From 354b9cc8972bf9e256a2b96c01941e59d68be30d Mon Sep 17 00:00:00 2001 From: Hwashiang Yu Date: Mon, 11 Nov 2019 11:24:41 -0600 Subject: [PATCH 001/307] MC-25175: Incorrect/Missed edits on templates/email-templates - Ported changes to 2.4-develop --- app/code/Magento/Directory/Block/Data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Directory/Block/Data.php b/app/code/Magento/Directory/Block/Data.php index 66c962d6656a6..5d94eacf9de96 100644 --- a/app/code/Magento/Directory/Block/Data.php +++ b/app/code/Magento/Directory/Block/Data.php @@ -142,7 +142,7 @@ public function getCountryHtmlSelect($defValue = null, $name = 'country_id', $id )->setId( $id )->setTitle( - __($title) + $this->escapeHtmlAttr(__($title)) )->setValue( $defValue )->setOptions( From 8c1168446f01c376b9a226b96ed64366143dabb8 Mon Sep 17 00:00:00 2001 From: Sachin Admane Date: Sun, 8 Dec 2019 14:22:32 -0600 Subject: [PATCH 002/307] MC-22963: Identify and Refactor GET requests which modify data. Refactor Search and Multishipping modules. Add integration for admin synonyms delete action. --- .../Multishipping/Controller/Checkout/RemoveItem.php | 9 ++++++++- .../view/frontend/templates/checkout/addresses.phtml | 6 +++++- .../Search/Controller/Adminhtml/Synonyms/Delete.php | 4 +++- .../Ui/Component/Listing/Column/SynonymActions.php | 4 +++- .../Controller/Adminhtml/Synonyms/DeleteTest.php | 10 ++++++++++ .../testsuite/Magento/Search/_files/synonym_group.php | 1 + 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php create mode 100644 dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php diff --git a/app/code/Magento/Multishipping/Controller/Checkout/RemoveItem.php b/app/code/Magento/Multishipping/Controller/Checkout/RemoveItem.php index 1bb333faaf2e4..d6d8ec9de0d58 100644 --- a/app/code/Magento/Multishipping/Controller/Checkout/RemoveItem.php +++ b/app/code/Magento/Multishipping/Controller/Checkout/RemoveItem.php @@ -6,7 +6,14 @@ */ namespace Magento\Multishipping\Controller\Checkout; -class RemoveItem extends \Magento\Multishipping\Controller\Checkout +use Magento\Framework\App\Action\HttpPostActionInterface; + +/** + * Class RemoveItem + * + * Removes multishipping items + */ +class RemoveItem extends \Magento\Multishipping\Controller\Checkout implements HttpPostActionInterface { /** * Multishipping checkout remove item action diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml index 418efa5033263..375a42793c2a5 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml @@ -86,8 +86,12 @@ - escapeHtml(__('Remove item')) ?> diff --git a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php index 9d8b612cefadf..06d15d4d7124e 100644 --- a/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php +++ b/app/code/Magento/Search/Controller/Adminhtml/Synonyms/Delete.php @@ -6,10 +6,12 @@ namespace Magento\Search\Controller\Adminhtml\Synonyms; +use Magento\Framework\App\Action\HttpPostActionInterface; + /** * Delete Controller */ -class Delete extends \Magento\Backend\App\Action +class Delete extends \Magento\Backend\App\Action implements HttpPostActionInterface { /** * Authorization level of a basic admin session diff --git a/app/code/Magento/Search/Ui/Component/Listing/Column/SynonymActions.php b/app/code/Magento/Search/Ui/Component/Listing/Column/SynonymActions.php index f42ce50d2804b..5cf02c725739d 100644 --- a/app/code/Magento/Search/Ui/Component/Listing/Column/SynonymActions.php +++ b/app/code/Magento/Search/Ui/Component/Listing/Column/SynonymActions.php @@ -64,7 +64,9 @@ public function prepareDataSource(array $dataSource) 'title' => __('Delete'), 'message' => __('Are you sure you want to delete synonym group with id: %1?', $item['group_id']) ], - '__disableTmpl' => true + '__disableTmpl' => true, + + 'post'=>true ]; $item[$name]['edit'] = [ 'href' => $this->urlBuilder->getUrl(self::SYNONYM_URL_PATH_EDIT, ['group_id' => $item['group_id']]), diff --git a/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php new file mode 100644 index 0000000000000..ce5e59778cd68 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php @@ -0,0 +1,10 @@ + Date: Sun, 8 Dec 2019 14:40:13 -0600 Subject: [PATCH 003/307] MC-22963: Identify and Refactor GET requests which modify data. Added new line in Synonyms/DeleteTest Added new fixture file --- .../Adminhtml/Synonyms/DeleteTest.php | 58 ++++++++++++++++++- .../Magento/Search/_files/synonym_group.php | 19 ++++++ 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php index ce5e59778cd68..39624a725ad72 100644 --- a/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php +++ b/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php @@ -1,10 +1,62 @@ gettestFixture(); + $this->getRequest()->setMethod(HttpRequest::METHOD_POST); + $this->getRequest()->setPostValue(['group_id' => $synonymGroupModel->getGroupId()]); + $this->dispatch('backend/search/synonyms/delete'); + $this->assertSessionMessages($this->equalTo([(string)__('The synonym group has been deleted.')])); + } + + /** + * Test execute with no params + * + * @return void + */ + public function testExecuteNoId(): void + { + $this->getRequest()->setMethod(HttpRequest::METHOD_POST); + $this->dispatch('backend/search/synonyms/delete'); + $this->assertSessionMessages($this->equalTo([(string)__('We can't find a synonym group to delete.')])); + } + + /** + * Gets synonym group Fixture. + * + * @return SynonymGroup + */ + private function gettestFixture(): SynonymGroup + { + /** @var Collection */ + $synonymGroupCollection = Bootstrap::getObjectManager()->get(Collection::class); + return $synonymGroupCollection->getLastItem(); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php b/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php index b3d9bbc7f3711..3eb10ffda0f85 100644 --- a/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php +++ b/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php @@ -1 +1,20 @@ create(SynonymGroupInterface::class); +$synonymGroupRepository=$objectManager->create(SynonymGroupRepository::class); +$synonymsGroupModel->setStoreId(Magento\Store\Model\Store::DEFAULT_STORE_ID) + ->setSynonymGroup('a,b,c') + ->setWebsiteId(0); + +$synonymGroupRepository->save($synonymsGroupModel); From a93e89dbe69c6a8d7af42a2e29cb41041155f1fa Mon Sep 17 00:00:00 2001 From: Sachin Admane Date: Mon, 9 Dec 2019 20:59:19 -0600 Subject: [PATCH 004/307] MC-22963: Identify and Refactor GET requests which modify data. Added rollback for fixture. Fix integration test. --- .../Model/ResourceModel/SynonymGroupTest.php | 18 +++++++++++++++--- .../Magento/Search/_files/synonym_group.php | 4 +--- .../Search/_files/synonym_group_rollback.php | 17 +++++++++++++++++ 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 dev/tests/integration/testsuite/Magento/Search/_files/synonym_group_rollback.php diff --git a/dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/SynonymGroupTest.php b/dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/SynonymGroupTest.php index 73f3424eab53c..78b57ab6bcc37 100644 --- a/dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/SynonymGroupTest.php +++ b/dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/SynonymGroupTest.php @@ -5,8 +5,16 @@ */ namespace Magento\Search\Model\ResourceModel; +/** + * Test for class \Magento\Search\Model\ResourceModel\SynonymGroup + */ class SynonymGroupTest extends \PHPUnit\Framework\TestCase { + /** + * Test Get By Scope + * + * @return void + */ public function testGetByScope() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); @@ -16,32 +24,36 @@ public function testGetByScope() $synonymGroupModel1->setStoreId(0); $synonymGroupModel1->setSynonymGroup('a,b,c'); $synonymGroupModel1->save(); + $group1 = $synonymGroupModel1->getGroupId(); /** @var \Magento\Search\Model\SynonymGroup $synonymGroupModel2 */ $synonymGroupModel2 = $objectManager->create(\Magento\Search\Model\SynonymGroup::class); $synonymGroupModel2->setWebsiteId(0); $synonymGroupModel2->setStoreId(1); $synonymGroupModel2->setSynonymGroup('d,e,f'); $synonymGroupModel2->save(); + $group2 = $synonymGroupModel2->getGroupId(); /** @var \Magento\Search\Model\SynonymGroup $synonymGroupModel3 */ $synonymGroupModel3 = $objectManager->create(\Magento\Search\Model\SynonymGroup::class); $synonymGroupModel3->setWebsiteId(1); $synonymGroupModel3->setStoreId(0); $synonymGroupModel3->setSynonymGroup('g,h,i'); $synonymGroupModel3->save(); + $group3 = $synonymGroupModel3->getGroupId(); /** @var \Magento\Search\Model\SynonymGroup $synonymGroupModel4 */ $synonymGroupModel4 = $objectManager->create(\Magento\Search\Model\SynonymGroup::class); $synonymGroupModel4->setWebsiteId(0); $synonymGroupModel4->setStoreId(0); $synonymGroupModel4->setSynonymGroup('d,e,f'); $synonymGroupModel4->save(); + $group4 = $synonymGroupModel4->getGroupId(); /** @var \Magento\Search\Model\ResourceModel\SynonymGroup $resourceModel */ $resourceModel = $objectManager->create(\Magento\Search\Model\ResourceModel\SynonymGroup::class); $this->assertEquals( - [['group_id' => 1, 'synonyms' => 'a,b,c'], ['group_id' => 4, 'synonyms' => 'd,e,f']], + [['group_id' => $group1, 'synonyms' => 'a,b,c'], ['group_id' => $group4, 'synonyms' => 'd,e,f']], $resourceModel->getByScope(0, 0) ); - $this->assertEquals([['group_id' => 2, 'synonyms' => 'd,e,f']], $resourceModel->getByScope(0, 1)); - $this->assertEquals([['group_id' => 3, 'synonyms' => 'g,h,i']], $resourceModel->getByScope(1, 0)); + $this->assertEquals([['group_id' => $group2, 'synonyms' => 'd,e,f']], $resourceModel->getByScope(0, 1)); + $this->assertEquals([['group_id' => $group3, 'synonyms' => 'g,h,i']], $resourceModel->getByScope(1, 0)); } } diff --git a/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php b/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php index 3eb10ffda0f85..d66a3a84ec13d 100644 --- a/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php +++ b/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group.php @@ -13,8 +13,6 @@ $synonymsGroupModel = $objectManager->create(SynonymGroupInterface::class); $synonymGroupRepository=$objectManager->create(SynonymGroupRepository::class); -$synonymsGroupModel->setStoreId(Magento\Store\Model\Store::DEFAULT_STORE_ID) - ->setSynonymGroup('a,b,c') - ->setWebsiteId(0); +$synonymsGroupModel->setStoreId(Magento\Store\Model\Store::DEFAULT_STORE_ID)->setStoreId(0)->setWebsiteId(0); $synonymGroupRepository->save($synonymsGroupModel); diff --git a/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group_rollback.php b/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group_rollback.php new file mode 100644 index 0000000000000..47027dcc54404 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Search/_files/synonym_group_rollback.php @@ -0,0 +1,17 @@ +get(Collection::class)->getLastItem(); + +$synonymGroupRepository=$objectManager->create(SynonymGroupRepository::class); +$synonymGroupRepository->delete($synonymGroupModel); From f6d2c9a7946f276303f5d275b0f2b1c4deea0611 Mon Sep 17 00:00:00 2001 From: OlgaVasyltsun Date: Thu, 19 Dec 2019 09:40:52 +0200 Subject: [PATCH 005/307] MC-29623: Improve Jwt Management --- app/code/Magento/CardinalCommerce/Model/JwtManagement.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/CardinalCommerce/Model/JwtManagement.php b/app/code/Magento/CardinalCommerce/Model/JwtManagement.php index 953af1751fd65..076e122e8e819 100644 --- a/app/code/Magento/CardinalCommerce/Model/JwtManagement.php +++ b/app/code/Magento/CardinalCommerce/Model/JwtManagement.php @@ -8,6 +8,7 @@ namespace Magento\CardinalCommerce\Model; use Magento\Framework\Serialize\Serializer\Json; +use Magento\Framework\Encryption\Helper\Security; /** * JSON Web Token management. @@ -62,7 +63,8 @@ public function decode(string $jwt, string $key): array $payload = $this->json->unserialize($payloadJson); $signature = $this->urlSafeB64Decode($signatureB64); - if ($signature !== $this->sign($headB64 . '.' . $payloadB64, $key, $header['alg'])) { + + if (!Security::compareStrings($signature, $this->sign($headB64 . '.' . $payloadB64, $key, $header['alg']))) { throw new \InvalidArgumentException('JWT signature verification failed'); } From fcde97f38d11090e6399afa0ff35fa871a31b9fa Mon Sep 17 00:00:00 2001 From: Viktor Sevch Date: Fri, 20 Dec 2019 09:18:32 +0200 Subject: [PATCH 006/307] MC-29467: File upload changes --- nginx.conf.sample | 7 ++++++- pub/media/custom_options/.htaccess | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 pub/media/custom_options/.htaccess diff --git a/nginx.conf.sample b/nginx.conf.sample index 9219400f6aacd..b937021a399f3 100644 --- a/nginx.conf.sample +++ b/nginx.conf.sample @@ -93,7 +93,7 @@ location / { } location /pub/ { - location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) { + location ~ ^/pub/media/(downloadable|customer|import|custom_options|theme_customization/.*\.xml) { deny all; } alias $MAGE_ROOT/pub/; @@ -166,6 +166,11 @@ location /media/downloadable/ { location /media/import/ { deny all; } + +location /media/custom_options/ { + deny all; +} + location /errors/ { location ~* \.xml$ { deny all; diff --git a/pub/media/custom_options/.htaccess b/pub/media/custom_options/.htaccess new file mode 100644 index 0000000000000..87cd9785472ac --- /dev/null +++ b/pub/media/custom_options/.htaccess @@ -0,0 +1,7 @@ + + order deny,allow + deny from all + += 2.4> + Require all denied + From 31684a1a9956309b82c6cc57462ccf9a9dda199d Mon Sep 17 00:00:00 2001 From: Viktor Sevch Date: Fri, 20 Dec 2019 10:38:25 +0200 Subject: [PATCH 007/307] MC-29455: Removal of SID in Magento Staging preview view --- .../Magento/Catalog/Block/Product/ListProduct.php | 15 +++++++-------- .../Test/Unit/Block/Product/ListProductTest.php | 2 +- .../frontend/templates/js/customer-data.phtml | 11 ++++++++--- .../Review/view/frontend/templates/review.phtml | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php index 144cb682e2d22..13706cbd88be2 100644 --- a/app/code/Magento/Catalog/Block/Product/ListProduct.php +++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php @@ -346,17 +346,16 @@ public function getIdentities() $category = $this->getLayer()->getCurrentCategory(); if ($category) { - $identities[] = Product::CACHE_PRODUCT_CATEGORY_TAG . '_' . $category->getId(); + $identities[] = [Product::CACHE_PRODUCT_CATEGORY_TAG . '_' . $category->getId()]; } //Check if category page shows only static block (No products) - if ($category->getData('display_mode') == Category::DM_PAGE) { - return $identities; - } - - foreach ($this->_getProductCollection() as $item) { - $identities = array_merge($identities, $item->getIdentities()); + if ($category->getData('display_mode') != Category::DM_PAGE) { + foreach ($this->_getProductCollection() as $item) { + $identities[] = $item->getIdentities(); + } } + $identities = array_merge(...$identities); return $identities; } @@ -369,7 +368,7 @@ public function getIdentities() */ public function getAddToCartPostParams(Product $product) { - $url = $this->getAddToCartUrl($product); + $url = $this->getAddToCartUrl($product, ['_escape' => false]); return [ 'action' => $url, 'data' => [ diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/ListProductTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/ListProductTest.php index fe07f69e8046f..c53168b7bf7c3 100644 --- a/app/code/Magento/Catalog/Test/Unit/Block/Product/ListProductTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/ListProductTest.php @@ -217,7 +217,7 @@ public function testGetAddToCartPostParams() ->will($this->returnValue(true)); $this->cartHelperMock->expects($this->any()) ->method('getAddUrl') - ->with($this->equalTo($this->productMock), $this->equalTo([])) + ->with($this->equalTo($this->productMock), $this->equalTo(['_escape' => false])) ->will($this->returnValue($url)); $this->productMock->expects($this->once()) ->method('getEntityId') diff --git a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml index a1a784076bac3..eb50ea6454788 100644 --- a/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml +++ b/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml @@ -5,16 +5,21 @@ */ /** @var \Magento\Customer\Block\CustomerData $block */ + +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper ?> ', + expected: 'Some test text in span tag text in strong tag ' + + '' + + 'Click herealert(1)', + allowedTags: ['a', 'span'] + }, + 'text with html comment': { + data: 'Only 2 in stock ', + expected: 'Only 2 in stock ', + allowedTags: ['span', 'b'] + }, + 'text with multi-line html comment': { + data: 'Only 2 in stock ', + expected: 'Only 2 in stock ', + allowedTags: ['span', 'b'] + }, + 'text with non ascii characters': { + data: 'абвгдمثال幸福', + expected: 'абвгдمثال幸福', + allowedTags: [] + }, + 'html and body tags': { + data: 'String', + expected: 'String', + allowedTags: ['span'] + }, + 'invalid tag': { + data: ' some text', + expected: ' some text', + allowedTags: ['span'] + }, + 'text with allowed script tag': { + data: '', + expected: 'some text in tags', + allowedTags: ['span', 'script'] + }, + 'text with invalid html': { + data: 'n id="id1">Some string', + expected: 'n id="id1">Some string', + allowedTags: ['span'] + } + }; + } + + describe('Magento_Security/js/escaper', function () { + describe('escapeHtml', function () { + var data = escapeHtmlDataProvider(), + scenarioName, + testData; + + for (scenarioName in data) { // eslint-disable-line guard-for-in + testData = data[scenarioName]; + + (function (dataSet) { // eslint-disable-line no-loop-func + /* + * Change to "it" instead of "xit" to run the tests. + * These are skipped due to PhantomJS not supporting DOMParser. The limitations of this ancient + * testing framework were not considered a limitation for a cross-browser solution of the escaper + * and the compromise was these tests won't be run automatically. Jasmine will generate + * _SpecRunner.html which can be loaded in a real browser to execute the tests when they need to be + * run. Regarding risk, this escaper doesn't have any external dependencies so it's very unlikely + * it will break unless modified directly. And in the event it's modified, run the tests in real + * supported browsers before merging. + */ + xit(scenarioName, function () { + expect(escaper.escapeHtml(dataSet.data, dataSet.allowedTags)).toEqual(dataSet.expected); + }); + })(testData); + } + }); + }); +}); diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index dd7a780af09fe..6af03a868cc49 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -41,7 +41,12 @@ class Escaper /** * @var string[] */ - private $allowedAttributes = ['id', 'class', 'href', 'target', 'title', 'style']; + private $allowedAttributes = ['id', 'class', 'href', 'title', 'style']; + + /** + * @var array + */ + private $notAllowedAttributes = ['a' => ['style']]; /** * @var string @@ -168,6 +173,16 @@ private function removeNotAllowedAttributes(\DOMDocument $domDocument) foreach ($nodes as $node) { $node->parentNode->removeAttribute($node->nodeName); } + + foreach ($this->notAllowedAttributes as $tag => $attributes) { + $nodes = $xpath->query( + '//@*[name() =\'' . implode('\' or name() = \'', $attributes) . '\']' + . '[parent::node()[name() = \'' . $tag . '\']]' + ); + foreach ($nodes as $node) { + $node->parentNode->removeAttribute($node->nodeName); + } + } } /** diff --git a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php index cde91cbda4891..581053a9823b1 100644 --- a/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/EscaperTest.php @@ -230,10 +230,12 @@ public function escapeHtmlDataProvider() 'allowedTags' => ['a'], ], 'text with allowed and not allowed tags, with allowed and not allowed attributes' => [ - 'data' => 'Some test text in span tag text in strong tag ' - . 'Click here', - 'expected' => 'Some test text in span tag text in strong tag ' + 'expected' => 'Some test text in span tag text in strong tag ' + . '' . 'Click herealert(1)', 'allowedTags' => ['a', 'span'], ], diff --git a/lib/internal/Magento/Framework/View/Element/Message/InterpretationMediator.php b/lib/internal/Magento/Framework/View/Element/Message/InterpretationMediator.php index eb4312e523b45..306cf89c0bb01 100644 --- a/lib/internal/Magento/Framework/View/Element/Message/InterpretationMediator.php +++ b/lib/internal/Magento/Framework/View/Element/Message/InterpretationMediator.php @@ -3,10 +3,15 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\Framework\View\Element\Message; use Magento\Framework\Message\MessageInterface; +/** + * Can try and interpret a given message or fall back to the message text if not possible + */ class InterpretationMediator implements InterpretationStrategyInterface { /** @@ -34,8 +39,8 @@ public function interpret(MessageInterface $message) if ($message->getIdentifier()) { try { return $this->interpretationStrategy->interpret($message); + // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch } catch (\LogicException $e) { - // pass } } From e8ecc493e3ff81f7daf2f3bfc2d4c6861318e629 Mon Sep 17 00:00:00 2001 From: "rostyslav.hymon" Date: Mon, 13 Jan 2020 11:29:28 +0200 Subject: [PATCH 013/307] MC-29736: Minor changes ui render --- app/code/Magento/Ui/Controller/Index/Render.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Ui/Controller/Index/Render.php b/app/code/Magento/Ui/Controller/Index/Render.php index faab203547064..64c950d50c308 100644 --- a/app/code/Magento/Ui/Controller/Index/Render.php +++ b/app/code/Magento/Ui/Controller/Index/Render.php @@ -92,11 +92,8 @@ public function __construct( public function execute() { if ($this->_request->getParam('namespace') === null) { - $this->_redirect('admin/noroute'); - - return; + return $this->_redirect('noroute'); } - try { $component = $this->uiComponentFactory->create($this->getRequest()->getParam('namespace')); if ($this->validateAclResource($component->getContext()->getDataProvider()->getConfigData())) { @@ -105,6 +102,7 @@ public function execute() $contentType = $this->contentTypeResolver->resolve($component->getContext()); $this->getResponse()->setHeader('Content-Type', $contentType, true); + return $this->getResponse(); } else { /** @var \Magento\Framework\Controller\Result\Json $resultJson */ $resultJson = $this->resultJsonFactory->create(); From 3768575ff4e1c1af47e4b844786e9d88b6895c0a Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Mon, 13 Jan 2020 09:55:20 -0600 Subject: [PATCH 014/307] MC-25219: Update messages mechanism --- app/code/Magento/Security/view/base/web/js/escaper.js | 9 +++++++-- .../Magento/Security/view/base/web/js/escaper.test.js | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Security/view/base/web/js/escaper.js b/app/code/Magento/Security/view/base/web/js/escaper.js index 98769e378ea14..dc1c896ad6836 100644 --- a/app/code/Magento/Security/view/base/web/js/escaper.js +++ b/app/code/Magento/Security/view/base/web/js/escaper.js @@ -85,11 +85,16 @@ define([], function () { return NodeFilter.FILTER_ACCEPT; }, false - ); + ), + nodesToRemove = []; while (treeWalker.nextNode()) { - treeWalker.currentNode.parentNode.removeChild(treeWalker.currentNode); + nodesToRemove.push(treeWalker.currentNode); } + + nodesToRemove.forEach(function (nodeToRemove) { + nodeToRemove.parentNode.removeChild(nodeToRemove); + }); }, /** diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Security/view/base/web/js/escaper.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Security/view/base/web/js/escaper.test.js index 661b3f45ea528..f8fa6bc70435f 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Security/view/base/web/js/escaper.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Security/view/base/web/js/escaper.test.js @@ -97,6 +97,11 @@ define([ expected: 'Only 2 in stock ', allowedTags: ['span', 'b'] }, + 'text with multiple comments': { + data: 'Only 2 in stock ', + expected: 'Only 2 in stock ', + allowedTags: ['span', 'b'] + }, 'text with multi-line html comment': { data: 'Only 2 in stock ', expected: 'Only 2 in stock ', From 7c35aede8fb732e6063d81144a5e2260e7293310 Mon Sep 17 00:00:00 2001 From: Mark Berube Date: Wed, 15 Jan 2020 14:39:38 -0600 Subject: [PATCH 015/307] MC-30416: Validating AreaList's FrontEndName argument --- lib/internal/Magento/Framework/App/AreaList.php | 5 ++++- .../Framework/App/Test/Unit/AreaListTest.php | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/AreaList.php b/lib/internal/Magento/Framework/App/AreaList.php index fb28d09d5fe09..3257307eb6cdd 100644 --- a/lib/internal/Magento/Framework/App/AreaList.php +++ b/lib/internal/Magento/Framework/App/AreaList.php @@ -7,6 +7,9 @@ */ namespace Magento\Framework\App; +/** + * Lists router area codes & processes resolves FrontEndNames to area codes + */ class AreaList { /** @@ -72,7 +75,7 @@ public function getCodeByFrontName($frontName) $resolver = $this->_resolverFactory->create($areaInfo['frontNameResolver']); $areaInfo['frontName'] = $resolver->getFrontName(true); } - if ($areaInfo['frontName'] == $frontName) { + if ($areaInfo['frontName'] === $frontName) { return $areaCode; } } diff --git a/lib/internal/Magento/Framework/App/Test/Unit/AreaListTest.php b/lib/internal/Magento/Framework/App/Test/Unit/AreaListTest.php index 8688cc3fcb2e9..e0fbb0e8b64e7 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/AreaListTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/AreaListTest.php @@ -100,6 +100,19 @@ public function testGetFrontNameWhenAreaCodeAndFrontNameArentSet() $this->assertSame('test', $model->getArea($code)); } + public function testGetFrontNameWhenFrontNameIsInvalid() : void + { + $this->_model = new AreaList( + $this->objectManagerMock, + $this->_resolverFactory, + [ + 'testAreaCode' => [] + ] + ); + + $this->assertNull($this->_model->getFrontName('0')); + } + public function testGetCodes() { $areas = ['area1' => 'value1', 'area2' => 'value2']; From 30741f6aa83e9904c62c928f8f7994d63f04b94b Mon Sep 17 00:00:00 2001 From: Serhii Voloshkov Date: Wed, 29 Jan 2020 11:39:23 +0200 Subject: [PATCH 016/307] MC-30845: Fix error message rendering --- .../Controller/Sidebar/RemoveItem.php | 13 +++++- .../Controller/Sidebar/RemoveItemTest.php | 46 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php b/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php index f589e702de950..e0c7f34a4c7d0 100644 --- a/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php +++ b/app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php @@ -7,6 +7,9 @@ use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; +/** + * Controller for removing quote item from shopping cart. + */ class RemoveItem extends \Magento\Framework\App\Action\Action implements HttpPostActionInterface { /** @@ -56,7 +59,7 @@ public function __construct( } /** - * @return $this + * @inheritdoc */ public function execute() { @@ -67,11 +70,17 @@ public function execute() try { $this->sidebar->checkQuoteItem($itemId); $this->sidebar->removeQuoteItem($itemId); + return $this->jsonResponse(); } catch (\Magento\Framework\Exception\LocalizedException $e) { return $this->jsonResponse($e->getMessage()); + } catch (\Zend_Db_Exception $e) { + $this->logger->critical($e); + + return $this->jsonResponse(__('An unspecified error occurred. Please contact us for assistance.')); } catch (\Exception $e) { $this->logger->critical($e); + return $this->jsonResponse($e->getMessage()); } } @@ -92,6 +101,8 @@ protected function jsonResponse($error = '') } /** + * Return formKey Validator object instance. + * * @return \Magento\Framework\Data\Form\FormKey\Validator * @deprecated 100.0.9 */ diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php index 7653a51b2f9b7..50f5c0ba42986 100644 --- a/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php @@ -234,6 +234,52 @@ public function testExecuteWithException() $this->assertEquals('json represented', $this->removeItem->execute()); } + /** + * Test controller when DB exception is thrown. + * + * @return void + */ + public function testExecuteWithDbException(): void + { + $itemId = 1; + $dbError = 'Error'; + $message = __('An unspecified error occurred. Please contact us for assistance.'); + $response = [ + 'success' => false, + 'error_message' => $message, + ]; + + $this->getPropertyValue($this->removeItem, 'formKeyValidator') + ->expects($this->once()) + ->method('validate') + ->with($this->requestMock) + ->willReturn(true); + $this->requestMock->expects($this->once())->method('getParam')->with('item_id')->willReturn($itemId); + + $exception = new \Zend_Db_Exception($dbError); + + $this->sidebarMock->expects($this->once()) + ->method('checkQuoteItem') + ->with($itemId) + ->willThrowException($exception); + + $this->loggerMock->expects($this->once())->method('critical')->with($exception); + + $this->sidebarMock->expects($this->once())->method('getResponseData')->with($message)->willReturn($response); + $encodedResponse = json_encode($response); + $this->jsonHelperMock->expects($this->once()) + ->method('jsonEncode') + ->with($response) + ->willReturn($encodedResponse); + + $this->responseMock->expects($this->once()) + ->method('representJson') + ->with($encodedResponse) + ->willReturn($this->responseMock); + + $this->removeItem->execute(); + } + public function testExecuteWhenFormKeyValidationFailed() { $resultRedirect = $this->createMock(\Magento\Framework\Controller\Result\Redirect::class); From 1e217f392f942d7d8e0b174ebf8a89bd4a21105b Mon Sep 17 00:00:00 2001 From: OlgaVasyltsun Date: Wed, 5 Feb 2020 14:10:18 +0200 Subject: [PATCH 017/307] MC-30942: Improve Newsletter Queue --- .../Magento/Newsletter/Block/Adminhtml/Queue/Preview.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php index dd6f51a5342f2..69512775f4e93 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Preview.php @@ -26,8 +26,8 @@ class Preview extends \Magento\Newsletter\Block\Adminhtml\Template\Preview /** * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Newsletter\Model\TemplateFactory $templateFactory - * @param \Magento\Newsletter\Model\QueueFactory $queueFactory * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory + * @param \Magento\Newsletter\Model\QueueFactory $queueFactory * @param array $data */ public function __construct( @@ -42,6 +42,8 @@ public function __construct( } /** + * Return template. + * * @param \Magento\Newsletter\Model\Template $template * @param string $id * @return $this @@ -50,9 +52,11 @@ protected function loadTemplate(\Magento\Newsletter\Model\Template $template, $i { /** @var \Magento\Newsletter\Model\Queue $queue */ $queue = $this->_queueFactory->create()->load($id); + $template->setId($queue->getTemplateId()); $template->setTemplateType($queue->getNewsletterType()); $template->setTemplateText($queue->getNewsletterText()); $template->setTemplateStyles($queue->getNewsletterStyles()); + return $this; } } From 3347656e5431122e09114fa868ed8af0c4848b5e Mon Sep 17 00:00:00 2001 From: OlgaVasyltsun Date: Thu, 6 Feb 2020 14:51:25 +0200 Subject: [PATCH 018/307] MC-30942: Improve Newsletter Queue --- .../Block/Adminhtml/Queue/PreviewTest.php | 72 +++++++++++++------ 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php b/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php index b64453594df41..19e0f4704a379 100644 --- a/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php +++ b/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php @@ -49,18 +49,18 @@ protected function setUp() { $context = $this->createMock(\Magento\Backend\Block\Template\Context::class); $eventManager = $this->createMock(\Magento\Framework\Event\ManagerInterface::class); - $context->expects($this->once())->method('getEventManager')->will($this->returnValue($eventManager)); + $context->expects($this->once())->method('getEventManager')->willReturn($eventManager); $scopeConfig = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class); - $context->expects($this->once())->method('getScopeConfig')->will($this->returnValue($scopeConfig)); + $context->expects($this->once())->method('getScopeConfig')->willReturn($scopeConfig); $this->request = $this->createMock(\Magento\Framework\App\Request\Http::class); - $context->expects($this->once())->method('getRequest')->will($this->returnValue($this->request)); + $context->expects($this->once())->method('getRequest')->willReturn($this->request); $this->storeManager = $this->createPartialMock( \Magento\Store\Model\StoreManager::class, ['getStores', 'getDefaultStoreView'] ); - $context->expects($this->once())->method('getStoreManager')->will($this->returnValue($this->storeManager)); + $context->expects($this->once())->method('getStoreManager')->willReturn($this->storeManager); $appState = $this->createMock(\Magento\Framework\App\State::class); - $context->expects($this->once())->method('getAppState')->will($this->returnValue($appState)); + $context->expects($this->once())->method('getAppState')->willReturn($appState); $backendSession = $this->getMockBuilder(\Magento\Backend\Model\Session::class) ->disableOriginalConstructor() @@ -69,16 +69,34 @@ protected function setUp() $context->expects($this->once())->method('getBackendSession')->willReturn($backendSession); $templateFactory = $this->createPartialMock(\Magento\Newsletter\Model\TemplateFactory::class, ['create']); - $this->template = $this->createMock(\Magento\Newsletter\Model\Template::class); - $templateFactory->expects($this->once())->method('create')->will($this->returnValue($this->template)); + $this->template = $this->createPartialMock( + \Magento\Newsletter\Model\Template::class, + [ + 'isPlain', + 'setId', + 'setTemplateType', + 'setTemplateText', + 'setTemplateStyles', + ] + ); + $templateFactory->expects($this->once())->method('create')->willReturn($this->template); $subscriberFactory = $this->createPartialMock(\Magento\Newsletter\Model\SubscriberFactory::class, ['create']); $this->subscriber = $this->createMock(\Magento\Newsletter\Model\Subscriber::class); - $subscriberFactory->expects($this->once())->method('create')->will($this->returnValue($this->subscriber)); + $subscriberFactory->expects($this->once())->method('create')->willReturn($this->subscriber); $queueFactory = $this->createPartialMock(\Magento\Newsletter\Model\QueueFactory::class, ['create']); - $this->queue = $this->createPartialMock(\Magento\Newsletter\Model\Queue::class, ['load']); - $queueFactory->expects($this->any())->method('create')->will($this->returnValue($this->queue)); + $this->queue = $this->createPartialMock( + \Magento\Newsletter\Model\Queue::class, + [ + 'load', + 'getTemplateId', + 'getNewsletterType', + 'getNewsletterText', + 'getNewsletterStyles', + ] + ); + $queueFactory->expects($this->any())->method('create')->willReturn($this->queue); $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); @@ -100,27 +118,37 @@ public function testToHtmlEmpty() { /** @var \Magento\Store\Model\Store $store */ $store = $this->createPartialMock(\Magento\Store\Model\Store::class, ['getId']); - $this->storeManager->expects($this->once())->method('getDefaultStoreView')->will($this->returnValue($store)); + $this->storeManager->expects($this->once())->method('getDefaultStoreView')->willReturn($store); $result = $this->preview->toHtml(); $this->assertEquals('', $result); } public function testToHtmlWithId() { - $this->request->expects($this->any())->method('getParam')->will( - $this->returnValueMap( - [ - ['id', null, 1], - ['store_id', null, 0] - ] - ) + $templateId = 1; + $newsletterType = 2; + $newsletterText = 'newsletter text'; + $newsletterStyle = 'style'; + $this->request->expects($this->any())->method('getParam')->willReturnMap( + [ + ['id', null, 1], + ['store_id', null, 0], + ] ); - $this->queue->expects($this->once())->method('load')->will($this->returnSelf()); - $this->template->expects($this->any())->method('isPlain')->will($this->returnValue(true)); + $this->queue->expects($this->once())->method('load')->willReturnSelf(); + $this->queue->expects($this->once())->method('getTemplateId')->willReturn($templateId); + $this->queue->expects($this->once())->method('getNewsletterType')->willReturn($newsletterType); + $this->queue->expects($this->once())->method('getNewsletterText')->willReturn($newsletterText); + $this->queue->expects($this->once())->method('getNewsletterStyles')->willReturn($newsletterStyle); + $this->template->expects($this->any())->method('isPlain')->willReturn(true); + $this->template->expects($this->once())->method('setId')->willReturn($templateId); + $this->template->expects($this->once())->method('setTemplateType')->willReturn($newsletterType); + $this->template->expects($this->once())->method('setTemplateText')->willReturn($newsletterText); + $this->template->expects($this->once())->method('setTemplateStyles')->willReturn($newsletterStyle); /** @var \Magento\Store\Model\Store $store */ - $this->storeManager->expects($this->once())->method('getDefaultStoreView')->will($this->returnValue(null)); + $this->storeManager->expects($this->once())->method('getDefaultStoreView')->willReturn(null); $store = $this->createPartialMock(\Magento\Store\Model\Store::class, ['getId']); - $this->storeManager->expects($this->once())->method('getStores')->will($this->returnValue([0 => $store])); + $this->storeManager->expects($this->once())->method('getStores')->willReturn([0 => $store]); $result = $this->preview->toHtml(); $this->assertEquals('
', $result);
     }

From 045f7f2168b9e3597df0628de3280686483a6008 Mon Sep 17 00:00:00 2001
From: Viktor Sevch 
Date: Mon, 10 Feb 2020 10:10:14 +0200
Subject: [PATCH 019/307] MC-30946: Improve legacy email template

---
 .../Framework/Filter/VariableResolver/LegacyResolver.php        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php b/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
index 179f36e1683d1..a46dc64ed0b5b 100644
--- a/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
+++ b/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
@@ -160,7 +160,7 @@ private function handleObjectMethod(Template $filter, array $templateVariables,
     {
         $object = $stackArgs[$i - 1]['variable'];
         $method = $stackArgs[$i]['name'];
-        if (method_exists($object, $method)) {
+        if (method_exists($object, $method) && substr($method, 0, 3) !== 'set') {
             $args = $this->getStackArgs($stackArgs[$i]['args'], $filter, $templateVariables);
             $stackArgs[$i]['variable'] = call_user_func_array([$object, $method], $args);
         }

From 7853ddc6101d454009d23830f1c1552193fb7c93 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Tue, 11 Feb 2020 14:14:04 -0600
Subject: [PATCH 020/307] MC-31362: Media folder update

- Fixed issues with folder deletion
- Fixed issue with image upload extensions
- Added test coverage for changes
---
 .../Adminhtml/Wysiwyg/Images/DeleteFolder.php |  7 ++-
 .../Theme/Model/Design/Backend/File.php       | 26 +++++++++--
 .../App/Filesystem/DirectoryResolverTest.php  | 46 +++++++++++++++++++
 .../App/Filesystem/DirectoryResolver.php      | 21 +++++++++
 4 files changed, 93 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
index 5344472a79a9d..b483da185a3ea 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
@@ -60,13 +60,16 @@ public function execute()
     {
         try {
             $path = $this->getStorage()->getCmsWysiwygImages()->getCurrentPath();
-            if (!$this->directoryResolver->validatePath($path, DirectoryList::MEDIA)) {
+            if (
+                !$this->directoryResolver->validatePath($path, DirectoryList::MEDIA)
+                || $this->directoryResolver->validateSamePath($path, DirectoryList::MEDIA)
+            ) {
                 throw new \Magento\Framework\Exception\LocalizedException(
                     __('Directory %1 is not under storage root path.', $path)
                 );
             }
             $this->getStorage()->deleteDirectory($path);
-            
+
             return $this->resultRawFactory->create();
         } catch (\Exception $e) {
             $result = ['error' => true, 'message' => $e->getMessage()];
diff --git a/app/code/Magento/Theme/Model/Design/Backend/File.php b/app/code/Magento/Theme/Model/Design/Backend/File.php
index 8f81ace8c9047..2fb90566e9ae7 100644
--- a/app/code/Magento/Theme/Model/Design/Backend/File.php
+++ b/app/code/Magento/Theme/Model/Design/Backend/File.php
@@ -6,8 +6,8 @@
 
 namespace Magento\Theme\Model\Design\Backend;
 
-use Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface;
 use Magento\Config\Model\Config\Backend\File as BackendFile;
+use Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface;
 use Magento\Framework\App\Cache\TypeListInterface;
 use Magento\Framework\App\Config\ScopeConfigInterface;
 use Magento\Framework\App\ObjectManager;
@@ -15,13 +15,14 @@
 use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\File\Mime;
 use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Io\File as IoFileSystem;
 use Magento\Framework\Model\Context;
 use Magento\Framework\Model\ResourceModel\AbstractResource;
 use Magento\Framework\Registry;
 use Magento\Framework\UrlInterface;
+use Magento\MediaStorage\Helper\File\Storage\Database;
 use Magento\MediaStorage\Model\File\UploaderFactory;
 use Magento\Theme\Model\Design\Config\FileUploader\FileProcessor;
-use Magento\MediaStorage\Helper\File\Storage\Database;
 
 /**
  * File Backend
@@ -45,6 +46,11 @@ class File extends BackendFile
      */
     private $databaseHelper;
 
+    /**
+     * @var IoFileSystem
+     */
+    private $ioFileSystem;
+
     /**
      * @param Context $context
      * @param Registry $registry
@@ -54,6 +60,7 @@ class File extends BackendFile
      * @param RequestDataInterface $requestData
      * @param Filesystem $filesystem
      * @param UrlInterface $urlBuilder
+     * @param IoFileSystem $ioFileSystem
      * @param AbstractResource|null $resource
      * @param AbstractDb|null $resourceCollection
      * @param array $data
@@ -69,6 +76,7 @@ public function __construct(
         RequestDataInterface $requestData,
         Filesystem $filesystem,
         UrlInterface $urlBuilder,
+        IoFileSystem $ioFileSystem,
         AbstractResource $resource = null,
         AbstractDb $resourceCollection = null,
         array $data = [],
@@ -86,6 +94,7 @@ public function __construct(
             $resourceCollection,
             $data
         );
+        $this->ioFileSystem = $ioFileSystem;
         $this->urlBuilder = $urlBuilder;
         $this->databaseHelper = $databaseHelper ?: ObjectManager::getInstance()->get(Database::class);
     }
@@ -108,11 +117,18 @@ public function beforeSave()
                 __('%1 does not contain field \'file\'', $this->getData('field_config/field'))
             );
         }
+
+        if (!in_array($this->ioFileSystem->getPathInfo(($file))['extension'], $this->getAllowedExtensions())) {
+            throw new LocalizedException(
+                __('Something is wrong with the file upload settings.')
+            );
+        }
+
         if (isset($value['exists'])) {
             $this->setValue($file);
             return $this;
         }
-      
+
         //phpcs:ignore Magento2.Functions.DiscouragedFunction
         $this->updateMediaDirectory(basename($file), $value['url']);
 
@@ -156,7 +172,7 @@ public function afterLoad()
      */
     public function getAllowedExtensions()
     {
-        return [];
+        return ['jpg', 'jpeg', 'gif', 'png'];
     }
 
     /**
@@ -196,7 +212,7 @@ protected function getStoreMediaUrl($fileName)
             $urlType = ['_type' => empty($baseUrl['type']) ? 'link' : (string)$baseUrl['type']];
             $baseUrl = $baseUrl['value'] . '/';
         }
-        return $this->urlBuilder->getBaseUrl($urlType) . $baseUrl  . $fileName;
+        return $this->urlBuilder->getBaseUrl($urlType) . $baseUrl . $fileName;
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php
index 90d8473032c69..b7f13112384df 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php
@@ -120,4 +120,50 @@ public function validatePathDataProvider()
             ],
         ];
     }
+
+    /**
+     * @param string $path
+     * @param string $directoryConfig
+     * @param bool $expectation
+     * @dataProvider validateSamePathDataProvider
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @magentoAppIsolation enabled
+     * @return void
+     */
+    public function testValidateSamePath($path, $directoryConfig, $expectation)
+    {
+        $directory = $this->filesystem
+            ->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
+        $path = $directory->getAbsolutePath() .'/' .$path;
+        $this->assertEquals($expectation, $this->directoryResolver->validateSamePath($path, $directoryConfig));
+    }
+
+    /**
+     * @return array
+     */
+    public function validateSamePathDataProvider()
+    {
+        return [
+            [
+                '/',
+                DirectoryList::MEDIA,
+                true,
+            ],
+            [
+                '/.',
+                DirectoryList::MEDIA,
+                true,
+            ],
+            [
+                '/../../pub/media/.',
+                DirectoryList::MEDIA,
+                true,
+            ],
+            [
+                '/../../pub/',
+                DirectoryList::MEDIA,
+                false,
+            ],
+        ];
+    }
 }
diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php
index 5ad3d888ffb57..ecdef2269522d 100644
--- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php
+++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php
@@ -55,4 +55,25 @@ public function validatePath($path, $directoryConfig = DirectoryList::MEDIA)
 
         return strpos($realPath, $root) === 0;
     }
+
+    /**
+     * Validate same path.
+     *
+     * Gets real path for directory provided in parameters and compares it with specified root directory.
+     * Will return TRUE if real path of provided value is root directory path and FALSE if not.
+     * Throws the \Magento\Framework\Exception\FileSystemException in case when directory path is absent
+     * in Directories configuration.
+     *
+     * @param string $path
+     * @param string $directoryConfig
+     * @return bool
+     * @throws \Magento\Framework\Exception\FileSystemException
+     */
+    public function validateSamePath($path, $directoryConfig = DirectoryList::MEDIA)
+    {
+        $root = $this->directoryList->getPath($directoryConfig);
+        $traverseRealPath = realpath($path);
+
+        return $root === $traverseRealPath;
+    }
 }

From 9d4fa81ef0857aa564c33160e6fe129ee06fbf09 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Tue, 11 Feb 2020 16:56:18 -0600
Subject: [PATCH 021/307] MC-31362: Media folder update

- Resolved unit test failures
---
 .../Theme/Model/Design/Backend/File.php       |  5 +-
 .../Unit/Model/Design/Backend/FileTest.php    | 54 +++++++++++++++++++
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Theme/Model/Design/Backend/File.php b/app/code/Magento/Theme/Model/Design/Backend/File.php
index 2fb90566e9ae7..dd102d7e27dc7 100644
--- a/app/code/Magento/Theme/Model/Design/Backend/File.php
+++ b/app/code/Magento/Theme/Model/Design/Backend/File.php
@@ -118,7 +118,10 @@ public function beforeSave()
             );
         }
 
-        if (!in_array($this->ioFileSystem->getPathInfo(($file))['extension'], $this->getAllowedExtensions())) {
+        if (
+            !isset($this->ioFileSystem->getPathInfo(($file))['extension']) ||
+            !in_array($this->ioFileSystem->getPathInfo(($file))['extension'], $this->getAllowedExtensions())
+        ) {
             throw new LocalizedException(
                 __('Something is wrong with the file upload settings.')
             );
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 91f176efbc7b9..1513ebf466f2a 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -8,6 +8,7 @@
 use Magento\Framework\UrlInterface;
 use Magento\Theme\Model\Design\Backend\File;
 use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem\Io\File as IoFileSystem;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -23,6 +24,9 @@ class FileTest extends \PHPUnit\Framework\TestCase
     /** @var File */
     protected $fileBackend;
 
+    /** @var IoFileSystem|\PHPUnit_Framework_MockObject_MockObject */
+    protected $ioFileSystem;
+
     /**
      * @var \Magento\Framework\File\Mime|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -56,6 +60,9 @@ public function setUp()
         $this->urlBuilder = $this->getMockBuilder(\Magento\Framework\UrlInterface::class)
             ->getMockForAbstractClass();
 
+        $this->ioFileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem\Io\File::class)
+            ->getMockForAbstractClass();
+
         $this->mime = $this->getMockBuilder(\Magento\Framework\File\Mime::class)
             ->disableOriginalConstructor()
             ->getMock();
@@ -80,6 +87,7 @@ public function setUp()
             $requestData,
             $filesystem,
             $this->urlBuilder,
+            $this->ioFileSystem,
             $abstractResource,
             $abstractDb,
             [],
@@ -240,6 +248,52 @@ public function beforeSaveDataProvider()
     {
         return [
             'Normal file name' => ['filename.jpg'],
+        ];
+    }
+
+    /**
+     * @dataProvider beforeSaveInvalidDataProvider
+     * @param string $fileName
+     *
+     * @expectedException \Magento\Framework\Exception\LocalizedException
+     * @expectedExceptionMessage Something is wrong with the file upload settings.
+     */
+    public function testBeforeSaveInvalidFile($fileName)
+    {
+        {
+            $expectedFileName = basename($fileName);
+            $expectedTmpMediaPath = 'tmp/design/file/' . $expectedFileName;
+            $this->fileBackend->setScope('store');
+            $this->fileBackend->setScopeId(1);
+            $this->fileBackend->setValue(
+                [
+                    [
+                        'url' => 'http://magento2.com/pub/media/tmp/image/' . $fileName,
+                        'file' => $fileName,
+                        'size' => 234234,
+                    ]
+                ]
+            );
+            $this->fileBackend->setFieldConfig(
+                [
+                    'upload_dir' => [
+                        'value' => 'value',
+                        'config' => 'system/filesystem/media',
+                    ],
+                ]
+            );
+
+            $this->fileBackend->beforeSave();
+        }
+    }
+
+    /**
+     * @return array
+     */
+    public function beforeSaveInvalidDataProvider()
+    {
+        return [
+            'Invalid Extension' => ['file.invalid'],
             'Vulnerable file name' => ['../../../../../../../../etc/passwd'],
         ];
     }

From e1124c114baeffce8a9ba2f333b7b88154c9ed91 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Tue, 11 Feb 2020 18:58:59 -0600
Subject: [PATCH 022/307] MC-31362: Media folder update

- Resolved static test failures
---
 .../Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php   | 3 +--
 app/code/Magento/Theme/Model/Design/Backend/File.php           | 3 +--
 .../Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php  | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
index b483da185a3ea..0e6c74b66a01d 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
@@ -60,8 +60,7 @@ public function execute()
     {
         try {
             $path = $this->getStorage()->getCmsWysiwygImages()->getCurrentPath();
-            if (
-                !$this->directoryResolver->validatePath($path, DirectoryList::MEDIA)
+            if (!$this->directoryResolver->validatePath($path, DirectoryList::MEDIA)
                 || $this->directoryResolver->validateSamePath($path, DirectoryList::MEDIA)
             ) {
                 throw new \Magento\Framework\Exception\LocalizedException(
diff --git a/app/code/Magento/Theme/Model/Design/Backend/File.php b/app/code/Magento/Theme/Model/Design/Backend/File.php
index dd102d7e27dc7..65b7182b9944b 100644
--- a/app/code/Magento/Theme/Model/Design/Backend/File.php
+++ b/app/code/Magento/Theme/Model/Design/Backend/File.php
@@ -118,8 +118,7 @@ public function beforeSave()
             );
         }
 
-        if (
-            !isset($this->ioFileSystem->getPathInfo(($file))['extension']) ||
+        if (!isset($this->ioFileSystem->getPathInfo(($file))['extension']) ||
             !in_array($this->ioFileSystem->getPathInfo(($file))['extension'], $this->getAllowedExtensions())
         ) {
             throw new LocalizedException(
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 1513ebf466f2a..49dc7de14f2cc 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -262,7 +262,6 @@ public function testBeforeSaveInvalidFile($fileName)
     {
         {
             $expectedFileName = basename($fileName);
-            $expectedTmpMediaPath = 'tmp/design/file/' . $expectedFileName;
             $this->fileBackend->setScope('store');
             $this->fileBackend->setScopeId(1);
             $this->fileBackend->setValue(

From 9009c5c69869e3f3c0f5a8503c62c81a963e34ff Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Wed, 12 Feb 2020 10:31:59 -0600
Subject: [PATCH 023/307] MC-31362: Media folder update

- Resolved static test failures
---
 .../Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php    | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 49dc7de14f2cc..75e58a356c670 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -261,7 +261,6 @@ public function beforeSaveDataProvider()
     public function testBeforeSaveInvalidFile($fileName)
     {
         {
-            $expectedFileName = basename($fileName);
             $this->fileBackend->setScope('store');
             $this->fileBackend->setScopeId(1);
             $this->fileBackend->setValue(

From 73dff292f88e2bd607a0ab140b266e3356342b5d Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov 
Date: Thu, 13 Feb 2020 15:52:40 +0200
Subject: [PATCH 024/307] MC-31363: Minor changes in product attribute save
 controller

---
 .../Catalog/Controller/Adminhtml/Product/Attribute/Save.php     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php
index 853cc65270306..dc77b130d225f 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php
@@ -221,7 +221,7 @@ public function execute()
                     return $this->returnResult('catalog/*/', [], ['error' => true]);
                 }
                 // entity type check
-                if ($model->getEntityTypeId() != $this->_entityTypeId) {
+                if ($model->getEntityTypeId() != $this->_entityTypeId || array_key_exists('backend_model', $data)) {
                     $this->messageManager->addErrorMessage(__('We can\'t update the attribute.'));
                     $this->_session->setAttributeData($data);
                     return $this->returnResult('catalog/*/', [], ['error' => true]);

From 33b6850ab694fd2da16dc29a4c98f788c45fc459 Mon Sep 17 00:00:00 2001
From: Stas Kozar 
Date: Fri, 14 Feb 2020 12:17:12 +0200
Subject: [PATCH 025/307] MC-31519: Improve product attribute mass update
 validation

---
 .../Product/Action/Attribute/Save.php         | 42 +++++++--
 .../Product/Action/AttributeTest.php          | 89 ++++++++++++-------
 2 files changed, 96 insertions(+), 35 deletions(-)

diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
index 2d10d7148fb71..a001fdd6d25f5 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php
@@ -7,14 +7,16 @@
 namespace Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute;
 
 use Magento\AsynchronousOperations\Api\Data\OperationInterface;
+use Magento\Catalog\Model\ProductFactory;
 use Magento\Eav\Model\Config;
 use Magento\Framework\App\Action\HttpPostActionInterface;
 use Magento\Backend\App\Action;
 use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
 
 /**
- * Class Save
+ * Class responsible for saving product attributes.
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribute implements HttpPostActionInterface
@@ -59,6 +61,11 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribut
      */
     private $eavConfig;
 
+    /**
+     * @var ProductFactory
+     */
+    private $productFactory;
+
     /**
      * @param Action\Context $context
      * @param \Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper
@@ -70,6 +77,7 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Action\Attribut
      * @param int $bulkSize
      * @param TimezoneInterface $timezone
      * @param Config $eavConfig
+     * @param ProductFactory $productFactory
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -82,7 +90,8 @@ public function __construct(
         \Magento\Authorization\Model\UserContextInterface $userContext,
         int $bulkSize = 100,
         TimezoneInterface $timezone = null,
-        Config $eavConfig = null
+        Config $eavConfig = null,
+        ProductFactory $productFactory = null
     ) {
         parent::__construct($context, $attributeHelper);
         $this->bulkManagement = $bulkManagement;
@@ -95,6 +104,7 @@ public function __construct(
             ->get(TimezoneInterface::class);
         $this->eavConfig = $eavConfig ?: ObjectManager::getInstance()
             ->get(Config::class);
+        $this->productFactory = $productFactory ?? ObjectManager::getInstance()->get(ProductFactory::class);
     }
 
     /**
@@ -120,9 +130,10 @@ public function execute()
         $attributesData = $this->sanitizeProductAttributes($attributesData);
 
         try {
+            $this->validateProductAttributes($attributesData);
             $this->publish($attributesData, $websiteRemoveData, $websiteAddData, $storeId, $websiteId, $productIds);
             $this->messageManager->addSuccessMessage(__('Message is added to queue'));
-        } catch (\Magento\Framework\Exception\LocalizedException $e) {
+        } catch (LocalizedException $e) {
             $this->messageManager->addErrorMessage($e->getMessage());
         } catch (\Exception $e) {
             $this->messageManager->addExceptionMessage(
@@ -147,10 +158,12 @@ private function sanitizeProductAttributes($attributesData)
 
         foreach ($attributesData as $attributeCode => $value) {
             $attribute = $this->eavConfig->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $attributeCode);
+
             if (!$attribute->getAttributeId()) {
                 unset($attributesData[$attributeCode]);
                 continue;
             }
+
             if ($attribute->getBackendType() === 'datetime') {
                 if (!empty($value)) {
                     $filterInput = new \Zend_Filter_LocalizedToNormalized(['date_format' => $dateFormat]);
@@ -178,6 +191,25 @@ private function sanitizeProductAttributes($attributesData)
         return $attributesData;
     }
 
+    /**
+     * Validate product attributes data.
+     *
+     * @param array $attributesData
+     *
+     * @return void
+     * @throws LocalizedException
+     */
+    private function validateProductAttributes(array $attributesData): void
+    {
+        $product = $this->productFactory->create();
+        $product->setData($attributesData);
+
+        foreach (array_keys($attributesData) as $attributeCode) {
+            $attribute = $this->eavConfig->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $attributeCode);
+            $attribute->getBackend()->validate($product);
+        }
+    }
+
     /**
      * Schedule new bulk
      *
@@ -187,7 +219,7 @@ private function sanitizeProductAttributes($attributesData)
      * @param int $storeId
      * @param int $websiteId
      * @param array $productIds
-     * @throws \Magento\Framework\Exception\LocalizedException
+     * @throws LocalizedException
      *
      * @return void
      */
@@ -241,7 +273,7 @@ private function publish(
                 $this->userContext->getUserId()
             );
             if (!$result) {
-                throw new \Magento\Framework\Exception\LocalizedException(
+                throw new LocalizedException(
                     __('Something went wrong while processing the request.')
                 );
             }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php
index 2f35a5fdafc3a..a49cd3ae19b59 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Action/AttributeTest.php
@@ -5,16 +5,26 @@
  */
 namespace Magento\Catalog\Controller\Adminhtml\Product\Action;
 
+use Magento\Backend\Model\Session;
+use Magento\Catalog\Block\Product\ListProduct;
+use Magento\Catalog\Helper\Product\Edit\Action\Attribute;
+use Magento\Catalog\Model\CategoryFactory;
 use Magento\Catalog\Model\Product\Visibility;
+use Magento\Framework\Message\MessageInterface;
 use Magento\Catalog\Model\ProductRepository;
 use Magento\Framework\App\Request\Http as HttpRequest;
+use Magento\Framework\UrlInterface;
 use Magento\TestFramework\Helper\Bootstrap;
+use Magento\TestFramework\MessageQueue\EnvironmentPreconditionException;
+use Magento\TestFramework\MessageQueue\PreconditionFailedException;
 use Magento\TestFramework\MessageQueue\PublisherConsumerController;
+use Magento\TestFramework\TestCase\AbstractBackendController;
 
 /**
  * @magentoAppArea adminhtml
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class AttributeTest extends \Magento\TestFramework\TestCase\AbstractBackendController
+class AttributeTest extends AbstractBackendController
 {
     /** @var PublisherConsumerController */
     private $publisherConsumerController;
@@ -22,7 +32,9 @@ class AttributeTest extends \Magento\TestFramework\TestCase\AbstractBackendContr
 
     protected function setUp()
     {
-        $this->publisherConsumerController = Bootstrap::getObjectManager()->create(
+        parent::setUp();
+
+        $this->publisherConsumerController = $this->_objectManager->create(
             PublisherConsumerController::class,
             [
                 'consumers' => $this->consumers,
@@ -34,15 +46,13 @@ protected function setUp()
 
         try {
             $this->publisherConsumerController->startConsumers();
-        } catch (\Magento\TestFramework\MessageQueue\EnvironmentPreconditionException $e) {
+        } catch (EnvironmentPreconditionException $e) {
             $this->markTestSkipped($e->getMessage());
-        } catch (\Magento\TestFramework\MessageQueue\PreconditionFailedException $e) {
+        } catch (PreconditionFailedException $e) {
             $this->fail(
                 $e->getMessage()
             );
         }
-
-        parent::setUp();
     }
 
     protected function tearDown()
@@ -59,10 +69,8 @@ protected function tearDown()
      */
     public function testSaveActionRedirectsSuccessfully()
     {
-        $objectManager = Bootstrap::getObjectManager();
-
-        /** @var $session \Magento\Backend\Model\Session */
-        $session = $objectManager->get(\Magento\Backend\Model\Session::class);
+        /** @var $session Session */
+        $session = $this->_objectManager->get(Session::class);
         $session->setProductIds([1]);
         $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
 
@@ -70,10 +78,10 @@ public function testSaveActionRedirectsSuccessfully()
 
         $this->assertEquals(302, $this->getResponse()->getHttpResponseCode());
         /** @var \Magento\Backend\Model\UrlInterface $urlBuilder */
-        $urlBuilder = $objectManager->get(\Magento\Framework\UrlInterface::class);
+        $urlBuilder = $this->_objectManager->get(UrlInterface::class);
 
-        /** @var \Magento\Catalog\Helper\Product\Edit\Action\Attribute $attributeHelper */
-        $attributeHelper = $objectManager->get(\Magento\Catalog\Helper\Product\Edit\Action\Attribute::class);
+        /** @var Attribute $attributeHelper */
+        $attributeHelper = $this->_objectManager->get(Attribute::class);
         $expectedUrl = $urlBuilder->getUrl(
             'catalog/product/index',
             ['store' => $attributeHelper->getSelectedStoreId()]
@@ -98,18 +106,15 @@ public function testSaveActionRedirectsSuccessfully()
      */
     public function testSaveActionChangeVisibility($attributes)
     {
-        $objectManager = Bootstrap::getObjectManager();
         /** @var ProductRepository $repository */
-        $repository = Bootstrap::getObjectManager()->create(
-            ProductRepository::class
-        );
+        $repository = $this->_objectManager->create(ProductRepository::class);
         $product = $repository->get('simple');
         $product->setOrigData();
         $product->setVisibility(Visibility::VISIBILITY_NOT_VISIBLE);
         $product->save();
 
-        /** @var $session \Magento\Backend\Model\Session */
-        $session = $objectManager->get(\Magento\Backend\Model\Session::class);
+        /** @var $session Session */
+        $session = $this->_objectManager->get(Session::class);
         $session->setProductIds([$product->getId()]);
         $this->getRequest()->setParam('attributes', $attributes);
         $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
@@ -117,13 +122,9 @@ public function testSaveActionChangeVisibility($attributes)
         $this->dispatch('backend/catalog/product_action_attribute/save/store/0');
 
         /** @var \Magento\Catalog\Model\Category $category */
-        $categoryFactory = Bootstrap::getObjectManager()->get(
-            \Magento\Catalog\Model\CategoryFactory::class
-        );
-        /** @var \Magento\Catalog\Block\Product\ListProduct $listProduct */
-        $listProduct = Bootstrap::getObjectManager()->get(
-            \Magento\Catalog\Block\Product\ListProduct::class
-        );
+        $categoryFactory = $this->_objectManager->get(CategoryFactory::class);
+        /** @var ListProduct $listProduct */
+        $listProduct = $this->_objectManager->get(ListProduct::class);
 
         $this->publisherConsumerController->waitForAsynchronousResult(
             function () use ($repository) {
@@ -159,10 +160,8 @@ function () use ($repository) {
      */
     public function testValidateActionWithMassUpdate($attributes)
     {
-        $objectManager = Bootstrap::getObjectManager();
-
-        /** @var $session \Magento\Backend\Model\Session */
-        $session = $objectManager->get(\Magento\Backend\Model\Session::class);
+        /** @var $session Session */
+        $session = $this->_objectManager->get(Session::class);
         $session->setProductIds([1, 2]);
 
         $this->getRequest()->setParam('attributes', $attributes);
@@ -214,4 +213,34 @@ public function saveActionVisibilityAttrDataProvider()
             ['arguments' => ['visibility' => Visibility::VISIBILITY_IN_CATALOG]]
         ];
     }
+
+    /**
+     * Assert that custom layout update can not be change for existing entity.
+     *
+     * @return void
+     * @magentoDataFixture Magento/Catalog/_files/product_simple.php
+     */
+    public function testSaveActionCantChangeCustomLayoutUpdate(): void
+    {
+        /** @var ProductRepository $repository */
+        $repository = $this->_objectManager->get(ProductRepository::class);
+        $product = $repository->get('simple');
+
+        $product->setOrigData('custom_layout_update', 'test');
+        $product->setData('custom_layout_update', 'test');
+        $product->save();
+        /** @var $session Session */
+        $session = $this->_objectManager->get(Session::class);
+        $session->setProductIds([$product->getId()]);
+        $this->getRequest()->setParam('attributes', ['custom_layout_update' => 'test2']);
+        $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
+
+        $this->dispatch('backend/catalog/product_action_attribute/save/store/0');
+
+        $this->assertSessionMessages(
+            $this->equalTo(['Custom layout update text cannot be changed, only removed']),
+            MessageInterface::TYPE_ERROR
+        );
+        $this->assertEquals('test', $product->getData('custom_layout_update'));
+    }
 }

From 2e43c3a38c733bb0e72bd6fa3988249f2403511c Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Fri, 14 Feb 2020 12:53:18 -0600
Subject: [PATCH 026/307] MC-31362: Media folder update

- Corrected uneeded parantheses
- Corrected dependencies.
- Removed allowedExtensions from base files
- Updated Backend fileTest
- Added Backend imageTest
---
 .../Theme/Model/Design/Backend/File.php       |  25 +--
 .../Unit/Model/Design/Backend/FileTest.php    |  48 +----
 .../Unit/Model/Design/Backend/ImageTest.php   | 179 ++++++++++++++++++
 3 files changed, 194 insertions(+), 58 deletions(-)
 create mode 100644 app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php

diff --git a/app/code/Magento/Theme/Model/Design/Backend/File.php b/app/code/Magento/Theme/Model/Design/Backend/File.php
index 65b7182b9944b..429ad34cb2dea 100644
--- a/app/code/Magento/Theme/Model/Design/Backend/File.php
+++ b/app/code/Magento/Theme/Model/Design/Backend/File.php
@@ -39,17 +39,17 @@ class File extends BackendFile
     /**
      * @var Mime
      */
-    private $mime;
+    protected $mime;
 
     /**
-     * @var Database
+     * @var IoFileSystem
      */
-    private $databaseHelper;
+    protected $ioFileSystem;
 
     /**
-     * @var IoFileSystem
+     * @var Database
      */
-    private $ioFileSystem;
+    private $databaseHelper;
 
     /**
      * @param Context $context
@@ -60,11 +60,11 @@ class File extends BackendFile
      * @param RequestDataInterface $requestData
      * @param Filesystem $filesystem
      * @param UrlInterface $urlBuilder
-     * @param IoFileSystem $ioFileSystem
      * @param AbstractResource|null $resource
      * @param AbstractDb|null $resourceCollection
      * @param array $data
      * @param Database $databaseHelper
+     * @param IoFileSystem $ioFileSystem
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -76,11 +76,11 @@ public function __construct(
         RequestDataInterface $requestData,
         Filesystem $filesystem,
         UrlInterface $urlBuilder,
-        IoFileSystem $ioFileSystem,
         AbstractResource $resource = null,
         AbstractDb $resourceCollection = null,
         array $data = [],
-        Database $databaseHelper = null
+        Database $databaseHelper = null,
+        IoFileSystem $ioFileSystem = null
     ) {
         parent::__construct(
             $context,
@@ -94,9 +94,9 @@ public function __construct(
             $resourceCollection,
             $data
         );
-        $this->ioFileSystem = $ioFileSystem;
         $this->urlBuilder = $urlBuilder;
         $this->databaseHelper = $databaseHelper ?: ObjectManager::getInstance()->get(Database::class);
+        $this->ioFileSystem = $ioFileSystem ?: ObjectManager::getInstance()->get(IoFileSystem::class);
     }
 
     /**
@@ -118,8 +118,9 @@ public function beforeSave()
             );
         }
 
-        if (!isset($this->ioFileSystem->getPathInfo(($file))['extension']) ||
-            !in_array($this->ioFileSystem->getPathInfo(($file))['extension'], $this->getAllowedExtensions())
+        if (!empty($this->getAllowedExtensions()) &&
+            (!isset($this->ioFileSystem->getPathInfo($file)['extension']) ||
+            !in_array($this->ioFileSystem->getPathInfo($file)['extension'], $this->getAllowedExtensions()))
         ) {
             throw new LocalizedException(
                 __('Something is wrong with the file upload settings.')
@@ -174,7 +175,7 @@ public function afterLoad()
      */
     public function getAllowedExtensions()
     {
-        return ['jpg', 'jpeg', 'gif', 'png'];
+        return [];
     }
 
     /**
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 75e58a356c670..65c675acdec12 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -87,11 +87,11 @@ public function setUp()
             $requestData,
             $filesystem,
             $this->urlBuilder,
-            $this->ioFileSystem,
             $abstractResource,
             $abstractDb,
             [],
-            $this->databaseHelper
+            $this->databaseHelper,
+            $this->ioFileSystem
         );
 
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -248,50 +248,6 @@ public function beforeSaveDataProvider()
     {
         return [
             'Normal file name' => ['filename.jpg'],
-        ];
-    }
-
-    /**
-     * @dataProvider beforeSaveInvalidDataProvider
-     * @param string $fileName
-     *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Something is wrong with the file upload settings.
-     */
-    public function testBeforeSaveInvalidFile($fileName)
-    {
-        {
-            $this->fileBackend->setScope('store');
-            $this->fileBackend->setScopeId(1);
-            $this->fileBackend->setValue(
-                [
-                    [
-                        'url' => 'http://magento2.com/pub/media/tmp/image/' . $fileName,
-                        'file' => $fileName,
-                        'size' => 234234,
-                    ]
-                ]
-            );
-            $this->fileBackend->setFieldConfig(
-                [
-                    'upload_dir' => [
-                        'value' => 'value',
-                        'config' => 'system/filesystem/media',
-                    ],
-                ]
-            );
-
-            $this->fileBackend->beforeSave();
-        }
-    }
-
-    /**
-     * @return array
-     */
-    public function beforeSaveInvalidDataProvider()
-    {
-        return [
-            'Invalid Extension' => ['file.invalid'],
             'Vulnerable file name' => ['../../../../../../../../etc/passwd'],
         ];
     }
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
new file mode 100644
index 0000000000000..c55cc0ed6e374
--- /dev/null
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -0,0 +1,179 @@
+getMockObject(\Magento\Framework\Model\Context::class);
+        $registry = $this->getMockObject(\Magento\Framework\Registry::class);
+        $config = $this->getMockObjectForAbstractClass(\Magento\Framework\App\Config\ScopeConfigInterface::class);
+        $cacheTypeList = $this->getMockObjectForAbstractClass(\Magento\Framework\App\Cache\TypeListInterface::class);
+        $uploaderFactory = $this->getMockObject(\Magento\MediaStorage\Model\File\UploaderFactory::class, ['create']);
+        $requestData = $this->getMockObjectForAbstractClass(
+            \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface::class
+        );
+        $filesystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->mediaDirectory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\WriteInterface::class)
+            ->getMockForAbstractClass();
+
+        $filesystem->expects($this->once())
+            ->method('getDirectoryWrite')
+            ->with(DirectoryList::MEDIA)
+            ->willReturn($this->mediaDirectory);
+        $this->urlBuilder = $this->getMockBuilder(\Magento\Framework\UrlInterface::class)
+            ->getMockForAbstractClass();
+
+        $this->ioFileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem\Io\File::class)
+            ->getMockForAbstractClass();
+
+        $this->mime = $this->getMockBuilder(\Magento\Framework\File\Mime::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->databaseHelper = $this->getMockBuilder(\Magento\MediaStorage\Helper\File\Storage\Database::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $abstractResource = $this->getMockBuilder(\Magento\Framework\Model\ResourceModel\AbstractResource::class)
+            ->getMockForAbstractClass();
+
+        $abstractDb = $this->getMockBuilder(\Magento\Framework\Data\Collection\AbstractDb::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->imageBackend = new Image(
+            $context,
+            $registry,
+            $config,
+            $cacheTypeList,
+            $uploaderFactory,
+            $requestData,
+            $filesystem,
+            $this->urlBuilder,
+            $abstractResource,
+            $abstractDb,
+            [],
+            $this->databaseHelper,
+            $this->ioFileSystem
+        );
+
+        $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $objectManager->setBackwardCompatibleProperty(
+            $this->imageBackend,
+            'mime',
+            $this->mime
+        );
+    }
+
+    public function tearDown()
+    {
+        unset($this->imageBackend);
+    }
+
+    /**
+     * @param string $class
+     * @param array $methods
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function getMockObject($class, $methods = [])
+    {
+        $builder =  $this->getMockBuilder($class)
+            ->disableOriginalConstructor();
+        if (count($methods)) {
+            $builder->setMethods($methods);
+        }
+        return  $builder->getMock();
+    }
+
+    /**
+     * @param string $class
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function getMockObjectForAbstractClass($class)
+    {
+        return  $this->getMockBuilder($class)
+            ->getMockForAbstractClass();
+    }
+
+    /**
+     * @dataProvider beforeSaveInvalidDataProvider
+     * @param string $imageName
+     *
+     * @expectedException \Magento\Framework\Exception\LocalizedException
+     * @expectedExceptionMessage Something is wrong with the file upload settings.
+     */
+    public function testBeforeSaveInvalidImage($imageName)
+    {
+        {
+            $this->imageBackend->setScope('store');
+            $this->imageBackend->setScopeId(1);
+            $this->imageBackend->setValue(
+                [
+                    [
+                        'url' => 'http://magento2.com/pub/media/tmp/image/' . $imageName,
+                        'file' => $imageName,
+                        'size' => 234234,
+                    ]
+                ]
+            );
+            $this->imageBackend->setFieldConfig(
+                [
+                    'upload_dir' => [
+                        'value' => 'value',
+                        'config' => 'system/filesystem/media',
+                    ],
+                ]
+            );
+
+            $this->imageBackend->beforeSave();
+        }
+    }
+
+    /**
+     * @return array
+     */
+    public function beforeSaveInvalidDataProvider()
+    {
+        return [
+            'Invalid Extension' => ['file.invalid'],
+            'Vulnerable file name' => ['../../../../../../../../etc/passwd'],
+        ];
+    }
+}

From ce1a47e62695f2d590289189b93a81bda9badb35 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun 
Date: Mon, 17 Feb 2020 11:28:26 +0200
Subject: [PATCH 027/307] MC-31361: Remove ability to change entity type for
 attributes

---
 .../Adminhtml/Product/Attribute/Save.php      |  2 +
 .../Magento/Eav/Model/Entity/Attribute.php    | 19 ++++
 .../Model/ResourceModel/Entity/Attribute.php  |  1 +
 .../Model/ResourceModel/Eav/AttributeTest.php | 68 ++++++++++----
 .../Magento/Customer/Model/AttributeTest.php  | 94 +++++++++++++++++++
 5 files changed, 167 insertions(+), 17 deletions(-)
 create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php

diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php
index 853cc65270306..692c15435a4d7 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php
@@ -258,6 +258,8 @@ public function execute()
                 unset($data['apply_to']);
             }
 
+            unset($data['entity_type_id']);
+
             $model->addData($data);
 
             if (!$attributeId) {
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute.php b/app/code/Magento/Eav/Model/Entity/Attribute.php
index 651bc96193780..04175c2da94d1 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute.php
@@ -260,6 +260,8 @@ public function beforeSave()
             );
         }
 
+        $this->validateEntityType();
+
         $defaultValue = $this->getDefaultValue();
         $hasDefaultValue = (string)$defaultValue != '';
 
@@ -535,4 +537,21 @@ public function __wakeup()
         $this->reservedAttributeList = $objectManager->get(\Magento\Catalog\Model\Product\ReservedAttributeList::class);
         $this->dateTimeFormatter = $objectManager->get(DateTimeFormatterInterface::class);
     }
+
+    /**
+     * Entity type for existing attribute shouldn't be changed.
+     *
+     * @return void
+     * @throws LocalizedException
+     */
+    private function validateEntityType(): void
+    {
+        if ($this->getId() !== null) {
+            $origEntityTypeId = $this->getOrigData('entity_type_id');
+
+            if (($origEntityTypeId !== null) && ((int)$this->getEntityTypeId() !== (int)$origEntityTypeId)) {
+                throw new LocalizedException(__('Do not change entity type.'));
+            }
+        }
+    }
 }
diff --git a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php
index 9e4ad6fb53a33..e9551c620ef85 100644
--- a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php
+++ b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php
@@ -107,6 +107,7 @@ public function loadByCode(AbstractModel $object, $entityTypeId, $code)
 
         if ($data) {
             $object->setData($data);
+            $object->setOrigData('entity_type_id', $object->getEntityTypeId());
             $this->_afterLoad($object);
             return true;
         }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
index 498c3167ed734..0d81a7973a3bc 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
@@ -5,21 +5,47 @@
  */
 namespace Magento\Catalog\Model\ResourceModel\Eav;
 
+use Magento\Eav\Api\AttributeRepositoryInterface;
+use Magento\Eav\Model\Config;
+use Magento\Framework\ObjectManagerInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
 /**
  * Test for \Magento\Catalog\Model\ResourceModel\Eav\Attribute.
  */
 class AttributeTest extends \PHPUnit\Framework\TestCase
 {
     /**
-     * @var \Magento\Catalog\Model\ResourceModel\Eav\Attribute
+     * @var ObjectManagerInterface
+     */
+    private $objectManager;
+
+    /**
+     * @var Attribute
+     */
+    private $model;
+
+    /**
+     * @var AttributeRepositoryInterface
+     */
+    private $attributeRepository;
+
+    /**
+     * @var int|string
      */
-    protected $_model;
+    private $catalogProductEntityType;
 
+    /**
+     * @inheritDoc
+     */
     protected function setUp()
     {
-        $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            \Magento\Catalog\Model\ResourceModel\Eav\Attribute::class
-        );
+        $this->objectManager = Bootstrap::getObjectManager();
+        $this->model = $this->objectManager->get(Attribute::class);
+        $this->attributeRepository = $this->objectManager->get(AttributeRepositoryInterface::class);
+        $this->catalogProductEntityType = $this->objectManager->get(Config::class)
+            ->getEntityType('catalog_product')
+            ->getId();
     }
 
     /**
@@ -29,18 +55,26 @@ protected function setUp()
      */
     public function testCRUD()
     {
-        $this->_model->setAttributeCode(
-            'test'
-        )->setEntityTypeId(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-                \Magento\Eav\Model\Config::class
-            )->getEntityType(
-                'catalog_product'
-            )->getId()
-        )->setFrontendLabel(
-            'test'
-        )->setIsUserDefined(1);
-        $crud = new \Magento\TestFramework\Entity($this->_model, ['frontend_label' => uniqid()]);
+        $this->model->setAttributeCode('test')
+            ->setEntityTypeId($this->catalogProductEntityType)
+            ->setFrontendLabel('test')
+            ->setIsUserDefined(1);
+        $crud = new \Magento\TestFramework\Entity($this->model, ['frontend_label' => uniqid()]);
         $crud->testCrud();
     }
+
+    /**
+     * @magentoDataFixture Magento/Catalog/_files/product_attribute.php
+     *
+     * @expectedException \Magento\Framework\Exception\LocalizedException
+     * @expectedExceptionMessage Do not change entity type.
+     *
+     * @return void
+     */
+    public function testAttributeSaveWithChangedEntityType(): void
+    {
+        $attribute = $this->attributeRepository->get($this->catalogProductEntityType, 'test_attribute_code_333');
+        $attribute->setEntityTypeId(1);
+        $attribute->save();
+    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
new file mode 100644
index 0000000000000..8f547e18e64ac
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
@@ -0,0 +1,94 @@
+objectManager = Bootstrap::getObjectManager();
+        $this->model = $this->objectManager->get(Attribute::class);
+        $this->attributeRepository = $this->objectManager->get(AttributeRepositoryInterface::class);
+        $this->customerEntityType = $this->objectManager->get(Config::class)
+            ->getEntityType('customer')
+            ->getId();
+    }
+
+    /**
+     * Test Create -> Read -> Update -> Delete attribute operations.
+     *
+     * @return void
+     */
+    public function testCRUD(): void
+    {
+        $this->model->setAttributeCode('test')
+            ->setEntityTypeId($this->customerEntityType)
+            ->setFrontendLabel('test')
+            ->setIsUserDefined(1);
+        $crud = new \Magento\TestFramework\Entity($this->model, ['frontend_label' => uniqid()]);
+        $crud->testCrud();
+    }
+
+    /**
+     * @magentoDataFixture Magento/Customer/_files/attribute_user_defined_customer.php
+     *
+     * @expectedException \Magento\Framework\Exception\LocalizedException
+     * @expectedExceptionMessage Do not change entity type.
+     *
+     * @return void
+     */
+    public function testAttributeSaveWithChangedEntityType(): void
+    {
+        $attribute = $this->attributeRepository->get($this->customerEntityType, 'user_attribute');
+        $attribute->setEntityTypeId(5);
+        $attribute->save();
+    }
+
+    /**
+     * @magentoDataFixture Magento/Customer/_files/attribute_user_defined_customer.php
+     *
+     * @return void
+     */
+    public function testAttributeSaveWithoutChangedEntityType(): void
+    {
+        $attribute = $this->attributeRepository->get($this->customerEntityType, 'user_attribute');
+        $attribute->setSortOrder(1250);
+        $attribute->save();
+    }
+}

From 7eb5025ef90035585a6ef6fc678628ae4dffd0c8 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun 
Date: Tue, 18 Feb 2020 13:17:59 +0200
Subject: [PATCH 028/307] MC-31361: Remove ability to change entity type for
 attributes

---
 .../Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php  | 3 ++-
 .../testsuite/Magento/Customer/Model/AttributeTest.php         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
index 0d81a7973a3bc..ac2a3a1818cf4 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
@@ -6,6 +6,7 @@
 namespace Magento\Catalog\Model\ResourceModel\Eav;
 
 use Magento\Eav\Api\AttributeRepositoryInterface;
+use Magento\Eav\Api\Data\AttributeInterface;
 use Magento\Eav\Model\Config;
 use Magento\Framework\ObjectManagerInterface;
 use Magento\TestFramework\Helper\Bootstrap;
@@ -59,7 +60,7 @@ public function testCRUD()
             ->setEntityTypeId($this->catalogProductEntityType)
             ->setFrontendLabel('test')
             ->setIsUserDefined(1);
-        $crud = new \Magento\TestFramework\Entity($this->model, ['frontend_label' => uniqid()]);
+        $crud = new \Magento\TestFramework\Entity($this->model, [AttributeInterface::FRONTEND_LABEL => uniqid()]);
         $crud->testCrud();
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
index 8f547e18e64ac..dde20a8049437 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
@@ -8,6 +8,7 @@
 namespace Magento\Customer\Model;
 
 use Magento\Eav\Api\AttributeRepositoryInterface;
+use Magento\Eav\Api\Data\AttributeInterface;
 use Magento\Eav\Model\Config;
 use Magento\Framework\ObjectManagerInterface;
 use Magento\TestFramework\Helper\Bootstrap;
@@ -61,7 +62,7 @@ public function testCRUD(): void
             ->setEntityTypeId($this->customerEntityType)
             ->setFrontendLabel('test')
             ->setIsUserDefined(1);
-        $crud = new \Magento\TestFramework\Entity($this->model, ['frontend_label' => uniqid()]);
+        $crud = new \Magento\TestFramework\Entity($this->model, [AttributeInterface::FRONTEND_LABEL => uniqid()]);
         $crud->testCrud();
     }
 

From d3cf7544692b3235feda1d1deb346fc8e1d4a7b4 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Tue, 18 Feb 2020 13:40:28 -0600
Subject: [PATCH 029/307] MC-31362: Media folder update

- Corrected variable scope
---
 app/code/Magento/Theme/Model/Design/Backend/File.php     | 4 ++--
 .../Theme/Test/Unit/Model/Design/Backend/FileTest.php    | 2 +-
 .../Theme/Test/Unit/Model/Design/Backend/ImageTest.php   | 9 +--------
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/app/code/Magento/Theme/Model/Design/Backend/File.php b/app/code/Magento/Theme/Model/Design/Backend/File.php
index 429ad34cb2dea..860a31041f2d0 100644
--- a/app/code/Magento/Theme/Model/Design/Backend/File.php
+++ b/app/code/Magento/Theme/Model/Design/Backend/File.php
@@ -39,12 +39,12 @@ class File extends BackendFile
     /**
      * @var Mime
      */
-    protected $mime;
+    private $mime;
 
     /**
      * @var IoFileSystem
      */
-    protected $ioFileSystem;
+    private $ioFileSystem;
 
     /**
      * @var Database
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 65c675acdec12..0a7e7c321ebe4 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -25,7 +25,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
     protected $fileBackend;
 
     /** @var IoFileSystem|\PHPUnit_Framework_MockObject_MockObject */
-    protected $ioFileSystem;
+    private $ioFileSystem;
 
     /**
      * @var \Magento\Framework\File\Mime|\PHPUnit_Framework_MockObject_MockObject
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index c55cc0ed6e374..ebfe83239ed21 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -25,7 +25,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     protected $imageBackend;
 
     /** @var IoFileSystem|\PHPUnit_Framework_MockObject_MockObject */
-    protected $ioFileSystem;
+    private $ioFileSystem;
 
     /**
      * @var \Magento\Framework\File\Mime|\PHPUnit_Framework_MockObject_MockObject
@@ -93,13 +93,6 @@ public function setUp()
             $this->databaseHelper,
             $this->ioFileSystem
         );
-
-        $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
-        $objectManager->setBackwardCompatibleProperty(
-            $this->imageBackend,
-            'mime',
-            $this->mime
-        );
     }
 
     public function tearDown()

From 14320e805d9740e5a8ed3fe0e7552e09332a121e Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Tue, 18 Feb 2020 15:23:03 -0600
Subject: [PATCH 030/307] MC-31362: Media folder update

- Reverted changes to model
- Updated storage path check
---
 .../Adminhtml/Wysiwyg/Images/DeleteFolder.php |  7 ---
 .../Cms/Model/Wysiwyg/Images/Storage.php      |  5 +-
 .../App/Filesystem/DirectoryResolverTest.php  | 46 -------------------
 .../App/Filesystem/DirectoryResolver.php      | 21 ---------
 4 files changed, 3 insertions(+), 76 deletions(-)

diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
index 0e6c74b66a01d..eec5c40c6e33b 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
@@ -60,13 +60,6 @@ public function execute()
     {
         try {
             $path = $this->getStorage()->getCmsWysiwygImages()->getCurrentPath();
-            if (!$this->directoryResolver->validatePath($path, DirectoryList::MEDIA)
-                || $this->directoryResolver->validateSamePath($path, DirectoryList::MEDIA)
-            ) {
-                throw new \Magento\Framework\Exception\LocalizedException(
-                    __('Directory %1 is not under storage root path.', $path)
-                );
-            }
             $this->getStorage()->deleteDirectory($path);
 
             return $this->resultRawFactory->create();
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
index f0a232bdccccc..1cb1aa20c5a16 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -765,12 +765,13 @@ public function getCmsWysiwygImages()
     protected function _validatePath($path)
     {
         $root = $this->_sanitizePath($this->_cmsWysiwygImages->getStorageRoot());
-        if ($root == $path) {
+        $realPath = realpath($path);
+        if ($root == $realPath) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('We can\'t delete root directory %1 right now.', $path)
             );
         }
-        if (strpos($path, (string) $root) !== 0) {
+        if (strpos($realPath, (string) $root) !== 0) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('Directory %1 is not under storage root path.', $path)
             );
diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php
index b7f13112384df..90d8473032c69 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/App/Filesystem/DirectoryResolverTest.php
@@ -120,50 +120,4 @@ public function validatePathDataProvider()
             ],
         ];
     }
-
-    /**
-     * @param string $path
-     * @param string $directoryConfig
-     * @param bool $expectation
-     * @dataProvider validateSamePathDataProvider
-     * @throws \Magento\Framework\Exception\FileSystemException
-     * @magentoAppIsolation enabled
-     * @return void
-     */
-    public function testValidateSamePath($path, $directoryConfig, $expectation)
-    {
-        $directory = $this->filesystem
-            ->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
-        $path = $directory->getAbsolutePath() .'/' .$path;
-        $this->assertEquals($expectation, $this->directoryResolver->validateSamePath($path, $directoryConfig));
-    }
-
-    /**
-     * @return array
-     */
-    public function validateSamePathDataProvider()
-    {
-        return [
-            [
-                '/',
-                DirectoryList::MEDIA,
-                true,
-            ],
-            [
-                '/.',
-                DirectoryList::MEDIA,
-                true,
-            ],
-            [
-                '/../../pub/media/.',
-                DirectoryList::MEDIA,
-                true,
-            ],
-            [
-                '/../../pub/',
-                DirectoryList::MEDIA,
-                false,
-            ],
-        ];
-    }
 }
diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php
index ecdef2269522d..5ad3d888ffb57 100644
--- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php
+++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryResolver.php
@@ -55,25 +55,4 @@ public function validatePath($path, $directoryConfig = DirectoryList::MEDIA)
 
         return strpos($realPath, $root) === 0;
     }
-
-    /**
-     * Validate same path.
-     *
-     * Gets real path for directory provided in parameters and compares it with specified root directory.
-     * Will return TRUE if real path of provided value is root directory path and FALSE if not.
-     * Throws the \Magento\Framework\Exception\FileSystemException in case when directory path is absent
-     * in Directories configuration.
-     *
-     * @param string $path
-     * @param string $directoryConfig
-     * @return bool
-     * @throws \Magento\Framework\Exception\FileSystemException
-     */
-    public function validateSamePath($path, $directoryConfig = DirectoryList::MEDIA)
-    {
-        $root = $this->directoryList->getPath($directoryConfig);
-        $traverseRealPath = realpath($path);
-
-        return $root === $traverseRealPath;
-    }
 }

From 20bf889a02e744f81818e72e655946ca5d87a486 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu 
Date: Wed, 19 Feb 2020 11:18:52 -0600
Subject: [PATCH 031/307] MC-31362: Media folder update

- Updated storage path check
- Removed extra test
---
 .../Cms/Model/Wysiwyg/Images/Storage.php      |   2 +-
 .../Unit/Model/Design/Backend/ImageTest.php   | 172 ------------------
 2 files changed, 1 insertion(+), 173 deletions(-)
 delete mode 100644 app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php

diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
index 1cb1aa20c5a16..c54f4c5bae3d8 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -765,7 +765,7 @@ public function getCmsWysiwygImages()
     protected function _validatePath($path)
     {
         $root = $this->_sanitizePath($this->_cmsWysiwygImages->getStorageRoot());
-        $realPath = realpath($path);
+        $realPath = $this->_sanitizePath($path);
         if ($root == $realPath) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('We can\'t delete root directory %1 right now.', $path)
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
deleted file mode 100644
index ebfe83239ed21..0000000000000
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ /dev/null
@@ -1,172 +0,0 @@
-getMockObject(\Magento\Framework\Model\Context::class);
-        $registry = $this->getMockObject(\Magento\Framework\Registry::class);
-        $config = $this->getMockObjectForAbstractClass(\Magento\Framework\App\Config\ScopeConfigInterface::class);
-        $cacheTypeList = $this->getMockObjectForAbstractClass(\Magento\Framework\App\Cache\TypeListInterface::class);
-        $uploaderFactory = $this->getMockObject(\Magento\MediaStorage\Model\File\UploaderFactory::class, ['create']);
-        $requestData = $this->getMockObjectForAbstractClass(
-            \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface::class
-        );
-        $filesystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->mediaDirectory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\WriteInterface::class)
-            ->getMockForAbstractClass();
-
-        $filesystem->expects($this->once())
-            ->method('getDirectoryWrite')
-            ->with(DirectoryList::MEDIA)
-            ->willReturn($this->mediaDirectory);
-        $this->urlBuilder = $this->getMockBuilder(\Magento\Framework\UrlInterface::class)
-            ->getMockForAbstractClass();
-
-        $this->ioFileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem\Io\File::class)
-            ->getMockForAbstractClass();
-
-        $this->mime = $this->getMockBuilder(\Magento\Framework\File\Mime::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->databaseHelper = $this->getMockBuilder(\Magento\MediaStorage\Helper\File\Storage\Database::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $abstractResource = $this->getMockBuilder(\Magento\Framework\Model\ResourceModel\AbstractResource::class)
-            ->getMockForAbstractClass();
-
-        $abstractDb = $this->getMockBuilder(\Magento\Framework\Data\Collection\AbstractDb::class)
-            ->disableOriginalConstructor()
-            ->getMockForAbstractClass();
-
-        $this->imageBackend = new Image(
-            $context,
-            $registry,
-            $config,
-            $cacheTypeList,
-            $uploaderFactory,
-            $requestData,
-            $filesystem,
-            $this->urlBuilder,
-            $abstractResource,
-            $abstractDb,
-            [],
-            $this->databaseHelper,
-            $this->ioFileSystem
-        );
-    }
-
-    public function tearDown()
-    {
-        unset($this->imageBackend);
-    }
-
-    /**
-     * @param string $class
-     * @param array $methods
-     * @return \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected function getMockObject($class, $methods = [])
-    {
-        $builder =  $this->getMockBuilder($class)
-            ->disableOriginalConstructor();
-        if (count($methods)) {
-            $builder->setMethods($methods);
-        }
-        return  $builder->getMock();
-    }
-
-    /**
-     * @param string $class
-     * @return \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected function getMockObjectForAbstractClass($class)
-    {
-        return  $this->getMockBuilder($class)
-            ->getMockForAbstractClass();
-    }
-
-    /**
-     * @dataProvider beforeSaveInvalidDataProvider
-     * @param string $imageName
-     *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Something is wrong with the file upload settings.
-     */
-    public function testBeforeSaveInvalidImage($imageName)
-    {
-        {
-            $this->imageBackend->setScope('store');
-            $this->imageBackend->setScopeId(1);
-            $this->imageBackend->setValue(
-                [
-                    [
-                        'url' => 'http://magento2.com/pub/media/tmp/image/' . $imageName,
-                        'file' => $imageName,
-                        'size' => 234234,
-                    ]
-                ]
-            );
-            $this->imageBackend->setFieldConfig(
-                [
-                    'upload_dir' => [
-                        'value' => 'value',
-                        'config' => 'system/filesystem/media',
-                    ],
-                ]
-            );
-
-            $this->imageBackend->beforeSave();
-        }
-    }
-
-    /**
-     * @return array
-     */
-    public function beforeSaveInvalidDataProvider()
-    {
-        return [
-            'Invalid Extension' => ['file.invalid'],
-            'Vulnerable file name' => ['../../../../../../../../etc/passwd'],
-        ];
-    }
-}

From e6b3c6152fd53e4a7f88174d8315ca8389ac29b3 Mon Sep 17 00:00:00 2001
From: Stas Kozar 
Date: Thu, 20 Feb 2020 09:53:08 +0200
Subject: [PATCH 032/307] MC-31359: Remove possibility to upload svg files.

---
 app/code/Magento/Store/etc/config.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/code/Magento/Store/etc/config.xml b/app/code/Magento/Store/etc/config.xml
index 07e4c8b0b6529..83bb4432ac18f 100644
--- a/app/code/Magento/Store/etc/config.xml
+++ b/app/code/Magento/Store/etc/config.xml
@@ -132,6 +132,7 @@
                     shtml
                     phpt
                     pht
+                    svg
                 
                 
                     

From f14771412e6eceee39633395697caf8d6eb1daf7 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra 
Date: Mon, 24 Feb 2020 10:19:43 +0200
Subject: [PATCH 033/307] MC-24883: [Forward Port 2.4] Session cleaner
 functionality improvement

---
 .../Customer/Api/SessionCleanerInterface.php  |  22 +++
 .../Customer/Model/AccountManagement.php      | 148 +++++++-----------
 .../Customer/Model/Session/SessionCleaner.php | 100 ++++++++++++
 app/code/Magento/Customer/Model/Visitor.php   |  23 ++-
 .../StorefrontUpdateCustomerPasswordTest.xml  |  15 +-
 .../Test/Unit/Model/AccountManagementTest.php |  54 ++-----
 app/code/Magento/Customer/etc/di.xml          |   1 +
 .../Customer/Model/AccountManagementTest.php  |  15 ++
 8 files changed, 241 insertions(+), 137 deletions(-)
 create mode 100644 app/code/Magento/Customer/Api/SessionCleanerInterface.php
 create mode 100644 app/code/Magento/Customer/Model/Session/SessionCleaner.php

diff --git a/app/code/Magento/Customer/Api/SessionCleanerInterface.php b/app/code/Magento/Customer/Api/SessionCleanerInterface.php
new file mode 100644
index 0000000000000..eb24712105f96
--- /dev/null
+++ b/app/code/Magento/Customer/Api/SessionCleanerInterface.php
@@ -0,0 +1,22 @@
+customerFactory = $customerFactory;
         $this->eventManager = $eventManager;
@@ -486,12 +481,6 @@ public function __construct(
         $this->dateTimeFactory = $dateTimeFactory ?: $objectManager->get(DateTimeFactory::class);
         $this->accountConfirmation = $accountConfirmation ?: $objectManager
             ->get(AccountConfirmation::class);
-        $this->sessionManager = $sessionManager
-            ?: $objectManager->get(SessionManagerInterface::class);
-        $this->saveHandler = $saveHandler
-            ?: $objectManager->get(SaveHandlerInterface::class);
-        $this->visitorCollectionFactory = $visitorCollectionFactory
-            ?: $objectManager->get(CollectionFactory::class);
         $this->searchCriteriaBuilder = $searchCriteriaBuilder
             ?: $objectManager->get(SearchCriteriaBuilder::class);
         $this->addressRegistry = $addressRegistry
@@ -500,6 +489,7 @@ public function __construct(
             ?: $objectManager->get(GetCustomerByToken::class);
         $this->allowedCountriesReader = $allowedCountriesReader
             ?: $objectManager->get(AllowedCountries::class);
+        $this->sessionCleaner = $sessionCleaner ?? $objectManager->get(SessionCleanerInterface::class);
     }
 
     /**
@@ -538,7 +528,10 @@ public function resendConfirmation($email, $websiteId = null, $redirectUrl = '')
         } catch (MailException $e) {
             // If we are not able to send a new account email, this should be ignored
             $this->logger->critical($e);
+
+            return false;
         }
+
         return true;
     }
 
@@ -685,16 +678,18 @@ public function initiatePasswordReset($email, $template, $websiteId = null)
      */
     private function handleUnknownTemplate($template)
     {
-        $phrase = __(
-            'Invalid value of "%value" provided for the %fieldName field. Possible values: %template1 or %template2.',
-            [
-                'value' => $template,
-                'fieldName' => 'template',
-                'template1' => AccountManagement::EMAIL_REMINDER,
-                'template2' => AccountManagement::EMAIL_RESET
-            ]
+        throw new InputException(
+            __(
+                'Invalid value of "%value" provided for the %fieldName field. '
+                    . 'Possible values: %template1 or %template2.',
+                [
+                    'value' => $template,
+                    'fieldName' => 'template',
+                    'template1' => AccountManagement::EMAIL_REMINDER,
+                    'template2' => AccountManagement::EMAIL_RESET
+                ]
+            )
         );
-        throw new InputException($phrase);
     }
 
     /**
@@ -725,7 +720,7 @@ public function resetPassword($email, $resetToken, $newPassword)
         $customerSecure->setRpToken(null);
         $customerSecure->setRpTokenCreatedAt(null);
         $customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
-        $this->destroyCustomerSessions($customer->getId());
+        $this->sessionCleaner->clearFor((int)$customer->getId());
         $this->customerRepository->save($customer);
 
         return true;
@@ -872,6 +867,7 @@ public function createAccountWithPasswordHash(CustomerInterface $customer, $hash
         if ($customer->getId()) {
             $customer = $this->customerRepository->get($customer->getEmail());
             $websiteId = $customer->getWebsiteId();
+
             if ($this->isCustomerInStore($websiteId, $customer->getStoreId())) {
                 throw new InputException(__('This customer already exists in this store.'));
             }
@@ -1050,7 +1046,7 @@ private function changePasswordForCustomer($customer, $currentPassword, $newPass
         $customerSecure->setRpTokenCreatedAt(null);
         $this->checkPasswordStrength($newPassword);
         $customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
-        $this->destroyCustomerSessions($customer->getId());
+        $this->sessionCleaner->clearFor((int)$customer->getId());
         $this->disableAddressValidation($customer);
         $this->customerRepository->save($customer);
 
@@ -1619,36 +1615,6 @@ private function getEmailNotification()
         }
     }
 
-    /**
-     * Destroy all active customer sessions by customer id (current session will not be destroyed).
-     *
-     * Customer sessions which should be deleted are collecting from the "customer_visitor" table considering
-     * configured session lifetime.
-     *
-     * @param string|int $customerId
-     * @return void
-     */
-    private function destroyCustomerSessions($customerId)
-    {
-        $sessionLifetime = $this->scopeConfig->getValue(
-            \Magento\Framework\Session\Config::XML_PATH_COOKIE_LIFETIME,
-            \Magento\Store\Model\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->saveHandler->destroy($sessionId);
-        }
-    }
-
     /**
      * Set ignore_validation_flag for reset password flow to skip unnecessary address and customer validation
      *
diff --git a/app/code/Magento/Customer/Model/Session/SessionCleaner.php b/app/code/Magento/Customer/Model/Session/SessionCleaner.php
new file mode 100644
index 0000000000000..1423c94782535
--- /dev/null
+++ b/app/code/Magento/Customer/Model/Session/SessionCleaner.php
@@ -0,0 +1,100 @@
+scopeConfig = $scopeConfig;
+        $this->dateTimeFactory = $dateTimeFactory;
+        $this->visitorCollectionFactory = $visitorCollectionFactory;
+        $this->sessionManager = $sessionManager;
+        $this->saveHandler = $saveHandler;
+    }
+
+    /**
+     * @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();
+        }
+    }
+}
diff --git a/app/code/Magento/Customer/Model/Visitor.php b/app/code/Magento/Customer/Model/Visitor.php
index 5fa1af69e9bdd..1f1487c58c168 100644
--- a/app/code/Magento/Customer/Model/Visitor.php
+++ b/app/code/Magento/Customer/Model/Visitor.php
@@ -10,7 +10,7 @@
 use Magento\Framework\App\RequestSafetyInterface;
 
 /**
- * Class Visitor
+ * Class Visitor responsible for initializing visitor's.
  *
  *  Used to track sessions of the logged in customers
  *
@@ -195,7 +195,9 @@ public function initByRequest($observer)
     public function saveByRequest($observer)
     {
         // prevent saving Visitor for safe methods, e.g. GET request
-        if ($this->skipRequestLogging || $this->requestSafety->isSafeMethod() || $this->isModuleIgnored($observer)) {
+        if (($this->skipRequestLogging || $this->requestSafety->isSafeMethod() || $this->isModuleIgnored($observer))
+            && !$this->sessionIdHasChanged()
+        ) {
             return $this;
         }
 
@@ -212,6 +214,23 @@ public function saveByRequest($observer)
         return $this;
     }
 
+    /**
+     * Check if visitor session id was changed.
+     *
+     * @return bool
+     */
+    private function sessionIdHasChanged(): bool
+    {
+        $visitorData = $this->session->getVisitorData();
+        $hasChanged = false;
+
+        if (isset($visitorData['session_id'])) {
+            $hasChanged = $this->session->getSessionId() !== $visitorData['session_id'];
+        }
+
+        return $hasChanged;
+    }
+
     /**
      * Returns true if the module is required
      *
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerPasswordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerPasswordTest.xml
index 9bc253c91af92..36a561e47f8ab 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerPasswordTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontUpdateCustomerPasswordTest.xml
@@ -78,4 +78,17 @@
         
         
     
-
\ No newline at end of file
+    
+        
+            
+            <description value="Update Customer Password on Storefront Redirect on Login Page"/>
+            <testCaseId value="MC-29687"/>
+            <useCaseId value="MC-24883"/>
+        </annotations>
+        <remove keyForRemoval="logout"/>
+        <remove keyForRemoval="loginWithNewPassword"/>
+        <remove keyForRemoval="seeMyEmail"/>
+
+        <seeInCurrentUrl url="{{StorefrontCustomerSignInPage.url}}" stepKey="assertStorefrontCustomerLoginPage"/>
+    </test>
+</tests>
diff --git a/app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php b/app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php
index 2344e0c8bce02..6dff700ba729b 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php
@@ -7,6 +7,7 @@
 namespace Magento\Customer\Test\Unit\Model;
 
 use Magento\Customer\Api\Data\CustomerInterface;
+use Magento\Customer\Api\SessionCleanerInterface;
 use Magento\Customer\Model\AccountConfirmation;
 use Magento\Customer\Model\AccountManagement;
 use Magento\Customer\Model\AuthenticationInterface;
@@ -161,6 +162,11 @@ class AccountManagementTest extends \PHPUnit\Framework\TestCase
      */
     private $allowedCountriesReader;
 
+    /**
+     * @var SessionCleanerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $sessionCleanerMock;
+
     /**
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
@@ -1447,6 +1453,7 @@ private function reInitModel()
             ->setMethods(['create'])
             ->getMock();
         $dateTimeFactory->expects($this->any())->method('create')->willReturn($dateTimeMock);
+        $this->sessionCleanerMock = $this->createMock(SessionCleanerInterface::class);
 
         $this->objectManagerHelper = new ObjectManagerHelper($this);
         $this->accountManagement = $this->objectManagerHelper->getObject(
@@ -1467,6 +1474,7 @@ private function reInitModel()
                 'storeManager' => $this->storeManager,
                 'addressRegistry' => $this->addressRegistryMock,
                 'transportBuilder' => $this->transportBuilder,
+                'sessionCleaner' => $this->sessionCleanerMock,
             ]
         );
         $this->objectManagerHelper->setBackwardCompatibleProperty(
@@ -1545,33 +1553,13 @@ public function testChangePassword()
             ->with($newPassword)
             ->willReturn(7);
 
+        $this->sessionCleanerMock->expects($this->once())->method('clearFor')->with($customerId)->willReturnSelf();
+
         $this->customerRepository
             ->expects($this->once())
             ->method('save')
             ->with($customer);
 
-        $this->sessionManager->expects($this->atLeastOnce())->method('getSessionId');
-
-        $visitor = $this->getMockBuilder(\Magento\Customer\Model\Visitor::class)
-            ->disableOriginalConstructor()
-            ->setMethods(['getSessionId'])
-            ->getMock();
-        $visitor->expects($this->atLeastOnce())->method('getSessionId')
-            ->willReturnOnConsecutiveCalls('session_id_1', 'session_id_2');
-        $visitorCollection = $this->getMockBuilder(
-            \Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory::class
-        )
-            ->disableOriginalConstructor()->setMethods(['addFieldToFilter', 'getItems'])->getMock();
-        $visitorCollection->expects($this->atLeastOnce())->method('addFieldToFilter')->willReturnSelf();
-        $visitorCollection->expects($this->atLeastOnce())->method('getItems')->willReturn([$visitor, $visitor]);
-        $this->visitorCollectionFactory->expects($this->atLeastOnce())->method('create')
-            ->willReturn($visitorCollection);
-        $this->saveHandler->expects($this->atLeastOnce())->method('destroy')
-            ->withConsecutive(
-                ['session_id_1'],
-                ['session_id_2']
-            );
-
         $this->assertTrue($this->accountManagement->changePassword($email, $currentPassword, $newPassword));
     }
 
@@ -1625,28 +1613,8 @@ function ($string) {
         $this->customerSecure->expects($this->once())->method('setRpToken')->with(null);
         $this->customerSecure->expects($this->once())->method('setRpTokenCreatedAt')->with(null);
         $this->customerSecure->expects($this->any())->method('setPasswordHash')->willReturn(null);
+        $this->sessionCleanerMock->expects($this->once())->method('clearFor')->with($customerId)->willReturnSelf();
 
-        $this->sessionManager->method('isSessionExists')->willReturn(false);
-        $this->sessionManager->expects($this->atLeastOnce())->method('getSessionId');
-        $visitor = $this->getMockBuilder(\Magento\Customer\Model\Visitor::class)
-            ->disableOriginalConstructor()
-            ->setMethods(['getSessionId'])
-            ->getMock();
-        $visitor->expects($this->atLeastOnce())->method('getSessionId')
-            ->willReturnOnConsecutiveCalls('session_id_1', 'session_id_2');
-        $visitorCollection = $this->getMockBuilder(
-            \Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory::class
-        )
-            ->disableOriginalConstructor()->setMethods(['addFieldToFilter', 'getItems'])->getMock();
-        $visitorCollection->expects($this->atLeastOnce())->method('addFieldToFilter')->willReturnSelf();
-        $visitorCollection->expects($this->atLeastOnce())->method('getItems')->willReturn([$visitor, $visitor]);
-        $this->visitorCollectionFactory->expects($this->atLeastOnce())->method('create')
-            ->willReturn($visitorCollection);
-        $this->saveHandler->expects($this->atLeastOnce())->method('destroy')
-            ->withConsecutive(
-                ['session_id_1'],
-                ['session_id_2']
-            );
         $this->assertTrue($this->accountManagement->resetPassword($customerEmail, $resetToken, $newPassword));
     }
 
diff --git a/app/code/Magento/Customer/etc/di.xml b/app/code/Magento/Customer/etc/di.xml
index be219a81fd990..dbbe1b5862a08 100644
--- a/app/code/Magento/Customer/etc/di.xml
+++ b/app/code/Magento/Customer/etc/di.xml
@@ -61,6 +61,7 @@
                 type="Magento\Customer\Block\Account\SortLink"/>
     <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"/>
     <type name="Magento\Customer\Model\Session">
         <arguments>
             <argument name="configShare" xsi:type="object">Magento\Customer\Model\Config\Share\Proxy</argument>
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php
index 754c949747d61..93b8e9ad35e24 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AccountManagementTest.php
@@ -14,6 +14,7 @@
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Exception\State\ExpiredException;
 use Magento\Framework\Reflection\DataObjectProcessor;
+use Magento\Framework\Session\SessionManagerInterface;
 use Magento\Store\Model\StoreManagerInterface;
 use Magento\TestFramework\Helper\Bootstrap;
 
@@ -177,8 +178,22 @@ public function testLoginWrongUsername()
      */
     public function testChangePassword()
     {
+        /** @var SessionManagerInterface $session */
+        $session = $this->objectManager->get(SessionManagerInterface::class);
+        $oldSessionId = $session->getSessionId();
+        $session->setTestData('test');
         $this->accountManagement->changePassword('customer@example.com', 'password', 'new_Password123');
 
+        $this->assertTrue(
+            $oldSessionId !== $session->getSessionId(),
+            'Customer session id wasn\'t regenerated after change password'
+        );
+
+        $session->destroy();
+        $session->setSessionId($oldSessionId);
+
+        $this->assertNull($session->getTestData(), 'Customer session data wasn\'t cleaned');
+
         $this->accountManagement->authenticate('customer@example.com', 'new_Password123');
     }
 

From b5799c4cb3a29cb845c7cc1c6b53ba3953d5e4fa Mon Sep 17 00:00:00 2001
From: Nathan Smith <nathsmit@adobe.com>
Date: Mon, 24 Feb 2020 13:53:08 -0600
Subject: [PATCH 034/307] MC-31733: Media gallery breaks in some filesystems

---
 app/code/Magento/Theme/Helper/Storage.php     | 25 +++++++++++++++++--
 .../Magento/Theme/Model/Wysiwyg/Storage.php   |  6 ++++-
 .../Test/Unit/Model/Wysiwyg/StorageTest.php   | 24 ++++++++++++++++++
 app/code/Magento/Theme/etc/di.xml             |  5 ++++
 4 files changed, 57 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php
index e41bc8b145e38..41daee8507307 100644
--- a/app/code/Magento/Theme/Helper/Storage.php
+++ b/app/code/Magento/Theme/Helper/Storage.php
@@ -11,6 +11,7 @@
 
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Filesystem\DriverInterface;
 
 /**
  * Handles the storage of media files like images and fonts.
@@ -97,6 +98,10 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper
      * @var \Magento\Framework\Filesystem\Io\File
      */
     private $file;
+    /**
+     * @var DriverInterface
+     */
+    private $filesystemDriver;
 
     /**
      * @param \Magento\Framework\App\Helper\Context $context
@@ -105,6 +110,7 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper
      * @param \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory
      * @param \Magento\Framework\Filesystem\Io\File|null $file
      *
+     * @param DriverInterface|null $filesystemDriver
      * @throws \Magento\Framework\Exception\FileSystemException
      * @throws \Magento\Framework\Exception\ValidatorException
      */
@@ -113,7 +119,8 @@ public function __construct(
         \Magento\Framework\Filesystem $filesystem,
         \Magento\Backend\Model\Session $session,
         \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory,
-        \Magento\Framework\Filesystem\Io\File $file = null
+        \Magento\Framework\Filesystem\Io\File $file = null,
+        DriverInterface $filesystemDriver = null
     ) {
         parent::__construct($context);
         $this->filesystem = $filesystem;
@@ -124,6 +131,7 @@ public function __construct(
         $this->file = $file ?: ObjectManager::getInstance()->get(
             \Magento\Framework\Filesystem\Io\File::class
         );
+        $this->filesystemDriver = $filesystemDriver ?: ObjectManager::getInstance()->get(DriverInterface::class);
     }
 
     /**
@@ -247,7 +255,20 @@ public function getCurrentPath()
             if ($path && $path !== self::NODE_ROOT) {
                 $path = $this->convertIdToPath($path);
 
-                if ($this->mediaDirectoryWrite->isDirectory($path) && 0 === strpos($path, (string) $currentPath)) {
+                $realPath = $this->filesystemDriver->getRealPath(
+                    $this->filesystemDriver->getRealPathSafety($path)
+                );
+
+                $path = $realPath ?: $path;
+
+                if (strpos($path, $currentPath) !== 0) {
+                    $path = $currentPath;
+                }
+
+                if ($this->mediaDirectoryWrite->isDirectory($path)
+                    && strpos($path, $currentPath) === 0
+                    && $path !== $currentPath
+                ) {
                     $currentPath = $this->mediaDirectoryWrite->getRelativePath($path);
                 }
             }
diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
index edf8c148f8e68..658e4d78490cd 100644
--- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
+++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
@@ -18,11 +18,15 @@ class Storage
 {
     /**
      * Type font
+     *
+     * Represents the font type
      */
     const TYPE_FONT = 'font';
 
     /**
      * Type image
+     *
+     * Represents the image type
      */
     const TYPE_IMAGE = 'image';
 
@@ -328,7 +332,7 @@ public function deleteDirectory($path)
         $rootCmp = rtrim($this->_helper->getStorageRoot(), '/');
         $pathCmp = rtrim($path, '/');
 
-        if ($rootCmp == $pathCmp) {
+        if ($rootCmp == $pathCmp || $rootCmp === $this->mediaWriteDirectory->getAbsolutePath($path)) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('We can\'t delete root directory %1 right now.', $path)
             );
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
index 7ca25ee2ccac3..3cd3049172d0a 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
@@ -562,6 +562,30 @@ public function testDeleteRootDirectory()
         $this->_storageModel->deleteDirectory($directoryPath);
     }
 
+    /**
+     * cover \Magento\Theme\Model\Wysiwyg\Storage::deleteDirectory
+     * @expectedException \Magento\Framework\Exception\LocalizedException
+     */
+    public function testDeleteRootDirectoryRelative()
+    {
+        $directoryPath = $this->_storageRoot;
+        $fakePath = 'fake/relative/path';
+
+        $this->directoryWrite->method('getAbsolutePath')
+            ->with($fakePath)
+            ->willReturn($directoryPath);
+
+        $this->_helperStorage->expects(
+            $this->atLeastOnce()
+        )->method(
+            'getStorageRoot'
+        )->will(
+            $this->returnValue($directoryPath)
+        );
+
+        $this->_storageModel->deleteDirectory($fakePath);
+    }
+
     /**
      * @return array
      */
diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml
index 9e06f6c0f4e51..ac5c83952281d 100644
--- a/app/code/Magento/Theme/etc/di.xml
+++ b/app/code/Magento/Theme/etc/di.xml
@@ -289,4 +289,9 @@
             <argument name="identifierName" xsi:type="string">theme_id</argument>
         </arguments>
     </type>
+    <type name="Magento\Theme\Helper\Storage">
+        <arguments>
+            <argument name="filesystemDriver" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
+        </arguments>
+    </type>
 </config>

From aa01632b74342484d57e50e5f6352db381c31b78 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Tue, 25 Feb 2020 13:22:20 -0600
Subject: [PATCH 035/307] MC-31362: Media folder update

- Updated storage path handling logic
- Updated file driver path check logic
- Updated unit test for path check logic
- Updated test for image class
---
 .../Cms/Model/Wysiwyg/Images/Storage.php      |  46 +++++--
 .../Unit/Model/Design/Backend/FileTest.php    | 115 ++++++++++--------
 .../Unit/Model/Design/Backend/ImageTest.php   |  89 ++++++++++++++
 .../Framework/Filesystem/Driver/File.php      |   2 +-
 .../Filesystem/Test/Unit/Driver/FileTest.php  |  31 +++++
 5 files changed, 221 insertions(+), 62 deletions(-)
 create mode 100644 app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php

diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
index c54f4c5bae3d8..cec6c3aa50609 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -225,6 +225,8 @@ public function __construct(
      *
      * @param string $path
      * @return void
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     protected function createSubDirectories($path)
     {
@@ -295,6 +297,7 @@ protected function removeItemFromCollection($collection, $conditions)
      *
      * @param string $path Parent directory path
      * @return \Magento\Framework\Data\Collection\Filesystem
+     * @throws \Exception
      */
     public function getDirsCollection($path)
     {
@@ -393,6 +396,7 @@ public function getFilesCollection($path, $type = null)
      *
      * @param string $path Path to the directory
      * @return \Magento\Cms\Model\Wysiwyg\Images\Storage\Collection
+     * @throws \Exception
      */
     public function getCollection($path = null)
     {
@@ -485,6 +489,9 @@ public function deleteDirectory($path)
      *
      * @param string $path
      * @return void
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\LocalizedException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     protected function _deleteByPath($path)
     {
@@ -500,6 +507,8 @@ protected function _deleteByPath($path)
      *
      * @param string $target File path to be deleted
      * @return $this
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     public function deleteFile($target)
     {
@@ -561,9 +570,11 @@ public function uploadFile($targetPath, $type = null)
     /**
      * Thumbnail path getter
      *
-     * @param  string $filePath original file path
-     * @param  bool $checkFile OPTIONAL is it necessary to check file availability
+     * @param string $filePath original file path
+     * @param bool $checkFile OPTIONAL is it necessary to check file availability
      * @return string|false
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     public function getThumbnailPath($filePath, $checkFile = false)
     {
@@ -587,9 +598,11 @@ public function getThumbnailPath($filePath, $checkFile = false)
     /**
      * Thumbnail URL getter
      *
-     * @param  string $filePath original file path
-     * @param  bool $checkFile OPTIONAL is it necessary to check file availability
+     * @param string $filePath original file path
+     * @param bool $checkFile OPTIONAL is it necessary to check file availability
      * @return string|false
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     public function getThumbnailUrl($filePath, $checkFile = false)
     {
@@ -610,6 +623,8 @@ public function getThumbnailUrl($filePath, $checkFile = false)
      * @param string $source Image path to be resized
      * @param bool $keepRatio Keep aspect ratio or not
      * @return bool|string Resized filepath or false if errors were occurred
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     public function resizeFile($source, $keepRatio = true)
     {
@@ -643,6 +658,9 @@ public function resizeFile($source, $keepRatio = true)
      *
      * @param string $filename File basename
      * @return bool|string Thumbnail path or false for errors
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\LocalizedException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     public function resizeOnTheFly($filename)
     {
@@ -658,6 +676,8 @@ public function resizeOnTheFly($filename)
      *
      * @param bool|string $filePath Path to the file
      * @return string
+     * @throws \Magento\Framework\Exception\FileSystemException
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     public function getThumbsPath($filePath = false)
     {
@@ -765,13 +785,12 @@ public function getCmsWysiwygImages()
     protected function _validatePath($path)
     {
         $root = $this->_sanitizePath($this->_cmsWysiwygImages->getStorageRoot());
-        $realPath = $this->_sanitizePath($path);
-        if ($root == $realPath) {
+        if ($root == $path) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('We can\'t delete root directory %1 right now.', $path)
             );
         }
-        if (strpos($realPath, (string) $root) !== 0) {
+        if (strpos($path, (string) $root) !== 0) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('Directory %1 is not under storage root path.', $path)
             );
@@ -783,10 +802,20 @@ protected function _validatePath($path)
      *
      * @param string $path
      * @return string
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     protected function _sanitizePath($path)
     {
-        return rtrim(preg_replace('~[/\\\]+~', '/', $this->_directory->getDriver()->getRealPathSafety($path)), '/');
+        return rtrim(
+            preg_replace(
+                '~[/\\\]+~',
+                '/',
+                $this->_directory->getDriver()->getRealPathSafety(
+                    $this->_directory->getAbsolutePath($path)
+                )
+            ),
+            '/'
+        );
     }
 
     /**
@@ -794,6 +823,7 @@ protected function _sanitizePath($path)
      *
      * @param string $path
      * @return string|bool
+     * @throws \Magento\Framework\Exception\ValidatorException
      */
     protected function _getRelativePathToRoot($path)
     {
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 0a7e7c321ebe4..4278afe8f1bb0 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -5,10 +5,11 @@
  */
 namespace Magento\Theme\Test\Unit\Model\Design\Backend;
 
-use Magento\Framework\UrlInterface;
-use Magento\Theme\Model\Design\Backend\File;
 use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\Filesystem\Io\File as IoFileSystem;
+use Magento\Framework\UrlInterface;
+use Magento\Theme\Model\Design\Backend\File;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -24,7 +25,7 @@ class FileTest extends \PHPUnit\Framework\TestCase
     /** @var File */
     protected $fileBackend;
 
-    /** @var IoFileSystem|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var IoFileSystem */
     private $ioFileSystem;
 
     /**
@@ -41,43 +42,48 @@ public function setUp()
     {
         $context = $this->getMockObject(\Magento\Framework\Model\Context::class);
         $registry = $this->getMockObject(\Magento\Framework\Registry::class);
-        $config = $this->getMockObjectForAbstractClass(\Magento\Framework\App\Config\ScopeConfigInterface::class);
-        $cacheTypeList = $this->getMockObjectForAbstractClass(\Magento\Framework\App\Cache\TypeListInterface::class);
-        $uploaderFactory = $this->getMockObject(\Magento\MediaStorage\Model\File\UploaderFactory::class, ['create']);
+        $config = $this->getMockObjectForAbstractClass(
+            \Magento\Framework\App\Config\ScopeConfigInterface::class
+        );
+        $cacheTypeList = $this->getMockObjectForAbstractClass(
+            \Magento\Framework\App\Cache\TypeListInterface::class
+        );
+        $uploaderFactory = $this->getMockObject(
+            \Magento\MediaStorage\Model\File\UploaderFactory::class,
+            ['create']
+        );
         $requestData = $this->getMockObjectForAbstractClass(
             \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface::class
         );
         $filesystem = $this->getMockBuilder(\Magento\Framework\Filesystem::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->mediaDirectory = $this->getMockBuilder(\Magento\Framework\Filesystem\Directory\WriteInterface::class)
+        $this->mediaDirectory = $this->getMockBuilder(
+            \Magento\Framework\Filesystem\Directory\WriteInterface::class
+        )
             ->getMockForAbstractClass();
-
         $filesystem->expects($this->once())
             ->method('getDirectoryWrite')
             ->with(DirectoryList::MEDIA)
             ->willReturn($this->mediaDirectory);
         $this->urlBuilder = $this->getMockBuilder(\Magento\Framework\UrlInterface::class)
             ->getMockForAbstractClass();
-
-        $this->ioFileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem\Io\File::class)
-            ->getMockForAbstractClass();
-
         $this->mime = $this->getMockBuilder(\Magento\Framework\File\Mime::class)
             ->disableOriginalConstructor()
             ->getMock();
-
-        $this->databaseHelper = $this->getMockBuilder(\Magento\MediaStorage\Helper\File\Storage\Database::class)
+        $this->databaseHelper = $this->getMockBuilder(
+            \Magento\MediaStorage\Helper\File\Storage\Database::class
+        )
             ->disableOriginalConstructor()
             ->getMock();
-
-        $abstractResource = $this->getMockBuilder(\Magento\Framework\Model\ResourceModel\AbstractResource::class)
+        $abstractResource = $this->getMockBuilder(
+            \Magento\Framework\Model\ResourceModel\AbstractResource::class
+        )
             ->getMockForAbstractClass();
-
         $abstractDb = $this->getMockBuilder(\Magento\Framework\Data\Collection\AbstractDb::class)
             ->disableOriginalConstructor()
             ->getMockForAbstractClass();
-
+        $this->ioFileSystem = new IoFileSystem();
         $this->fileBackend = new File(
             $context,
             $registry,
@@ -93,7 +99,6 @@ public function setUp()
             $this->databaseHelper,
             $this->ioFileSystem
         );
-
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $objectManager->setBackwardCompatibleProperty(
             $this->fileBackend,
@@ -139,16 +144,18 @@ public function testAfterLoad()
 
         $absoluteFilePath = '/absolute_path/' . $value;
 
-        $this->fileBackend->setValue($value);
-        $this->fileBackend->setFieldConfig(
+        $this->fileBackend->setData(
             [
-                'upload_dir' => [
-                    'value' => 'value',
-                    'config' => 'system/filesystem/media',
-                ],
-                'base_url' => [
-                    'type' => 'media',
-                    'value' => 'design/file'
+                'value' => $value,
+                'field_config' => [
+                    'upload_dir' => [
+                        'value' => 'value',
+                        'config' => 'system/filesystem/media',
+                    ],
+                    'base_url' => [
+                        'type' => 'media',
+                        'value' => 'design/file'
+                    ],
                 ],
             ]
         );
@@ -161,7 +168,6 @@ public function testAfterLoad()
             ->method('getAbsolutePath')
             ->with('value/' . $value)
             ->willReturn($absoluteFilePath);
-
         $this->urlBuilder->expects($this->once())
             ->method('getBaseUrl')
             ->with(['_type' => UrlInterface::URL_TYPE_MEDIA])
@@ -174,12 +180,10 @@ public function testAfterLoad()
             ->method('stat')
             ->with('value/' . $value)
             ->willReturn(['size' => 234234]);
-
         $this->mime->expects($this->once())
             ->method('getMimeType')
             ->with($absoluteFilePath)
             ->willReturn($mime);
-
         $this->fileBackend->afterLoad();
         $this->assertEquals(
             [
@@ -199,27 +203,28 @@ public function testAfterLoad()
     /**
      * @dataProvider beforeSaveDataProvider
      * @param string $fileName
+     * @throws LocalizedException
      */
     public function testBeforeSave($fileName)
     {
         $expectedFileName = basename($fileName);
         $expectedTmpMediaPath = 'tmp/design/file/' . $expectedFileName;
-        $this->fileBackend->setScope('store');
-        $this->fileBackend->setScopeId(1);
-        $this->fileBackend->setValue(
-            [
-                [
-                    'url' => 'http://magento2.com/pub/media/tmp/image/' . $fileName,
-                    'file' => $fileName,
-                    'size' => 234234,
-                ]
-            ]
-        );
-        $this->fileBackend->setFieldConfig(
+        $this->fileBackend->setData(
             [
-                'upload_dir' => [
-                    'value' => 'value',
-                    'config' => 'system/filesystem/media',
+                'scope' => 'store',
+                'scope_id' => 1,
+                'value' => [
+                    [
+                        'url' => 'http://magento2.com/pub/media/tmp/image/' . $fileName,
+                        'file' => $fileName,
+                        'size' => 234234,
+                    ]
+                ],
+                'field_config' => [
+                    'upload_dir' => [
+                        'value' => 'value',
+                        'config' => 'system/filesystem/media',
+                    ],
                 ],
             ]
         );
@@ -274,16 +279,19 @@ public function testBeforeSaveWithoutFile()
     public function testBeforeSaveWithExistingFile()
     {
         $value = 'filename.jpg';
-        $this->fileBackend->setValue(
+        $this->fileBackend->setData(
             [
-                [
-                    'url' => 'http://magento2.com/pub/media/tmp/image/' . $value,
-                    'file' => $value,
-                    'size' => 234234,
-                    'exists' => true
-                ]
+                'value' => [
+                    [
+                        'url' => 'http://magento2.com/pub/media/tmp/image/' . $value,
+                        'file' => $value,
+                        'size' => 234234,
+                        'exists' => true
+                    ]
+                ],
             ]
         );
+
         $this->fileBackend->beforeSave();
         $this->assertEquals(
             $value,
@@ -297,6 +305,7 @@ public function testBeforeSaveWithExistingFile()
      * @param string $path
      * @param string $filename
      * @dataProvider getRelativeMediaPathDataProvider
+     * @throws \ReflectionException
      */
     public function testGetRelativeMediaPath(string $path, string $filename)
     {
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
new file mode 100644
index 0000000000000..c79fdbf9168ce
--- /dev/null
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+namespace Magento\Theme\Test\Unit\Model\Design\Backend;
+
+use Magento\Framework\Filesystem\Io\File as IoFileSystem;
+use Magento\Theme\Model\Design\Backend\Image;
+
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ImageTest extends \PHPUnit\Framework\TestCase
+{
+    /** @var Image */
+    protected $imageBackend;
+
+    public function setUp()
+    {
+        $context = $this->getMockObject(\Magento\Framework\Model\Context::class);
+        $registry = $this->getMockObject(\Magento\Framework\Registry::class);
+        $config = $this->getMockObject(\Magento\Framework\App\Config\ScopeConfigInterface::class);
+        $cacheTypeList = $this->getMockObject(\Magento\Framework\App\Cache\TypeListInterface::class);
+        $uploaderFactory = $this->getMockObject(\Magento\MediaStorage\Model\File\UploaderFactory::class);
+        $requestData = $this->getMockObject(
+            \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface::class
+        );
+        $filesystem = $this->getMockObject(\Magento\Framework\Filesystem::class);
+        $urlBuilder = $this->getMockObject(\Magento\Framework\UrlInterface::class);
+        $databaseHelper = $this->getMockObject(\Magento\MediaStorage\Helper\File\Storage\Database::class);
+        $abstractResource = $this->getMockObject(\Magento\Framework\Model\ResourceModel\AbstractResource::class);
+        $abstractDb = $this->getMockObject(\Magento\Framework\Data\Collection\AbstractDb::class);
+        $ioFileSystem = new IoFileSystem();
+        $this->imageBackend = new Image(
+            $context,
+            $registry,
+            $config,
+            $cacheTypeList,
+            $uploaderFactory,
+            $requestData,
+            $filesystem,
+            $urlBuilder,
+            $abstractResource,
+            $abstractDb,
+            [],
+            $databaseHelper,
+            $ioFileSystem
+        );
+    }
+
+    public function tearDown()
+    {
+        unset($this->imageBackend);
+    }
+
+    /**
+     * @param string $class
+     * @param array $methods
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function getMockObject($class, $methods = [])
+    {
+        $builder =  $this->getMockBuilder($class)
+            ->disableOriginalConstructor();
+        if (count($methods)) {
+            $builder->setMethods($methods);
+        }
+        return  $builder->getMock();
+    }
+
+    /**
+     * @expectedException \Magento\Framework\Exception\LocalizedException
+     * @expectedExceptionMessage Something is wrong with the file upload settings.
+     */
+    public function testBeforeSaveWithInvalidExtensionFile()
+    {
+        $this->imageBackend->setData(
+            [
+                'value' => [
+                    [
+                        'file' => 'fileName.invalidExtension',
+                    ]
+                ],
+            ]
+        );
+        $this->imageBackend->beforeSave();
+    }
+}
diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
index 4d5ba7a1918ce..1a847a518a3f9 100644
--- a/lib/internal/Magento/Framework/Filesystem/Driver/File.php
+++ b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
@@ -972,7 +972,7 @@ public function getRealPath($path)
      */
     public function getRealPathSafety($path)
     {
-        if (strpos($path, DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR) === false) {
+        if (strpos($path, DIRECTORY_SEPARATOR . '.') === false) {
             return $path;
         }
 
diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
index 5d1f9664bde61..e5926a815172e 100644
--- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
+++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
@@ -24,6 +24,9 @@ public function setUp()
 
     /**
      * @dataProvider dataProviderForTestGetAbsolutePath
+     * @param $basePath
+     * @param $path
+     * @param $expected
      */
     public function testGetAbsolutePath($basePath, $path, $expected)
     {
@@ -46,6 +49,9 @@ public function dataProviderForTestGetAbsolutePath()
 
     /**
      * @dataProvider dataProviderForTestGetRelativePath
+     * @param $basePath
+     * @param $path
+     * @param $expected
      */
     public function testGetRelativePath($basePath, $path, $expected)
     {
@@ -65,4 +71,29 @@ public function dataProviderForTestGetRelativePath()
             ['/root/path/sub', '/root/path/other', '/root/path/other'],
         ];
     }
+
+    /**
+     * @dataProvider dataProviderForTestRealPathSafety
+     * @param $path
+     * @param $expected
+     */
+    public function testGetRealPathSafety($path, $expected)
+    {
+        $file = new File();
+        $this->assertEquals($expected, $file->getRealPathSafety($path));
+    }
+
+    /**
+     * @return array
+     */
+    public function dataProviderForTestRealPathSafety()
+    {
+        return [
+            ['/1/2/3', '/1/2/3'],
+            ['/1/2/3/../..', '/1'],
+            ['/1/2/3/.', '/1/2/3'],
+            ['/1/2/3/./4/5', '/1/2/3/4/5'],
+            ['/1/2/3/../4/5', '/1/2/4/5'],
+        ];
+    }
 }

From 4dc80f084392de86456ee12a884040a2f5981f9d Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Tue, 25 Feb 2020 16:13:41 -0600
Subject: [PATCH 036/307] MC-31362: Media folder update

- Added strict typing
- Added docblocks and type hints to tests
- Updated unit tests
---
 .../Adminhtml/Wysiwyg/Images/DeleteFolder.php |  3 +
 .../Theme/Model/Design/Backend/File.php       |  2 +
 .../Unit/Model/Design/Backend/FileTest.php    | 72 +++++++++++++------
 .../Unit/Model/Design/Backend/ImageTest.php   | 21 ++++--
 .../Filesystem/Test/Unit/Driver/FileTest.php  | 47 ++++++++----
 5 files changed, 105 insertions(+), 40 deletions(-)

diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
index eec5c40c6e33b..29f84e0b2e534 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFolder.php
@@ -4,6 +4,9 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+declare(strict_types=1);
+
 namespace Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
 
 use Magento\Framework\App\Action\HttpPostActionInterface;
diff --git a/app/code/Magento/Theme/Model/Design/Backend/File.php b/app/code/Magento/Theme/Model/Design/Backend/File.php
index 860a31041f2d0..143889364781f 100644
--- a/app/code/Magento/Theme/Model/Design/Backend/File.php
+++ b/app/code/Magento/Theme/Model/Design/Backend/File.php
@@ -4,6 +4,8 @@
  * See COPYING.txt for license details.
  */
 
+declare(strict_types=1);
+
 namespace Magento\Theme\Model\Design\Backend;
 
 use Magento\Config\Model\Config\Backend\File as BackendFile;
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 4278afe8f1bb0..91ba3941ca937 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -3,41 +3,51 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+declare(strict_types=1);
+
 namespace Magento\Theme\Test\Unit\Model\Design\Backend;
 
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Exception\LocalizedException;
+use Magento\Framework\File\Mime;
+use Magento\Framework\Filesystem\Directory\WriteInterface;
 use Magento\Framework\Filesystem\Io\File as IoFileSystem;
 use Magento\Framework\UrlInterface;
+use Magento\MediaStorage\Helper\File\Storage\Database;
 use Magento\Theme\Model\Design\Backend\File;
+use PHPUnit_Framework_MockObject_MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class FileTest extends \PHPUnit\Framework\TestCase
 {
-    /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\PHPUnit_Framework_MockObject_MockObject */
-    protected $mediaDirectory;
+    /** @var WriteInterface|PHPUnit_Framework_MockObject_MockObject */
+    private $mediaDirectory;
 
-    /** @var UrlInterface|\PHPUnit_Framework_MockObject_MockObject */
-    protected $urlBuilder;
+    /** @var UrlInterface|PHPUnit_Framework_MockObject_MockObject */
+    private $urlBuilder;
 
     /** @var File */
-    protected $fileBackend;
+    private $fileBackend;
 
-    /** @var IoFileSystem */
+    /** @var IoFileSystem|PHPUnit_Framework_MockObject_MockObject */
     private $ioFileSystem;
 
     /**
-     * @var \Magento\Framework\File\Mime|\PHPUnit_Framework_MockObject_MockObject
+     * @var Mime|PHPUnit_Framework_MockObject_MockObject
      */
     private $mime;
 
     /**
-     * @var \Magento\MediaStorage\Helper\File\Storage\Database|\PHPUnit_Framework_MockObject_MockObject
+     * @var Database|PHPUnit_Framework_MockObject_MockObject
      */
     private $databaseHelper;
 
+    /**
+     * @inheritdoc
+     */
     public function setUp()
     {
         $context = $this->getMockObject(\Magento\Framework\Model\Context::class);
@@ -59,7 +69,7 @@ public function setUp()
             ->disableOriginalConstructor()
             ->getMock();
         $this->mediaDirectory = $this->getMockBuilder(
-            \Magento\Framework\Filesystem\Directory\WriteInterface::class
+            WriteInterface::class
         )
             ->getMockForAbstractClass();
         $filesystem->expects($this->once())
@@ -68,11 +78,13 @@ public function setUp()
             ->willReturn($this->mediaDirectory);
         $this->urlBuilder = $this->getMockBuilder(\Magento\Framework\UrlInterface::class)
             ->getMockForAbstractClass();
-        $this->mime = $this->getMockBuilder(\Magento\Framework\File\Mime::class)
+        $this->ioFileSystem = $this->getMockBuilder(\Magento\Framework\Filesystem\Io\File::class)
+            ->getMockForAbstractClass();
+        $this->mime = $this->getMockBuilder(Mime::class)
             ->disableOriginalConstructor()
             ->getMock();
         $this->databaseHelper = $this->getMockBuilder(
-            \Magento\MediaStorage\Helper\File\Storage\Database::class
+            Database::class
         )
             ->disableOriginalConstructor()
             ->getMock();
@@ -83,7 +95,6 @@ public function setUp()
         $abstractDb = $this->getMockBuilder(\Magento\Framework\Data\Collection\AbstractDb::class)
             ->disableOriginalConstructor()
             ->getMockForAbstractClass();
-        $this->ioFileSystem = new IoFileSystem();
         $this->fileBackend = new File(
             $context,
             $registry,
@@ -107,17 +118,22 @@ public function setUp()
         );
     }
 
+    /**
+     * @inheritdoc
+     */
     public function tearDown()
     {
         unset($this->fileBackend);
     }
 
     /**
+     * Gets the mock object.
+     *
      * @param string $class
      * @param array $methods
-     * @return \PHPUnit_Framework_MockObject_MockObject
+     * @return PHPUnit_Framework_MockObject_MockObject
      */
-    protected function getMockObject($class, $methods = [])
+    private function getMockObject(string $class, array $methods = []): PHPUnit_Framework_MockObject_MockObject
     {
         $builder =  $this->getMockBuilder($class)
             ->disableOriginalConstructor();
@@ -128,15 +144,20 @@ protected function getMockObject($class, $methods = [])
     }
 
     /**
+     * Gets mock objects for abstract class.
+     *
      * @param string $class
-     * @return \PHPUnit_Framework_MockObject_MockObject
+     * @return PHPUnit_Framework_MockObject_MockObject
      */
-    protected function getMockObjectForAbstractClass($class)
+    private function getMockObjectForAbstractClass(string $class): PHPUnit_Framework_MockObject_MockObject
     {
         return  $this->getMockBuilder($class)
             ->getMockForAbstractClass();
     }
 
+    /**
+     * Test for afterLoad method.
+     */
     public function testAfterLoad()
     {
         $value = 'filename.jpg';
@@ -201,11 +222,13 @@ public function testAfterLoad()
     }
 
     /**
+     * Test for beforeSave method.
+     *
      * @dataProvider beforeSaveDataProvider
      * @param string $fileName
      * @throws LocalizedException
      */
-    public function testBeforeSave($fileName)
+    public function testBeforeSave(string $fileName)
     {
         $expectedFileName = basename($fileName);
         $expectedTmpMediaPath = 'tmp/design/file/' . $expectedFileName;
@@ -247,17 +270,21 @@ public function testBeforeSave($fileName)
     }
 
     /**
+     * Data provider for testBeforeSave.
+     *
      * @return array
      */
-    public function beforeSaveDataProvider()
+    public function beforeSaveDataProvider(): array
     {
         return [
             'Normal file name' => ['filename.jpg'],
-            'Vulnerable file name' => ['../../../../../../../../etc/passwd'],
+            'Vulnerable file name' => ['../../../../../../../../etc/pass'],
         ];
     }
 
     /**
+     * Test for beforeSave method without file.
+     *
      * @expectedException \Magento\Framework\Exception\LocalizedException
      * @expectedExceptionMessage header_logo_src does not contain field 'file'
      */
@@ -276,6 +303,11 @@ public function testBeforeSaveWithoutFile()
         $this->fileBackend->beforeSave();
     }
 
+    /**
+     * Test for beforeSave method with existing file.
+     *
+     * @throws LocalizedException
+     */
     public function testBeforeSaveWithExistingFile()
     {
         $value = 'filename.jpg';
@@ -327,7 +359,7 @@ public function getRelativeMediaPathDataProvider(): array
     {
         return [
             'Normal path' => ['pub/media/', 'filename.jpg'],
-            'Complex path' => ['somepath/pub/media/', 'filename.jpg'],
+            'Complex path' => ['some_path/pub/media/', 'filename.jpg'],
         ];
     }
 }
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index c79fdbf9168ce..4f5b47db93dd7 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -3,10 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+declare(strict_types=1);
+
 namespace Magento\Theme\Test\Unit\Model\Design\Backend;
 
-use Magento\Framework\Filesystem\Io\File as IoFileSystem;
 use Magento\Theme\Model\Design\Backend\Image;
+use PHPUnit_Framework_MockObject_MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -14,8 +17,11 @@
 class ImageTest extends \PHPUnit\Framework\TestCase
 {
     /** @var Image */
-    protected $imageBackend;
+    private $imageBackend;
 
+    /**
+     * @inheritdoc
+     */
     public function setUp()
     {
         $context = $this->getMockObject(\Magento\Framework\Model\Context::class);
@@ -31,7 +37,7 @@ public function setUp()
         $databaseHelper = $this->getMockObject(\Magento\MediaStorage\Helper\File\Storage\Database::class);
         $abstractResource = $this->getMockObject(\Magento\Framework\Model\ResourceModel\AbstractResource::class);
         $abstractDb = $this->getMockObject(\Magento\Framework\Data\Collection\AbstractDb::class);
-        $ioFileSystem = new IoFileSystem();
+        $ioFileSystem = $this->getMockObject(\Magento\Framework\Filesystem\Io\File::class);
         $this->imageBackend = new Image(
             $context,
             $registry,
@@ -49,6 +55,9 @@ public function setUp()
         );
     }
 
+    /**
+     * @inheritdoc
+     */
     public function tearDown()
     {
         unset($this->imageBackend);
@@ -57,9 +66,9 @@ public function tearDown()
     /**
      * @param string $class
      * @param array $methods
-     * @return \PHPUnit_Framework_MockObject_MockObject
+     * @return PHPUnit_Framework_MockObject_MockObject
      */
-    protected function getMockObject($class, $methods = [])
+    private function getMockObject(string $class, array $methods = []): PHPUnit_Framework_MockObject_MockObject
     {
         $builder =  $this->getMockBuilder($class)
             ->disableOriginalConstructor();
@@ -70,6 +79,8 @@ protected function getMockObject($class, $methods = [])
     }
 
     /**
+     * Test for beforeSave method with invalid file extension.
+     *
      * @expectedException \Magento\Framework\Exception\LocalizedException
      * @expectedExceptionMessage Something is wrong with the file upload settings.
      */
diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
index e5926a815172e..83cb9ea80e1ab 100644
--- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
+++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
@@ -4,6 +4,8 @@
  * See COPYING.txt for license details.
  */
 
+declare(strict_types=1);
+
 namespace Magento\Framework\Filesystem\Test\Unit\Driver;
 
 use Magento\Framework\Filesystem\Driver\File;
@@ -16,6 +18,9 @@ class FileTest extends \PHPUnit\Framework\TestCase
     /** @var bool Result of file_put_contents() function */
     public static $filePutContents;
 
+    /**
+     * @inheritdoc
+     */
     public function setUp()
     {
         self::$fileGetContents = '';
@@ -23,21 +28,25 @@ public function setUp()
     }
 
     /**
+     * Test for getAbsolutePath method.
+     *
      * @dataProvider dataProviderForTestGetAbsolutePath
-     * @param $basePath
-     * @param $path
-     * @param $expected
+     * @param string $basePath
+     * @param string $path
+     * @param string $expected
      */
-    public function testGetAbsolutePath($basePath, $path, $expected)
+    public function testGetAbsolutePath(string $basePath, string $path, string $expected)
     {
         $file = new File();
         $this->assertEquals($expected, $file->getAbsolutePath($basePath, $path));
     }
 
     /**
+     * Data provider for testGetAbsolutePath.
+     *
      * @return array
      */
-    public function dataProviderForTestGetAbsolutePath()
+    public function dataProviderForTestGetAbsolutePath(): array
     {
         return [
             ['/root/path/', 'sub', '/root/path/sub'],
@@ -48,21 +57,25 @@ public function dataProviderForTestGetAbsolutePath()
     }
 
     /**
+     * Test for getRelativePath method.
+     *
      * @dataProvider dataProviderForTestGetRelativePath
-     * @param $basePath
-     * @param $path
-     * @param $expected
+     * @param string $basePath
+     * @param string $path
+     * @param string $expected
      */
-    public function testGetRelativePath($basePath, $path, $expected)
+    public function testGetRelativePath(string $basePath, string $path, string $expected)
     {
         $file = new File();
         $this->assertEquals($expected, $file->getRelativePath($basePath, $path));
     }
 
     /**
+     * Data provider for testGetRelativePath.
+     *
      * @return array
      */
-    public function dataProviderForTestGetRelativePath()
+    public function dataProviderForTestGetRelativePath(): array
     {
         return [
             ['/root/path/', 'sub', 'sub'],
@@ -73,20 +86,24 @@ public function dataProviderForTestGetRelativePath()
     }
 
     /**
-     * @dataProvider dataProviderForTestRealPathSafety
-     * @param $path
-     * @param $expected
+     * Test for getRealPathSafety method.
+     *
+     * @dataProvider dataProviderForTestGetRealPathSafety
+     * @param string $path
+     * @param string $expected
      */
-    public function testGetRealPathSafety($path, $expected)
+    public function testGetRealPathSafety(string $path, string $expected)
     {
         $file = new File();
         $this->assertEquals($expected, $file->getRealPathSafety($path));
     }
 
     /**
+     * Data provider for testGetRealPathSafety;
+     *
      * @return array
      */
-    public function dataProviderForTestRealPathSafety()
+    public function dataProviderForTestGetRealPathSafety(): array
     {
         return [
             ['/1/2/3', '/1/2/3'],

From d53c7cabcd4fccb871b350a3c74c388db1ed8c89 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Tue, 25 Feb 2020 17:39:55 -0600
Subject: [PATCH 037/307] MC-31362: Media folder update

- Fixed missed unit test mock data
---
 .../Unit/Model/Design/Backend/ImageTest.php   | 54 +++++++++++++------
 1 file changed, 38 insertions(+), 16 deletions(-)

diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index 4f5b47db93dd7..2bc60ffa7aa04 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -8,6 +8,18 @@
 
 namespace Magento\Theme\Test\Unit\Model\Design\Backend;
 
+use Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface;
+use Magento\Framework\App\Cache\TypeListInterface;
+use Magento\Framework\App\Config\ScopeConfigInterface;
+use Magento\Framework\Data\Collection\AbstractDb;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Io\File;
+use Magento\Framework\Model\Context;
+use Magento\Framework\Model\ResourceModel\AbstractResource;
+use Magento\Framework\Registry;
+use Magento\Framework\UrlInterface;
+use Magento\MediaStorage\Helper\File\Storage\Database;
+use Magento\MediaStorage\Model\File\UploaderFactory;
 use Magento\Theme\Model\Design\Backend\Image;
 use PHPUnit_Framework_MockObject_MockObject;
 
@@ -19,25 +31,26 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     /** @var Image */
     private $imageBackend;
 
+    /** @var File */
+    private $ioFileSystem;
+
     /**
      * @inheritdoc
      */
     public function setUp()
     {
-        $context = $this->getMockObject(\Magento\Framework\Model\Context::class);
-        $registry = $this->getMockObject(\Magento\Framework\Registry::class);
-        $config = $this->getMockObject(\Magento\Framework\App\Config\ScopeConfigInterface::class);
-        $cacheTypeList = $this->getMockObject(\Magento\Framework\App\Cache\TypeListInterface::class);
-        $uploaderFactory = $this->getMockObject(\Magento\MediaStorage\Model\File\UploaderFactory::class);
-        $requestData = $this->getMockObject(
-            \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface::class
-        );
-        $filesystem = $this->getMockObject(\Magento\Framework\Filesystem::class);
-        $urlBuilder = $this->getMockObject(\Magento\Framework\UrlInterface::class);
-        $databaseHelper = $this->getMockObject(\Magento\MediaStorage\Helper\File\Storage\Database::class);
-        $abstractResource = $this->getMockObject(\Magento\Framework\Model\ResourceModel\AbstractResource::class);
-        $abstractDb = $this->getMockObject(\Magento\Framework\Data\Collection\AbstractDb::class);
-        $ioFileSystem = $this->getMockObject(\Magento\Framework\Filesystem\Io\File::class);
+        $context = $this->getMockObject(Context::class);
+        $registry = $this->getMockObject(Registry::class);
+        $config = $this->getMockObject(ScopeConfigInterface::class);
+        $cacheTypeList = $this->getMockObject(TypeListInterface::class);
+        $uploaderFactory = $this->getMockObject(UploaderFactory::class);
+        $requestData = $this->getMockObject(RequestDataInterface::class);
+        $filesystem = $this->getMockObject(Filesystem::class);
+        $urlBuilder = $this->getMockObject(UrlInterface::class);
+        $databaseHelper = $this->getMockObject(Database::class);
+        $abstractResource = $this->getMockObject(AbstractResource::class);
+        $abstractDb = $this->getMockObject(AbstractDb::class);
+        $this->ioFileSystem = $this->getMockObject(File::class);
         $this->imageBackend = new Image(
             $context,
             $registry,
@@ -51,7 +64,7 @@ public function setUp()
             $abstractDb,
             [],
             $databaseHelper,
-            $ioFileSystem
+            $this->ioFileSystem
         );
     }
 
@@ -86,15 +99,24 @@ private function getMockObject(string $class, array $methods = []): PHPUnit_Fram
      */
     public function testBeforeSaveWithInvalidExtensionFile()
     {
+        $invalidFileName = 'fileName.invalidExtension';
         $this->imageBackend->setData(
             [
                 'value' => [
                     [
-                        'file' => 'fileName.invalidExtension',
+                        'file' => $invalidFileName,
                     ]
                 ],
             ]
         );
+        $expectedPathInfo = [
+            'extension' => 'invalidExtension'
+        ];
+        $this->ioFileSystem
+            ->expects($this->any())
+            ->method('getPathInfo')
+            ->with($invalidFileName)
+            ->willReturn($expectedPathInfo);
         $this->imageBackend->beforeSave();
     }
 }

From 412c747844c48c5fef50fcb517126c90bfc43282 Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Wed, 26 Feb 2020 11:09:27 -0600
Subject: [PATCH 038/307] MC-31357: Customer file uploader update

- Updated customer metadata form image logic
- Updated corresponding unit and integration tests
---
 .../Customer/Model/Metadata/Form/Image.php    | 115 +++++++---
 .../Unit/Model/Metadata/Form/ImageTest.php    | 172 +++++++++++---
 .../Model/Metadata/Form/ImageTest.php         | 214 ++++++++++++++++++
 .../Magento/Customer/_files/image/magento.jpg | Bin 0 -> 1393 bytes
 4 files changed, 448 insertions(+), 53 deletions(-)
 create mode 100644 dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Customer/_files/image/magento.jpg

diff --git a/app/code/Magento/Customer/Model/Metadata/Form/Image.php b/app/code/Magento/Customer/Model/Metadata/Form/Image.php
index 33bdf827f80fa..d023db1454906 100644
--- a/app/code/Magento/Customer/Model/Metadata/Form/Image.php
+++ b/app/code/Magento/Customer/Model/Metadata/Form/Image.php
@@ -3,17 +3,33 @@
  * 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\Api\AddressMetadataInterface;
 use Magento\Customer\Api\CustomerMetadataInterface;
+use Magento\Customer\Api\Data\AttributeMetadataInterface;
 use Magento\Customer\Model\FileProcessor;
+use Magento\Customer\Model\FileProcessorFactory;
 use Magento\Framework\Api\ArrayObjectSearch;
 use Magento\Framework\Api\Data\ImageContentInterface;
 use Magento\Framework\Api\Data\ImageContentInterfaceFactory;
 use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Exception\FileSystemException;
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\File\UploaderFactory;
 use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Directory\WriteInterface;
+use Magento\Framework\Filesystem\Io\File as IoFileSystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem\Directory\WriteFactory;
+use Magento\Framework\Locale\ResolverInterface;
+use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
+use Magento\Framework\Url\EncoderInterface;
+use Magento\MediaStorage\Model\File\Validator\NotProtectedExtension;
+use Psr\Log\LoggerInterface;
 
 /**
  * Metadata for form image field
@@ -27,38 +43,55 @@ class Image extends File
      */
     private $imageContentFactory;
 
+    /**
+     * @var IoFileSystem
+     */
+    private $ioFileSystem;
+
+    /**
+     * @var WriteInterface
+     */
+    private $mediaEntityTmpDirectory;
+
     /**
      * Constructor
      *
-     * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
-     * @param \Psr\Log\LoggerInterface $logger
-     * @param \Magento\Customer\Api\Data\AttributeMetadataInterface $attribute
-     * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
+     * @param TimezoneInterface $localeDate
+     * @param LoggerInterface $logger
+     * @param AttributeMetadataInterface $attribute
+     * @param ResolverInterface $localeResolver
      * @param null|string $value
      * @param string $entityTypeCode
      * @param bool $isAjax
-     * @param \Magento\Framework\Url\EncoderInterface $urlEncoder
-     * @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $fileValidator
+     * @param EncoderInterface $urlEncoder
+     * @param NotProtectedExtension $fileValidator
      * @param Filesystem $fileSystem
      * @param UploaderFactory $uploaderFactory
-     * @param \Magento\Customer\Model\FileProcessorFactory|null $fileProcessorFactory
-     * @param \Magento\Framework\Api\Data\ImageContentInterfaceFactory|null $imageContentInterfaceFactory
+     * @param FileProcessorFactory|null $fileProcessorFactory
+     * @param ImageContentInterfaceFactory|null $imageContentInterfaceFactory
+     * @param IoFileSystem|null $ioFileSystem
+     * @param DirectoryList|null $directoryList
+     * @param WriteFactory|null $writeFactory
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     * @throws FileSystemException
      */
     public function __construct(
-        \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
-        \Psr\Log\LoggerInterface $logger,
-        \Magento\Customer\Api\Data\AttributeMetadataInterface $attribute,
-        \Magento\Framework\Locale\ResolverInterface $localeResolver,
+        TimezoneInterface $localeDate,
+        LoggerInterface $logger,
+        AttributeMetadataInterface $attribute,
+        ResolverInterface $localeResolver,
         $value,
         $entityTypeCode,
         $isAjax,
-        \Magento\Framework\Url\EncoderInterface $urlEncoder,
-        \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $fileValidator,
+        EncoderInterface $urlEncoder,
+        NotProtectedExtension $fileValidator,
         Filesystem $fileSystem,
         UploaderFactory $uploaderFactory,
-        \Magento\Customer\Model\FileProcessorFactory $fileProcessorFactory = null,
-        \Magento\Framework\Api\Data\ImageContentInterfaceFactory $imageContentInterfaceFactory = null
+        FileProcessorFactory $fileProcessorFactory = null,
+        ImageContentInterfaceFactory $imageContentInterfaceFactory = null,
+        IoFileSystem $ioFileSystem = null,
+        ?DirectoryList $directoryList = null,
+        ?WriteFactory $writeFactory = null
     ) {
         parent::__construct(
             $localeDate,
@@ -75,7 +108,16 @@ public function __construct(
             $fileProcessorFactory
         );
         $this->imageContentFactory = $imageContentInterfaceFactory ?: ObjectManager::getInstance()
-            ->get(\Magento\Framework\Api\Data\ImageContentInterfaceFactory::class);
+            ->get(ImageContentInterfaceFactory::class);
+        $this->ioFileSystem = $ioFileSystem ?: ObjectManager::getInstance()
+            ->get(IoFileSystem::class);
+        $writeFactory = $writeFactory ?? ObjectManager::getInstance()->get(WriteFactory::class);
+        $directoryList = $directoryList ?? ObjectManager::getInstance()->get(DirectoryList::class);
+        $this->mediaEntityTmpDirectory = $writeFactory->create(
+            $directoryList->getPath($directoryList::MEDIA)
+            . '/' . $this->_entityTypeCode
+            . '/' . FileProcessor::TMP_DIR
+        );
     }
 
     /**
@@ -85,6 +127,7 @@ public function __construct(
      *
      * @param array $value
      * @return string[]
+     * @throws LocalizedException
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
@@ -93,7 +136,11 @@ protected function _validateByRules($value)
         $label = $value['name'];
         $rules = $this->getAttribute()->getValidationRules();
 
-        $imageProp = @getimagesize($value['tmp_name']);
+        try {
+            $imageProp = getimagesize($value['tmp_name']);
+        } catch (\Throwable $e) {
+            $imageProp = false;
+        }
 
         if (!$this->_isUploadedFile($value['tmp_name']) || !$imageProp) {
             return [__('"%1" is not a valid file.', $label)];
@@ -106,9 +153,11 @@ protected function _validateByRules($value)
         }
 
         // modify image name
-        $extension = pathinfo($value['name'], PATHINFO_EXTENSION);
+        $extension = $this->ioFileSystem->getPathInfo($value['name'])['extension'];
         if ($extension != $allowImageTypes[$imageProp[2]]) {
-            $value['name'] = pathinfo($value['name'], PATHINFO_FILENAME) . '.' . $allowImageTypes[$imageProp[2]];
+            $value['name'] = $this->ioFileSystem->getPathInfo($value['name'])['filename']
+                . '.'
+                . $allowImageTypes[$imageProp[2]];
         }
 
         $maxFileSize = ArrayObjectSearch::getArrayElementByName(
@@ -153,6 +202,7 @@ protected function _validateByRules($value)
      *
      * @param array $value
      * @return bool|int|ImageContentInterface|string
+     * @throws LocalizedException
      */
     protected function processUiComponentValue(array $value)
     {
@@ -174,11 +224,23 @@ protected function processUiComponentValue(array $value)
      *
      * @param array $value
      * @return string
+     * @throws LocalizedException
      */
     protected function processCustomerAddressValue(array $value)
     {
-        $result = $this->getFileProcessor()->moveTemporaryFile($value['file']);
-        return $result;
+        $fileName = $this->mediaEntityTmpDirectory
+            ->getDriver()
+            ->getRealPathSafety(
+                $this->mediaEntityTmpDirectory->getAbsolutePath(
+                    ltrim(
+                        $value['file'],
+                        '/'
+                    )
+                )
+            );
+        return $this->getFileProcessor()->moveTemporaryFile(
+            $this->mediaEntityTmpDirectory->getRelativePath($fileName)
+        );
     }
 
     /**
@@ -186,20 +248,19 @@ protected function processCustomerAddressValue(array $value)
      *
      * @param array $value
      * @return bool|int|ImageContentInterface|string
+     * @throws LocalizedException
      */
     protected function processCustomerValue(array $value)
     {
-        $temporaryFile = FileProcessor::TMP_DIR . '/' . ltrim($value['file'], '/');
-
-        if ($this->getFileProcessor()->isExist($temporaryFile)) {
+        $file = ltrim($value['file'], '/');
+        if ($this->mediaEntityTmpDirectory->isExist($file)) {
+            $temporaryFile = FileProcessor::TMP_DIR . '/' . $file;
             $base64EncodedData = $this->getFileProcessor()->getBase64EncodedData($temporaryFile);
-
             /** @var ImageContentInterface $imageContentDataObject */
             $imageContentDataObject = $this->imageContentFactory->create()
                 ->setName($value['name'])
                 ->setBase64EncodedData($base64EncodedData)
                 ->setType($value['type']);
-
             // Remove temporary file
             $this->getFileProcessor()->removeUploadedFile($temporaryFile);
 
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
index 31d2a31ceae4c..e64c9d87b8b82 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
@@ -3,101 +3,173 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+declare(strict_types=1);
+
 namespace Magento\Customer\Test\Unit\Model\Metadata\Form;
 
 use Magento\Customer\Api\AddressMetadataInterface;
 use Magento\Customer\Api\CustomerMetadataInterface;
 use Magento\Customer\Model\FileProcessor;
-use Magento\MediaStorage\Model\File\Validator\NotProtectedExtension;
+use Magento\Customer\Model\FileProcessorFactory;
+use Magento\Customer\Model\Metadata\Form\Image;
 use Magento\Framework\Api\Data\ImageContentInterfaceFactory;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\App\Request\Http;
+use Magento\Framework\Exception\FileSystemException;
+use Magento\Framework\Exception\LocalizedException;
+use Magento\Framework\File\UploaderFactory;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Directory\WriteFactory;
+use Magento\Framework\Filesystem\Directory\Write;
+use Magento\Framework\Filesystem\Driver\File as Driver;
+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
+ *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class ImageTest extends AbstractFormTestCase
 {
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Url\EncoderInterface
+     * @var PHPUnit_Framework_MockObject_MockObject|EncoderInterface
      */
     private $urlEncode;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\MediaStorage\Model\File\Validator\NotProtectedExtension
+     * @var PHPUnit_Framework_MockObject_MockObject|NotProtectedExtension
      */
     private $fileValidatorMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem
+     * @var PHPUnit_Framework_MockObject_MockObject|Filesystem
      */
     private $fileSystemMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\Request\Http
+     * @var PHPUnit_Framework_MockObject_MockObject|Http
      */
     private $requestMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\File\UploaderFactory
+     * @var PHPUnit_Framework_MockObject_MockObject|UploaderFactory
      */
     private $uploaderFactoryMock;
 
     /**
-     * @var FileProcessor|\PHPUnit_Framework_MockObject_MockObject
+     * @var FileProcessor|PHPUnit_Framework_MockObject_MockObject
      */
     private $fileProcessorMock;
 
     /**
-     * @var \Magento\Framework\Api\Data\ImageContentInterfaceFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var ImageContentInterfaceFactory|PHPUnit_Framework_MockObject_MockObject
      */
     private $imageContentFactory;
 
     /**
-     * @var \Magento\Customer\Model\FileProcessorFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var FileProcessorFactory|PHPUnit_Framework_MockObject_MockObject
      */
     private $fileProcessorFactoryMock;
 
+    /**
+     * @var File|PHPUnit_Framework_MockObject_MockObject
+     */
+    private $ioFileSystemMock;
+
+    /**
+     * @var DirectoryList|PHPUnit_Framework_MockObject_MockObject
+     */
+    private $directoryListMock;
+
+    /**
+     * @var WriteFactory|PHPUnit_Framework_MockObject_MockObject
+     */
+    private $writeFactoryMock;
+
+    /**
+     * @var Write|PHPUnit_Framework_MockObject_MockObject
+     */
+    private $mediaEntityTmpDirectoryMock;
+
+    /**
+     * @var Driver|PHPUnit_Framework_MockObject_MockObject
+     */
+    private $driverMock;
+
+    /**
+     * @inheritdoc
+     */
     protected function setUp()
     {
         parent::setUp();
 
-        $this->urlEncode = $this->getMockBuilder(\Magento\Framework\Url\EncoderInterface::class)
+        $this->urlEncode = $this->getMockBuilder(EncoderInterface::class)
             ->disableOriginalConstructor()
             ->getMock();
         $this->fileValidatorMock = $this->getMockBuilder(NotProtectedExtension::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->fileSystemMock = $this->getMockBuilder(\Magento\Framework\Filesystem::class)
+        $this->fileSystemMock = $this->getMockBuilder(Filesystem::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->requestMock = $this->getMockBuilder(\Magento\Framework\App\Request\Http::class)
+        $this->requestMock = $this->getMockBuilder(Http::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->uploaderFactoryMock = $this->getMockBuilder(\Magento\Framework\File\UploaderFactory::class)
+        $this->uploaderFactoryMock = $this->getMockBuilder(UploaderFactory::class)
             ->disableOriginalConstructor()
             ->getMock();
-        $this->fileProcessorMock = $this->getMockBuilder(\Magento\Customer\Model\FileProcessor::class)
+        $this->fileProcessorMock = $this->getMockBuilder(FileProcessor::class)
             ->disableOriginalConstructor()
             ->getMock();
         $this->imageContentFactory = $this->getMockBuilder(ImageContentInterfaceFactory::class)
             ->disableOriginalConstructor()
             ->setMethods(['create'])
             ->getMock();
-        $this->fileProcessorFactoryMock = $this->getMockBuilder(\Magento\Customer\Model\FileProcessorFactory::class)
+        $this->fileProcessorFactoryMock = $this->getMockBuilder(FileProcessorFactory::class)
             ->setMethods(['create'])
             ->disableOriginalConstructor()
             ->getMock();
         $this->fileProcessorFactoryMock->expects($this->any())
             ->method('create')
             ->willReturn($this->fileProcessorMock);
+        $this->ioFileSystemMock = $this->getMockBuilder(File::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->directoryListMock = $this->getMockBuilder(DirectoryList::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->writeFactoryMock = $this->getMockBuilder(WriteFactory::class)
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->mediaEntityTmpDirectoryMock = $this->getMockBuilder(Write::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->driverMock = $this->getMockBuilder(Driver::class)
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->writeFactoryMock->expects($this->any())
+            ->method('create')
+            ->willReturn($this->mediaEntityTmpDirectoryMock);
+        $this->mediaEntityTmpDirectoryMock->expects($this->any())
+            ->method('getDriver')
+            ->willReturn($this->driverMock);
     }
 
     /**
+     * Initializes an image instance
+     *
      * @param array $data
-     * @return \Magento\Customer\Model\Metadata\Form\File
+     * @return Image
+     * @throws FileSystemException
      */
-    private function initialize(array $data)
+    private function initialize(array $data): Image
     {
-        return new \Magento\Customer\Model\Metadata\Form\Image(
+        return new Image(
             $this->localeMock,
             $this->loggerMock,
             $this->attributeMetadataMock,
@@ -110,10 +182,17 @@ private function initialize(array $data)
             $this->fileSystemMock,
             $this->uploaderFactoryMock,
             $this->fileProcessorFactoryMock,
-            $this->imageContentFactory
+            $this->imageContentFactory,
+            $this->ioFileSystemMock,
+            $this->directoryListMock,
+            $this->writeFactoryMock
         );
     }
 
+    /**
+     * Test for validateValue method for not valid file
+     * @throws LocalizedException
+     */
     public function testValidateIsNotValidFile()
     {
         $value = [
@@ -139,6 +218,10 @@ public function testValidateIsNotValidFile()
         $this->assertEquals(['"realFileName" is not a valid file.'], $model->validateValue($value));
     }
 
+    /**
+     * Test for validateValue method
+     * @throws LocalizedException
+     */
     public function testValidate()
     {
         $value = [
@@ -164,6 +247,10 @@ public function testValidate()
         $this->assertTrue($model->validateValue($value));
     }
 
+    /**
+     * Test for validateValue method for max file size
+     * @throws LocalizedException
+     */
     public function testValidateMaxFileSize()
     {
         $value = [
@@ -205,6 +292,10 @@ public function testValidateMaxFileSize()
         $this->assertEquals(['"logo.gif" exceeds the allowed file size.'], $model->validateValue($value));
     }
 
+    /**
+     * Test for validateValue method for max image width
+     * @throws LocalizedException
+     */
     public function testValidateMaxImageWidth()
     {
         $value = [
@@ -245,6 +336,10 @@ public function testValidateMaxImageWidth()
         $this->assertEquals(['"logo.gif" width exceeds allowed value of 1 px.'], $model->validateValue($value));
     }
 
+    /**
+     * Test for validateValue method for max image height
+     * @throws LocalizedException
+     */
     public function testValidateMaxImageHeight()
     {
         $value = [
@@ -285,6 +380,10 @@ public function testValidateMaxImageHeight()
         $this->assertEquals(['"logo.gif" height exceeds allowed value of 1 px.'], $model->validateValue($value));
     }
 
+    /**
+     * Test for compactValue method
+     * @throws LocalizedException
+     */
     public function testCompactValueNoChanges()
     {
         $originValue = 'filename.ext1';
@@ -302,6 +401,10 @@ public function testCompactValueNoChanges()
         $this->assertEquals($originValue, $model->compactValue($value));
     }
 
+    /**
+     * Test for compactValue method for address image
+     * @throws LocalizedException
+     */
     public function testCompactValueUiComponentAddress()
     {
         $originValue = 'filename.ext1';
@@ -310,20 +413,33 @@ public function testCompactValueUiComponentAddress()
             'file' => 'filename.ext2',
         ];
 
+        $this->driverMock->expects($this->once())
+            ->method('getRealPathSafety')
+            ->with($value['file'])
+            ->willReturn($value['file']);
+        $this->mediaEntityTmpDirectoryMock->expects($this->once())
+            ->method('getAbsolutePath')
+            ->willReturn($value['file']);
+        $this->mediaEntityTmpDirectoryMock->expects($this->once())
+            ->method('getRelativePath')
+            ->willReturn($value['file']);
         $this->fileProcessorMock->expects($this->once())
             ->method('moveTemporaryFile')
             ->with($value['file'])
-            ->willReturn(true);
-
+            ->willReturn($value['file']);
         $model = $this->initialize([
             'value' => $originValue,
             'isAjax' => false,
             'entityTypeCode' => AddressMetadataInterface::ENTITY_TYPE_ADDRESS,
         ]);
 
-        $this->assertTrue($model->compactValue($value));
+        $this->assertEquals($value['file'], $model->compactValue($value));
     }
 
+    /**
+     * Test for compactValue method for image
+     * @throws LocalizedException
+     */
     public function testCompactValueUiComponentCustomer()
     {
         $originValue = 'filename.ext1';
@@ -336,9 +452,9 @@ public function testCompactValueUiComponentCustomer()
 
         $base64EncodedData = 'encoded_data';
 
-        $this->fileProcessorMock->expects($this->once())
+        $this->mediaEntityTmpDirectoryMock->expects($this->once())
             ->method('isExist')
-            ->with(FileProcessor::TMP_DIR . '/' . $value['file'])
+            ->with($value['file'])
             ->willReturn(true);
         $this->fileProcessorMock->expects($this->once())
             ->method('getBase64EncodedData')
@@ -378,6 +494,10 @@ public function testCompactValueUiComponentCustomer()
         $this->assertEquals($imageContentMock, $model->compactValue($value));
     }
 
+    /**
+     * Test for compactValue method for non-existing customer
+     * @throws LocalizedException
+     */
     public function testCompactValueUiComponentCustomerNotExists()
     {
         $originValue = 'filename.ext1';
@@ -388,9 +508,9 @@ public function testCompactValueUiComponentCustomerNotExists()
             'type' => 'image',
         ];
 
-        $this->fileProcessorMock->expects($this->once())
+        $this->mediaEntityTmpDirectoryMock->expects($this->once())
             ->method('isExist')
-            ->with(FileProcessor::TMP_DIR . '/' . $value['file'])
+            ->with($value['file'])
             ->willReturn(false);
 
         $model = $this->initialize([
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
new file mode 100644
index 0000000000000..578525a0d8161
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
@@ -0,0 +1,214 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Customer\Model\Metadata\Form;
+
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Exception\FileSystemException;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Directory\WriteInterface;
+use Magento\Framework\ObjectManagerInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+class ImageTest extends \PHPUnit\Framework\TestCase
+{
+    /**
+     * @var ObjectManagerInterface
+     */
+    private $objectManager;
+
+    /**
+     * @var Filesystem
+     */
+    private $filesystem;
+
+    /**
+     * @var string
+     */
+    private $fileName = 'magento.jpg';
+
+    /**
+     * @var string
+     */
+    private $invalidFileName = '../../invalidFile.xyz';
+
+    /**
+     * @var string
+     */
+    private $imageFixtureDir;
+
+    /**
+     * @var string
+     */
+    private $expectedFileName;
+
+    /**
+     * @var WriteInterface
+     */
+    private $mediaDirectory;
+
+    /**
+     * @inheritDoc
+     */
+    public function setUp()
+    {
+        $this->objectManager = Bootstrap::getObjectManager();
+        $this->filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->get(Filesystem::class);
+        $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+        $this->imageFixtureDir = realpath(__DIR__ . '/../../../_files/image');
+        $this->expectedFileName = '/m/a/' . $this->fileName;
+    }
+
+    /**
+     * Test for processCustomerAddressValue method
+     *
+     * @magentoAppIsolation enabled
+     * @throws FileSystemException
+     * @throws \ReflectionException
+     */
+    public function testProcessCustomerAddressValue()
+    {
+        $this->mediaDirectory->delete('customer_address');
+        $this->mediaDirectory->create($this->mediaDirectory->getRelativePath('customer_address/tmp/'));
+        $tmpFilePath = $this->mediaDirectory->getAbsolutePath('customer_address/tmp/' . $this->fileName);
+        copy($this->imageFixtureDir . DIRECTORY_SEPARATOR . $this->fileName, $tmpFilePath);
+
+        $imageFile = [
+            'name' => $this->fileName,
+            'type' => 'image/jpeg',
+            'tmp_name' => $this->fileName,
+            'file' => $this->fileName,
+            'error' => 0,
+            'size' => 12500,
+            'previewType' => 'image',
+        ];
+
+        $params = [
+            'entityTypeCode' => 'customer_address',
+            'formCode' => 'customer_address_edit',
+            'isAjax' => false,
+            'value' => $imageFile
+        ];
+
+        $expectedPath = $this->mediaDirectory->getAbsolutePath('customer_address' . $this->expectedFileName);
+
+        /** @var Image $image */
+        $image = $this->objectManager->create(\Magento\Customer\Model\Metadata\Form\Image::class, $params);
+        $processCustomerAddressValueMethod = new \ReflectionMethod(
+            \Magento\Customer\Model\Metadata\Form\Image::class,
+            'processCustomerAddressValue'
+        );
+        $processCustomerAddressValueMethod->setAccessible(true);
+        $actual = $processCustomerAddressValueMethod->invoke($image, $imageFile);
+        $this->assertEquals($this->expectedFileName, $actual);
+        $this->assertFileExists($expectedPath);
+        $this->assertFileNotExists($tmpFilePath);
+    }
+
+    /**
+     * Test for processCustomerValue method
+     *
+     * @magentoAppIsolation enabled
+     * @throws FileSystemException
+     * @throws \ReflectionException
+     */
+    public function testProcessCustomerValue()
+    {
+        $this->mediaDirectory->delete('customer');
+        $this->mediaDirectory->create($this->mediaDirectory->getRelativePath('customer/tmp/'));
+        $tmpFilePath = $this->mediaDirectory->getAbsolutePath('customer/tmp/' . $this->fileName);
+        copy($this->imageFixtureDir . DIRECTORY_SEPARATOR . $this->fileName, $tmpFilePath);
+
+        $imageFile = [
+            'name' => $this->fileName,
+            'type' => 'image/jpeg',
+            'tmp_name' => $this->fileName,
+            'file' => $this->fileName,
+            'error' => 0,
+            'size' => 12500,
+            'previewType' => 'image',
+        ];
+
+        $params = [
+            'entityTypeCode' => 'customer',
+            'formCode' => 'customer_edit',
+            'isAjax' => false,
+            'value' => $imageFile
+        ];
+
+        /** @var Image $image */
+        $image = $this->objectManager->create(\Magento\Customer\Model\Metadata\Form\Image::class, $params);
+        $processCustomerAddressValueMethod = new \ReflectionMethod(
+            \Magento\Customer\Model\Metadata\Form\Image::class,
+            'processCustomerValue'
+        );
+        $processCustomerAddressValueMethod->setAccessible(true);
+        $result = $processCustomerAddressValueMethod->invoke($image, $imageFile);
+        $this->assertInstanceOf('Magento\Framework\Api\ImageContent', $result);
+        $this->assertFileNotExists($tmpFilePath);
+    }
+
+    /**
+     * Test for processCustomerValue method with invalid value
+     *
+     * @magentoAppIsolation enabled
+     * @expectedException \Magento\Framework\Exception\ValidatorException
+     * @throws FileSystemException
+     * @throws \ReflectionException
+     */
+    public function testProcessCustomerInvalidValue()
+    {
+        $this->mediaDirectory->delete('customer');
+        $this->mediaDirectory->create($this->mediaDirectory->getRelativePath('customer/tmp/'));
+        $tmpFilePath = $this->mediaDirectory->getAbsolutePath('customer/tmp/' . $this->fileName);
+        copy($this->imageFixtureDir . DIRECTORY_SEPARATOR . $this->fileName, $tmpFilePath);
+
+        $imageFile = [
+            'name' => $this->fileName,
+            'type' => 'image/jpeg',
+            'tmp_name' => $this->fileName,
+            'file' => $this->invalidFileName,
+            'error' => 0,
+            'size' => 12500,
+            'previewType' => 'image',
+        ];
+
+        $params = [
+            'entityTypeCode' => 'customer',
+            'formCode' => 'customer_edit',
+            'isAjax' => false,
+            'value' => $imageFile
+        ];
+
+        /** @var Image $image */
+        $image = $this->objectManager->create(\Magento\Customer\Model\Metadata\Form\Image::class, $params);
+        $processCustomerAddressValueMethod = new \ReflectionMethod(
+            \Magento\Customer\Model\Metadata\Form\Image::class,
+            'processCustomerValue'
+        );
+        $processCustomerAddressValueMethod->setAccessible(true);
+        $processCustomerAddressValueMethod->invoke($image, $imageFile);
+    }
+
+    /**
+     * @inheritdoc
+     * @throws FileSystemException
+     */
+    public static function tearDownAfterClass()
+    {
+        parent::tearDownAfterClass();
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            Filesystem::class
+        );
+        /** @var WriteInterface $mediaDirectory */
+        $mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+        $mediaDirectory->delete('customer');
+        $mediaDirectory->delete('customer_address');
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Customer/_files/image/magento.jpg b/dev/tests/integration/testsuite/Magento/Customer/_files/image/magento.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..5704eccd795dea8d001650abc3bc375d5b76d042
GIT binary patch
literal 1393
zcmb7EX;6~~5dD%b7ZHUoV8S6F2{v3o0c(`A90o*N<rG4hhzbZokqAU0!XQclCLCtK
zgTo>MVvLq>YKnlIqBK%aKmy7kjB$`d<i-?g$Nzo%XLsJtd%Hh&6@7|#fT|nq01be_
zV8F@s02BkjB>;s$qL2s_3W-9aQ5dW$7OSL$Ro|kbtV&SV&>*Pe@me}N^t7}|+wl19
zrrSwBkd2IuH1#OED2BUs7#bPE&}cLkgH^*~)eN=pT894{iUt6}01kjN2qOY;2nIqh
zMKd4(U;rH481*~Q7#I?TfP<<43;}~9Km<}5{FmJ5T;Bph<Mhqd90G~%QCSv_9>>KP
z^{pfWODE5y!rSE)jngn-UGKZvMuI?sC}=|sgd;)Ze-s>mfd~kxZ;n&j>fl~DoK@bX
z9+)&Tt#|_{gX>lh2m$uMJudeWk<yyieZ$r%<Z0{CoxloHQlvS<T4Q;dU3;m)r>Z^@
z#K%rnl;s3gM%{YcJt1eW;(Q*q_=m{qG(C%o53{1eRfIFMzYC*9o{+ZpIHx7j+J=Vz
zOdX<rBIMJz@%GAO#B_S@QgEcrp(=>i{<cQbHX*>v^ZwodW`=E^(uIyD<}v%aV{<Ev
zsjfhV7nqRhf2U4xboV}@?j-Az%A~Z5#(h%IMq4nSq@4Yw87fD{-%G<0iK<sBhhz0N
z<#f8nXjICNR9at!qs_^Yr=^h`@0JH2FN@47vIdsI6+n;?+c6z(KJnhZ#L<$D=@d(E
zRS1=6m(P2&q;{#_i0M3K^9Qx*A`m|oJ7}lVlT~sqiuZIj=*NJ&kwd(T-DaI4*ow$j
zS|+b#2qdefdkXD+eFK-A>tn+(Us4JrVg1oQ!<Qrt<XAXnS#KrA3Nyl`{d)3w%<-OT
zQ_aR#+{Wp}c@Mjirs1<yq_z<KhbBP=j=h<^9M~YImel3UzUC0TyF34c-e_?7W;q=_
zc_f1q3M`e8>5a-uHm>4#?R^6l1U<_2SEDc4qW=3OZpluaY*U`tPo;YH0D3w4vpiP}
z{Y(z?8C*;pHNrA|g#`I_N^Z{V1oqD;aC4F6xe)r<f>mLWSvp<x{=6&tj)X7aSKD6b
zs4+p_r3YlbfCk#i7iB`Z^bj?nc9oM6^PonfV*eiMp64q>qVYYPk#=(CV)bnDpqf48
z-Z53X|E~FUo8s1>v1s!*Cw!m9u}-^^Kg1>VK6dg1tx6jD6LY-gLLIfs^D<Jx*Yf?o
zD!YZf>@l5Oo>u_P1av8Ls#H1q*?e&SEek?ulV)J{&7@bs>8JQ9_$O2jT-oWjLYLdZ
z(Hts1tKv;!yJ3#OnY4Pr==9?-04I%j%lqmz+-f5^)pR9?3_m!LQ7VLwE$)nZTWrZx
zo9icxFr@@=T*Qm?h>ttGczJx-c}q&GbEb<WNl#WXmc8ogvi6jw!D-~KDu4<z^bSUI
zg5OG_mUM(E>Szo3qN}Zx-kv*u{UfeV-1m;lX`hN{s>%FfZ9G!-_fLJ}#EAU)1-Fj^
z7X$AGMwHH19+xXJi-RDHzsRI)cG;geP<v4PT2N|DXPr!zjn9)t?k8ltW;6VHBYd~X
zHC_1pP}#oJh1O4hEwbjk{em7)&QJ`X9%xKZ<4UoNValw+M9)mD=j@~%681$IBe#0K
zsLHL*EpKS3g>S%5wJun*+MO5!pD{_BtkIsiY3v{Up+2^+s-85V>rn3}nwoet=bpl_
z&3+-4SUlR~GZ2uJrF6$^vu^Iv@&dgjo2`Rm6(<zY51vc2YY(@(VsP~Undt*<RZm+#
TsEubp)W>kSj^B!%ivE89DK$)d

literal 0
HcmV?d00001


From 525cf22a6116aed580957dc9286503f11eb7f0a4 Mon Sep 17 00:00:00 2001
From: Nathan Smith <nathsmit@adobe.com>
Date: Wed, 26 Feb 2020 15:08:40 -0600
Subject: [PATCH 039/307] MC-31733: Media gallery breaks in some filesystems

---
 app/code/Magento/Theme/Helper/Storage.php     |   4 +-
 .../Magento/Theme/Model/Wysiwyg/Storage.php   |  15 ++-
 .../Theme/Test/Unit/Helper/StorageTest.php    | 106 ++++++++++++++----
 .../Test/Unit/Model/Wysiwyg/StorageTest.php   |  27 +++--
 4 files changed, 116 insertions(+), 36 deletions(-)

diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php
index 41daee8507307..99b2e47a49a4d 100644
--- a/app/code/Magento/Theme/Helper/Storage.php
+++ b/app/code/Magento/Theme/Helper/Storage.php
@@ -255,9 +255,7 @@ public function getCurrentPath()
             if ($path && $path !== self::NODE_ROOT) {
                 $path = $this->convertIdToPath($path);
 
-                $realPath = $this->filesystemDriver->getRealPath(
-                    $this->filesystemDriver->getRealPathSafety($path)
-                );
+                $realPath = $this->filesystemDriver->getRealPathSafety($path);
 
                 $path = $realPath ?: $path;
 
diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
index 658e4d78490cd..a48d34c6df93d 100644
--- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
+++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
@@ -8,6 +8,7 @@
 
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Filesystem\DriverInterface;
 
 /**
  * Theme wysiwyg storage model
@@ -86,6 +87,11 @@ class Storage
      */
     private $file;
 
+    /**
+     * @var DriverInterface
+     */
+    private $filesystemDriver;
+
     /**
      * Initialize dependencies
      *
@@ -96,6 +102,7 @@ class Storage
      * @param \Magento\Framework\Url\EncoderInterface $urlEncoder
      * @param \Magento\Framework\Url\DecoderInterface $urlDecoder
      * @param \Magento\Framework\Filesystem\Io\File|null $file
+     * @param DriverInterface|null $filesystemDriver
      *
      * @throws \Magento\Framework\Exception\FileSystemException
      */
@@ -106,7 +113,8 @@ public function __construct(
         \Magento\Framework\Image\AdapterFactory $imageFactory,
         \Magento\Framework\Url\EncoderInterface $urlEncoder,
         \Magento\Framework\Url\DecoderInterface $urlDecoder,
-        \Magento\Framework\Filesystem\Io\File $file = null
+        \Magento\Framework\Filesystem\Io\File $file = null,
+        DriverInterface $filesystemDriver = null
     ) {
         $this->mediaWriteDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_helper = $helper;
@@ -117,6 +125,8 @@ public function __construct(
         $this->file = $file ?: ObjectManager::getInstance()->get(
             \Magento\Framework\Filesystem\Io\File::class
         );
+        $this->filesystemDriver = $filesystemDriver ?: ObjectManager::getInstance()
+            ->get(DriverInterface::class);
     }
 
     /**
@@ -331,8 +341,9 @@ public function deleteDirectory($path)
     {
         $rootCmp = rtrim($this->_helper->getStorageRoot(), '/');
         $pathCmp = rtrim($path, '/');
+        $absolutePath = $this->filesystemDriver->getRealPathSafety($this->mediaWriteDirectory->getAbsolutePath($path));
 
-        if ($rootCmp == $pathCmp || $rootCmp === $this->mediaWriteDirectory->getAbsolutePath($path)) {
+        if ($rootCmp == $pathCmp || $rootCmp === $absolutePath) {
             throw new \Magento\Framework\Exception\LocalizedException(
                 __('We can\'t delete root directory %1 right now.', $path)
             );
diff --git a/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php
index c2ee34dfbba0a..f9f97281c2e3b 100644
--- a/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php
@@ -9,7 +9,9 @@
  */
 namespace Magento\Theme\Test\Unit\Helper;
 
+use Magento\Framework\Filesystem\DriverInterface;
 use Magento\Theme\Helper\Storage;
+use PHPUnit\Framework\MockObject\MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -37,7 +39,7 @@ class StorageTest extends \PHPUnit\Framework\TestCase
     protected $request;
 
     /**
-     * @var \Magento\Theme\Helper\Storage
+     * @var Storage
      */
     protected $helper;
 
@@ -78,6 +80,11 @@ class StorageTest extends \PHPUnit\Framework\TestCase
 
     protected $requestParams;
 
+    /**
+     * @var DriverInterface|MockObject
+     */
+    private $filesystemDriver;
+
     protected function setUp()
     {
         $this->customizationPath = '/' . implode('/', ['var', 'theme']);
@@ -102,6 +109,7 @@ protected function setUp()
         $this->contextHelper->expects($this->any())->method('getUrlEncoder')->willReturn($this->urlEncoder);
         $this->contextHelper->expects($this->any())->method('getUrlDecoder')->willReturn($this->urlDecoder);
         $this->themeFactory->expects($this->any())->method('create')->willReturn($this->theme);
+        $this->filesystemDriver = $this->createMock(DriverInterface::class);
 
         $this->theme->expects($this->any())
             ->method('getCustomization')
@@ -109,18 +117,20 @@ protected function setUp()
 
         $this->request->expects($this->at(0))
             ->method('getParam')
-            ->with(\Magento\Theme\Helper\Storage::PARAM_THEME_ID)
+            ->with(Storage::PARAM_THEME_ID)
             ->will($this->returnValue(6));
         $this->request->expects($this->at(1))
             ->method('getParam')
-            ->with(\Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE)
+            ->with(Storage::PARAM_CONTENT_TYPE)
             ->will($this->returnValue(\Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE));
 
-        $this->helper = new \Magento\Theme\Helper\Storage(
+        $this->helper = new Storage(
             $this->contextHelper,
             $this->filesystem,
             $this->session,
-            $this->themeFactory
+            $this->themeFactory,
+            null,
+            $this->filesystemDriver
         );
     }
 
@@ -196,7 +206,7 @@ public function testGetRequestParams()
         )->method(
             'getParam'
         )->with(
-            \Magento\Theme\Helper\Storage::PARAM_THEME_ID
+            Storage::PARAM_THEME_ID
         )->will(
             $this->returnValue(6)
         );
@@ -205,7 +215,7 @@ public function testGetRequestParams()
         )->method(
             'getParam'
         )->with(
-            \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE
+            Storage::PARAM_CONTENT_TYPE
         )->will(
             $this->returnValue('image')
         );
@@ -214,15 +224,15 @@ public function testGetRequestParams()
         )->method(
             'getParam'
         )->with(
-            \Magento\Theme\Helper\Storage::PARAM_NODE
+            Storage::PARAM_NODE
         )->will(
             $this->returnValue('node')
         );
 
         $expectedResult = [
-            \Magento\Theme\Helper\Storage::PARAM_THEME_ID => 6,
-            \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE => \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE,
-            \Magento\Theme\Helper\Storage::PARAM_NODE => 'node',
+            Storage::PARAM_THEME_ID => 6,
+            Storage::PARAM_CONTENT_TYPE => \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE,
+            Storage::PARAM_NODE => 'node',
         ];
         $this->assertEquals($expectedResult, $this->helper->getRequestParams());
     }
@@ -234,7 +244,7 @@ public function testGetAllowedExtensionsByType()
         )->method(
             'getParam'
         )->with(
-            \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE
+            Storage::PARAM_CONTENT_TYPE
         )->will(
             $this->returnValue(\Magento\Theme\Model\Wysiwyg\Storage::TYPE_FONT)
         );
@@ -244,7 +254,7 @@ public function testGetAllowedExtensionsByType()
         )->method(
             'getParam'
         )->with(
-            \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE
+            Storage::PARAM_CONTENT_TYPE
         )->will(
             $this->returnValue(\Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE)
         );
@@ -273,17 +283,17 @@ public function testGetThumbnailPathNotFound()
             ->willReturnMap(
                 [
                     [
-                        \Magento\Theme\Helper\Storage::PARAM_THEME_ID,
+                        Storage::PARAM_THEME_ID,
                         null,
                         6,
                     ],
                     [
-                        \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE,
+                        Storage::PARAM_CONTENT_TYPE,
                         null,
                         \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE
                     ],
                     [
-                        \Magento\Theme\Helper\Storage::PARAM_NODE,
+                        Storage::PARAM_NODE,
                         null,
                         $node
                     ],
@@ -349,17 +359,17 @@ public function testGetRelativeUrl()
             ->willReturnMap(
                 [
                     'type' => [
-                        \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE,
+                        Storage::PARAM_CONTENT_TYPE,
                         null,
                         \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE,
                     ],
                     'node' => [
-                        \Magento\Theme\Helper\Storage::PARAM_NODE,
+                        Storage::PARAM_NODE,
                         null,
                         $notRoot,
                     ],
                     'filenaem' => [
-                        \Magento\Theme\Helper\Storage::PARAM_FILENAME,
+                        Storage::PARAM_FILENAME,
                         null,
                         $filename,
                     ],
@@ -389,8 +399,8 @@ public function testGetRelativeUrl()
     public function getStorageTypeForNameDataProvider()
     {
         return [
-            'font' => [\Magento\Theme\Model\Wysiwyg\Storage::TYPE_FONT, \Magento\Theme\Helper\Storage::FONTS],
-            'image' => [\Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE, \Magento\Theme\Helper\Storage::IMAGES],
+            'font' => [\Magento\Theme\Model\Wysiwyg\Storage::TYPE_FONT, Storage::FONTS],
+            'image' => [\Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE, Storage::IMAGES],
         ];
     }
 
@@ -405,7 +415,7 @@ public function testGetStorageTypeName($type, $name)
     {
         $this->request->expects($this->once())
             ->method('getParam')
-            ->with(\Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE)
+            ->with(Storage::PARAM_CONTENT_TYPE)
             ->willReturn($type);
 
         $this->assertEquals($name, $this->helper->getStorageTypeName());
@@ -433,7 +443,7 @@ public function testGetThemeNotFound()
         $this->themeFactory->expects($this->once())
             ->method('create')
             ->willReturn(null);
-        $helper = new \Magento\Theme\Helper\Storage(
+        $helper = new Storage(
             $this->contextHelper,
             $this->filesystem,
             $this->session,
@@ -441,4 +451,54 @@ public function testGetThemeNotFound()
         );
         $helper->getStorageRoot();
     }
+
+    /**
+     * @dataProvider getCurrentPathDataProvider
+     */
+    public function testGetCurrentPath(
+        string $expectedPath,
+        string $requestedPath,
+        ?bool $isDirectory = null,
+        ?string $relativePath = null,
+        ?string $resolvedPath = null
+    ) {
+        $this->directoryWrite->method('isDirectory')
+            ->willReturn($isDirectory);
+
+        $this->directoryWrite->method('getRelativePath')
+            ->willReturn($relativePath);
+
+        $this->urlDecoder->method('decode')
+            ->willReturnArgument(0);
+
+        if ($resolvedPath) {
+            $this->filesystemDriver->method('getRealpathSafety')
+                ->willReturn($resolvedPath);
+        } else {
+            $this->filesystemDriver->method('getRealpathSafety')
+                ->willReturnArgument(0);
+        }
+
+        $this->request->expects($this->once())
+            ->method('getParam')
+            ->with(Storage::PARAM_NODE)
+            ->willReturn($requestedPath);
+
+        $actualPath = $this->helper->getCurrentPath();
+
+        self::assertSame($expectedPath, $actualPath);
+    }
+
+    public function getCurrentPathDataProvider(): array
+    {
+        $rootPath = '/' . \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE;
+
+        return [
+            [$rootPath, Storage::NODE_ROOT],
+            [$rootPath, $rootPath . '/foo'],
+            [$rootPath, $rootPath . '/something', true, null, '/bar'],
+            ['foo/', $rootPath . '/foo', true, 'foo/'],
+            [$rootPath, $rootPath . '/foo', false],
+        ];
+    }
 }
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
index 3cd3049172d0a..2c1bb013ad0ec 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
@@ -9,6 +9,9 @@
  */
 namespace Magento\Theme\Test\Unit\Model\Wysiwyg;
 
+use Magento\Framework\Filesystem\DriverInterface;
+use PHPUnit\Framework\MockObject\MockObject;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -59,6 +62,11 @@ class StorageTest extends \PHPUnit\Framework\TestCase
      */
     protected $urlDecoder;
 
+    /**
+     * @var DriverInterface|MockObject
+     */
+    private $filesystemDriver;
+
     protected function setUp()
     {
         $this->_filesystem = $this->createMock(\Magento\Framework\Filesystem::class);
@@ -99,6 +107,7 @@ function ($path) {
         $this->directoryWrite = $this->createMock(\Magento\Framework\Filesystem\Directory\Write::class);
         $this->urlEncoder = $this->createPartialMock(\Magento\Framework\Url\EncoderInterface::class, ['encode']);
         $this->urlDecoder = $this->createPartialMock(\Magento\Framework\Url\DecoderInterface::class, ['decode']);
+        $this->filesystemDriver = $this->createMock(DriverInterface::class);
 
         $this->_filesystem->expects(
             $this->once()
@@ -114,7 +123,9 @@ function ($path) {
             $this->_objectManager,
             $this->_imageFactory,
             $this->urlEncoder,
-            $this->urlDecoder
+            $this->urlDecoder,
+            null,
+            $this->filesystemDriver
         );
 
         $this->_storageRoot = '/root';
@@ -575,13 +586,13 @@ public function testDeleteRootDirectoryRelative()
             ->with($fakePath)
             ->willReturn($directoryPath);
 
-        $this->_helperStorage->expects(
-            $this->atLeastOnce()
-        )->method(
-            'getStorageRoot'
-        )->will(
-            $this->returnValue($directoryPath)
-        );
+        $this->filesystemDriver->method('getRealPathSafety')
+            ->with($directoryPath)
+            ->willReturn($directoryPath);
+
+        $this->_helperStorage
+            ->method('getStorageRoot')
+            ->willReturn($directoryPath);
 
         $this->_storageModel->deleteDirectory($fakePath);
     }

From 8a52ac736ff879416ed4e6cfb2502f06d3e122df Mon Sep 17 00:00:00 2001
From: Nathan Smith <nathsmit@adobe.com>
Date: Thu, 27 Feb 2020 08:12:50 -0600
Subject: [PATCH 040/307] MC-31733: Media gallery breaks in some filesystems

---
 app/code/Magento/Theme/Helper/Storage.php     |  4 +--
 .../Theme/Test/Unit/Helper/StorageTest.php    | 29 ++++++++++++++-----
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php
index 99b2e47a49a4d..aff70c5d1ee97 100644
--- a/app/code/Magento/Theme/Helper/Storage.php
+++ b/app/code/Magento/Theme/Helper/Storage.php
@@ -255,9 +255,7 @@ public function getCurrentPath()
             if ($path && $path !== self::NODE_ROOT) {
                 $path = $this->convertIdToPath($path);
 
-                $realPath = $this->filesystemDriver->getRealPathSafety($path);
-
-                $path = $realPath ?: $path;
+                $path = $this->filesystemDriver->getRealPathSafety($path);
 
                 if (strpos($path, $currentPath) !== 0) {
                     $path = $currentPath;
diff --git a/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php
index f9f97281c2e3b..83e0490ff6f58 100644
--- a/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Helper/StorageTest.php
@@ -274,6 +274,8 @@ public function testGetAllowedExtensionsByType()
      */
     public function testGetThumbnailPathNotFound()
     {
+        $this->filesystemDriver->method('getRealpathSafety')
+            ->willReturnArgument(0);
         $image = 'notFoundImage.png';
         $root = '/image';
         $sourceNode = '/not/a/root';
@@ -452,6 +454,20 @@ public function testGetThemeNotFound()
         $helper->getStorageRoot();
     }
 
+    /**
+     * @dataProvider getCurrentPathDataProvider
+     */
+    public function testGetCurrentPathCachesResult()
+    {
+        $this->request->expects($this->once())
+            ->method('getParam')
+            ->with(Storage::PARAM_NODE)
+            ->willReturn(Storage::NODE_ROOT);
+
+        $actualPath = $this->helper->getCurrentPath();
+        self::assertSame('/image', $actualPath);
+    }
+
     /**
      * @dataProvider getCurrentPathDataProvider
      */
@@ -479,8 +495,7 @@ public function testGetCurrentPath(
                 ->willReturnArgument(0);
         }
 
-        $this->request->expects($this->once())
-            ->method('getParam')
+        $this->request->method('getParam')
             ->with(Storage::PARAM_NODE)
             ->willReturn($requestedPath);
 
@@ -494,11 +509,11 @@ public function getCurrentPathDataProvider(): array
         $rootPath = '/' . \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE;
 
         return [
-            [$rootPath, Storage::NODE_ROOT],
-            [$rootPath, $rootPath . '/foo'],
-            [$rootPath, $rootPath . '/something', true, null, '/bar'],
-            ['foo/', $rootPath . '/foo', true, 'foo/'],
-            [$rootPath, $rootPath . '/foo', false],
+            'requested path "root" should short-circuit' => [$rootPath, Storage::NODE_ROOT],
+            'non-existent directory should default to the base path' => [$rootPath, $rootPath . '/foo'],
+            'requested path that resolves to a bad path should default to root' =>
+                [$rootPath, $rootPath . '/something', true, null, '/bar'],
+            'real path should resolve to relative path' => ['foo/', $rootPath . '/foo', true, 'foo/'],
         ];
     }
 }

From 438a7aba20444ad69baf8dd1c3f934d31cfbf2d7 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 27 Feb 2020 17:07:49 +0200
Subject: [PATCH 041/307] MAGETWO-90070: Image uploader improvements

---
 .../MediaStorage/Model/File/Uploader.php      | 24 +++++-
 .../Model/File/Validator/Image.php            | 74 +++++++++++++++++++
 2 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 app/code/Magento/MediaStorage/Model/File/Validator/Image.php

diff --git a/app/code/Magento/MediaStorage/Model/File/Uploader.php b/app/code/Magento/MediaStorage/Model/File/Uploader.php
index 3f3cefe1d6330..2f3d683fd8d41 100644
--- a/app/code/Magento/MediaStorage/Model/File/Uploader.php
+++ b/app/code/Magento/MediaStorage/Model/File/Uploader.php
@@ -6,6 +6,8 @@
 
 namespace Magento\MediaStorage\Model\File;
 
+use Magento\Framework\Validation\ValidationException;
+
 /**
  * Core file uploader model
  *
@@ -40,21 +42,29 @@ class Uploader extends \Magento\Framework\File\Uploader
      */
     protected $_validator;
 
+    /**
+     * @var \Magento\MediaStorage\Model\File\Validator\Image
+     */
+    private $imageValidator;
+
     /**
      * @param string $fileId
      * @param \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\MediaStorage\Helper\File\Storage $coreFileStorage
      * @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator
+     * @param \Magento\MediaStorage\Model\File\Validator\Image $imageValidator
      */
     public function __construct(
         $fileId,
         \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\MediaStorage\Helper\File\Storage $coreFileStorage,
-        \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator
+        \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator,
+        \Magento\MediaStorage\Model\File\Validator\Image $imageValidator
     ) {
         $this->_coreFileStorageDb = $coreFileStorageDb;
         $this->_coreFileStorage = $coreFileStorage;
         $this->_validator = $validator;
+        $this->imageValidator = $imageValidator;
         parent::__construct($fileId);
     }
 
@@ -130,4 +140,16 @@ public function validateFile()
         $this->_validateFile();
         return $this->_file;
     }
+
+    /**
+     * @inheritDoc
+     */
+    protected function _validateFile()
+    {
+        parent::_validateFile();
+
+        if (!$this->imageValidator->isValid($this->_file['tmp_name'])) {
+            throw new ValidationException(__('File validation failed.'));
+        }
+    }
 }
diff --git a/app/code/Magento/MediaStorage/Model/File/Validator/Image.php b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php
new file mode 100644
index 0000000000000..a8bce7cfee20b
--- /dev/null
+++ b/app/code/Magento/MediaStorage/Model/File/Validator/Image.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\MediaStorage\Model\File\Validator;
+
+use Magento\Framework\File\Mime;
+use Magento\Framework\Filesystem\Driver\File;
+
+/**
+ * Image validator
+ */
+class Image extends \Zend_Validate_Abstract
+{
+    /**
+     * @var array
+     */
+    private $imageMimeTypes = [
+        'png'  => 'image/png',
+        'jpe'  => 'image/jpeg',
+        'jpeg' => 'image/jpeg',
+        'jpg'  => 'image/jpeg',
+        'gif'  => 'image/gif',
+        'bmp'  => 'image/bmp',
+        'ico'  => 'image/vnd.microsoft.icon',
+    ];
+
+    /**
+     * @var Mime
+     */
+    private $fileMime;
+
+    /**
+     * @var File
+     */
+    private $file;
+
+    /**
+     * @param Mime $fileMime
+     * @param File $file
+     */
+    public function __construct(
+        Mime $fileMime,
+        File $file
+    ) {
+        $this->fileMime = $fileMime;
+        $this->file = $file;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function isValid($filePath): bool
+    {
+        $fileMimeType = $this->fileMime->getMimeType($filePath);
+        $isValid = true;
+
+        if (in_array($fileMimeType, $this->imageMimeTypes)) {
+            try {
+                //phpcs:ignore Magento2.Functions.DiscouragedFunction
+                $image = imagecreatefromstring($this->file->fileGetContents($filePath));
+
+                $isValid = $image ? true : false;
+            } catch (\Exception $e) {
+                $isValid = false;
+            }
+        }
+
+        return $isValid;
+    }
+}

From 02eeaa92c938f708326ca0a5c474533fd8cee53b Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Thu, 27 Feb 2020 13:56:59 -0600
Subject: [PATCH 042/307] MC-31357: Customer file uploader update

- Fixed minor setup typo in integration test
---
 .../Magento/Customer/Model/Metadata/Form/ImageTest.php         | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
index 578525a0d8161..5d00feec17407 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
@@ -58,8 +58,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     public function setUp()
     {
         $this->objectManager = Bootstrap::getObjectManager();
-        $this->filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get(Filesystem::class);
+        $this->filesystem = $this->objectManager->get(Filesystem::class);
         $this->mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->imageFixtureDir = realpath(__DIR__ . '/../../../_files/image');
         $this->expectedFileName = '/m/a/' . $this->fileName;

From a7c1740f76811eed5189e8a037cc51e1d643d5bb Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Fri, 28 Feb 2020 09:45:08 +0200
Subject: [PATCH 043/307] MAGETWO-90070: Image uploader improvements

---
 app/code/Magento/MediaStorage/Model/File/Uploader.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/MediaStorage/Model/File/Uploader.php b/app/code/Magento/MediaStorage/Model/File/Uploader.php
index 2f3d683fd8d41..90e29353879bc 100644
--- a/app/code/Magento/MediaStorage/Model/File/Uploader.php
+++ b/app/code/Magento/MediaStorage/Model/File/Uploader.php
@@ -6,7 +6,9 @@
 
 namespace Magento\MediaStorage\Model\File;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Validation\ValidationException;
+use Magento\MediaStorage\Model\File\Validator\Image;
 
 /**
  * Core file uploader model
@@ -43,7 +45,7 @@ class Uploader extends \Magento\Framework\File\Uploader
     protected $_validator;
 
     /**
-     * @var \Magento\MediaStorage\Model\File\Validator\Image
+     * @var Image
      */
     private $imageValidator;
 
@@ -52,19 +54,19 @@ class Uploader extends \Magento\Framework\File\Uploader
      * @param \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\MediaStorage\Helper\File\Storage $coreFileStorage
      * @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator
-     * @param \Magento\MediaStorage\Model\File\Validator\Image $imageValidator
+     * @param Image $imageValidator
      */
     public function __construct(
         $fileId,
         \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\MediaStorage\Helper\File\Storage $coreFileStorage,
         \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator,
-        \Magento\MediaStorage\Model\File\Validator\Image $imageValidator
+        Image $imageValidator = null
     ) {
         $this->_coreFileStorageDb = $coreFileStorageDb;
         $this->_coreFileStorage = $coreFileStorage;
         $this->_validator = $validator;
-        $this->imageValidator = $imageValidator;
+        $this->imageValidator = $imageValidator?: ObjectManager::getInstance()->get(Image::class);
         parent::__construct($fileId);
     }
 

From 70eb207cf615a24ca57afcc8b473961de4c1fef0 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Fri, 28 Feb 2020 13:48:09 +0200
Subject: [PATCH 044/307] MAGETWO-90070: Image uploader improvements

---
 .../MediaStorage/Model/File/Uploader.php      | 23 +++++++++++++++----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/app/code/Magento/MediaStorage/Model/File/Uploader.php b/app/code/Magento/MediaStorage/Model/File/Uploader.php
index 90e29353879bc..daa9116e5138d 100644
--- a/app/code/Magento/MediaStorage/Model/File/Uploader.php
+++ b/app/code/Magento/MediaStorage/Model/File/Uploader.php
@@ -54,19 +54,16 @@ class Uploader extends \Magento\Framework\File\Uploader
      * @param \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\MediaStorage\Helper\File\Storage $coreFileStorage
      * @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator
-     * @param Image $imageValidator
      */
     public function __construct(
         $fileId,
         \Magento\MediaStorage\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\MediaStorage\Helper\File\Storage $coreFileStorage,
-        \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator,
-        Image $imageValidator = null
+        \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $validator
     ) {
         $this->_coreFileStorageDb = $coreFileStorageDb;
         $this->_coreFileStorage = $coreFileStorage;
         $this->_validator = $validator;
-        $this->imageValidator = $imageValidator?: ObjectManager::getInstance()->get(Image::class);
         parent::__construct($fileId);
     }
 
@@ -150,8 +147,24 @@ protected function _validateFile()
     {
         parent::_validateFile();
 
-        if (!$this->imageValidator->isValid($this->_file['tmp_name'])) {
+        if (!$this->getImageValidator()->isValid($this->_file['tmp_name'])) {
             throw new ValidationException(__('File validation failed.'));
         }
     }
+
+    /**
+     * Return image validator class.
+     *
+     * Child classes __construct() don't call parent, so we have to retrieve class instance with private function.
+     *
+     * @return Image
+     */
+    private function getImageValidator(): Image
+    {
+        if (!$this->imageValidator) {
+            $this->imageValidator = ObjectManager::getInstance()->get(Image::class);
+        }
+
+        return $this->imageValidator;
+    }
 }

From 89194c47022311d3d079304ce00f22d9acdc02c9 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Mon, 2 Mar 2020 13:08:24 -0600
Subject: [PATCH 045/307] MC-30944: Incorrect flow of saving Newsletter
 templates

---
 .../Magento/Newsletter/Controller/Adminhtml/Template/Save.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php
index 8fc729ea34078..ac7371a08571f 100644
--- a/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php
+++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php
@@ -32,9 +32,7 @@ public function execute()
         }
 
         try {
-            $template->addData(
-                $request->getParams()
-            )->setTemplateSubject(
+            $template->setTemplateSubject(
                 $request->getParam('subject')
             )->setTemplateCode(
                 $request->getParam('code')

From a050516262c70eb314769f4795d5b897778f9a9d Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Mon, 2 Mar 2020 16:00:21 -0600
Subject: [PATCH 046/307] MC-31362: Media folder update

- Fixed edge case in file driver
---
 lib/internal/Magento/Framework/Filesystem/Driver/File.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
index 1a847a518a3f9..e5fa134f6d38a 100644
--- a/lib/internal/Magento/Framework/Filesystem/Driver/File.php
+++ b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
@@ -983,6 +983,9 @@ public function getRealPathSafety($path)
             $path
         );
         $pathParts = explode(DIRECTORY_SEPARATOR, $path);
+        if (end($pathParts) == '.') {
+            $pathParts[count($pathParts)] = '';
+        }
         $realPath = [];
         foreach ($pathParts as $pathPart) {
             if ($pathPart == '.') {

From 727862d55e477927c9c2801e39fa1042a1abea40 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Tue, 3 Mar 2020 11:19:24 -0600
Subject: [PATCH 047/307] MC-30944: Incorrect flow of saving Newsletter
 templates

---
 .../Magento/Newsletter/Controller/Adminhtml/Template/Save.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php
index ac7371a08571f..dc4d50c22b162 100644
--- a/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php
+++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Template/Save.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
@@ -10,6 +9,9 @@
 use Magento\Framework\App\TemplateTypesInterface;
 use Magento\Framework\Exception\LocalizedException;
 
+/**
+ * An action that saves a template.
+ */
 class Save extends \Magento\Newsletter\Controller\Adminhtml\Template implements HttpPostActionInterface
 {
     /**

From 421fdc45a71f7c889a9d45b9d704544c95f26d5d Mon Sep 17 00:00:00 2001
From: Hwashiang Yu <hwyu@adobe.com>
Date: Tue, 3 Mar 2020 12:16:11 -0600
Subject: [PATCH 048/307] MC-31362: Media folder update

- Fixed unit test failures
- Fixed minor invalid logic in filedriver
---
 .../Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php    | 4 +++-
 lib/internal/Magento/Framework/Filesystem/Driver/File.php | 2 +-
 .../Framework/Filesystem/Test/Unit/Driver/FileTest.php    | 8 ++++++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php
index f87eee62e1095..6bdadfa07ff3d 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php
@@ -139,7 +139,7 @@ protected function setUp()
 
         $this->directoryMock = $this->createPartialMock(
             \Magento\Framework\Filesystem\Directory\Write::class,
-            ['delete', 'getDriver', 'create', 'getRelativePath', 'isExist', 'isFile']
+            ['delete', 'getDriver', 'create', 'getRelativePath', 'getAbsolutePath', 'isExist', 'isFile']
         );
         $this->directoryMock->expects(
             $this->any()
@@ -283,6 +283,7 @@ public function testGetResizeHeight()
     public function testDeleteDirectoryOverRoot()
     {
         $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->will($this->returnArgument(0));
+        $this->directoryMock->expects($this->atLeastOnce())->method('getAbsolutePath')->will($this->returnArgument(0));
         $this->imagesStorage->deleteDirectory(self::INVALID_DIRECTORY_OVER_ROOT);
     }
 
@@ -294,6 +295,7 @@ public function testDeleteDirectoryOverRoot()
     public function testDeleteRootDirectory()
     {
         $this->driverMock->expects($this->atLeastOnce())->method('getRealPathSafety')->will($this->returnArgument(0));
+        $this->directoryMock->expects($this->atLeastOnce())->method('getAbsolutePath')->will($this->returnArgument(0));
         $this->imagesStorage->deleteDirectory(self::STORAGE_ROOT_DIR);
     }
 
diff --git a/lib/internal/Magento/Framework/Filesystem/Driver/File.php b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
index e5fa134f6d38a..948ba21226ca5 100644
--- a/lib/internal/Magento/Framework/Filesystem/Driver/File.php
+++ b/lib/internal/Magento/Framework/Filesystem/Driver/File.php
@@ -984,7 +984,7 @@ public function getRealPathSafety($path)
         );
         $pathParts = explode(DIRECTORY_SEPARATOR, $path);
         if (end($pathParts) == '.') {
-            $pathParts[count($pathParts)] = '';
+            $pathParts[count($pathParts) - 1] = '';
         }
         $realPath = [];
         foreach ($pathParts as $pathPart) {
diff --git a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
index 83cb9ea80e1ab..9d00d6210bd70 100644
--- a/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
+++ b/lib/internal/Magento/Framework/Filesystem/Test/Unit/Driver/FileTest.php
@@ -107,10 +107,14 @@ public function dataProviderForTestGetRealPathSafety(): array
     {
         return [
             ['/1/2/3', '/1/2/3'],
+            ['/1/.test', '/1/.test'],
+            ['/1/..test', '/1/..test'],
+            ['/1/.test/.test', '/1/.test/.test'],
+            ['/1/2/./.', '/1/2/'],
             ['/1/2/3/../..', '/1'],
-            ['/1/2/3/.', '/1/2/3'],
+            ['/1/2/3/.', '/1/2/3/'],
             ['/1/2/3/./4/5', '/1/2/3/4/5'],
-            ['/1/2/3/../4/5', '/1/2/4/5'],
+            ['/1/2/3/../4/5', '/1/2/4/5']
         ];
     }
 }

From 606372927496e210ff2e25f616c14de6f4e17736 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Wed, 4 Mar 2020 14:55:01 -0600
Subject: [PATCH 049/307] MC-30944: Incorrect flow of saving Newsletter
 templates

---
 .../Adminhtml/NewsletterTemplateTest.php           | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php
index ae57703f9e8e2..c19ca5aa6f4d8 100644
--- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/Adminhtml/NewsletterTemplateTest.php
@@ -62,11 +62,19 @@ protected function tearDown()
     public function testSaveActionCreateNewTemplateAndVerifySuccessMessage()
     {
         $this->getRequest()->setParam('id', $this->model->getId());
+        $this->getRequest()->setParam('is_legacy', 1);
+
         $this->dispatch('backend/newsletter/template/save');
+
         /**
          * Check that errors was generated and set to session
          */
         $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR);
+
+        $this->model->load($this->getRequest()->getPostValue('code'), 'template_code');
+
+        $this->assertEquals(0, $this->model->getIsLegacy());
+
         /**
          * Check that success message is set
          */
@@ -90,6 +98,8 @@ public function testSaveActionEditTemplateAndVerifySuccessMessage()
         $this->assertEquals('some_unique_code', $this->model->getTemplateCode());
 
         $this->getRequest()->setParam('id', $this->model->getId());
+        $this->getRequest()->setParam('is_legacy', 1);
+
         $this->dispatch('backend/newsletter/template/save');
 
         /**
@@ -97,6 +107,10 @@ public function testSaveActionEditTemplateAndVerifySuccessMessage()
          */
         $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR);
 
+        $this->model->load($this->getRequest()->getPostValue('code'), 'template_code');
+
+        $this->assertEquals(0, $this->model->getIsLegacy());
+
         /**
          * Check that success message is set
          */

From 258d99860973f9caf522542ffc613e79c118874e Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Thu, 5 Mar 2020 12:27:23 +0200
Subject: [PATCH 050/307] MC-31491: Export file controller improvement

---
 .../Adminhtml/Export/File/Delete.php          | 44 +++++++++++++++----
 .../Magento/TestFramework/Application.php     |  1 +
 .../Adminhtml/Export/File/DeleteTest.php      |  4 +-
 .../App/Filesystem/DirectoryList.php          | 10 ++++-
 4 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
index 1e9d194653c9c..0bcff0899d35d 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
@@ -13,9 +13,15 @@
 use Magento\Framework\Exception\FileSystemException;
 use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Exception\ValidatorException;
 use Magento\ImportExport\Controller\Adminhtml\Export as ExportController;
 use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\DriverInterface;
+use Magento\Framework\App\ResponseInterface;
+use Magento\Framework\Controller\ResultInterface;
+use Magento\Framework\App\Filesystem\DirectoryResolver;
+use Magento\Framework\Filesystem\Directory\WriteFactory;
+use Magento\Backend\Model\View\Result\Redirect;
 
 /**
  * Controller that delete file by name.
@@ -37,26 +43,43 @@ class Delete extends ExportController implements HttpPostActionInterface
      */
     private $file;
 
+    /**
+     * @var DirectoryResolver
+     */
+    private $directoryResolver;
+
+    /**
+     * @var WriteFactory
+     */
+    private $writeFactory;
+
     /**
      * Delete constructor.
+     *
      * @param Action\Context $context
      * @param Filesystem $filesystem
      * @param DriverInterface $file
+     * @param DirectoryResolver $directoryResolver
+     * @param WriteFactory $writeFactory
      */
     public function __construct(
         Action\Context $context,
         Filesystem $filesystem,
-        DriverInterface $file
+        DriverInterface $file,
+        DirectoryResolver $directoryResolver,
+        WriteFactory $writeFactory
     ) {
         $this->filesystem = $filesystem;
         $this->file = $file;
+        $this->directoryResolver = $directoryResolver;
+        $this->writeFactory = $writeFactory;
         parent::__construct($context);
     }
 
     /**
      * Controller basic method implementation.
      *
-     * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface
+     * @return ResponseInterface|ResultInterface
      * @throws LocalizedException
      */
     public function execute()
@@ -65,17 +88,20 @@ public function execute()
             if (empty($fileName = $this->getRequest()->getParam('filename'))) {
                 throw new LocalizedException(__('Please provide export file name'));
             }
-            $directory = $this->filesystem->getDirectoryRead(DirectoryList::VAR_DIR);
-            $path = $directory->getAbsolutePath() . 'export/' . $fileName;
-
-            if (!$directory->isFile($path)) {
+            $directoryWrite = $this->writeFactory->create(
+                $this->filesystem->getDirectoryRead(DirectoryList::VAR_EXPORT)->getAbsolutePath()
+            );
+            try {
+                $directoryWrite->delete($directoryWrite->getAbsolutePath($fileName));
+            } catch (ValidatorException $exception) {
+                throw new LocalizedException(__('Filename has not permitted symbols in it'));
+            } catch (FileSystemException $exception) {
                 throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.'));
             }
-
-            $this->file->deleteFile($path);
-            /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
+            /** @var Redirect $resultRedirect */
             $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
             $resultRedirect->setPath('adminhtml/export/index');
+
             return $resultRedirect;
         } catch (FileSystemException $exception) {
             throw new LocalizedException(__('There are no export file with such name %1', $fileName));
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php
index f0ce2e24545eb..62f1101bae847 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php
@@ -704,6 +704,7 @@ protected function getCustomDirs()
         $customDirs = [
             DirectoryList::CONFIG => [$path => "{$this->installDir}/etc"],
             DirectoryList::VAR_DIR => [$path => $var],
+            DirectoryList::VAR_EXPORT => [$path => "{$var}/export"],
             DirectoryList::MEDIA => [$path => "{$this->installDir}/pub/media"],
             DirectoryList::STATIC_VIEW => [$path => "{$this->installDir}/pub/static"],
             DirectoryList::TMP_MATERIALIZATION_DIR => [$path => "{$var}/view_preprocessed/pub/static"],
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Controller/Adminhtml/Export/File/DeleteTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Controller/Adminhtml/Export/File/DeleteTest.php
index 6b1463aa1a9df..77caf7a88bbd4 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Controller/Adminhtml/Export/File/DeleteTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Controller/Adminhtml/Export/File/DeleteTest.php
@@ -22,7 +22,7 @@ class DeleteTest extends AbstractBackendController
     /**
      * @var WriteInterface
      */
-    private $varDirectory;
+    protected $varDirectory;
 
     /**
      * @var string
@@ -83,7 +83,7 @@ public function testExecute($file): void
      * @param $destinationFilePath
      * @return void
      */
-    private function copyFile($destinationFilePath): void
+    protected function copyFile($destinationFilePath): void
     {
         //Refers to application root directory
         $rootDirectory = $this->fileSystem->getDirectoryWrite(DirectoryList::ROOT);
diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php
index 4b10a503f423c..6caf2c0f88dfa 100644
--- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php
+++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php
@@ -57,6 +57,11 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList
      */
     const VAR_DIR = 'var';
 
+    /**
+     * Storage of files which was exported.
+     */
+    const VAR_EXPORT = 'var_export';
+
     /**
      * Temporary files
      */
@@ -136,7 +141,7 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList
     const GENERATED_METADATA = 'metadata';
 
     /**
-     * {@inheritdoc}
+     * @inheritdoc
      */
     public static function getDefaultConfig()
     {
@@ -146,6 +151,7 @@ public static function getDefaultConfig()
             self::CONFIG => [parent::PATH => 'app/etc'],
             self::LIB_INTERNAL => [parent::PATH => 'lib/internal'],
             self::VAR_DIR => [parent::PATH => 'var'],
+            self::VAR_EXPORT => [parent::PATH => 'var/export'],
             self::CACHE => [parent::PATH => 'var/cache'],
             self::LOG => [parent::PATH => 'var/log'],
             self::DI => [parent::PATH => 'generated/metadata'],
@@ -169,7 +175,7 @@ public static function getDefaultConfig()
     }
 
     /**
-     * {@inheritdoc}
+     * @inheritdoc
      */
     public function __construct($root, array $config = [])
     {

From 52d72b8010c9cecb5b8e3d98ec5edc1ddcc65fb4 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Tue, 10 Mar 2020 12:26:51 +0200
Subject: [PATCH 051/307] MC-32188: Improve validation of secret keys

---
 app/code/Magento/Backend/App/AbstractAction.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php
index 2f01700bdf51c..c6d6c9fc5f8a8 100644
--- a/app/code/Magento/Backend/App/AbstractAction.php
+++ b/app/code/Magento/Backend/App/AbstractAction.php
@@ -16,6 +16,7 @@
 use Magento\Framework\Data\Form\FormKey\Validator as FormKeyValidator;
 use Magento\Framework\Locale\ResolverInterface;
 use Magento\Framework\View\Element\AbstractBlock;
+use Magento\Framework\Encryption\Helper\Security;
 
 /**
  * Generic backend controller
@@ -386,7 +387,7 @@ protected function _validateSecretKey()
         }
 
         $secretKey = $this->getRequest()->getParam(UrlInterface::SECRET_KEY_PARAM_NAME, null);
-        if (!$secretKey || $secretKey != $this->_backendUrl->getSecretKey()) {
+        if (!$secretKey || !Security::compareStrings($secretKey, $this->_backendUrl->getSecretKey())) {
             return false;
         }
         return true;

From 9dd8b9684cdcaa068d74554dbc360d2ae962abdf Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Wed, 11 Mar 2020 11:08:39 +0200
Subject: [PATCH 052/307] MC-31491: Export file controller improvement

---
 .../Adminhtml/Export/File/Delete.php          | 22 +------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
index 0bcff0899d35d..e7b0515cbe98e 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
@@ -16,10 +16,8 @@
 use Magento\Framework\Exception\ValidatorException;
 use Magento\ImportExport\Controller\Adminhtml\Export as ExportController;
 use Magento\Framework\Filesystem;
-use Magento\Framework\Filesystem\DriverInterface;
 use Magento\Framework\App\ResponseInterface;
 use Magento\Framework\Controller\ResultInterface;
-use Magento\Framework\App\Filesystem\DirectoryResolver;
 use Magento\Framework\Filesystem\Directory\WriteFactory;
 use Magento\Backend\Model\View\Result\Redirect;
 
@@ -38,16 +36,6 @@ class Delete extends ExportController implements HttpPostActionInterface
      */
     private $filesystem;
 
-    /**
-     * @var DriverInterface
-     */
-    private $file;
-
-    /**
-     * @var DirectoryResolver
-     */
-    private $directoryResolver;
-
     /**
      * @var WriteFactory
      */
@@ -58,20 +46,14 @@ class Delete extends ExportController implements HttpPostActionInterface
      *
      * @param Action\Context $context
      * @param Filesystem $filesystem
-     * @param DriverInterface $file
-     * @param DirectoryResolver $directoryResolver
      * @param WriteFactory $writeFactory
      */
     public function __construct(
         Action\Context $context,
         Filesystem $filesystem,
-        DriverInterface $file,
-        DirectoryResolver $directoryResolver,
         WriteFactory $writeFactory
     ) {
         $this->filesystem = $filesystem;
-        $this->file = $file;
-        $this->directoryResolver = $directoryResolver;
         $this->writeFactory = $writeFactory;
         parent::__construct($context);
     }
@@ -88,9 +70,7 @@ public function execute()
             if (empty($fileName = $this->getRequest()->getParam('filename'))) {
                 throw new LocalizedException(__('Please provide export file name'));
             }
-            $directoryWrite = $this->writeFactory->create(
-                $this->filesystem->getDirectoryRead(DirectoryList::VAR_EXPORT)->getAbsolutePath()
-            );
+            $directoryWrite = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_EXPORT);
             try {
                 $directoryWrite->delete($directoryWrite->getAbsolutePath($fileName));
             } catch (ValidatorException $exception) {

From 3e2c40110b1b8c4b7c9bb4fb0006440eb33ee8c8 Mon Sep 17 00:00:00 2001
From: Nathan Smith <nathsmit@adobe.com>
Date: Wed, 11 Mar 2020 09:50:43 -0500
Subject: [PATCH 053/307] MC-31733: Media gallery breaks in some filesystems

---
 app/code/Magento/Theme/Model/Wysiwyg/Storage.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
index a48d34c6df93d..5c38d99dd6a22 100644
--- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
+++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
@@ -341,7 +341,10 @@ public function deleteDirectory($path)
     {
         $rootCmp = rtrim($this->_helper->getStorageRoot(), '/');
         $pathCmp = rtrim($path, '/');
-        $absolutePath = $this->filesystemDriver->getRealPathSafety($this->mediaWriteDirectory->getAbsolutePath($path));
+        $absolutePath = rtrim(
+            $this->filesystemDriver->getRealPathSafety($this->mediaWriteDirectory->getAbsolutePath($path)),
+            '/'
+        );
 
         if ($rootCmp == $pathCmp || $rootCmp === $absolutePath) {
             throw new \Magento\Framework\Exception\LocalizedException(

From 4f1c2a75706fa5219b6bd8c31838315329c45e25 Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Mon, 16 Mar 2020 13:07:51 +0200
Subject: [PATCH 054/307] MC-31491: Export file controller improvement

---
 .../ImportExport/Controller/Adminhtml/Export/File/Delete.php    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
index e7b0515cbe98e..9c4cfc0df0af5 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
@@ -74,7 +74,7 @@ public function execute()
             try {
                 $directoryWrite->delete($directoryWrite->getAbsolutePath($fileName));
             } catch (ValidatorException $exception) {
-                throw new LocalizedException(__('Filename has not permitted symbols in it'));
+                throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.'));
             } catch (FileSystemException $exception) {
                 throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.'));
             }

From f4d3015cefe1423e5cb5d8f39a6feddc451bcadd Mon Sep 17 00:00:00 2001
From: Andrii Kasian <akasian@magento.com>
Date: Fri, 20 Mar 2020 13:39:09 -0500
Subject: [PATCH 055/307] Speedup bin/magento

---
 .../Model/ConfigOptionsListCollectorTest.php  | 20 +++++---
 .../Framework/Module/DependencyChecker.php    | 51 ++++++++-----------
 .../Test/Unit/DependencyCheckerTest.php       | 18 ++-----
 .../Model/ConfigOptionsListCollector.php      | 27 +++++-----
 4 files changed, 53 insertions(+), 63 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php b/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php
index 455d6436f724d..0d2a9e8eaacbc 100644
--- a/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Setup\Model;
 
+use Magento\Framework\Component\ComponentRegistrarInterface;
+use Magento\Setup\Validator\DbValidator;
+use Zend\ServiceManager\ServiceLocatorInterface;
+
 class ConfigOptionsListCollectorTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -14,7 +18,7 @@ class ConfigOptionsListCollectorTest extends \PHPUnit\Framework\TestCase
 
     public function setUp()
     {
-        $this->objectManagerProvider = $this->createMock(\Magento\Setup\Model\ObjectManagerProvider::class);
+        $this->objectManagerProvider = $this->createMock(ObjectManagerProvider::class);
         $this->objectManagerProvider
             ->expects($this->any())
             ->method('get')
@@ -24,11 +28,13 @@ public function setUp()
     public function testCollectOptionsLists()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $fullModuleListMock = $this->createMock(\Magento\Framework\Module\FullModuleList::class);
-        $fullModuleListMock->expects($this->once())->method('getNames')->willReturn(['Magento_Backend']);
+        $componentRegistrar = $this->createMock(ComponentRegistrarInterface::class);
+        $componentRegistrar->expects($this->once())
+            ->method('getPaths')
+            ->willReturn(['Magento_Backend'=>'app/code/Magento/Backend']);
 
-        $dbValidator = $this->createMock(\Magento\Setup\Validator\DbValidator::class);
-        $configGenerator = $this->createMock(\Magento\Setup\Model\ConfigGenerator::class);
+        $dbValidator = $this->createMock(DbValidator::class);
+        $configGenerator = $this->createMock(ConfigGenerator::class);
 
         $setupOptions = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create(
@@ -39,7 +45,7 @@ public function testCollectOptionsLists()
                 ]
             );
 
-        $serviceLocator = $this->getMockForAbstractClass(\Zend\ServiceManager\ServiceLocatorInterface::class);
+        $serviceLocator = $this->getMockForAbstractClass(ServiceLocatorInterface::class);
 
         $serviceLocator->expects($this->once())
             ->method('get')
@@ -51,7 +57,7 @@ public function testCollectOptionsLists()
             \Magento\Setup\Model\ConfigOptionsListCollector::class,
             [
                 'objectManagerProvider' => $this->objectManagerProvider,
-                'fullModuleList' => $fullModuleListMock,
+                'componentRegistrar' => $componentRegistrar,
                 'serviceLocator' => $serviceLocator
             ]
         );
diff --git a/lib/internal/Magento/Framework/Module/DependencyChecker.php b/lib/internal/Magento/Framework/Module/DependencyChecker.php
index 5855c5cf4143e..bfdda2e10501f 100644
--- a/lib/internal/Magento/Framework/Module/DependencyChecker.php
+++ b/lib/internal/Magento/Framework/Module/DependencyChecker.php
@@ -13,43 +13,31 @@
 class DependencyChecker
 {
     /**
-     * Enabled module list from configuration
-     *
-     * @var array
-     */
-    private $enabledModuleList;
-
-    /**
-     * The full module list information from filesystem
-     *
-     * @var array
+     * @var PackageInfo
      */
-    private $fullModuleList;
+    protected $packageInfo;
 
     /**
-     * Graph
-     *
-     * @var Graph
+     * @var ModuleList
      */
-    private $graph;
-
+    private $list;
     /**
-     * @var PackageInfo
+     * @var ModuleList\Loader
      */
-    protected $packageInfo;
+    private $loader;
 
     /**
      * Constructor
      *
      * @param ModuleList $list
      * @param ModuleList\Loader $loader
-     * @param PackageInfoFactory $packageInfoFactory
+     * @param PackageInfo $packageInfo
      */
-    public function __construct(ModuleList $list, ModuleList\Loader $loader, PackageInfoFactory $packageInfoFactory)
+    public function __construct(ModuleList $list, ModuleList\Loader $loader, PackageInfo $packageInfo)
     {
-        $this->enabledModuleList = $list->getNames();
-        $this->fullModuleList = $loader->load();
-        $this->packageInfo = $packageInfoFactory->create();
+        $this->list = $list;
+        $this->loader = $loader;
+        $this->packageInfo = $packageInfo;
     }
 
     /**
@@ -61,7 +49,7 @@ public function __construct(ModuleList $list, ModuleList\Loader $loader, Package
      */
     public function checkDependenciesWhenDisableModules($toBeDisabledModules, $currentlyEnabledModules = null)
     {
-        $masterList = isset($currentlyEnabledModules) ? $currentlyEnabledModules : $this->enabledModuleList;
+        $masterList = $currentlyEnabledModules ?? $this->list->getNames();
         // assume disable succeeds: currently enabled modules - to-be-disabled modules
         $enabledModules = array_diff($masterList, $toBeDisabledModules);
         return $this->checkDependencyGraph(false, $toBeDisabledModules, $enabledModules);
@@ -76,7 +64,7 @@ public function checkDependenciesWhenDisableModules($toBeDisabledModules, $curre
      */
     public function checkDependenciesWhenEnableModules($toBeEnabledModules, $currentlyEnabledModules = null)
     {
-        $masterList = isset($currentlyEnabledModules) ? $currentlyEnabledModules : $this->enabledModuleList;
+        $masterList = $currentlyEnabledModules ?? $this->list->getNames();
         // assume enable succeeds: union of currently enabled modules and to-be-enabled modules
         $enabledModules = array_unique(array_merge($masterList, $toBeEnabledModules));
         return $this->checkDependencyGraph(true, $toBeEnabledModules, $enabledModules);
@@ -89,17 +77,19 @@ public function checkDependenciesWhenEnableModules($toBeEnabledModules, $current
      * @param string[] $moduleNames list of modules to be enabled/disabled
      * @param string[] $enabledModules list of enabled modules assuming enable/disable succeeds
      * @return array
+     * @throws \Magento\Framework\Exception\LocalizedException
      */
     private function checkDependencyGraph($isEnable, $moduleNames, $enabledModules)
     {
-        $this->graph = $this->createGraph();
+        $fullModuleList = $this->loader->load();
+        $graph = $this->createGraph($fullModuleList);
         $dependenciesMissingAll = [];
         $graphMode = $isEnable ? Graph::DIRECTIONAL : Graph::INVERSE;
         foreach ($moduleNames as $moduleName) {
             $dependenciesMissing = [];
-            $paths = $this->graph->findPathsToReachableNodes($moduleName, $graphMode);
+            $paths = $graph->findPathsToReachableNodes($moduleName, $graphMode);
             $modules = array_merge(
-                array_keys($this->fullModuleList),
+                array_keys($fullModuleList),
                 $this->packageInfo->getNonExistingDependencies()
             );
             foreach ($modules as $module) {
@@ -119,15 +109,16 @@ private function checkDependencyGraph($isEnable, $moduleNames, $enabledModules)
     /**
      * Create the dependency graph
      *
+     * @param array $fullModuleList
      * @return Graph
      */
-    private function createGraph()
+    private function createGraph($fullModuleList)
     {
         $nodes = [];
         $dependencies = [];
 
         // build the graph data
-        foreach (array_keys($this->fullModuleList) as $moduleName) {
+        foreach (array_keys($fullModuleList) as $moduleName) {
             $nodes[] = $moduleName;
             foreach ($this->packageInfo->getRequire($moduleName) as $dependModuleName) {
                 if ($dependModuleName) {
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
index ced028c0ef47b..ff37cd99e489c 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
@@ -19,11 +19,6 @@ class DependencyCheckerTest extends \PHPUnit\Framework\TestCase
      */
     private $packageInfoMock;
 
-    /**
-     * @var \Magento\Framework\Module\PackageInfoFactory|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private $packageInfoFactoryMock;
-
     /**
      * @var \Magento\Framework\Module\ModuleList|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -49,10 +44,7 @@ protected function setUp()
             ->method('getRequire')
             ->will($this->returnValueMap($requireMap));
 
-        $this->packageInfoFactoryMock = $this->createMock(\Magento\Framework\Module\PackageInfoFactory::class);
-        $this->packageInfoFactoryMock->expects($this->once())
-            ->method('create')
-            ->will($this->returnValue($this->packageInfoMock));
+
 
         $this->listMock = $this->createMock(\Magento\Framework\Module\ModuleList::class);
         $this->loaderMock = $this->createMock(\Magento\Framework\Module\ModuleList\Loader::class);
@@ -70,7 +62,7 @@ public function testCheckDependenciesWhenDisableModules()
         $this->packageInfoMock->expects($this->atLeastOnce())
             ->method('getNonExistingDependencies')
             ->willReturn([]);
-        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoFactoryMock);
+        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoMock);
 
         $actual = $this->checker->checkDependenciesWhenDisableModules(['B', 'D']);
         $expected = ['B' => ['A' => ['A', 'B']], 'D' => ['A' => ['A', 'B', 'D']]];
@@ -82,7 +74,7 @@ public function testCheckDependenciesWhenDisableModulesWithCurEnabledModules()
         $this->packageInfoMock->expects($this->atLeastOnce())
             ->method('getNonExistingDependencies')
             ->willReturn([]);
-        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoFactoryMock);
+        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoMock);
 
         $actual = $this->checker->checkDependenciesWhenDisableModules(['B', 'D'], ['C', 'D', 'E']);
         $expected = ['B' => [], 'D' => []];
@@ -97,7 +89,7 @@ public function testCheckDependenciesWhenEnableModules()
         $this->packageInfoMock->expects($this->atLeastOnce())
             ->method('getNonExistingDependencies')
             ->willReturn([]);
-        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoFactoryMock);
+        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoMock);
         $actual = $this->checker->checkDependenciesWhenEnableModules(['B', 'D']);
         $expected = [
             'B' => ['A' => ['B', 'D', 'A'], 'E' => ['B', 'E']],
@@ -111,7 +103,7 @@ public function testCheckDependenciesWhenEnableModulesWithCurEnabledModules()
         $this->packageInfoMock->expects($this->atLeastOnce())
             ->method('getNonExistingDependencies')
             ->willReturn([]);
-        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoFactoryMock);
+        $this->checker = new DependencyChecker($this->listMock, $this->loaderMock, $this->packageInfoMock);
         $actual = $this->checker->checkDependenciesWhenEnableModules(['B', 'D'], ['C']);
         $expected = [
             'B' => ['A' => ['B', 'D', 'A'], 'E' => ['B', 'E']],
diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php b/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php
index cd2442c215bb3..a7aa46c7dd12b 100644
--- a/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php
+++ b/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php
@@ -6,8 +6,9 @@
 namespace Magento\Setup\Model;
 
 use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Component\ComponentRegistrar;
+use Magento\Framework\Component\ComponentRegistrarInterface;
 use Magento\Framework\Filesystem;
-use Magento\Framework\Module\FullModuleList;
 use Magento\Framework\Setup\ConfigOptionsListInterface;
 use Zend\ServiceManager\ServiceLocatorInterface;
 
@@ -30,13 +31,6 @@ class ConfigOptionsListCollector
      */
     private $filesystem;
 
-    /**
-     * Module list including enabled and disabled modules
-     *
-     * @var FullModuleList
-     */
-    private $fullModuleList;
-
     /**
      * Object manager provider
      *
@@ -51,27 +45,34 @@ class ConfigOptionsListCollector
      */
     private $serviceLocator;
 
+    /**
+     * Component list
+     *
+     * @var ComponentRegistrarInterface
+     */
+    private $componentRegistrar;
+
     /**
      * Constructor
      *
      * @param DirectoryList $directoryList
      * @param Filesystem $filesystem
-     * @param FullModuleList $fullModuleList
+     * @param ComponentRegistrarInterface $componentRegistrar
      * @param ObjectManagerProvider $objectManagerProvider
      * @param ServiceLocatorInterface $serviceLocator
      */
     public function __construct(
         DirectoryList $directoryList,
         Filesystem $filesystem,
-        FullModuleList $fullModuleList,
+        ComponentRegistrarInterface $componentRegistrar,
         ObjectManagerProvider $objectManagerProvider,
         ServiceLocatorInterface $serviceLocator
     ) {
         $this->directoryList = $directoryList;
         $this->filesystem = $filesystem;
-        $this->fullModuleList = $fullModuleList;
         $this->objectManagerProvider = $objectManagerProvider;
         $this->serviceLocator = $serviceLocator;
+        $this->componentRegistrar = $componentRegistrar;
     }
 
     /**
@@ -84,8 +85,8 @@ public function collectOptionsLists()
     {
         $optionsList = [];
 
-        // go through modules
-        foreach ($this->fullModuleList->getNames() as $moduleName) {
+        $modulePaths = $this->componentRegistrar->getPaths(ComponentRegistrar::MODULE);
+        foreach ($modulePaths as $moduleName => $modulePath) {
             $optionsClassName = str_replace('_', '\\', $moduleName) . '\Setup\ConfigOptionsList';
             if (class_exists($optionsClassName)) {
                 $optionsClass = $this->objectManagerProvider->get()->create($optionsClassName);

From 7bc112b8a8567ac9ef3014a62adf01f31e6b1a8f Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 20 Mar 2020 14:04:41 -0500
Subject: [PATCH 056/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../Magento/Catalog/Model/Template/Filter.php | 10 +++-
 .../Magento/Cms/Model/Template/Filter.php     | 19 ------
 .../Magento/Email/Model/Template/Filter.php   |  7 ++-
 .../Model/StoreSwitcher/CleanTargetUrl.php    | 25 ++------
 .../Framework/Session/SessionManagerTest.php  | 16 -----
 .../testsuite/Magento/Framework/UrlTest.php   |  7 ---
 .../Magento/Store/Model/StoreSwitcherTest.php |  2 +-
 .../Framework/Session/SessionManager.php      |  8 +--
 .../Magento/Framework/Session/SidResolver.php | 58 ++++++-------------
 .../Session/SidResolverInterface.php          |  6 ++
 .../Magento/Framework/Test/Unit/UrlTest.php   | 27 ---------
 lib/internal/Magento/Framework/Url.php        |  8 ++-
 .../Magento/Framework/UrlInterface.php        | 11 +---
 13 files changed, 55 insertions(+), 149 deletions(-)

diff --git a/app/code/Magento/Catalog/Model/Template/Filter.php b/app/code/Magento/Catalog/Model/Template/Filter.php
index 8cd61415b958a..0a46af3ef021d 100644
--- a/app/code/Magento/Catalog/Model/Template/Filter.php
+++ b/app/code/Magento/Catalog/Model/Template/Filter.php
@@ -14,8 +14,6 @@
 
 /**
  * Work with catalog(store, website) urls
- *
- * @package Magento\Catalog\Model\Template
  */
 class Filter extends \Magento\Framework\Filter\Template
 {
@@ -30,6 +28,7 @@ class Filter extends \Magento\Framework\Filter\Template
      * Whether to allow SID in store directive: NO
      *
      * @var bool
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     protected $_useSessionInUrl = false;
 
@@ -81,10 +80,14 @@ public function setUseAbsoluteLinks($flag)
      *
      * @param bool $flag
      * @return $this
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     public function setUseSessionInUrl($flag)
     {
-        $this->_useSessionInUrl = $flag;
+        // phpcs:disable Magento2.Functions.DiscouragedFunction
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return $this;
     }
 
@@ -126,6 +129,7 @@ public function viewDirective($construction)
      */
     public function mediaDirective($construction)
     {
+        // phpcs:disable Magento2.Functions.DiscouragedFunction
         $params = $this->getParameters(html_entity_decode($construction[2], ENT_QUOTES));
         return $this->_storeManager->getStore()
                 ->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . $params['url'];
diff --git a/app/code/Magento/Cms/Model/Template/Filter.php b/app/code/Magento/Cms/Model/Template/Filter.php
index a22daab950149..66bca1052b797 100644
--- a/app/code/Magento/Cms/Model/Template/Filter.php
+++ b/app/code/Magento/Cms/Model/Template/Filter.php
@@ -10,25 +10,6 @@
  */
 class Filter extends \Magento\Email\Model\Template\Filter
 {
-    /**
-     * Whether to allow SID in store directive: AUTO
-     *
-     * @var bool
-     */
-    protected $_useSessionInUrl;
-
-    /**
-     * Setter whether SID is allowed in store directive
-     *
-     * @param bool $flag
-     * @return $this
-     */
-    public function setUseSessionInUrl($flag)
-    {
-        $this->_useSessionInUrl = (bool)$flag;
-        return $this;
-    }
-
     /**
      * Retrieve media file URL directive
      *
diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php
index 5bb2c42144508..cd075a5115ff0 100644
--- a/app/code/Magento/Email/Model/Template/Filter.php
+++ b/app/code/Magento/Email/Model/Template/Filter.php
@@ -45,6 +45,7 @@ class Filter extends \Magento\Framework\Filter\Template
      * Whether to allow SID in store directive: NO
      *
      * @var bool
+     * @deprecated SID is not being used as query parameter anymore.
      */
     protected $_useSessionInUrl = false;
 
@@ -264,10 +265,14 @@ public function setUseAbsoluteLinks($flag)
      *
      * @param bool $flag
      * @return $this
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     public function setUseSessionInUrl($flag)
     {
-        $this->_useSessionInUrl = $flag;
+        // phpcs:disable Magento2.Functions.DiscouragedFunction
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return $this;
     }
 
diff --git a/app/code/Magento/Store/Model/StoreSwitcher/CleanTargetUrl.php b/app/code/Magento/Store/Model/StoreSwitcher/CleanTargetUrl.php
index 3328a21e8f5e1..c907ab14c0137 100644
--- a/app/code/Magento/Store/Model/StoreSwitcher/CleanTargetUrl.php
+++ b/app/code/Magento/Store/Model/StoreSwitcher/CleanTargetUrl.php
@@ -14,6 +14,8 @@
 
 /**
  * Remove SID, from_store, store from target url.
+ *
+ * Used in store-switching process in HTML frontend.
  */
 class CleanTargetUrl implements StoreSwitcherInterface
 {
@@ -22,42 +24,27 @@ class CleanTargetUrl implements StoreSwitcherInterface
      */
     private $urlHelper;
 
-    /**
-     * @var \Magento\Framework\Session\Generic
-     */
-    private $session;
-
-    /**
-     * @var \Magento\Framework\Session\SidResolverInterface
-     */
-    private $sidResolver;
-
     /**
      * @param UrlHelper $urlHelper
-     * @param \Magento\Framework\Session\Generic $session
-     * @param \Magento\Framework\Session\SidResolverInterface $sidResolver
      */
     public function __construct(
-        UrlHelper $urlHelper,
-        \Magento\Framework\Session\Generic $session,
-        \Magento\Framework\Session\SidResolverInterface $sidResolver
+        UrlHelper $urlHelper
     ) {
         $this->urlHelper = $urlHelper;
-        $this->session = $session;
-        $this->sidResolver = $sidResolver;
     }
 
     /**
+     * Generate target URL to switch stores through other mechanism then via URL params.
+     *
      * @param StoreInterface $fromStore store where we came from
      * @param StoreInterface $targetStore store where to go to
      * @param string $redirectUrl original url requested for redirect after switching
      * @return string redirect url
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function switch(StoreInterface $fromStore, StoreInterface $targetStore, string $redirectUrl): string
     {
         $targetUrl = $redirectUrl;
-        $sidName = $this->sidResolver->getSessionIdQueryParam($this->session);
-        $targetUrl = $this->urlHelper->removeRequestParam($targetUrl, $sidName);
         $targetUrl = $this->urlHelper->removeRequestParam($targetUrl, '___from_store');
         $targetUrl = $this->urlHelper->removeRequestParam($targetUrl, StoreResolverInterface::PARAM_NAME);
 
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
index 482a3c9cbd619..6ce5f0cf39c29 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
@@ -225,22 +225,6 @@ public function testSetSessionId()
             $this->assertEquals('test', $this->model->getSessionId());
         }
 
-        /**
-         * @magentoConfigFixture current_store web/session/use_frontend_sid 1
-         */
-        public function testSetSessionIdFromParam()
-        {
-            $this->initializeModel();
-            $this->appState->expects($this->any())
-                ->method('getAreaCode')
-                ->willReturn(\Magento\Framework\App\Area::AREA_FRONTEND);
-            $currentId = $this->model->getSessionId();
-            $this->assertNotEquals('test_id', $this->model->getSessionId());
-            $this->request->getQuery()->set(SidResolverInterface::SESSION_ID_QUERY_PARAM, 'test-id');
-            $this->model->setSessionId($this->sidResolver->getSid($this->model));
-            $this->assertEquals($currentId, $this->model->getSessionId());
-        }
-
         public function testGetSessionIdForHost()
         {
             $this->initializeModel();
diff --git a/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php b/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php
index 081857348d7da..f30fd205c6012 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/UrlTest.php
@@ -23,13 +23,6 @@ protected function setUp()
         $this->model = Bootstrap::getObjectManager()->create(\Magento\Framework\Url::class);
     }
 
-    public function testSetGetUseSession()
-    {
-        $this->assertFalse((bool)$this->model->getUseSession());
-        $this->model->setUseSession(false);
-        $this->assertFalse($this->model->getUseSession());
-    }
-
     public function testSetRouteFrontName()
     {
         $value = 'route';
diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreSwitcherTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreSwitcherTest.php
index 0e4d129d17aa6..abf133afa9078 100644
--- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreSwitcherTest.php
+++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreSwitcherTest.php
@@ -42,7 +42,7 @@ protected function setUp()
      */
     public function testSwitch(): void
     {
-        $redirectUrl = "http://domain.com/?SID=e5h3e086dce3ckkqt9ia7avl27&___store=fixture_second_store";
+        $redirectUrl = "http://domain.com/?___store=fixture_second_store";
         $expectedUrl = "http://domain.com/";
         $fromStoreCode = 'test';
         /** @var \Magento\Store\Api\StoreRepositoryInterface $storeRepository */
diff --git a/lib/internal/Magento/Framework/Session/SessionManager.php b/lib/internal/Magento/Framework/Session/SessionManager.php
index b96925facf528..7e43a9f2d99c0 100644
--- a/lib/internal/Magento/Framework/Session/SessionManager.php
+++ b/lib/internal/Magento/Framework/Session/SessionManager.php
@@ -10,7 +10,8 @@
 use Magento\Framework\Session\Config\ConfigInterface;
 
 /**
- * Session Manager
+ * Standard session management.
+ *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
  */
@@ -200,9 +201,6 @@ public function start()
                     session_commit();
                     session_id($_SESSION['new_session_id']);
                 }
-                $sid = $this->sidResolver->getSid($this);
-                // potential custom logic for session id (ex. switching between hosts)
-                $this->setSessionId($sid);
                 session_start();
                 if (isset($_SESSION['destroyed'])
                     && $_SESSION['destroyed'] < time() - $this->sessionConfig->getCookieLifetime()
@@ -211,7 +209,7 @@ public function start()
                 }
 
                 $this->validator->validate($this);
-                $this->renewCookie($sid);
+                $this->renewCookie(null);
 
                 register_shutdown_function([$this, 'writeClose']);
 
diff --git a/lib/internal/Magento/Framework/Session/SidResolver.php b/lib/internal/Magento/Framework/Session/SidResolver.php
index fd7af781981a9..3455ccf5cab2d 100644
--- a/lib/internal/Magento/Framework/Session/SidResolver.php
+++ b/lib/internal/Magento/Framework/Session/SidResolver.php
@@ -56,7 +56,7 @@ class SidResolver implements SidResolverInterface
      * @var bool|null
      * @see \Magento\Framework\UrlInterface
      */
-    protected $_useSessionInUrl;
+    protected $_useSessionInUrl = false;
 
     /**
      * @var string
@@ -88,26 +88,21 @@ public function __construct(
     }
 
     /**
-     * Get Sid
-     *
-     * @param SessionManagerInterface $session
-     * @return string|null
-     * @throws \Magento\Framework\Exception\LocalizedException
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @inheritDoc
      */
     public function getSid(SessionManagerInterface $session)
     {
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return null;
     }
 
     /**
-     * Get session id query param
-     *
-     * @param SessionManagerInterface $session
-     * @return string
+     * @inheritDoc
      */
     public function getSessionIdQueryParam(SessionManagerInterface $session)
     {
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
         $sessionName = $session->getName();
         if ($sessionName && isset($this->sidNameMap[$sessionName])) {
             return $this->sidNameMap[$sessionName];
@@ -116,57 +111,42 @@ public function getSessionIdQueryParam(SessionManagerInterface $session)
     }
 
     /**
-     * Set use session var instead of SID for URL
-     *
-     * @param bool $var
-     * @return $this
+     * @inheritDoc
      */
     public function setUseSessionVar($var)
     {
-        $this->_useSessionVar = (bool)$var;
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return $this;
     }
 
     /**
-     * Retrieve use flag session var instead of SID for URL
-     *
-     * @return bool
-     * @SuppressWarnings(PHPMD.BooleanGetMethodName)
+     * @inheritDoc
      */
     public function getUseSessionVar()
     {
-        return $this->_useSessionVar;
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
+        return false;
     }
 
     /**
-     * Set Use session in URL flag
-     *
-     * @param bool $flag
-     * @return $this
+     * @inheritDoc
      */
     public function setUseSessionInUrl($flag = true)
     {
-        $this->_useSessionInUrl = (bool)$flag;
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return $this;
     }
 
     /**
-     * Retrieve use session in URL flag.
-     *
-     * @return bool
-     * @SuppressWarnings(PHPMD.BooleanGetMethodName)
+     * @inheritDoc
      */
     public function getUseSessionInUrl()
     {
-        if ($this->_useSessionInUrl === null) {
-            //Using config value by default, can be overridden by using the
-            //setter.
-            $this->_useSessionInUrl = $this->scopeConfig->isSetFlag(
-                self::XML_PATH_USE_FRONTEND_SID,
-                $this->_scopeType
-            );
-        }
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
 
-        return $this->_useSessionInUrl;
+        return false;
     }
 }
diff --git a/lib/internal/Magento/Framework/Session/SidResolverInterface.php b/lib/internal/Magento/Framework/Session/SidResolverInterface.php
index 6f242c1c9e308..3c30921e7bce3 100644
--- a/lib/internal/Magento/Framework/Session/SidResolverInterface.php
+++ b/lib/internal/Magento/Framework/Session/SidResolverInterface.php
@@ -10,6 +10,7 @@
 /**
  * Interface \Magento\Framework\Session\SidResolverInterface
  *
+ * @deprecated 2.3.3 SIDs in URLs are no longer used
  */
 interface SidResolverInterface
 {
@@ -23,6 +24,7 @@ interface SidResolverInterface
      *
      * @param \Magento\Framework\Session\SessionManagerInterface $session
      * @return string|null
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     public function getSid(\Magento\Framework\Session\SessionManagerInterface $session);
 
@@ -31,6 +33,7 @@ public function getSid(\Magento\Framework\Session\SessionManagerInterface $sessi
      *
      * @param \Magento\Framework\Session\SessionManagerInterface $session
      * @return string
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     public function getSessionIdQueryParam(\Magento\Framework\Session\SessionManagerInterface $session);
 
@@ -39,6 +42,7 @@ public function getSessionIdQueryParam(\Magento\Framework\Session\SessionManager
      *
      * @param bool $var
      * @return $this
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     public function setUseSessionVar($var);
 
@@ -55,6 +59,7 @@ public function getUseSessionVar();
      *
      * @param bool $flag
      * @return $this
+     * @deprecated SID query parameter is not used in URLs anymore.
      */
     public function setUseSessionInUrl($flag = true);
 
@@ -62,6 +67,7 @@ public function setUseSessionInUrl($flag = true);
      * Retrieve use session in URL flag
      *
      * @return bool
+     * @deprecated SID query parameter is not used in URLs anymore.
      * @SuppressWarnings(PHPMD.BooleanGetMethodName)
      */
     public function getUseSessionInUrl();
diff --git a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php
index ee39b612852b9..8e95e4e7bbfea 100644
--- a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php
@@ -175,17 +175,6 @@ public function getCurrentUrlProvider()
         ];
     }
 
-    public function testGetUseSession()
-    {
-        $model = $this->getUrlModel();
-
-        $model->setUseSession(false);
-        $this->assertFalse((bool)$model->getUseSession());
-
-        $model->setUseSession(true);
-        $this->assertFalse($model->getUseSession());
-    }
-
     public function testGetBaseUrlNotLinkType()
     {
         $model = $this->getUrlModel(
@@ -532,22 +521,6 @@ public function testGetRouteUrlWithValidUrl()
         $this->assertEquals('http://example.com', $model->getRouteUrl('http://example.com'));
     }
 
-    public function testAddSessionParam()
-    {
-        $model = $this->getUrlModel([
-            'session' => $this->sessionMock,
-            'sidResolver' => $this->sidResolverMock,
-            'queryParamsResolver' => $this->queryParamsResolverMock,
-        ]);
-
-        $this->sidResolverMock->expects($this->never())->method('getSessionIdQueryParam')->with($this->sessionMock)
-            ->will($this->returnValue('sid'));
-        $this->sessionMock->expects($this->never())->method('getSessionId')->will($this->returnValue('session-id'));
-        $this->queryParamsResolverMock->expects($this->never())->method('setQueryParam')->with('sid', 'session-id');
-
-        $model->addSessionParam();
-    }
-
     /**
      * @param bool $result
      * @param string $referrer
diff --git a/lib/internal/Magento/Framework/Url.php b/lib/internal/Magento/Framework/Url.php
index a2318f1169715..f7ac3e21ba99e 100644
--- a/lib/internal/Magento/Framework/Url.php
+++ b/lib/internal/Magento/Framework/Url.php
@@ -292,6 +292,8 @@ public function setUseSession($useSession)
      */
     public function getUseSession()
     {
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return false;
     }
 
@@ -754,12 +756,12 @@ public function getRouteUrl($routePath = null, $routeParams = null)
     }
 
     /**
-     * Add session param
-     *
-     * @return \Magento\Framework\UrlInterface
+     * @inheritDoc
      */
     public function addSessionParam()
     {
+        trigger_error('Session ID is not used as URL parameter anymore.', E_USER_DEPRECATED);
+
         return $this;
     }
 
diff --git a/lib/internal/Magento/Framework/UrlInterface.php b/lib/internal/Magento/Framework/UrlInterface.php
index 59806e14eb7c9..c1fbbfc8407d3 100644
--- a/lib/internal/Magento/Framework/UrlInterface.php
+++ b/lib/internal/Magento/Framework/UrlInterface.php
@@ -28,19 +28,10 @@ interface UrlInterface
      */
     const DEFAULT_URL_TYPE = 'link';
 
-    /**
-     * Default controller name
-     */
     const DEFAULT_CONTROLLER_NAME = 'index';
 
-    /**
-     * Default action name
-     */
     const DEFAULT_ACTION_NAME = 'index';
 
-    /**
-     * Rewrite request path alias
-     */
     const REWRITE_REQUEST_PATH_ALIAS = 'rewrite_request_path';
 
     /**
@@ -52,6 +43,7 @@ interface UrlInterface
      * Retrieve use session rule
      *
      * @return bool
+     * @deprecated SID is not being passed in URLs anymore.
      * @SuppressWarnings(PHPMD.BooleanGetMethodName)
      */
     public function getUseSession();
@@ -84,6 +76,7 @@ public function getRouteUrl($routePath = null, $routeParams = null);
      * Add session param
      *
      * @return \Magento\Framework\UrlInterface
+     * @deprecated SID is not being passed in URLs anymore.
      */
     public function addSessionParam();
 

From e1b6729489b4356fc37c84ac1f1c5cfd7763bfb4 Mon Sep 17 00:00:00 2001
From: Andrii Kasian <akasian@magento.com>
Date: Fri, 20 Mar 2020 15:18:02 -0500
Subject: [PATCH 057/307] Fix errors found by static test

---
 .../Framework/Module/DependencyChecker.php    | 19 +++++++++++--------
 .../Test/Unit/DependencyCheckerTest.php       |  2 --
 .../Model/ConfigOptionsListCollector.php      |  3 ++-
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/lib/internal/Magento/Framework/Module/DependencyChecker.php b/lib/internal/Magento/Framework/Module/DependencyChecker.php
index bfdda2e10501f..a36af333f8b1f 100644
--- a/lib/internal/Magento/Framework/Module/DependencyChecker.php
+++ b/lib/internal/Magento/Framework/Module/DependencyChecker.php
@@ -15,12 +15,13 @@ class DependencyChecker
     /**
      * @var PackageInfo
      */
-    protected $packageInfo;
+    private $packageInfo;
 
     /**
      * @var ModuleList
      */
     private $list;
+
     /**
      * @var ModuleList\Loader
      */
@@ -46,6 +47,7 @@ public function __construct(ModuleList $list, ModuleList\Loader $loader, Package
      * @param string[] $toBeDisabledModules
      * @param string[] $currentlyEnabledModules
      * @return array
+     * @throws \Magento\Framework\Exception\LocalizedException
      */
     public function checkDependenciesWhenDisableModules($toBeDisabledModules, $currentlyEnabledModules = null)
     {
@@ -61,8 +63,9 @@ public function checkDependenciesWhenDisableModules($toBeDisabledModules, $curre
      * @param string[] $toBeEnabledModules
      * @param string[] $currentlyEnabledModules
      * @return array
+     * @throws \Magento\Framework\Exception\LocalizedException
      */
-    public function checkDependenciesWhenEnableModules($toBeEnabledModules, $currentlyEnabledModules = null)
+    public function checkDependenciesWhenEnableModules(array $toBeEnabledModules, array $currentlyEnabledModules = null)
     {
         $masterList = $currentlyEnabledModules ?? $this->list->getNames();
         // assume enable succeeds: union of currently enabled modules and to-be-enabled modules
@@ -79,19 +82,19 @@ public function checkDependenciesWhenEnableModules($toBeEnabledModules, $current
      * @return array
      * @throws \Magento\Framework\Exception\LocalizedException
      */
-    private function checkDependencyGraph($isEnable, $moduleNames, $enabledModules)
+    private function checkDependencyGraph(bool $isEnable, array $moduleNames, array $enabledModules)
     {
         $fullModuleList = $this->loader->load();
         $graph = $this->createGraph($fullModuleList);
         $dependenciesMissingAll = [];
         $graphMode = $isEnable ? Graph::DIRECTIONAL : Graph::INVERSE;
+        $modules = array_merge(
+            array_keys($fullModuleList),
+            $this->packageInfo->getNonExistingDependencies()
+        );
         foreach ($moduleNames as $moduleName) {
             $dependenciesMissing = [];
             $paths = $graph->findPathsToReachableNodes($moduleName, $graphMode);
-            $modules = array_merge(
-                array_keys($fullModuleList),
-                $this->packageInfo->getNonExistingDependencies()
-            );
             foreach ($modules as $module) {
                 if (isset($paths[$module])) {
                     if ($isEnable && !in_array($module, $enabledModules)) {
@@ -112,7 +115,7 @@ private function checkDependencyGraph($isEnable, $moduleNames, $enabledModules)
      * @param array $fullModuleList
      * @return Graph
      */
-    private function createGraph($fullModuleList)
+    private function createGraph(array $fullModuleList): Graph
     {
         $nodes = [];
         $dependencies = [];
diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
index ff37cd99e489c..e78c846a3382e 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
@@ -44,8 +44,6 @@ protected function setUp()
             ->method('getRequire')
             ->will($this->returnValueMap($requireMap));
 
-
-
         $this->listMock = $this->createMock(\Magento\Framework\Module\ModuleList::class);
         $this->loaderMock = $this->createMock(\Magento\Framework\Module\ModuleList\Loader::class);
         $this->loaderMock
diff --git a/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php b/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php
index a7aa46c7dd12b..d84357d9d3eb9 100644
--- a/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php
+++ b/setup/src/Magento/Setup/Model/ConfigOptionsListCollector.php
@@ -77,6 +77,7 @@ public function __construct(
 
     /**
      * Auto discover ConfigOptionsList class and collect them.
+     *
      * These classes should reside in <module>/Setup directories.
      *
      * @return \Magento\Framework\Setup\ConfigOptionsListInterface[]
@@ -86,7 +87,7 @@ public function collectOptionsLists()
         $optionsList = [];
 
         $modulePaths = $this->componentRegistrar->getPaths(ComponentRegistrar::MODULE);
-        foreach ($modulePaths as $moduleName => $modulePath) {
+        foreach (array_keys($modulePaths) as $moduleName) {
             $optionsClassName = str_replace('_', '\\', $moduleName) . '\Setup\ConfigOptionsList';
             if (class_exists($optionsClassName)) {
                 $optionsClass = $this->objectManagerProvider->get()->create($optionsClassName);

From 9ace0175dcb2d4d363c050f9a5fc0c1f7f670d5b Mon Sep 17 00:00:00 2001
From: Sachin Admane <sadmane@adobe.com>
Date: Mon, 23 Mar 2020 12:09:30 -0500
Subject: [PATCH 058/307] MC-22963: Identify and Refactor GET requests which
 modify data.

Fix unit test and static errors.
---
 .../templates/checkout/addresses.phtml         | 18 +++++++++---------
 .../Listing/Column/SynonymActionsTest.php      |  3 ++-
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml
index 375a42793c2a5..e941ecf63255b 100644
--- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml
@@ -4,8 +4,8 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Files.LineLength
-
+// phpcs:disable Generic.Files.LineLength
+// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
 ?>
 <?php
 /**
@@ -43,8 +43,8 @@
             </tr>
             </thead>
             <tbody>
-            <?php foreach ($block->getItems() as $_index => $_item) : ?>
-                <?php if ($_item->getQuoteItem()) : ?>
+            <?php foreach ($block->getItems() as $_index => $_item): ?>
+                <?php if ($_item->getQuoteItem()): ?>
                     <tr>
                         <td class="col product" data-th="<?= $block->escapeHtml(__('Product')) ?>">
                             <?= $block->getItemHtml($_item->getQuoteItem()) ?>
@@ -69,11 +69,11 @@
                             </div>
                         </td>
                         <td class="col address" data-th="<?= $block->escapeHtml(__('Send To')) ?>">
-                            <?php if ($_item->getProduct()->getIsVirtual()) : ?>
+                            <?php if ($_item->getProduct()->getIsVirtual()): ?>
                                 <div class="applicable">
                                     <?= $block->escapeHtml(__('A shipping selection is not applicable.')) ?>
                                 </div>
-                            <?php else : ?>
+                            <?php else: ?>
                                 <div class="field address">
                                     <label for="ship_<?= $block->escapeHtml($_index) ?>_<?= $block->escapeHtml($_item->getQuoteItemId()) ?>_address"
                                            class="label">
@@ -89,9 +89,9 @@
                             <a href="#"
                                title="<?= $block->escapeHtml(__('Remove Item')) ?>"
                                data-post='<?= /* @noEscape */
-                               $this->helper(\Magento\Framework\Data\Helper\PostHelper::class)
+                                $this->helper(\Magento\Framework\Data\Helper\PostHelper::class)
                                    ->getPostData($block->getItemDeleteUrl($_item))
-                               ?>'
+                                ?>'
                                class="action delete"
                                data-multiship-item-remove="">
                                 <span><?= $block->escapeHtml(__('Remove item')) ?></span>
@@ -110,7 +110,7 @@
                     class="action primary continue<?= $block->isContinueDisabled() ? ' disabled' : '' ?>"
                     data-role="can-continue"
                     data-flag="1"
-                <?php if ($block->isContinueDisabled()) : ?>
+                <?php if ($block->isContinueDisabled()): ?>
                     disabled="disabled"
                 <?php endif; ?>>
                 <span><?= $block->escapeHtml(__('Go to Shipping Information')) ?></span>
diff --git a/app/code/Magento/Search/Test/Unit/Ui/Component/Listing/Column/SynonymActionsTest.php b/app/code/Magento/Search/Test/Unit/Ui/Component/Listing/Column/SynonymActionsTest.php
index d5563ec1cb289..99a8c2f838cda 100644
--- a/app/code/Magento/Search/Test/Unit/Ui/Component/Listing/Column/SynonymActionsTest.php
+++ b/app/code/Magento/Search/Test/Unit/Ui/Component/Listing/Column/SynonymActionsTest.php
@@ -112,7 +112,8 @@ public function testPrepareDataSourceWithItems()
                                         self::STUB_SYNONYM_GROUP_ID
                                     )
                                 ],
-                                '__disableTmpl' => true
+                                '__disableTmpl' => true,
+                                'post' => true
                             ],
                             'edit' => [
                                 'href' => sprintf(

From 7fadc75c5695242ff91c56e2c80fb4217150c9a6 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 15:56:53 -0500
Subject: [PATCH 059/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Csp/Model/Collector/CspWhitelistXml/Converter.php     | 1 -
 .../Magento/TestModuleCspConfig/etc/csp_whitelist.xml     | 1 +
 .../Csp/Model/Collector/CspWhitelistXmlCollectorTest.php  | 8 +++++++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Converter.php b/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Converter.php
index ab1ee8bb0befe..e0b3af9f9ed81 100644
--- a/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Converter.php
+++ b/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Converter.php
@@ -43,7 +43,6 @@ public function convert($source)
                 }
             }
             $policyConfig[$id]['hosts'] = array_unique($policyConfig[$id]['hosts']);
-            $policyConfig[$id]['hashes'] = array_unique($policyConfig[$id]['hashes']);
         }
 
         return $policyConfig;
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspConfig/etc/csp_whitelist.xml b/dev/tests/integration/_files/Magento/TestModuleCspConfig/etc/csp_whitelist.xml
index e9eb1fe21aa4f..7c5d66427aecb 100644
--- a/dev/tests/integration/_files/Magento/TestModuleCspConfig/etc/csp_whitelist.xml
+++ b/dev/tests/integration/_files/Magento/TestModuleCspConfig/etc/csp_whitelist.xml
@@ -11,6 +11,7 @@
             <values>
                 <value id="mage-base" type="host">https://magento.com</value>
                 <value id="hash" type="hash" algorithm="sha256">B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=</value>
+                <value id="hash2" type="hash" algorithm="sha256">B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF9=</value>
             </values>
         </policy>
         <policy id="media-src">
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/CspWhitelistXmlCollectorTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/CspWhitelistXmlCollectorTest.php
index bbaabba9dd268..1c13766c6bec4 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/CspWhitelistXmlCollectorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/CspWhitelistXmlCollectorTest.php
@@ -53,7 +53,13 @@ public function testCollecting(): void
             if ($policy->getId() === 'object-src') {
                 $this->assertInstanceOf(FetchPolicy::class, $policy);
                 $this->assertEquals(['http://magento.com', 'https://devdocs.magento.com'], $policy->getHostSources());
-                $this->assertEquals(['B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=' => 'sha256'], $policy->getHashes());
+                $this->assertEquals(
+                    [
+                        'B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=' => 'sha256',
+                        'B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF9=' => 'sha256'
+                    ],
+                    $policy->getHashes()
+                );
                 $objectSrcChecked = true;
             } elseif ($policy->getId() === 'media-src') {
                 $this->assertInstanceOf(FetchPolicy::class, $policy);

From 1b15e46974e28ca8f14ce9ee6f4f64908c8e9562 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:03:33 -0500
Subject: [PATCH 060/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Csp/Api/CspAwareActionInterface.php       |  27 ++
 .../Magento/Csp/Api/InlineUtilInterface.php   |  40 +++
 app/code/Magento/Csp/Helper/InlineUtil.php    | 212 ++++++++++++++
 .../Model/Collector/ControllerCollector.php   |  45 +++
 .../Csp/Model/Collector/DynamicCollector.php  |  41 +++
 .../Csp/Model/CompositePolicyCollector.php    |  44 +--
 .../Csp/Plugin/CspAwareControllerPlugin.php   |  49 ++++
 .../Csp/Plugin/TemplateRenderingPlugin.php    |  48 ++++
 app/code/Magento/Csp/etc/di.xml               |  13 +-
 .../Controller/Csp/Aware.php                  |  54 ++++
 .../Controller/Csp/Helper.php                 |  26 ++
 .../Magento/TestModuleCspUtil/composer.json   |  21 ++
 .../TestModuleCspUtil/etc/csp_whitelist.xml   |  16 ++
 .../TestModuleCspUtil/etc/frontend/routes.xml |  14 +
 .../Magento/TestModuleCspUtil/etc/module.xml  |  10 +
 .../TestModuleCspUtil/registration.php        |  12 +
 .../frontend/layout/csputil_csp_aware.xml     |  17 ++
 .../frontend/layout/csputil_csp_helper.xml    |  17 ++
 .../view/frontend/templates/helper.phtml      |  12 +
 .../Magento/Csp/CspAwareActionTest.php        |  45 +++
 .../testsuite/Magento/Csp/CspUtilTest.php     |  39 +++
 .../Magento/Csp/Helper/InlineUtilTest.php     | 260 ++++++++++++++++++
 .../Collector/ControllerCollectorTest.php     |  85 ++++++
 23 files changed, 1124 insertions(+), 23 deletions(-)
 create mode 100644 app/code/Magento/Csp/Api/CspAwareActionInterface.php
 create mode 100644 app/code/Magento/Csp/Api/InlineUtilInterface.php
 create mode 100644 app/code/Magento/Csp/Helper/InlineUtil.php
 create mode 100644 app/code/Magento/Csp/Model/Collector/ControllerCollector.php
 create mode 100644 app/code/Magento/Csp/Model/Collector/DynamicCollector.php
 create mode 100644 app/code/Magento/Csp/Plugin/CspAwareControllerPlugin.php
 create mode 100644 app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Aware.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Helper.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/composer.json
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/csp_whitelist.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/frontend/routes.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/module.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/registration.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_aware.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_helper.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/helper.phtml
 create mode 100644 dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php

diff --git a/app/code/Magento/Csp/Api/CspAwareActionInterface.php b/app/code/Magento/Csp/Api/CspAwareActionInterface.php
new file mode 100644
index 0000000000000..f4d58dd2bf55a
--- /dev/null
+++ b/app/code/Magento/Csp/Api/CspAwareActionInterface.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Api;
+
+use Magento\Framework\App\ActionInterface;
+
+/**
+ * Interface for controllers that can provide route-specific CSPs.
+ */
+interface CspAwareActionInterface extends ActionInterface
+{
+    /**
+     * Return CSPs that will be applied to current route (page).
+     *
+     * The array returned will be used as is so if you need to keep policies that have been already applied they need
+     * to be included in the resulting array.
+     *
+     * @param \Magento\Csp\Api\Data\PolicyInterface[] $appliedPolicies
+     * @return \Magento\Csp\Api\Data\PolicyInterface[]
+     */
+    public function modifyCsp(array $appliedPolicies): array;
+}
diff --git a/app/code/Magento/Csp/Api/InlineUtilInterface.php b/app/code/Magento/Csp/Api/InlineUtilInterface.php
new file mode 100644
index 0000000000000..dac2adbfd2270
--- /dev/null
+++ b/app/code/Magento/Csp/Api/InlineUtilInterface.php
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Api;
+
+use Magento\Csp\Api\Data\PolicyInterface;
+
+/**
+ * Utility for classes responsible for rendering and templates that allows whitelist inline sources.
+ */
+interface InlineUtilInterface
+{
+    /**
+     * Render HTML tag and whitelist it as trusted source.
+     *
+     * Use this method to whitelist remote static resources and inline styles/scripts.
+     * Do not use user-provided as any of the parameters.
+     *
+     * @param string $tagName
+     * @param string[] $attributes
+     * @param string|null $content
+     * @return string
+     */
+    public function renderTag(string $tagName, array $attributes, ?string $content = null): string;
+
+    /**
+     * Render event listener as an HTML attribute and whitelist it as trusted source.
+     *
+     * Do not use user-provided values as any of the parameters.
+     *
+     * @param string $eventName Full attribute name like "onclick".
+     * @param string $javascript
+     * @return string
+     */
+    public function renderEventListener(string $eventName, string $javascript): string;
+}
diff --git a/app/code/Magento/Csp/Helper/InlineUtil.php b/app/code/Magento/Csp/Helper/InlineUtil.php
new file mode 100644
index 0000000000000..f0de25fb81d7a
--- /dev/null
+++ b/app/code/Magento/Csp/Helper/InlineUtil.php
@@ -0,0 +1,212 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Helper;
+
+use Magento\Csp\Api\InlineUtilInterface;
+use Magento\Csp\Model\Collector\DynamicCollector;
+use Magento\Csp\Model\Policy\FetchPolicy;
+
+/**
+ * Helper for classes responsible for rendering and templates.
+ *
+ * Allows to whitelist dynamic sources specific to a certain page.
+ */
+class InlineUtil implements InlineUtilInterface
+{
+    /**
+     * @var DynamicCollector
+     */
+    private $dynamicCollector;
+
+    /**
+     * @var bool
+     */
+    private $useUnsafeHashes;
+
+    private static $tagMeta = [
+        'script' => ['id' => 'script-src', 'remote' => ['src'], 'hash' => true],
+        'style' => ['id' => 'style-src', 'remote' => [], 'hash' => true],
+        'img' => ['id' => 'img-src', 'remote' => ['src']],
+        'audio' => ['id' => 'media-src', 'remote' => ['src']],
+        'video' => ['id' => 'media-src', 'remote' => ['src']],
+        'track' => ['id' => 'media-src', 'remote' => ['src']],
+        'source' => ['id' => 'media-src', 'remote' => ['src']],
+        'object' => ['id' => 'object-src', 'remote' => ['data', 'archive']],
+        'embed' => ['id' => 'object-src', 'remote' => ['src']],
+        'applet' => ['id' => 'object-src', 'remote' => ['code', 'archive']],
+        'link' => ['id' => 'style-src', 'remote' => ['href']],
+        'form' => ['id' => 'form-action', 'remote' => ['action']],
+        'iframe' => ['id' => 'frame-src', 'remote' => ['src']],
+        'frame' => ['id' => 'frame-src', 'remote' => ['src']]
+    ];
+
+    /**
+     * @param DynamicCollector $dynamicCollector
+     * @param bool $useUnsafeHashes Use 'unsafe-hashes' policy (not supported by CSP v2).
+     */
+    public function __construct(DynamicCollector $dynamicCollector, bool $useUnsafeHashes = false)
+    {
+        $this->dynamicCollector = $dynamicCollector;
+        $this->useUnsafeHashes = $useUnsafeHashes;
+    }
+
+    /**
+     * Generate fetch policy hash for some content.
+     *
+     * @param string $content
+     * @return array Hash data to insert into a FetchPolicy.
+     */
+    private function generateHashValue(string $content): array
+    {
+        return [base64_encode(hash('sha256', $content, true)) => 'sha256'];
+    }
+
+    /**
+     * Extract host for a fetch policy from a URL.
+     *
+     * @param string $url
+     * @return string|null Null is returned when URL does not point to a remote host.
+     */
+    private function extractHost(string $url): ?string
+    {
+        // phpcs:ignore Magento2.Functions.DiscouragedFunction
+        $urlData = parse_url($url);
+        if (!$urlData
+            || empty($urlData['scheme'])
+            || ($urlData['scheme'] !== 'http' && $urlData['scheme'] !== 'https')
+        ) {
+            return null;
+        }
+
+        return $urlData['scheme'] .'://' .$urlData['host'];
+    }
+
+    /**
+     * Extract remote hosts used to get fonts.
+     *
+     * @param string $styleContent
+     * @return string[]
+     */
+    private function extractRemoteFonts(string $styleContent): array
+    {
+        $urlsFound = [[]];
+        preg_match_all('/\@font\-face\s*?\{([^\}]*)[^\}]*?\}/im', $styleContent, $fontFaces);
+        foreach ($fontFaces[1] as $fontFaceContent) {
+            preg_match_all('/url\([\'\"]?(http(s)?\:[^\)]+)[\'\"]?\)/i', $fontFaceContent, $urls);
+            $urlsFound[] = $urls[1];
+        }
+
+        return array_map([$this, 'extractHost'], array_merge(...$urlsFound));
+    }
+
+    /**
+     * Extract remote hosts utilized.
+     *
+     * @param string $tag
+     * @param string[] $attributes
+     * @param string|null $content
+     * @return string[]
+     */
+    private function extractRemoteHosts(string $tag, array $attributes, ?string $content): array
+    {
+        /** @var string[] $remotes */
+        $remotes = [];
+        foreach (self::$tagMeta[$tag]['remote'] as $remoteAttr) {
+            if (!empty($attributes[$remoteAttr]) && $host = $this->extractHost($attributes[$remoteAttr])) {
+                $remotes[] = $host;
+                break;
+            }
+        }
+        if ($tag === 'style' && $content) {
+            $remotes += $this->extractRemoteFonts($content);
+        }
+
+        return $remotes;
+    }
+
+    /**
+     * Render tag.
+     *
+     * @param string $tag
+     * @param string[] $attributes
+     * @param string|null $content
+     * @return string
+     */
+    private function render(string $tag, array $attributes, ?string $content): string
+    {
+        $html = '<' .$tag;
+        foreach ($attributes as $attribute => $value) {
+            $html .= ' ' .$attribute .'="' .$value .'"';
+        }
+        if ($content) {
+            $html .= '>' .$content .'</' .$tag .'>';
+        } else {
+            $html .= ' />';
+        }
+
+        return $html;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function renderTag(string $tagName, array $attributes, ?string $content = null): string
+    {
+        //Processing tag data
+        if (!array_key_exists($tagName, self::$tagMeta)) {
+            throw new \InvalidArgumentException('Unknown source type - ' .$tagName);
+        }
+        /** @var string $policyId */
+        $policyId = self::$tagMeta[$tagName]['id'];
+        $remotes = $this->extractRemoteHosts($tagName, $attributes, $content);
+        if (empty($remotes) && !$content) {
+            throw new \InvalidArgumentException('Either remote URL or hashable content is required to whitelist');
+        }
+
+        //Adding required policies.
+        if ($remotes) {
+            $this->dynamicCollector->add(
+                new FetchPolicy($policyId, false, $remotes)
+            );
+        }
+        if ($content && !empty(self::$tagMeta[$tagName]['hash'])) {
+            $this->dynamicCollector->add(
+                new FetchPolicy($policyId, false, [], [], false, false, false, [], $this->generateHashValue($content))
+            );
+        }
+
+        return $this->render($tagName, $attributes, $content);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function renderEventListener(string $eventName, string $javascript): string
+    {
+        if ($this->useUnsafeHashes) {
+            $policy = new FetchPolicy(
+                'script-src',
+                false,
+                [],
+                [],
+                false,
+                false,
+                false,
+                [],
+                $this->generateHashValue($javascript),
+                false,
+                true
+            );
+        } else {
+            $policy = new FetchPolicy('script-src', false, [], [], false, true);
+        }
+        $this->dynamicCollector->add($policy);
+
+        return $eventName .'="' .$javascript .'"';
+    }
+}
diff --git a/app/code/Magento/Csp/Model/Collector/ControllerCollector.php b/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
new file mode 100644
index 0000000000000..0239601951744
--- /dev/null
+++ b/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Model\Collector;
+
+use Magento\Csp\Api\CspAwareActionInterface;
+use Magento\Csp\Api\PolicyCollectorInterface;
+
+/**
+ * Asks for route-specific policies from a compatible controller.
+ */
+class ControllerCollector implements PolicyCollectorInterface
+{
+    /**
+     * @var CspAwareActionInterface|null
+     */
+    private $controller;
+
+    /**
+     * Set the action interface that is responsible for processing current HTTP request.
+     *
+     * @param CspAwareActionInterface $cspAwareAction
+     * @return void
+     */
+    public function setCurrentActionInstance(CspAwareActionInterface $cspAwareAction): void
+    {
+        $this->controller = $cspAwareAction;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function collect(array $defaultPolicies = []): array
+    {
+        if ($this->controller) {
+            return $this->controller->modifyCsp($defaultPolicies);
+        }
+
+        return $defaultPolicies;
+    }
+}
diff --git a/app/code/Magento/Csp/Model/Collector/DynamicCollector.php b/app/code/Magento/Csp/Model/Collector/DynamicCollector.php
new file mode 100644
index 0000000000000..6478e9622f910
--- /dev/null
+++ b/app/code/Magento/Csp/Model/Collector/DynamicCollector.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Model\Collector;
+
+use Magento\Csp\Api\Data\PolicyInterface;
+use Magento\Csp\Api\PolicyCollectorInterface;
+
+/**
+ * CSPs dynamically added during the rendering of current page (from .phtml templates for instance).
+ */
+class DynamicCollector implements PolicyCollectorInterface
+{
+    /**
+     * @var PolicyInterface[]
+     */
+    private $added = [];
+
+    /**
+     * Add a policy for current page.
+     *
+     * @param PolicyInterface $policy
+     * @return void
+     */
+    public function add(PolicyInterface $policy): void
+    {
+        $this->added[] = $policy;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function collect(array $defaultPolicies = []): array
+    {
+        return array_merge($defaultPolicies, $this->added);
+    }
+}
diff --git a/app/code/Magento/Csp/Model/CompositePolicyCollector.php b/app/code/Magento/Csp/Model/CompositePolicyCollector.php
index b775c91b4e1ef..6c1459b791835 100644
--- a/app/code/Magento/Csp/Model/CompositePolicyCollector.php
+++ b/app/code/Magento/Csp/Model/CompositePolicyCollector.php
@@ -32,27 +32,39 @@ class CompositePolicyCollector implements PolicyCollectorInterface
      */
     public function __construct(array $collectors, array $mergers)
     {
+        ksort($collectors);
         $this->collectors = $collectors;
         $this->mergers = $mergers;
     }
 
     /**
-     * Merge 2 policies with the same ID.
+     * Merge policies with same IDs and return a list of policies with 1 DTO per policy ID.
      *
-     * @param PolicyInterface $policy1
-     * @param PolicyInterface $policy2
-     * @return PolicyInterface
+     * @param PolicyInterface[] $collected
+     * @return PolicyInterface[]
      * @throws \RuntimeException When failed to merge.
      */
-    private function merge(PolicyInterface $policy1, PolicyInterface $policy2): PolicyInterface
+    private function merge(array $collected): array
     {
-        foreach ($this->mergers as $merger) {
-            if ($merger->canMerge($policy1, $policy2)) {
-                return $merger->merge($policy1, $policy2);
+        /** @var PolicyInterface[] $merged */
+        $merged = [];
+
+        foreach ($collected as $policy) {
+            if (array_key_exists($policy->getId(), $merged)) {
+                foreach ($this->mergers as $merger) {
+                    if ($merger->canMerge($merged[$policy->getId()], $policy)) {
+                        $merged[$policy->getId()] = $merger->merge($merged[$policy->getId()], $policy);
+                        continue 2;
+                    }
+                }
+
+                throw new \RuntimeException(sprintf('Merge for policies #%s was not found', $policy->getId()));
+            } else {
+                $merged[$policy->getId()] = $policy;
             }
         }
 
-        throw new \RuntimeException(sprintf('Merge for policies #%s was not found', $policy1->getId()));
+        return $merged;
     }
 
     /**
@@ -62,19 +74,9 @@ public function collect(array $defaultPolicies = []): array
     {
         $collected = $defaultPolicies;
         foreach ($this->collectors as $collector) {
-            $collected = $collector->collect($collected);
-        }
-        //Merging policies.
-        /** @var PolicyInterface[] $result */
-        $result = [];
-        foreach ($collected as $policy) {
-            if (array_key_exists($policy->getId(), $result)) {
-                $result[$policy->getId()] = $this->merge($result[$policy->getId()], $policy);
-            } else {
-                $result[$policy->getId()] = $policy;
-            }
+            $collected = $this->merge($collector->collect($collected));
         }
 
-        return array_values($result);
+        return array_values($collected);
     }
 }
diff --git a/app/code/Magento/Csp/Plugin/CspAwareControllerPlugin.php b/app/code/Magento/Csp/Plugin/CspAwareControllerPlugin.php
new file mode 100644
index 0000000000000..09dc7256568bc
--- /dev/null
+++ b/app/code/Magento/Csp/Plugin/CspAwareControllerPlugin.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Plugin;
+
+use Magento\Csp\Api\CspAwareActionInterface;
+use Magento\Csp\Model\Collector\ControllerCollector;
+use Magento\Framework\App\ActionInterface;
+use Magento\Framework\App\RouterInterface;
+
+/**
+ * Plugin that registers CSP aware action instance processing current request.
+ */
+class CspAwareControllerPlugin
+{
+    /**
+     * @var ControllerCollector
+     */
+    private $collector;
+
+    /**
+     * @param ControllerCollector $collector
+     */
+    public function __construct(ControllerCollector $collector)
+    {
+        $this->collector = $collector;
+    }
+
+    /**
+     * Register matched action instance.
+     *
+     * @param RouterInterface $router
+     * @param ActionInterface|null $matched
+     * @return ActionInterface|null
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function afterMatch(RouterInterface $router, $matched)
+    {
+        if ($matched && $matched instanceof CspAwareActionInterface) {
+            $this->collector->setCurrentActionInstance($matched);
+        }
+
+        return $matched;
+    }
+}
diff --git a/app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php b/app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php
new file mode 100644
index 0000000000000..781fb06e487a8
--- /dev/null
+++ b/app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Plugin;
+
+use Magento\Csp\Api\InlineUtilInterface;
+use Magento\Framework\View\Element\BlockInterface;
+use Magento\Framework\View\TemplateEngine\Php;
+
+/**
+ * Plugin that adds CSP utility to templates context.
+ */
+class TemplateRenderingPlugin
+{
+    /**
+     * @var InlineUtilInterface
+     */
+    private $util;
+
+    /**
+     * @param InlineUtilInterface $util
+     */
+    public function __construct(InlineUtilInterface $util)
+    {
+        $this->util = $util;
+    }
+
+    /**
+     * Add $csp variable to a template scope.
+     *
+     * @param Php $renderer
+     * @param BlockInterface $block
+     * @param string $fileName
+     * @param array $dictionary
+     * @return array
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function beforeRender(Php $renderer, BlockInterface $block, $fileName, array $dictionary): array
+    {
+        $dictionary['csp'] = $this->util;
+
+        return [$block, $fileName, $dictionary];
+    }
+}
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index 0804f6d579137..e6e4f166117f7 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -18,8 +18,10 @@
     <type name="Magento\Csp\Model\CompositePolicyCollector">
         <arguments>
             <argument name="collectors" xsi:type="array">
-                <item name="config" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector</item>
-                <item name="csp_whitelist" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector</item>
+                <item name="1" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector</item>
+                <item name="2" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector</item>
+                <item name="3" xsi:type="object">Magento\Csp\Model\Collector\DynamicCollector</item>
+                <item name="100" xsi:type="object">Magento\Csp\Model\Collector\ControllerCollector</item>
             </argument>
             <argument name="mergers" xsi:type="array">
                 <item name="fetch" xsi:type="object">Magento\Csp\Model\Collector\FetchPolicyMerger</item>
@@ -47,4 +49,11 @@
             <argument name="fileName" xsi:type="string">csp_whitelist.xml</argument>
         </arguments>
     </type>
+    <type name="Magento\Framework\View\TemplateEngine\Php">
+        <plugin name="csp_helper_plugin" type="Magento\Csp\Plugin\TemplateRenderingPlugin" />
+    </type>
+    <type name="Magento\Framework\App\RouterInterface">
+        <plugin name="csp_aware_plugin" type="Magento\Csp\Plugin\CspAwareControllerPlugin" />
+    </type>
+    <preference for="Magento\Csp\Api\InlineUtilInterface" type="Magento\Csp\Helper\InlineUtil" />
 </config>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Aware.php b/dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Aware.php
new file mode 100644
index 0000000000000..567c308330ba3
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Aware.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\TestModuleCspUtil\Controller\Csp;
+
+use Magento\Csp\Api\CspAwareActionInterface;
+use Magento\Csp\Model\Policy\FetchPolicy;
+use Magento\Framework\App\Action\Action;
+use Magento\Framework\Controller\ResultFactory;
+
+/**
+ * CSP Aware controller.
+ */
+class Aware extends Action implements CspAwareActionInterface
+{
+    /**
+     * @inheritDoc
+     */
+    public function execute()
+    {
+        return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function modifyCsp(array $appliedPolicies): array
+    {
+        $policies = [];
+        foreach ($appliedPolicies as $policy) {
+            if ($policy instanceof FetchPolicy
+                && in_array('http://controller.magento.com', $policy->getHostSources(), true)
+            ) {
+                $policies[] = new FetchPolicy(
+                    'script-src',
+                    false,
+                    ['https://controller.magento.com'],
+                    [],
+                    true,
+                    false,
+                    false,
+                    [],
+                    ['H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=' => 'sha256']
+                );
+            }
+        }
+
+        return $policies;
+    }
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Helper.php b/dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Helper.php
new file mode 100644
index 0000000000000..8dde67de73dfa
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/Controller/Csp/Helper.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\TestModuleCspUtil\Controller\Csp;
+
+use Magento\Framework\App\Action\Action;
+use Magento\Framework\Controller\ResultFactory;
+use Magento\Framework\View\Result\PageFactory;
+
+/**
+ * .phtml templates utilizes CSP helper.
+ */
+class Helper extends Action
+{
+    /**
+     * @inheritDoc
+     */
+    public function execute()
+    {
+        return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
+    }
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/composer.json b/dev/tests/integration/_files/Magento/TestModuleCspUtil/composer.json
new file mode 100644
index 0000000000000..aece82306d9d5
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/composer.json
@@ -0,0 +1,21 @@
+{
+  "name": "magento/module-csp-util",
+  "description": "test csp module",
+  "config": {
+    "sort-packages": true
+  },
+  "require": {
+    "php": "~7.1.3||~7.2.0||~7.3.0",
+    "magento/framework": "*",
+    "magento/module-integration": "*"
+  },
+  "type": "magento2-module",
+  "extra": {
+    "map": [
+      [
+        "*",
+        "Magento/TestModuleCspUtil"
+      ]
+    ]
+  }
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/csp_whitelist.xml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..c39e74edafd5e
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/csp_whitelist.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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="script-src">
+            <values>
+                <value id="devdocs-base" type="host">https://devdocs.magento.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/frontend/routes.xml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/frontend/routes.xml
new file mode 100644
index 0000000000000..f78ddb740ec6c
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/frontend/routes.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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:framework:App/etc/routes.xsd">
+    <router id="standard">
+        <route id="csputil" frontName="csputil">
+            <module name="Magento_TestModuleCspUtil" />
+        </route>
+    </router>
+</config>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/module.xml
new file mode 100644
index 0000000000000..1e9bc9b6fa9bc
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/etc/module.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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:framework:Module/etc/module.xsd">
+    <module name="Magento_TestModuleCspUtil" active="true" />
+</config>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/registration.php b/dev/tests/integration/_files/Magento/TestModuleCspUtil/registration.php
new file mode 100644
index 0000000000000..570aed9fe5ce6
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/registration.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Framework\Component\ComponentRegistrar;
+
+$registrar = new ComponentRegistrar();
+if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleCspUtil') === null) {
+    ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleCspUtil', __DIR__);
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_aware.xml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_aware.xml
new file mode 100644
index 0000000000000..89550403fa6bf
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_aware.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+-->
+<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
+    <body>
+        <referenceContainer name="content">
+            <block class="Magento\Framework\View\Element\Template"
+                   name="csp_helper"
+                   cacheable="false"
+                   template="Magento_TestModuleCspUtil::helper.phtml" />
+        </referenceContainer>
+    </body>
+</page>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_helper.xml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_helper.xml
new file mode 100644
index 0000000000000..89550403fa6bf
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/layout/csputil_csp_helper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+-->
+<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
+    <body>
+        <referenceContainer name="content">
+            <block class="Magento\Framework\View\Element\Template"
+                   name="csp_helper"
+                   cacheable="false"
+                   template="Magento_TestModuleCspUtil::helper.phtml" />
+        </referenceContainer>
+    </body>
+</page>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/helper.phtml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/helper.phtml
new file mode 100644
index 0000000000000..fa349062aafcb
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/helper.phtml
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
+?>
+<h1>Hello there!</h1>
+<?= /* @noEscape */ $csp->renderTag('script', ['src' => 'http://my.magento.com/static/script.js']); ?>
+<?= /* @noEscape */ $csp->renderTag('script', [], "\n    let myVar = 1;\n") ?>
+
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
new file mode 100644
index 0000000000000..20ed4d1b79bc8
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp;
+
+use Magento\TestFramework\TestCase\AbstractController;
+
+/**
+ * Test that controllers can modify CSPs for a page.
+ *
+ * @magentoAppArea frontend
+ */
+class CspAwareActionTest extends AbstractController
+{
+    /**
+     * Check that a CSP aware action can modify CSPs after ALL other policies had been gathered.
+     *
+     * @return void
+     * @magentoConfigFixture default_store csp/mode/storefront/report_only 0
+     * @magentoConfigFixture default_store csp/policies/storefront/script/policy_id script-src
+     * @magentoConfigFixture default_store csp/policies/storefront/script/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/script/hosts/example http://controller.magento.com
+     * @magentoConfigFixture default_store csp/policies/storefront/script/self 0
+     * @magentoConfigFixture default_store csp/policies/storefront/script/inline 0
+     */
+    public function testAwareAction(): void
+    {
+        $this->getRequest()->setMethod('GET');
+        $this->dispatch('csputil/csp/aware');
+        $headers = '';
+        foreach ($this->getResponse()->getHeaders() as $header) {
+            $headers .= $header->getFieldName() .': ' .$header->getFieldValue() .PHP_EOL;
+        }
+
+        $this->assertContains(
+            'Content-Security-Policy: script-src https://controller.magento.com'
+                .' \'self\' \'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'',
+            $headers
+        );
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
new file mode 100644
index 0000000000000..f33476c669111
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp;
+
+use Magento\TestFramework\TestCase\AbstractController;
+
+/**
+ * Test CSP util use cases.
+ *
+ * @magentoAppArea frontend
+ */
+class CspUtilTest extends AbstractController
+{
+    /**
+     * Test that CSP helper for templates works.
+     *
+     * @return void
+     */
+    public function testPhtmlHelper(): void
+    {
+        $this->getRequest()->setMethod('GET');
+        $this->dispatch('csputil/csp/helper');
+        $content = $this->getResponse()->getContent();
+
+        $this->assertContains('<script src="http://my.magento.com/static/script.js" />', $content);
+        $this->assertContains("<script>\n    let myVar = 1;\n</script>", $content);
+        $headers = '';
+        foreach ($this->getResponse()->getHeaders() as $header) {
+            $headers .= $header->getFieldName() .': ' .$header->getFieldValue() .PHP_EOL;
+        }
+        $this->assertContains('http://my.magento.com', $headers);
+        $this->assertContains('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $headers);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
new file mode 100644
index 0000000000000..9dc08ca0337bb
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
@@ -0,0 +1,260 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Helper;
+
+use Magento\Csp\Api\Data\PolicyInterface;
+use Magento\Csp\Model\Collector\DynamicCollector;
+use Magento\Csp\Model\Policy\FetchPolicy;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Cover CSP util use cases.
+ */
+class InlineUtilTest extends TestCase
+{
+    /**
+     * @var InlineUtil
+     */
+    private $util;
+
+    /**
+     * @var PolicyInterface[]
+     */
+    private $policiesAdded = [];
+
+    /**
+     * @inheritDoc
+     */
+    public function setUp()
+    {
+        $this->policiesAdded = [];
+        $collectorMock = $this->getMockBuilder(DynamicCollector::class)->disableOriginalConstructor()->getMock();
+        $collectorMock->method('add')
+            ->willReturnCallback(
+                function (PolicyInterface $policy) {
+                    $this->policiesAdded[] = $policy;
+                }
+            );
+        $this->util = Bootstrap::getObjectManager()->create(InlineUtil::class, ['dynamicCollector' => $collectorMock]);
+    }
+
+    /**
+     * Test tag rendering.
+     *
+     * @param string $tagName
+     * @param array $attributes
+     * @param string|null $content
+     * @param string $result Expected result.
+     * @param PolicyInterface[] $policiesExpected
+     * @return void
+     * @dataProvider getTags
+     */
+    public function testRenderTag(
+        string $tagName,
+        array $attributes,
+        ?string $content,
+        string $result,
+        array $policiesExpected
+    ): void {
+        $this->assertEquals($result, $this->util->renderTag($tagName, $attributes, $content));
+        $this->assertEquals($policiesExpected, $this->policiesAdded);
+    }
+
+    /**
+     * Test data for tag rendering test.
+     *
+     * @return array
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
+     */
+    public function getTags(): array
+    {
+        return [
+            'remote-script' => [
+                'script',
+                ['src' => 'http://magento.com/static/some-script.js'],
+                null,
+                '<script src="http://magento.com/static/some-script.js" />',
+                [new FetchPolicy('script-src', false, ['http://magento.com'])]
+            ],
+            'inline-script' => [
+                'script',
+                ['type' => 'text/javascript'],
+                "\n    let someVar = 25;\n    document.getElementById('test').innerText = someVar;\n",
+                "<script type=\"text/javascript\">\n    let someVar = 25;"
+                    ."\n    document.getElementById('test').innerText = someVar;\n</script>",
+                [
+                    new FetchPolicy(
+                        'script-src',
+                        false,
+                        [],
+                        [],
+                        false,
+                        false,
+                        false,
+                        [],
+                        ['U+SKpEef030N2YgyKKdIBIvPy8Fmd42N/JcTZgQV+DA=' => 'sha256']
+                    )
+                ]
+            ],
+            'remote-style' => [
+                'link',
+                ['rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'http://magento.com/static/style.css'],
+                null,
+                '<link rel="stylesheet" type="text/css" href="http://magento.com/static/style.css" />',
+                [new FetchPolicy('style-src', false, ['http://magento.com'])]
+            ],
+            'inline-style' => [
+                'style',
+                [],
+                "\n    h1 {color: red;}\n    p {color: green;}\n",
+                "<style>\n    h1 {color: red;}\n    p {color: green;}\n</style>",
+                [
+                    new FetchPolicy(
+                        'style-src',
+                        false,
+                        [],
+                        [],
+                        false,
+                        false,
+                        false,
+                        [],
+                        ['KISO7smrk+XdGrEsiPvVjX6qx4wNef/UKjNb26RaKGM=' => 'sha256']
+                    )
+                ]
+            ],
+            'remote-image' => [
+                'img',
+                ['src' => 'http://magento.com/static/my.jpg'],
+                null,
+                '<img src="http://magento.com/static/my.jpg" />',
+                [new FetchPolicy('img-src', false, ['http://magento.com'])]
+            ],
+            'remote-font' => [
+                'style',
+                ['type' => 'text/css'],
+                "\n    @font-face {\n        font-family: \"MyCustomFont\";"
+                    ."\n        src: url(\"http://magento.com/static/font.ttf\");\n    }\n"
+                    ."    @font-face {\n        font-family: \"MyCustomFont2\";"
+                    ."\n        src: url('https://magento.com/static/font-2.ttf'),"
+                    ."\n             url(static/font.ttf),"
+                    ."\n             url(https://devdocs.magento.com/static/another-font.woff),"
+                    ."\n             url(http://devdocs.magento.com/static/font.woff);\n    }\n",
+                "<style type=\"text/css\">"
+                    ."\n    @font-face {\n        font-family: \"MyCustomFont\";"
+                    ."\n        src: url(\"http://magento.com/static/font.ttf\");\n    }\n"
+                    ."    @font-face {\n        font-family: \"MyCustomFont2\";"
+                    ."\n        src: url('https://magento.com/static/font-2.ttf'),"
+                    ."\n             url(static/font.ttf),"
+                    ."\n             url(https://devdocs.magento.com/static/another-font.woff),"
+                    ."\n             url(http://devdocs.magento.com/static/font.woff);\n    }\n"
+                    ."</style>",
+                [
+                    new FetchPolicy(
+                        'style-src',
+                        false,
+                        [
+                            'http://magento.com',
+                            'https://magento.com',
+                            'https://devdocs.magento.com',
+                            'http://devdocs.magento.com'
+                        ]
+                    ),
+                    new FetchPolicy(
+                        'style-src',
+                        false,
+                        [],
+                        [],
+                        false,
+                        false,
+                        false,
+                        [],
+                        ['TP6Ulnz1kstJ8PYUKvowgJm0phHhtqJnJCnWxKLXkf0=' => 'sha256']
+                    )
+                ]
+            ],
+            'cross-origin-form' => [
+                'form',
+                ['action' => 'https://magento.com/submit', 'method' => 'post'],
+                "\n    <input type=\"text\" name=\"test\" /><input type=\"submit\" value=\"Submit\" />\n",
+                "<form action=\"https://magento.com/submit\" method=\"post\">"
+                    ."\n    <input type=\"text\" name=\"test\" /><input type=\"submit\" value=\"Submit\" />\n"
+                    ."</form>",
+                [new FetchPolicy('form-action', false, ['https://magento.com'])]
+            ],
+            'cross-origin-iframe' => [
+                'iframe',
+                ['src' => 'http://magento.com/some-page'],
+                null,
+                '<iframe src="http://magento.com/some-page" />',
+                [new FetchPolicy('frame-src', false, ['http://magento.com'])]
+            ],
+            'remote-track' => [
+                'track',
+                ['src' => 'http://magento.com/static/track.vtt', 'kind' => 'subtitles'],
+                null,
+                '<track src="http://magento.com/static/track.vtt" kind="subtitles" />',
+                [new FetchPolicy('media-src', false, ['http://magento.com'])]
+            ],
+            'remote-source' => [
+                'source',
+                ['src' => 'http://magento.com/static/track.ogg', 'type' => 'audio/ogg'],
+                null,
+                '<source src="http://magento.com/static/track.ogg" type="audio/ogg" />',
+                [new FetchPolicy('media-src', false, ['http://magento.com'])]
+            ],
+            'remote-video' => [
+                'video',
+                ['src' => 'https://magento.com/static/video.mp4'],
+                null,
+                '<video src="https://magento.com/static/video.mp4" />',
+                [new FetchPolicy('media-src', false, ['https://magento.com'])]
+            ],
+            'remote-audio' => [
+                'audio',
+                ['src' => 'https://magento.com/static/audio.mp3'],
+                null,
+                '<audio src="https://magento.com/static/audio.mp3" />',
+                [new FetchPolicy('media-src', false, ['https://magento.com'])]
+            ],
+            'remote-object' => [
+                'object',
+                ['data' => 'http://magento.com/static/flash.swf'],
+                null,
+                '<object data="http://magento.com/static/flash.swf" />',
+                [new FetchPolicy('object-src', false, ['http://magento.com'])]
+            ],
+            'remote-embed' => [
+                'embed',
+                ['src' => 'http://magento.com/static/flash.swf'],
+                null,
+                '<embed src="http://magento.com/static/flash.swf" />',
+                [new FetchPolicy('object-src', false, ['http://magento.com'])]
+            ],
+            'remote-applet' => [
+                'applet',
+                ['code' => 'SomeApplet.class', 'archive' => 'https://magento.com/applet/my-applet.jar'],
+                null,
+                '<applet code="SomeApplet.class" archive="https://magento.com/applet/my-applet.jar" />',
+                [new FetchPolicy('object-src', false, ['https://magento.com'])]
+            ]
+        ];
+    }
+
+    /**
+     * Test that inline event listeners are rendered properly.
+     *
+     * @return void
+     */
+    public function testRenderEventListener(): void
+    {
+        $result = $this->util->renderEventListener('onclick', 'alert()');
+        $this->assertEquals('onclick="alert()"', $result);
+        $this->assertEquals([new FetchPolicy('script-src', false, [], [], false, true)], $this->policiesAdded);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php
new file mode 100644
index 0000000000000..87a307933a035
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Model\Collector;
+
+use Magento\Csp\Api\CspAwareActionInterface;
+use Magento\Csp\Model\Policy\FetchPolicy;
+use Magento\Csp\Model\Policy\FlagPolicy;
+use Magento\Framework\Exception\NotFoundException;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Test collecting policies from a CSP-aware controllers.
+ */
+class ControllerCollectorTest extends TestCase
+{
+    /**
+     * @var ControllerCollector
+     */
+    private $collector;
+
+    /**
+     * @inheritDoc
+     */
+    public function setUp()
+    {
+        $this->collector = Bootstrap::getObjectManager()->create(ControllerCollector::class);
+    }
+
+    /**
+     * Test collection.
+     *
+     * @return void
+     */
+    public function testCollect(): void
+    {
+        $controller = new class implements CspAwareActionInterface {
+            /**
+             * @inheritDoc
+             */
+            public function execute()
+            {
+                throw new NotFoundException(__('Page not found.'));
+            }
+
+            /**
+             * @inheritDoc
+             */
+            public function modifyCsp(array $appliedPolicies): array
+            {
+                $processed = [];
+                foreach ($appliedPolicies as $policy) {
+                    if ($policy instanceof FetchPolicy && $policy->getHostSources()) {
+                        $policy = new FetchPolicy(
+                            'default-src',
+                            false,
+                            array_map(
+                                function ($host) {
+                                    return str_replace('http://', 'https://', $host);
+                                },
+                                $policy->getHostSources()
+                            )
+                        );
+                    }
+                    $processed[] = $policy;
+                }
+                $processed[] = new FlagPolicy(FlagPolicy::POLICIES[0]);
+
+                return $processed;
+            }
+        };
+
+        $this->collector->setCurrentActionInstance($controller);
+        $collected = $this->collector->collect([new FetchPolicy('default-src', false, ['http://magento.com'])]);
+        $this->assertEquals(
+            [new FetchPolicy('default-src', false, ['https://magento.com']), new FlagPolicy(FlagPolicy::POLICIES[0])],
+            $collected
+        );
+    }
+}

From f4db9a422c331902b41a37f413706ec40168f6e9 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:08:20 -0500
Subject: [PATCH 061/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../AdminAnalytics/etc/csp_whitelist.xml      |  17 ++
 .../AdminNotification/etc/csp_whitelist.xml   |  18 ++
 .../Authorizenet/etc/csp_whitelist.xml        |  30 +++
 .../etc/csp_whitelist.xml                     |  18 ++
 .../Magento/Braintree/etc/csp_whitelist.xml   |  25 +++
 .../CardinalCommerce/etc/csp_whitelist.xml    |  52 +++++
 app/code/Magento/Csp/etc/config.xml           | 202 ++++++++++++++++++
 .../GoogleAdwords/etc/csp_whitelist.xml       |  24 +++
 app/code/Magento/Paypal/etc/csp_whitelist.xml |  35 +++
 .../ProductVideo/etc/csp_whitelist.xml        |  25 +++
 .../Magento/Signifyd/etc/csp_whitelist.xml    |  17 ++
 .../Magento/Tinymce3/etc/csp_whitelist.xml    |  28 +++
 .../testsuite/Magento/Csp/CspTest.php         |   4 +-
 .../Model/Collector/ConfigCollectorTest.php   | 135 ++++++------
 14 files changed, 567 insertions(+), 63 deletions(-)
 create mode 100644 app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/AdminNotification/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/Authorizenet/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/Braintree/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/CardinalCommerce/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/GoogleAdwords/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/Paypal/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/ProductVideo/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/Signifyd/etc/csp_whitelist.xml
 create mode 100644 app/code/Magento/Tinymce3/etc/csp_whitelist.xml

diff --git a/app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml b/app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..e937a3e18148a
--- /dev/null
+++ b/app/code/Magento/AdminAnalytics/etc/csp_whitelist.xml
@@ -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="script-src">
+                <values>
+                    <value id="adobedtm" type="host">assets.adobedtm.com</value>
+                </values>
+            </policy>
+        </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/AdminNotification/etc/csp_whitelist.xml b/app/code/Magento/AdminNotification/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..c3327a716947b
--- /dev/null
+++ b/app/code/Magento/AdminNotification/etc/csp_whitelist.xml
@@ -0,0 +1,18 @@
+<?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="commerce_widgets" type="host">widgets.magentocommerce.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
+
diff --git a/app/code/Magento/Authorizenet/etc/csp_whitelist.xml b/app/code/Magento/Authorizenet/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..0af163606fcaf
--- /dev/null
+++ b/app/code/Magento/Authorizenet/etc/csp_whitelist.xml
@@ -0,0 +1,30 @@
+<?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="script-src">
+            <values>
+                <value id="authorize_net_direct" type="host">secure.authorize.net</value>
+                <value id="authorize_net_direct_test" type="host">test.authorize.net</value>
+            </values>
+        </policy>
+        <policy id="frame-src">
+            <values>
+                <value id="authorize_net_direct" type="host">secure.authorize.net</value>
+                <value id="authorize_net_direct_test" type="host">test.authorize.net</value>
+            </values>
+        </policy>
+        <policy id="form-action">
+            <values>
+                <value id="authorize_net_direct" type="host">secure.authorize.net</value>
+                <value id="authorize_net_direct_test" type="host">test.authorize.net</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml b/app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..df6d02387d3d7
--- /dev/null
+++ b/app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml
@@ -0,0 +1,18 @@
+<?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="script-src">
+            <values>
+                <value id="authorize_net_js" type="host">js.authorize.net</value>
+                <value id="authorize_net_jstest" type="host">jstest.authorize.net</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/Braintree/etc/csp_whitelist.xml b/app/code/Magento/Braintree/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..b023d2adf03fd
--- /dev/null
+++ b/app/code/Magento/Braintree/etc/csp_whitelist.xml
@@ -0,0 +1,25 @@
+<?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="script-src">
+            <values>
+                <value id="paypal_objects" type="host">www.paypalobjects.com</value>
+                <value id="braintree_js_gateway" type="host">js.braintreegateway.com</value>
+                <value id="paypal_tag_gateway" type="host">www.paypal.com</value>
+            </values>
+        </policy>
+        <policy id="img-src">
+            <values>
+                <value id="paypal_objects" type="host">www.paypalobjects.com</value>
+                <value id="paypal_analytics" type="host">t.paypal.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/CardinalCommerce/etc/csp_whitelist.xml b/app/code/Magento/CardinalCommerce/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..946f22b219909
--- /dev/null
+++ b/app/code/Magento/CardinalCommerce/etc/csp_whitelist.xml
@@ -0,0 +1,52 @@
+<?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="script-src">
+            <values>
+                <value id="cardinal_commerce_geo_stag" type="host">geostag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf_stag" type="host">1eafstag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_geo" type="host">geoapi.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf" type="host">1eafapi.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_songbird" type="host">songbird.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_test" type="host">includestest.ccdc02.com</value>
+            </values>
+        </policy>
+        <policy id="connect-src">
+            <values>
+                <value id="cardinal_commerce_geo_stag" type="host">geostag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_geo" type="host">geo.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf_stag" type="host">1eafstag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf" type="host">1eaf.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_cent_stag" type="host">centinelapistag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_cent" type="host">centinelapi.cardinalcommerce.com</value>
+            </values>
+        </policy>
+        <policy id="frame-src">
+            <values>
+                <value id="cardinal_commerce_geo_stag" type="host">geostag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_geo" type="host">geo.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf_stag" type="host">1eafstag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf" type="host">1eaf.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_cent_stag" type="host">centinelapistag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_cent" type="host">centinelapi.cardinalcommerce.com</value>
+            </values>
+        </policy>
+        <policy id="form-action">
+            <values>
+                <value id="cardinal_commerce_geo_stag" type="host">geostag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_geo" type="host">geo.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf_stag" type="host">1eafstag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_1eaf" type="host">1eaf.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_cent_stag" type="host">centinelapistag.cardinalcommerce.com</value>
+                <value id="cardinal_commerce_cent" type="host">centinelapi.cardinalcommerce.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/Csp/etc/config.xml b/app/code/Magento/Csp/etc/config.xml
index e45f6b223ed22..c13cd37ca0340 100644
--- a/app/code/Magento/Csp/etc/config.xml
+++ b/app/code/Magento/Csp/etc/config.xml
@@ -16,6 +16,208 @@
                     <report_only>1</report_only>
                 </admin>
             </mode>
+            <policies>
+                <storefront>
+                    <base>
+                        <policy_id>base-uri</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </base>
+                    <default>
+                        <policy_id>default-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>1</eval>
+                        <dynamic>0</dynamic>
+                    </default>
+                    <children>
+                        <policy_id>child-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </children>
+                    <connections>
+                        <policy_id>connect-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </connections>
+                    <manifests>
+                        <policy_id>manifest-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </manifests>
+                    <media>
+                        <policy_id>media-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </media>
+                    <objects>
+                        <policy_id>object-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </objects>
+                    <styles>
+                        <policy_id>style-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </styles>
+                    <scripts>
+                        <policy_id>script-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>1</eval>
+                        <dynamic>0</dynamic>
+                    </scripts>
+                    <images>
+                        <policy_id>img-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </images>
+                    <frames>
+                        <policy_id>frame-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </frames>
+                    <frame-ancestors>
+                        <policy_id>frame-ancestors</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </frame-ancestors>
+                    <forms>
+                        <policy_id>form-action</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </forms>
+                    <fonts>
+                        <policy_id>font-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </fonts>
+                </storefront>
+                <admin>
+                    <base>
+                        <policy_id>base-uri</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </base>
+                    <default>
+                        <policy_id>default-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>1</eval>
+                        <dynamic>0</dynamic>
+                    </default>
+                    <children>
+                        <policy_id>child-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </children>
+                    <connections>
+                        <policy_id>connect-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </connections>
+                    <manifests>
+                        <policy_id>manifest-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </manifests>
+                    <media>
+                        <policy_id>media-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </media>
+                    <objects>
+                        <policy_id>object-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </objects>
+                    <styles>
+                        <policy_id>style-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </styles>
+                    <scripts>
+                        <policy_id>script-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>1</eval>
+                        <dynamic>0</dynamic>
+                    </scripts>
+                    <images>
+                        <policy_id>img-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </images>
+                    <frames>
+                        <policy_id>frame-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </frames>
+                    <frame-ancestors>
+                        <policy_id>frame-ancestors</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </frame-ancestors>
+                    <forms>
+                        <policy_id>form-action</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </forms>
+                    <fonts>
+                        <policy_id>font-src</policy_id>
+                        <self>1</self>
+                        <inline>1</inline>
+                        <eval>0</eval>
+                        <dynamic>0</dynamic>
+                    </fonts>
+                </admin>
+            </policies>
         </csp>
     </default>
 </config>
diff --git a/app/code/Magento/GoogleAdwords/etc/csp_whitelist.xml b/app/code/Magento/GoogleAdwords/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..d700b0e9e7668
--- /dev/null
+++ b/app/code/Magento/GoogleAdwords/etc/csp_whitelist.xml
@@ -0,0 +1,24 @@
+<?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="script-src">
+            <values>
+                <value id="google_ad_services" type="host">www.googleadservices.com</value>
+                <value id="google_analytics" type="host">www.google-analytics.com</value>
+            </values>
+        </policy>
+        <policy id="img-src">
+            <values>
+                <value id="google_ad_services" type="host">www.googleadservices.com</value>
+                <value id="google_analytics" type="host">www.google-analytics.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/Paypal/etc/csp_whitelist.xml b/app/code/Magento/Paypal/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..932664bde9e09
--- /dev/null
+++ b/app/code/Magento/Paypal/etc/csp_whitelist.xml
@@ -0,0 +1,35 @@
+<?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="paypal_analytics" type="host">t.paypal.com</value>
+                <value id="www_paypal" type="host">www.paypal.com</value>
+                <value id="paypal_objects" type="host">www.paypalobjects.com</value>
+                <value id="paypal_fpdbs" type="host">fpdbs.paypal.com</value>
+                <value id="paypal_fpdbs_sandbox" type="host">fpdbs.sandbox.paypal.com</value>
+            </values>
+        </policy>
+        <policy id="script-src">
+            <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="paypal_objects" type="host">www.paypalobjects.com</value>
+                <value id="paypal_analytics" type="host">t.paypal.com</value>
+            </values>
+        </policy>
+        <policy id="frame-src">
+            <values>
+                <value id="www_paypal" type="host">www.paypal.com</value>
+                <value id="www_sandbox_paypal" type="host">www.sandbox.paypal.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/ProductVideo/etc/csp_whitelist.xml b/app/code/Magento/ProductVideo/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..ca4536057104d
--- /dev/null
+++ b/app/code/Magento/ProductVideo/etc/csp_whitelist.xml
@@ -0,0 +1,25 @@
+<?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="script-src">
+            <values>
+                <value id="youtube_cdn" type="host">s.ytimg.com</value>
+                <value id="google_video" type="host">www.googleapis.com</value>
+                <value id="vimeo" type="host">vimeo.com</value>
+                <value id="www_vimeo" type="host">www.vimeo.com</value>
+            </values>
+        </policy>
+        <policy id="img-src">
+            <values>
+                <value id="vimeo_cdn" type="host">*.vimeocdn.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/Signifyd/etc/csp_whitelist.xml b/app/code/Magento/Signifyd/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..35af3809cb225
--- /dev/null
+++ b/app/code/Magento/Signifyd/etc/csp_whitelist.xml
@@ -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="script-src">
+            <values>
+                <value id="signifyd_cdn" type="host">cdn-scripts.signifyd.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/app/code/Magento/Tinymce3/etc/csp_whitelist.xml b/app/code/Magento/Tinymce3/etc/csp_whitelist.xml
new file mode 100644
index 0000000000000..e2b2364dc80e8
--- /dev/null
+++ b/app/code/Magento/Tinymce3/etc/csp_whitelist.xml
@@ -0,0 +1,28 @@
+<?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="style-src">
+            <values>
+                <value id="firebug" type="host">getfirebug.com</value>
+            </values>
+        </policy>
+        <policy id="script-src">
+            <values>
+                <value id="www_youtube" type="host">www.youtube.com</value>
+                <value id="google_video" type="host">video.google.com</value>
+            </values>
+        </policy>
+        <policy id="img-src">
+            <values>
+                <value id="youtube_cdn" type="host">s.ytimg.com</value>
+            </values>
+        </policy>
+    </policies>
+</csp_whitelist>
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspTest.php
index e66c6af36e42c..eeb96d8943ced 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspTest.php
@@ -67,7 +67,7 @@ public function testStorefrontPolicies(): void
         $this->assertFalse($this->searchInResponse($response, '\'none\''));
         $this->assertTrue($this->searchInResponse($response, 'script-src'));
         $this->assertTrue($this->searchInResponse($response, '\'unsafe-inline\''));
-        $this->assertFalse($this->searchInResponse($response, 'font-src'));
+        $this->assertTrue($this->searchInResponse($response, 'font-src'));
         //Policies configured in cps_whitelist.xml files
         $this->assertTrue($this->searchInResponse($response, 'object-src'));
         $this->assertTrue($this->searchInResponse($response, 'media-src'));
@@ -104,7 +104,7 @@ public function testAdminPolicies(): void
         $this->assertFalse($this->searchInResponse($response, '\'none\''));
         $this->assertTrue($this->searchInResponse($response, 'script-src'));
         $this->assertTrue($this->searchInResponse($response, '\'unsafe-inline\''));
-        $this->assertFalse($this->searchInResponse($response, 'font-src'));
+        $this->assertTrue($this->searchInResponse($response, 'font-src'));
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php
index 6d8876012df1e..6cfafcb55b46f 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php
@@ -86,59 +86,74 @@ private function getExpectedPolicies(): array
      * Test initiating policies from config.
      *
      * @magentoAppArea frontend
-     * @magentoConfigFixture default_store csp/policies/storefront/default_src/policy_id default-src
-     * @magentoConfigFixture default_store csp/policies/storefront/default_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/default_src/hosts/example http://magento.com
-     * @magentoConfigFixture default_store csp/policies/storefront/default_src/hosts/example2 http://devdocs.magento.com
-     * @magentoConfigFixture default_store csp/policies/storefront/default_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/policy_id child-src
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/hosts/example http://magento.com
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/hosts/example2 http://devdocs.magento.com
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/inline 1
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/schemes/scheme1 http
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src/dynamic 1
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src2/policy_id child-src
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src2/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/child_src2/eval 1
-     * @magentoConfigFixture default_store csp/policies/storefront/connect_src/policy_id connect-src
-     * @magentoConfigFixture default_store csp/policies/storefront/connect_src/none 1
-     * @magentoConfigFixture default_store csp/policies/storefront/font_src/policy_id font-src
-     * @magentoConfigFixture default_store csp/policies/storefront/font_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/font_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_src/policy_id frame-src
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_src/dynamic 1
-     * @magentoConfigFixture default_store csp/policies/storefront/img_src/policy_id img-src
-     * @magentoConfigFixture default_store csp/policies/storefront/img_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/img_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/manifest_src/policy_id manifest-src
-     * @magentoConfigFixture default_store csp/policies/storefront/manifest_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/manifest_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/media_src/policy_id media-src
-     * @magentoConfigFixture default_store csp/policies/storefront/media_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/media_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/object_src/policy_id object-src
-     * @magentoConfigFixture default_store csp/policies/storefront/object_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/object_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/script_src/policy_id script-src
-     * @magentoConfigFixture default_store csp/policies/storefront/script_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/script_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/script_src/event_handlers 1
+     * @magentoConfigFixture default_store csp/policies/storefront/default/policy_id default-src
+     * @magentoConfigFixture default_store csp/policies/storefront/default/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/default/hosts/example http://magento.com
+     * @magentoConfigFixture default_store csp/policies/storefront/default/hosts/example2 http://devdocs.magento.com
+     * @magentoConfigFixture default_store csp/policies/storefront/default/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/default/eval 0
+     * @magentoConfigFixture default_store csp/policies/storefront/default/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/children/policy_id child-src
+     * @magentoConfigFixture default_store csp/policies/storefront/children/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/children/hosts/example http://magento.com
+     * @magentoConfigFixture default_store csp/policies/storefront/children/hosts/example2 http://devdocs.magento.com
+     * @magentoConfigFixture default_store csp/policies/storefront/children/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/children/inline 1
+     * @magentoConfigFixture default_store csp/policies/storefront/children/schemes/scheme1 http
+     * @magentoConfigFixture default_store csp/policies/storefront/children/dynamic 1
+     * @magentoConfigFixture default_store csp/policies/storefront/children-2/policy_id child-src
+     * @magentoConfigFixture default_store csp/policies/storefront/children-2/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/children-2/eval 1
+     * @magentoConfigFixture default_store csp/policies/storefront/connections/policy_id connect-src
+     * @magentoConfigFixture default_store csp/policies/storefront/connections/none 1
+     * @magentoConfigFixture default_store csp/policies/storefront/connections/self 0
+     * @magentoConfigFixture default_store csp/policies/storefront/connections/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/fonts/policy_id font-src
+     * @magentoConfigFixture default_store csp/policies/storefront/fonts/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/fonts/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/fonts/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/frames/policy_id frame-src
+     * @magentoConfigFixture default_store csp/policies/storefront/frames/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/frames/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/frames/dynamic 1
+     * @magentoConfigFixture default_store csp/policies/storefront/frames/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/images/policy_id img-src
+     * @magentoConfigFixture default_store csp/policies/storefront/images/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/images/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/images/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/manifests/policy_id manifest-src
+     * @magentoConfigFixture default_store csp/policies/storefront/manifests/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/manifests/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/manifests/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/media/policy_id media-src
+     * @magentoConfigFixture default_store csp/policies/storefront/media/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/media/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/media/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/objects/policy_id object-src
+     * @magentoConfigFixture default_store csp/policies/storefront/objects/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/objects/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/objects/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/policy_id script-src
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/eval 0
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/event_handlers 1
      * @magentoConfigFixture default_store csp/policies/storefront/base_uri/policy_id base-uri
      * @magentoConfigFixture default_store csp/policies/storefront/base_uri/none 0
      * @magentoConfigFixture default_store csp/policies/storefront/base_uri/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/style_src/policy_id style-src
-     * @magentoConfigFixture default_store csp/policies/storefront/style_src/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/style_src/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/form_action/policy_id form-action
-     * @magentoConfigFixture default_store csp/policies/storefront/form_action/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/form_action/self 1
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_ancestors/policy_id frame-ancestors
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_ancestors/none 0
-     * @magentoConfigFixture default_store csp/policies/storefront/frame_ancestors/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/styles/policy_id style-src
+     * @magentoConfigFixture default_store csp/policies/storefront/styles/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/styles/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/styles/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/forms/policy_id form-action
+     * @magentoConfigFixture default_store csp/policies/storefront/forms/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/forms/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/forms/inline 0
+     * @magentoConfigFixture default_store csp/policies/storefront/frame-ancestors/policy_id frame-ancestors
+     * @magentoConfigFixture default_store csp/policies/storefront/frame-ancestors/none 0
+     * @magentoConfigFixture default_store csp/policies/storefront/frame-ancestors/self 1
+     * @magentoConfigFixture default_store csp/policies/storefront/frame-ancestors/inline 0
      * @magentoConfigFixture default_store csp/policies/storefront/plugin_types/policy_id plugin-types
      * @magentoConfigFixture default_store csp/policies/storefront/plugin_types/types/fl application/x-shockwave-flash
      * @magentoConfigFixture default_store csp/policies/storefront/plugin_types/types/applet application/x-java-applet
@@ -155,32 +170,30 @@ private function getExpectedPolicies(): array
      * @magentoConfigFixture default_store csp/policies/storefront/sandbox/navigation 1
      * @magentoConfigFixture default_store csp/policies/storefront/sandbox/navigation_by_user 1
      * @magentoConfigFixture default_store csp/policies/storefront/mixed_content/policy_id block-all-mixed-content
+     * @magentoConfigFixture default_store csp/policies/storefront/base/policy_id base-uri
+     * @magentoConfigFixture default_store csp/policies/storefront/base/inline 0
      * @magentoConfigFixture default_store csp/policies/storefront/upgrade/policy_id upgrade-insecure-requests
      * @return void
      */
     public function testCollecting(): void
     {
         $policies = $this->collector->collect([new FlagPolicy('upgrade-insecure-requests')]);
-        $checked = [];
         $expectedPolicies = $this->getExpectedPolicies();
-
-        //Policies were collected
         $this->assertNotEmpty($policies);
-        //Default policies are being kept
-        /** @var PolicyInterface $defaultPolicy */
         $defaultPolicy = array_shift($policies);
         $this->assertEquals('upgrade-insecure-requests', $defaultPolicy->getId());
-        //Comparing collected with configured
-        /** @var PolicyInterface $policy */
+        $expectedPolicyKeys = array_keys($expectedPolicies);
+        $checkedKeys = [];
+
         foreach ($policies as $policy) {
             $id = $policy->getId();
+            $this->assertTrue(in_array($id, $expectedPolicyKeys));
             if ($id === 'child-src' && $policy->isEvalAllowed()) {
                 $id = 'child-src2';
             }
-            $this->assertEquals($expectedPolicies[$id], $policy);
-            $checked[] = $id;
+            $this->assertEquals($expectedPolicies[$id]->getValue(), $policy->getValue());
+            $checkedKeys[] = $id;
         }
-        $expectedIds = array_keys($expectedPolicies);
-        $this->assertEquals(sort($expectedIds), sort($checked));
+        $this->assertEmpty(array_diff($expectedPolicyKeys, $checkedKeys));
     }
 }

From a900ac08b9b8e775c9b392aaee8e7929f4b84e8e Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:11:06 -0500
Subject: [PATCH 062/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Renderer/SimplePolicyHeaderRenderer.php   |  7 +++--
 .../Magento/Csp/CspAwareActionTest.php        | 10 +++---
 .../testsuite/Magento/Csp/CspUtilTest.php     | 11 +++----
 .../SimplePolicyHeaderRendererTest.php        | 22 ++-----------
 .../HTTP/PhpEnvironment/Response.php          | 31 +++++++++++++++++--
 5 files changed, 46 insertions(+), 35 deletions(-)

diff --git a/app/code/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php b/app/code/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php
index 14ae23eb3fe37..d419c25acc4ce 100644
--- a/app/code/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php
+++ b/app/code/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php
@@ -45,7 +45,7 @@ public function render(PolicyInterface $policy, HttpResponse $response): void
             $header = 'Content-Security-Policy';
         }
         $value = $policy->getId() .' ' .$policy->getValue() .';';
-        if ($config->getReportUri()) {
+        if ($config->getReportUri() && !$response->getHeader('Report-To')) {
             $reportToData = [
                 'group' => 'report-endpoint',
                 'max_age' => 10886400,
@@ -57,7 +57,10 @@ public function render(PolicyInterface $policy, HttpResponse $response): void
             $value .= ' report-to '. $reportToData['group'] .';';
             $response->setHeader('Report-To', json_encode($reportToData), true);
         }
-        $response->setHeader($header, $value, false);
+        if ($existing = $response->getHeader($header)) {
+            $value = $value .' ' .$existing->getFieldValue();
+        }
+        $response->setHeader($header, $value, true);
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
index 20ed4d1b79bc8..7e1e2c236eed9 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
@@ -31,15 +31,13 @@ public function testAwareAction(): void
     {
         $this->getRequest()->setMethod('GET');
         $this->dispatch('csputil/csp/aware');
-        $headers = '';
-        foreach ($this->getResponse()->getHeaders() as $header) {
-            $headers .= $header->getFieldName() .': ' .$header->getFieldValue() .PHP_EOL;
-        }
+        $header = $this->getResponse()->getHeader('Content-Security-Policy');
+        $this->assertNotEmpty($header);
 
         $this->assertContains(
-            'Content-Security-Policy: script-src https://controller.magento.com'
+            'script-src https://controller.magento.com'
                 .' \'self\' \'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'',
-            $headers
+            $header->getFieldValue()
         );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
index f33476c669111..362fb412eae12 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
@@ -20,6 +20,7 @@ class CspUtilTest extends AbstractController
      * Test that CSP helper for templates works.
      *
      * @return void
+     * @magentoConfigFixture default_store csp/mode/storefront/report_only 0
      */
     public function testPhtmlHelper(): void
     {
@@ -29,11 +30,9 @@ public function testPhtmlHelper(): void
 
         $this->assertContains('<script src="http://my.magento.com/static/script.js" />', $content);
         $this->assertContains("<script>\n    let myVar = 1;\n</script>", $content);
-        $headers = '';
-        foreach ($this->getResponse()->getHeaders() as $header) {
-            $headers .= $header->getFieldName() .': ' .$header->getFieldValue() .PHP_EOL;
-        }
-        $this->assertContains('http://my.magento.com', $headers);
-        $this->assertContains('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $headers);
+        $header = $this->getResponse()->getHeader('Content-Security-Policy');
+        $this->assertNotEmpty($header);
+        $this->assertContains('http://my.magento.com', $header->getFieldValue());
+        $this->assertContains('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $header->getFieldValue());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php
index 12ed71b708b88..a67665c6d3c48 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php
@@ -53,15 +53,7 @@ public function testRenderRestrictMode(): void
 
         $this->assertNotEmpty($header = $this->response->getHeader('Content-Security-Policy'));
         $this->assertEmpty($this->response->getHeader('Content-Security-Policy-Report-Only'));
-        $contentSecurityPolicyContent = [];
-        if ($header instanceof \ArrayIterator) {
-            foreach ($header as $item) {
-                $contentSecurityPolicyContent[] = $item->getFieldValue();
-            }
-        } else {
-            $contentSecurityPolicyContent = [$header->getFieldValue()];
-        }
-        $this->assertEquals(['default-src https://magento.com \'self\';'], $contentSecurityPolicyContent);
+        $this->assertEquals('default-src https://magento.com \'self\';', $header->getFieldValue());
     }
 
     /**
@@ -81,17 +73,9 @@ public function testRenderRestrictWithReportingMode(): void
 
         $this->assertNotEmpty($header = $this->response->getHeader('Content-Security-Policy'));
         $this->assertEmpty($this->response->getHeader('Content-Security-Policy-Report-Only'));
-        $contentSecurityPolicyContent = [];
-        if ($header instanceof \ArrayIterator) {
-            foreach ($header as $item) {
-                $contentSecurityPolicyContent[] = $item->getFieldValue();
-            }
-        } else {
-            $contentSecurityPolicyContent = [$header->getFieldValue()];
-        }
         $this->assertEquals(
-            ['default-src https://magento.com \'self\'; report-uri /csp-reports/; report-to report-endpoint;'],
-            $contentSecurityPolicyContent
+            'default-src https://magento.com \'self\'; report-uri /csp-reports/; report-to report-endpoint;',
+            $header->getFieldValue()
         );
         $this->assertNotEmpty($reportToHeader = $this->response->getHeader('Report-To'));
         $this->assertNotEmpty($reportData = json_decode("[{$reportToHeader->getFieldValue()}]", true));
diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
index dfc68cf975d50..5f0e3212434c9 100644
--- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
+++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
@@ -98,8 +98,13 @@ public function clearHeader($name)
     {
         $headers = $this->getHeaders();
         if ($headers->has($name)) {
-            $header = $headers->get($name);
-            $headers->removeHeader($header);
+            $headerValues = $headers->get($name);
+            if (!is_iterable($headerValues)) {
+                $headerValues = [$headerValues];
+            }
+            foreach ($headerValues as $headerValue) {
+                $headers->removeHeader($headerValue);
+            }
         }
 
         return $this;
@@ -187,4 +192,26 @@ public function __sleep()
     {
         return ['content', 'isRedirect', 'statusCode'];
     }
+
+    /**
+     * Sending provided headers.
+     *
+     * Had to be overridden because the original did not work correctly with multi-headers.
+     */
+    public function sendHeaders()
+    {
+        if ($this->headersSent()) {
+            return $this;
+        }
+
+        $status  = $this->renderStatusLine();
+        header($status);
+
+        /** @var \Zend\Http\Header\HeaderInterface $header */
+        foreach ($this->getHeaders() as $header) {
+            header($header->toString(), false);
+        }
+
+        return $this;
+    }
 }

From 6d31a61a535ab6368db35115a695bf7f010f8a18 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:11:57 -0500
Subject: [PATCH 063/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Model/Collector/CspWhitelistXml/Data.php  | 44 +++++++++++++++++++
 .../Collector/CspWhitelistXmlCollector.php    |  4 +-
 app/code/Magento/Csp/etc/di.xml               | 10 +++++
 3 files changed, 56 insertions(+), 2 deletions(-)
 create mode 100644 app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Data.php

diff --git a/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Data.php b/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Data.php
new file mode 100644
index 0000000000000..015327df90efb
--- /dev/null
+++ b/app/code/Magento/Csp/Model/Collector/CspWhitelistXml/Data.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Csp\Model\Collector\CspWhitelistXml;
+
+use Magento\Framework\Serialize\SerializerInterface;
+use Magento\Framework\Config\Data\Scoped;
+use Magento\Framework\Config\ScopeInterface;
+use Magento\Framework\Config\CacheInterface;
+
+/**
+ * Provides CSP whitelist configuration
+ */
+class Data extends Scoped
+{
+    /**
+     * Scope priority loading scheme
+     *
+     * @var array
+     */
+    protected $_scopePriorityScheme = ['global'];
+
+    /**
+     * Constructor
+     *
+     * @param Reader $reader
+     * @param ScopeInterface $configScope
+     * @param CacheInterface $cache
+     * @param SerializerInterface $serializer
+     */
+    public function __construct(
+        Reader $reader,
+        ScopeInterface $configScope,
+        CacheInterface $cache,
+        SerializerInterface $serializer
+    ) {
+        parent::__construct($reader, $configScope, $cache, 'csp_whitelist_config', $serializer);
+    }
+}
diff --git a/app/code/Magento/Csp/Model/Collector/CspWhitelistXmlCollector.php b/app/code/Magento/Csp/Model/Collector/CspWhitelistXmlCollector.php
index 9f19a5299c063..7fa16fda52ab9 100644
--- a/app/code/Magento/Csp/Model/Collector/CspWhitelistXmlCollector.php
+++ b/app/code/Magento/Csp/Model/Collector/CspWhitelistXmlCollector.php
@@ -9,7 +9,7 @@
 namespace Magento\Csp\Model\Collector;
 
 use Magento\Csp\Api\PolicyCollectorInterface;
-use Magento\Csp\Model\Collector\CspWhitelistXml\Reader as ConfigReader;
+use Magento\Framework\Config\DataInterface as ConfigReader;
 use Magento\Csp\Model\Policy\FetchPolicy;
 
 /**
@@ -36,7 +36,7 @@ public function __construct(ConfigReader $configReader)
     public function collect(array $defaultPolicies = []): array
     {
         $policies = $defaultPolicies;
-        $config = $this->configReader->read();
+        $config = $this->configReader->get(null);
         foreach ($config as $policyId => $values) {
             $policies[] = new FetchPolicy(
                 $policyId,
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index e6e4f166117f7..6b380ab2d00d7 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -49,6 +49,16 @@
             <argument name="fileName" xsi:type="string">csp_whitelist.xml</argument>
         </arguments>
     </type>
+    <type name="Magento\Csp\Model\Collector\CspWhitelistXml\Data">
+        <arguments>
+            <argument name="reader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Reader\Proxy</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Csp\Model\Collector\CspWhitelistXmlCollector">
+        <arguments>
+            <argument name="configReader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Data</argument>
+        </arguments>
+    </type>
     <type name="Magento\Framework\View\TemplateEngine\Php">
         <plugin name="csp_helper_plugin" type="Magento\Csp\Plugin\TemplateRenderingPlugin" />
     </type>

From 900fdb1cd758f52743cb62fbb0d10024195b0273 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:13:29 -0500
Subject: [PATCH 064/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../HTTP/PhpEnvironment/Response.php          | 22 -------------------
 1 file changed, 22 deletions(-)

diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
index 5f0e3212434c9..97c0ceb7c006f 100644
--- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
+++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
@@ -192,26 +192,4 @@ public function __sleep()
     {
         return ['content', 'isRedirect', 'statusCode'];
     }
-
-    /**
-     * Sending provided headers.
-     *
-     * Had to be overridden because the original did not work correctly with multi-headers.
-     */
-    public function sendHeaders()
-    {
-        if ($this->headersSent()) {
-            return $this;
-        }
-
-        $status  = $this->renderStatusLine();
-        header($status);
-
-        /** @var \Zend\Http\Header\HeaderInterface $header */
-        foreach ($this->getHeaders() as $header) {
-            header($header->toString(), false);
-        }
-
-        return $this;
-    }
 }

From f084eb53aaeea813177dafe0b5b8adb243beb136 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:28:15 -0500
Subject: [PATCH 065/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../System/Config/CollectionTimeLabelTest.php |   7 +-
 .../Config/SubscriptionStatusLabelTest.php    |   2 +-
 .../Adminhtml/System/Config/VerticalTest.php  |   2 +-
 .../Magento/Backend/Block/Widget/Button.php   |  84 ++++++++++-
 .../Block/Widget/Button/SplitButton.php       | 104 +++++++++++++-
 .../form/renderer/fieldset/element.phtml      |  20 ++-
 .../templates/widget/button/split.phtml       |   9 +-
 .../templates/widget/form/element.phtml       | 130 +++++++++++++-----
 .../System/Config/Form/Field/ImageTest.php    |  21 ++-
 .../Form/Field/Select/AllowspecificTest.php   |  16 ++-
 app/code/Magento/Csp/Helper/InlineUtil.php    | 110 +++++++++------
 .../Magento/Csp/Model/Policy/FetchPolicy.php  |  12 +-
 .../Csp/Plugin/TemplateRenderingPlugin.php    |  48 -------
 app/code/Magento/Csp/etc/di.xml               |  44 +++++-
 .../Test/Unit/Model/Renderer/RegionTest.php   |  37 ++++-
 .../Block/Adminhtml/Form/Field/ImportTest.php |  11 +-
 .../Field/Enable/AbstractEnableTest.php       |  35 ++++-
 .../Magento/Ui/Component/Control/Button.php   | 102 +++++++++++++-
 .../Ui/Component/Control/SplitButton.php      | 115 +++++++++++++++-
 .../Unit/Component/Control/ButtonTest.php     |   4 +-
 .../base/templates/control/button/split.phtml |   9 +-
 app/etc/di.xml                                |   7 +
 .../Test/Block/Adminhtml/Order/Create.php     |   4 +-
 .../Block/Adminhtml/Order/Create/Coupons.php  |   2 +-
 .../Controller/Secure/Helper.php              |  25 ++++
 .../composer.json                             |  21 +++
 .../etc/frontend/routes.xml                   |  14 ++
 .../etc/module.xml                            |  10 ++
 .../registration.php                          |  12 ++
 .../layout/securehtml_secure_helper.xml       |  17 +++
 .../view/frontend/templates/helper.phtml      |  13 ++
 .../integration/etc/di/preferences/ce.php     |   8 +-
 .../Block/Widget/Button/SplitButtonTest.php   |  89 ++++++++++++
 .../Backend/Block/Widget/ButtonTest.php       |  82 +++++++++++
 .../Magento/Backend/Block/WidgetTest.php      |   9 +-
 .../Tab/Bundle/Option/Search/GridTest.php     |   2 +-
 .../Controller/Adminhtml/CategoryTest.php     |   6 +
 .../Controller/Adminhtml/ProductTest.php      |   7 +
 .../Catalog/Controller/CategoryTest.php       |   6 +
 .../Catalog/Controller/ProductTest.php        |   6 +
 .../Backend/AbstractLayoutUpdateTest.php      |   6 +
 .../Model/Category/DataProviderTest.php       |   8 +-
 .../Catalog/Model/CategoryRepositoryTest.php  |   6 +
 .../Catalog/Model/ProductRepositoryTest.php   |   6 +
 .../Form/Modifier/LayoutUpdateTest.php        |   6 +
 .../Controller/Adminhtml/PageDesignTest.php   |   6 +
 .../Magento/Cms/Controller/PageTest.php       |  14 ++
 .../Model/Page/CustomLayoutRepositoryTest.php |   8 ++
 .../Cms/Model/Page/DataProviderTest.php       |   6 +
 .../Magento/Cms/Model/PageRepositoryTest.php  |   6 +
 .../Cms/_files/pages_with_layout_xml.php      |   6 +
 .../testsuite/Magento/Csp/CspUtilTest.php     |   5 +-
 .../Magento/Csp/Helper/InlineUtilTest.php     | 104 ++++++++++----
 .../Model/Collector/DynamicCollectorMock.php  |  44 ++++++
 .../SimplePolicyHeaderRendererTest.php        |  39 +++++-
 .../Helper/SecureHtmlRendererTemplateTest.php |  48 +++++++
 .../View/Helper/SecureHtmlRendererTest.php    |  91 ++++++++++++
 .../Order/Create/Form/AccountTest.php         |  20 +--
 .../Ui/Component/Control/ButtonTest.php       |  82 +++++++++++
 .../Ui/Component/Control/SplitButtonTest.php  |  91 ++++++++++++
 .../Block/Catalog/Category/EditTest.php       |  26 ++--
 .../Block/Catalog/Product/EditTest.php        |  28 ++--
 .../UrlRewrite/Block/Cms/Page/EditTest.php    |  28 ++--
 .../Adminhtml/Widget/InstanceTest.php         |   5 +-
 .../Data/Form/Element/AbstractElement.php     |  97 ++++++++++++-
 .../Data/Form/Element/Checkboxes.php          |  45 +++---
 .../Data/Form/Element/Editablemultiselect.php |  59 ++++++--
 .../Framework/Data/Form/Element/Editor.php    | 117 ++++++++++++----
 .../Framework/Data/Form/Element/Gallery.php   |  95 +++++++++----
 .../Framework/Data/Form/Element/Image.php     |  46 +++++--
 .../Framework/Data/Form/Element/Link.php      |  16 ++-
 .../Data/Form/Element/Multiselect.php         | 116 +++++++++++-----
 .../Framework/Data/Form/Element/Radios.php    |  61 ++++++--
 .../Framework/Data/Form/Element/Select.php    |  42 +++++-
 .../Framework/Data/Form/Element/Time.php      |  34 ++++-
 .../Unit/Form/Element/AbstractElementTest.php |  44 ++++--
 .../Form/Element/EditablemultiselectTest.php  |  34 ++++-
 .../Test/Unit/Form/Element/EditorTest.php     |  29 +++-
 .../Data/Test/Unit/Form/Element/ImageTest.php |  30 +++-
 .../Data/Test/Unit/Form/Element/LinkTest.php  |  15 +-
 .../Unit/Form/Element/MultiselectTest.php     |  29 +++-
 .../SecureHtmlRender/EventHandlerData.php     |  55 ++++++++
 .../Helper/SecureHtmlRender/HtmlRenderer.php  |  72 ++++++++++
 .../SecurityProcessorInterface.php            |  31 +++++
 .../View/Helper/SecureHtmlRender/TagData.php  |  89 ++++++++++++
 .../View/Helper/SecureHtmlRenderer.php        | 117 ++++++++++++++++
 .../Framework/View/TemplateEngine/Php.php     |  15 +-
 87 files changed, 2773 insertions(+), 466 deletions(-)
 delete mode 100644 app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/Controller/Secure/Helper.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/composer.json
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/frontend/routes.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/module.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/registration.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/layout/securehtml_secure_helper.xml
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/templates/helper.phtml
 create mode 100644 dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Csp/Model/Collector/DynamicCollectorMock.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
 create mode 100644 lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/EventHandlerData.php
 create mode 100644 lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/HtmlRenderer.php
 create mode 100644 lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/SecurityProcessorInterface.php
 create mode 100644 lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/TagData.php
 create mode 100644 lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php

diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
index 3a98fd6acbf4d..cf2c6d46539fa 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
@@ -53,13 +53,18 @@ class CollectionTimeLabelTest extends TestCase
      */
     private $abstractElementMock;
 
+    /**
+     * @var \PHPUnit\Framework\MockObject\MockObject
+     */
+    private $formMock;
+
     /**
      * @inheritDoc
      */
     protected function setUp()
     {
         $this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
-            ->setMethods(['getComment'])
+            ->setMethods(['getComment', 'getElementHtml'])
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
index b43225be9570d..34a1a0129362e 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
@@ -48,7 +48,7 @@ protected function setUp()
             ->disableOriginalConstructor()
             ->getMock();
         $this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
-            ->setMethods(['getComment'])
+            ->setMethods(['getComment', 'getElementHtml'])
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
index 0b5e86a523339..f462fbe62d8e7 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
@@ -36,7 +36,7 @@ class VerticalTest extends \PHPUnit\Framework\TestCase
     protected function setUp()
     {
         $this->abstractElementMock = $this->getMockBuilder(AbstractElement::class)
-            ->setMethods(['getComment', 'getLabel', 'getHint'])
+            ->setMethods(['getComment', 'getLabel', 'getHint', 'getElementHtml'])
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index 8385ecaa40a8b..6e449b4a33382 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -5,6 +5,11 @@
  */
 namespace Magento\Backend\Block\Widget;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Backend\Block\Template\Context;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Button widget
  *
@@ -15,6 +20,33 @@
  */
 class Button extends \Magento\Backend\Block\Widget
 {
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param Random|null $random
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?Random $random = null,
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct($context, $data);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * Define block template
      *
@@ -90,11 +122,12 @@ protected function _prepareAttributes($title, $classes, $disabled)
             'title' => $title,
             'type' => $this->getType(),
             'class' => join(' ', $classes),
-            'onclick' => $this->getOnClick(),
-            'style' => $this->getStyle(),
             'value' => $this->getValue(),
             'disabled' => $disabled,
         ];
+        if ($this->hasData('backend_button_widget_hook_id')) {
+            $attributes['backend-button-widget-hook-id'] = $this->getData('backend_button_widget_hook_id');
+        }
         if ($this->getDataAttribute()) {
             foreach ($this->getDataAttribute() as $key => $attr) {
                 $attributes['data-' . $key] = is_scalar($attr) ? $attr : json_encode($attr);
@@ -121,4 +154,51 @@ protected function _attributesToHtml($attributes)
 
         return $html;
     }
+
+    /**
+     * Generate "style" tag aimed to replace "style" attribute of the button.
+     *
+     * @return string
+     */
+    private function generateStyle(): string
+    {
+        $buttonId = $this->getData('backend_button_widget_hook_id');
+        $style = $this->getStyle();
+
+        return <<<style
+            #{$this->getId()} {
+                $style
+            }
+style;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function _beforeToHtml()
+    {
+        parent::_beforeToHtml();
+
+        $this->setData('backend_button_widget_hook_id', $buttonId = 'buttonId' .$this->random->getRandomString(32));
+
+        $afterHtml = $this->getAfterHtml();
+        if ($this->getOnClick()) {
+            $afterHtml .= $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                $this->getOnClick(),
+                "*[backend-button-widget-hook-id='$buttonId']"
+            );
+        }
+        if ($this->getStyle()) {
+            $afterHtml .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                $this->generateStyle(),
+                false
+            );
+        }
+        $this->setAfterHtml($afterHtml);
+
+        return $this;
+    }
 }
diff --git a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
index db3f5466fbacb..a458097751698 100644
--- a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
+++ b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
@@ -5,6 +5,11 @@
  */
 namespace Magento\Backend\Block\Widget\Button;
 
+use Magento\Backend\Block\Template\Context;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Split button widget
  *
@@ -21,6 +26,33 @@
  */
 class SplitButton extends \Magento\Backend\Block\Widget
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
+    ) {
+        parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+    }
+
     /**
      * Define block template
      *
@@ -61,6 +93,16 @@ public function getAttributesHtml()
         return $html;
     }
 
+    /**
+     * Get main button's "id" attribute value.
+     *
+     * @return string
+     */
+    private function getButtonId(): string
+    {
+        return $this->getId() .'-button';
+    }
+
     /**
      * Retrieve button attributes html
      *
@@ -84,11 +126,10 @@ public function getButtonAttributesHtml()
             $classes[] = $disabled;
         }
         $attributes = [
-            'id' => $this->getId() . '-button',
+            'id' => $this->getButtonId(),
             'title' => $title,
             'class' => join(' ', $classes),
-            'disabled' => $disabled,
-            'style' => $this->getStyle(),
+            'disabled' => $disabled
         ];
 
         //TODO perhaps we need to skip data-mage-init when disabled="disabled"
@@ -180,7 +221,7 @@ public function hasSplit()
      * Add data attributes to $attributes array
      *
      * @param array $data
-     * @param array &$attributes
+     * @param array $attributes
      * @return void
      */
     protected function _getDataAttributes($data, &$attributes)
@@ -190,6 +231,22 @@ protected function _getDataAttributes($data, &$attributes)
         }
     }
 
+    /**
+     * Set and return "id" attribute value for an option.
+     *
+     * @param array $option
+     * @return string
+     */
+    private function identifyOption(array &$option): string
+    {
+        $id = isset($option['id'])
+            ? $option['id']
+            : (isset($option['id_attribute']) ? $option['id_attribute'] : 'optId' .$this->random->getRandomString(32));
+        $option['id_attribute'] = $id;
+
+        return $this->getId() .'-' .$id;
+    }
+
     /**
      * Prepare option attributes
      *
@@ -203,11 +260,9 @@ protected function _getDataAttributes($data, &$attributes)
     protected function _prepareOptionAttributes($option, $title, $classes, $disabled)
     {
         $attributes = [
-            'id' => isset($option['id']) ? $this->getId() . '-' . $option['id'] : '',
+            'id' => $this->identifyOption($option),
             'title' => $title,
             'class' => join(' ', $classes),
-            'onclick' => isset($option['onclick']) ? $option['onclick'] : '',
-            'style' => isset($option['style']) ? $option['style'] : '',
             'disabled' => $disabled,
         ];
 
@@ -235,4 +290,39 @@ protected function _getAttributesString($attributes)
         }
         return join(' ', $html);
     }
+
+    /**
+     * @inheritDoc
+     */
+    protected function _beforeToHtml()
+    {
+        parent::_beforeToHtml();
+
+        $afterHtml = $this->getAfterHtml();
+        /** @var array|null $options */
+        $options = $this->getOptions() ?? [];
+        foreach ($options as &$option) {
+            $id = $this->identifyOption($option);
+            if (!empty($option['onclick'])) {
+                $afterHtml .= $this->secureRenderer->renderEventListenerAsTag('onclick', $option['onclick'], "#$id");
+            }
+            if (!empty($option['style'])) {
+                $afterHtml .= $this->secureRenderer->renderTag(
+                    'style',
+                    [],
+                    <<<style
+                    #$id {
+                        {$option['style']}
+                    }
+style
+                    ,
+                    false
+                );
+            }
+        }
+        $this->setOptions($options);
+        $this->setAfterHtml($afterHtml);
+
+        return $this;
+    }
 }
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml
index 959a27279e5c2..eb64cc602eaf9 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher/form/renderer/fieldset/element.phtml
@@ -21,19 +21,25 @@ $fieldAttributes = $fieldId . ' class="' . $fieldClass . '" '
     . $block->getUiId('form-field', $element->getId());
 ?>
 
-<?php if (!$element->getNoDisplay()) : ?>
-    <?php if ($element->getType() == 'hidden') : ?>
+<?php if (!$element->getNoDisplay()): ?>
+    <?php if ($element->getType() == 'hidden'): ?>
         <?= $element->getElementHtml() ?>
-    <?php else : ?>
-    <div<?= /* @noEscape */ $fieldAttributes ?>>
-        <?php if ($elementBeforeLabel) : ?>
+    <?php else: ?>
+    <div <?= /* @noEscape */ $fieldAttributes ?>>
+        <?php if ($elementBeforeLabel): ?>
             <?= $element->getElementHtml() ?>
             <?= $element->getLabelHtml('', $element->getScopeLabel()) ?>
             <?= /* @noEscape */ $note ?>
-        <?php else : ?>
+        <?php else: ?>
             <?= $element->getLabelHtml('', $element->getScopeLabel()) ?>
             <div class="admin__field-control control">
-                <?= /* @noEscape */ ($addOn) ? '<div class="addon">' . $element->getElementHtml() . '</div>' : $element->getElementHtml() ?>
+                <?php if ($addOn): ?>
+                <div class="addon">
+                <?php endif; ?>
+                    <?= /* @noEscape */ $element->getElementHtml() ?>
+                <?php if ($addOn): ?>
+                </div>
+                <?php endif; ?>
                 <?= $block->getHintHtml() ?>
                 <?= /* @noEscape */ $note ?>
             </div>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
index 0123de098a9e0..49b79ddfd7c16 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
@@ -12,19 +12,19 @@
     <button <?= $block->getButtonAttributesHtml() ?>>
         <span><?= $block->escapeHtml($block->getLabel()) ?></span>
     </button>
-    <?php if ($block->hasSplit()) : ?>
+    <?php if ($block->hasSplit()): ?>
         <button <?= $block->getToggleAttributesHtml() ?>>
             <span>Select</span>
         </button>
 
-        <?php if (!$block->getDisabled()) : ?>
+        <?php if (!$block->getDisabled()): ?>
             <ul class="dropdown-menu" <?= /* @noEscape */ $block->getUiId("dropdown-menu") ?>>
-                <?php foreach ($block->getOptions() as $key => $option) : ?>
+                <?php foreach ($block->getOptions() as $key => &$option): ?>
                 <li>
                     <span <?= $block->getOptionAttributesHtml($key, $option) ?>>
                         <?= $block->escapeHtml($option['label']) ?>
                     </span>
-                    <?php if (isset($option['hint'])) : ?>
+                    <?php if (isset($option['hint'])): ?>
                     <div class="tooltip" <?= /* @noEscape */ $block->getUiId('item', $key, 'tooltip') ?>>
                         <a href="<?= $block->escapeHtml($option['hint']['href']) ?>" class="help">
                             <?= $block->escapeHtml($option['hint']['label']) ?>
@@ -37,6 +37,7 @@
         <?php endif; ?>
     <?php endif; ?>
 </div>
+<?= /* @noEscape */$block->getAfterHtml() ?>
 
 <script type="text/x-magento-init">
     {
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
index ec53f7e5c74ce..fce4d094ee0b1 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
@@ -4,46 +4,86 @@
  * See COPYING.txt for license details.
  */
 
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $type = $element->getType();
+$htmlId = $element->getHtmlId();
 ?>
-<?php if ($type === 'fieldset') : ?>
+<?php if ($type === 'fieldset'): ?>
     <fieldset>
         <legend><?= $block->escapeHtml($element->getLegend()) ?></legend><br />
-        <?php foreach ($element->getElements() as $_element) : ?>
+        <?php foreach ($element->getElements() as $_element): ?>
             <?= /* @noEscape */ $formBlock->drawElement($_element) ?>
         <?php endforeach; ?>
     </fieldset>
-<?php elseif ($type === 'hidden') : ?>
-    <input type="<?= $block->escapeHtmlAttr($element->getType()) ?>" name="<?= $block->escapeHtmlAttr($element->getName()) ?>" id="<?= $element->getHtmlId() ?>" value="<?= $block->escapeHtmlAttr($element->getValue()) ?>">
-    <?php elseif ($type === 'select') : ?>
+<?php elseif ($type === 'hidden'): ?>
+    <input type="<?= $block->escapeHtmlAttr($element->getType()) ?>"
+           name="<?= $block->escapeHtmlAttr($element->getName()) ?>"
+           id="<?= /* @noEscape */ $htmlId ?>"
+           value="<?= $block->escapeHtmlAttr($element->getValue()) ?>">
+    <?php elseif ($type === 'select'): ?>
     <span class="form_row">
-        <?php if ($element->getLabel()) : ?><label for="<?= $element->getHtmlId() ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label><?php endif; ?>
-        <select name="<?= $block->escapeHtmlAttr($element->getName()) ?>" id="<?= $element->getHtmlId() ?>" class="select<?= $block->escapeHtmlAttr($element->getClass()) ?>" title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>">
-        <?php foreach ($element->getValues() as $_value) : ?>
-            <option <?= /* @noEscape */ $_value->serialize() ?><?php if ($_value->getValue() == $element->getValue()) : ?> selected="selected"<?php endif; ?>><?= $block->escapeHtml($_value->getLabel()) ?></option>
+        <?php if ($element->getLabel()): ?>
+            <label for="<?= /* @noEscape */ $htmlId ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
+        <?php endif; ?>
+        <select name="<?= $block->escapeHtmlAttr($element->getName()) ?>"
+                id="<?= /* @noEscape */ $htmlId ?>"
+                class="select<?= $block->escapeHtmlAttr($element->getClass()) ?>"
+                title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>">
+        <?php foreach ($element->getValues() as $_value): ?>
+            <option <?= /* @noEscape */ $_value->serialize() ?>
+                <?php if ($_value->getValue() == $element->getValue()): ?> selected="selected"<?php endif; ?>>
+                <?= $block->escapeHtml($_value->getLabel()) ?>
+            </option>
         <?php endforeach; ?>
         </select>
     </span>
-<?php elseif ($type === 'text' || $type === 'button' || $type === 'password') : ?>
+<?php elseif ($type === 'text' || $type === 'button' || $type === 'password'): ?>
     <span class="form_row">
-        <?php if ($element->getLabel()) : ?><label for="<?= $element->getHtmlId() ?>" <?= /* @noEscape */ $block->getUiId('label') ?>><?= $block->escapeHtml($element->getLabel()) ?>:</label><?php endif; ?>
-        <input type="<?= $block->escapeHtmlAttr($element->getType()) ?>" name="<?= $block->escapeHtmlAttr($element->getName()) ?>" id="<?= /* @noEscape */ $element->getHtmlId() ?>" value="<?= $block->escapeHtmlAttr($element->getValue()) ?>" class="input-text <?= $block->escapeHtmlAttr($element->getClass()) ?>" title="<?= $block->escapeHtmlAttr($element->getTitle()) ?>" <?= /* @noEscape */ ($element->getOnClick() ? 'onClick="' . $element->getOnClick() . '"' : '') ?>/>
+        <?php if ($element->getLabel()): ?>
+            <label for="<?= /* @noEscape */ $htmlId ?>" <?= /* @noEscape */ $block->getUiId('label') ?>>
+                <?= $block->escapeHtml($element->getLabel()) ?>:
+            </label>
+        <?php endif; ?>
+        <input type="<?= $block->escapeHtmlAttr($element->getType()) ?>"
+               name="<?= $block->escapeHtmlAttr($element->getName()) ?>"
+               id="<?= /* @noEscape */ $htmlId ?>"
+               value="<?= $block->escapeHtmlAttr($element->getValue()) ?>"
+               class="input-text <?= $block->escapeHtmlAttr($element->getClass()) ?>"
+               title="<?= $block->escapeHtmlAttr($element->getTitle()) ?>" />
+        <?php if ($listener = $element->getOnclick()): ?>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag('onclick', $listener, "#{$htmlId}")  ?>
+        <?php endif; ?>
     </span>
-<?php elseif ($type === 'radio') : ?>
+<?php elseif ($type === 'radio'): ?>
     <span class="form_row">
-        <?php if ($element->getLabel()) : ?><label for="<?= $element->getHtmlId() ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label><?php endif; ?>
-        <input type="<?=  $block->escapeHtmlAttr($element->getType()) ?>" name="<?=  $block->escapeHtmlAttr($element->getName()) ?>" id="<?= $element->getHtmlId() ?>" value="<?=  $block->escapeHtmlAttr($element->getValue()) ?>" class="input-text <?= $block->escapeHtmlAttr($element->getClass()) ?>" title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>"/>
+        <?php if ($element->getLabel()): ?>
+            <label for="<?= /* @noEscape */ $htmlId ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
+        <?php endif; ?>
+        <input type="<?=  $block->escapeHtmlAttr($element->getType()) ?>"
+               name="<?=  $block->escapeHtmlAttr($element->getName()) ?>"
+               id="<?= /* @noEscape */ $htmlId ?>"
+               value="<?=  $block->escapeHtmlAttr($element->getValue()) ?>"
+               class="input-text <?= $block->escapeHtmlAttr($element->getClass()) ?>"
+               title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>"/>
     </span>
-<?php elseif ($type === 'radios') : ?>
+<?php elseif ($type === 'radios'): ?>
     <span class="form_row">
-        <label for="<?= $element->getHtmlId() ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
-    <?php foreach ($element->getRadios() as $_radio) : ?>
-    <input type="radio" name="<?=  $block->escapeHtmlAttr($_radio->getName()) ?>" id="<?= $_radio->getHtmlId() ?>" value="<?=  $block->escapeHtmlAttr($_radio->getValue()) ?>" class="input-radio <?= $block->escapeHtmlAttr($_radio->getClass()) ?>" title="<?=  $block->escapeHtmlAttr($_radio->getTitle()) ?>" <?= ($_radio->getValue() == $element->getChecked()) ? 'checked="true"' : '' ?> > <?= $block->escapeHtml($_radio->getLabel()) ?>
+        <label for="<?= /* @noEscape */ $htmlId ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
+    <?php foreach ($element->getRadios() as $_radio): ?>
+    <input type="radio"
+           name="<?=  $block->escapeHtmlAttr($_radio->getName()) ?>"
+           id="<?= $_radio->getHtmlId() ?>"
+           value="<?=  $block->escapeHtmlAttr($_radio->getValue()) ?>"
+           class="input-radio <?= $block->escapeHtmlAttr($_radio->getClass()) ?>"
+           title="<?=  $block->escapeHtmlAttr($_radio->getTitle()) ?>"
+           <?= ($_radio->getValue() == $element->getChecked()) ? 'checked="true"' : '' ?> >
+        <?= $block->escapeHtml($_radio->getLabel()) ?>
     <?php endforeach; ?>
     </span>
-<?php elseif ($type === 'wysiwyg') : ?>
+<?php elseif ($type === 'wysiwyg'): ?>
     <span class="form_row">
-      <label for="<?= $element->getHtmlId() ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
+      <label for="<?= /* @noEscape */ $htmlId ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
         <script>
         require([
             "wysiwygAdapter"
@@ -53,33 +93,57 @@ $type = $element->getType();
                 mode : "exact",
                 theme : "advanced",
                 elements : "<?= $block->escapeJs($element->getName()) ?>",
-                plugins : "inlinepopups,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
-                theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
-                theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
-                theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
-                theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking",
+                plugins : "inlinepopups,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,"
+                    + "insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,"
+                    + "fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
+                theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|"
+                    + ",justifyleft,justifycenter,justifyright,justifyfull,|"
+                    + ",styleselect,formatselect,fontselect,fontsizeselect",
+                theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|"
+                    + ",outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|"
+                    + ",insertdate,inserttime,preview,|,forecolor,backcolor",
+                theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|"
+                    + ",charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
+                theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|"
+                    + ",cite,abbr,acronym,del,ins,|,visualchars,nonbreaking",
                 theme_advanced_toolbar_location : "top",
                 theme_advanced_toolbar_align : "left",
                 theme_advanced_path_location : "bottom",
-                extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
+                extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace"
+                    + "|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size"
+                    + "|noshade],font[face|size|color|style],span[class|align|style]",
                 theme_advanced_resize_horizontal : 'false',
                 theme_advanced_resizing : 'true',
                 apply_source_formatting : 'true',
                 convert_urls : 'false',
                 force_br_newlines : 'true',
-                doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
+                doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
+                    + ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
             });
         });
 </script>
-      <textarea name="<?= $block->escapeHtmlAttr($element->getName()) ?>" title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>" id="<?= $element->getHtmlId() ?>" class="textarea <?= $block->escapeHtmlAttr($element->getClass()) ?>" cols="80" rows="20"><?= $block->escapeHtml($element->getValue()) ?></textarea>
+      <textarea name="<?= $block->escapeHtmlAttr($element->getName()) ?>"
+                title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>"
+                id="<?= /* @noEscape */ $htmlId ?>"
+                class="textarea <?= $block->escapeHtmlAttr($element->getClass()) ?>"
+                cols="80" rows="20">
+          <?= $block->escapeHtml($element->getValue()) ?>
+      </textarea>
     </span>
-<?php elseif ($type === 'textarea') : ?>
+<?php elseif ($type === 'textarea'): ?>
             <span class="form_row">
-                    <label for="<?= $element->getHtmlId() ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
-                    <textarea name="<?= $block->escapeHtmlAttr($element->getName()) ?>" title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>" id="<?= $element->getHtmlId() ?>" class="textarea <?= $block->escapeHtmlAttr($element->getClass()) ?>" cols="15" rows="2"><?= $block->escapeHtml($element->getValue()) ?></textarea>
+                    <label for="<?= /* @noEscape */ $htmlId ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
+                    <textarea name="<?= $block->escapeHtmlAttr($element->getName()) ?>"
+                              title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>"
+                              id="<?= /* @noEscape */ $htmlId ?>"
+                              class="textarea <?= $block->escapeHtmlAttr($element->getClass()) ?>"
+                              cols="15"
+                              rows="2">
+                        <?= $block->escapeHtml($element->getValue()) ?>
+                    </textarea>
             </span>
 <?php endif; ?>
-<?php if ($element->getScript()) : ?>
+<?php if ($element->getScript()): ?>
 <script>
     <?= /* @noEscape */ $element->getScript() ?>
 </script>
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php
index b752f79f73446..0d73fd51debbf 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php
@@ -9,6 +9,9 @@
  */
 namespace Magento\Config\Test\Unit\Block\System\Config\Form\Field;
 
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class ImageTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -29,12 +32,23 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('some-rando-string');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $listener, string $selector): string {
+                    return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
+                }
+            );
         $this->urlBuilderMock = $this->createMock(\Magento\Framework\Url::class);
         $this->image = $objectManager->getObject(
             \Magento\Config\Block\System\Config\Form\Field\Image::class,
             [
                 'urlBuilder' => $this->urlBuilderMock,
-                '_escaper' => $objectManager->getObject(\Magento\Framework\Escaper::class)
+                '_escaper' => $objectManager->getObject(\Magento\Framework\Escaper::class),
+                'random' => $randomMock,
+                'secureRenderer' => $secureRendererMock
             ]
         );
 
@@ -99,14 +113,15 @@ public function testGetElementHtmlWithValue()
         $this->assertContains('type="file"', $html);
         $this->assertContains('value="test_value"', $html);
         $this->assertContains(
-            '<a href="'
+            '<a previewlinkid="linkIdsome-rando-string" href="'
             . $url
             . $this->testData['path']
             . '/'
             . $this->testData['value']
-            . '" onclick="imagePreview(\'' . $expectedHtmlId . '_image\'); return false;"',
+            . '"',
             $html
         );
+        $this->assertContains("imagePreview('{$expectedHtmlId}_image');\nreturn false;", $html);
         $this->assertContains('<input type="checkbox"', $html);
     }
 }
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
index e7ba2e8aaa2e7..75c46c1168843 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Config\Test\Unit\Block\System\Config\Form\Field\Select;
 
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class AllowspecificTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -20,10 +23,21 @@ class AllowspecificTest extends \PHPUnit\Framework\TestCase
     protected function setUp()
     {
         $testHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('some-rando-string');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $listener, string $selector): string {
+                    return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
+                }
+            );
         $this->_object = $testHelper->getObject(
             \Magento\Config\Block\System\Config\Form\Field\Select\Allowspecific::class,
             [
-                '_escaper' => $testHelper->getObject(\Magento\Framework\Escaper::class)
+                '_escaper' => $testHelper->getObject(\Magento\Framework\Escaper::class),
+                'random' => $randomMock,
+                'secureRenderer' => $secureRendererMock
             ]
         );
         $this->_object->setData('html_id', 'spec_element');
diff --git a/app/code/Magento/Csp/Helper/InlineUtil.php b/app/code/Magento/Csp/Helper/InlineUtil.php
index f0de25fb81d7a..f9dd9aafa459e 100644
--- a/app/code/Magento/Csp/Helper/InlineUtil.php
+++ b/app/code/Magento/Csp/Helper/InlineUtil.php
@@ -3,6 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
 declare(strict_types=1);
 
 namespace Magento\Csp\Helper;
@@ -10,13 +11,18 @@
 use Magento\Csp\Api\InlineUtilInterface;
 use Magento\Csp\Model\Collector\DynamicCollector;
 use Magento\Csp\Model\Policy\FetchPolicy;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRender\EventHandlerData;
+use Magento\Framework\View\Helper\SecureHtmlRender\HtmlRenderer;
+use Magento\Framework\View\Helper\SecureHtmlRender\SecurityProcessorInterface;
+use Magento\Framework\View\Helper\SecureHtmlRender\TagData;
 
 /**
  * Helper for classes responsible for rendering and templates.
  *
  * Allows to whitelist dynamic sources specific to a certain page.
  */
-class InlineUtil implements InlineUtilInterface
+class InlineUtil implements InlineUtilInterface, SecurityProcessorInterface
 {
     /**
      * @var DynamicCollector
@@ -28,6 +34,11 @@ class InlineUtil implements InlineUtilInterface
      */
     private $useUnsafeHashes;
 
+    /**
+     * @var HtmlRenderer
+     */
+    private $htmlRenderer;
+
     private static $tagMeta = [
         'script' => ['id' => 'script-src', 'remote' => ['src'], 'hash' => true],
         'style' => ['id' => 'style-src', 'remote' => [], 'hash' => true],
@@ -48,11 +59,16 @@ class InlineUtil implements InlineUtilInterface
     /**
      * @param DynamicCollector $dynamicCollector
      * @param bool $useUnsafeHashes Use 'unsafe-hashes' policy (not supported by CSP v2).
+     * @param HtmlRenderer|null $htmlRenderer
      */
-    public function __construct(DynamicCollector $dynamicCollector, bool $useUnsafeHashes = false)
-    {
+    public function __construct(
+        DynamicCollector $dynamicCollector,
+        bool $useUnsafeHashes = false,
+        ?HtmlRenderer $htmlRenderer = null
+    ) {
         $this->dynamicCollector = $dynamicCollector;
         $this->useUnsafeHashes = $useUnsafeHashes;
+        $this->htmlRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(HtmlRenderer::class);
     }
 
     /**
@@ -130,63 +146,71 @@ private function extractRemoteHosts(string $tag, array $attributes, ?string $con
     }
 
     /**
-     * Render tag.
-     *
-     * @param string $tag
-     * @param string[] $attributes
-     * @param string|null $content
-     * @return string
+     * @inheritDoc
      */
-    private function render(string $tag, array $attributes, ?string $content): string
+    public function renderTag(string $tagName, array $attributes, ?string $content = null): string
     {
-        $html = '<' .$tag;
-        foreach ($attributes as $attribute => $value) {
-            $html .= ' ' .$attribute .'="' .$value .'"';
-        }
-        if ($content) {
-            $html .= '>' .$content .'</' .$tag .'>';
-        } else {
-            $html .= ' />';
+        if (!array_key_exists($tagName, self::$tagMeta)) {
+            throw new \InvalidArgumentException('Unknown source type - ' .$tagName);
         }
 
-        return $html;
+        return $this->htmlRenderer->renderTag($this->processTag(new TagData($tagName, $attributes, $content, false)));
     }
 
     /**
      * @inheritDoc
      */
-    public function renderTag(string $tagName, array $attributes, ?string $content = null): string
+    public function renderEventListener(string $eventName, string $javascript): string
+    {
+        return $this->htmlRenderer->renderEventHandler(
+            $this->processEventHandler(new EventHandlerData($eventName, $javascript))
+        );
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function processTag(TagData $tagData): TagData
     {
         //Processing tag data
-        if (!array_key_exists($tagName, self::$tagMeta)) {
-            throw new \InvalidArgumentException('Unknown source type - ' .$tagName);
-        }
-        /** @var string $policyId */
-        $policyId = self::$tagMeta[$tagName]['id'];
-        $remotes = $this->extractRemoteHosts($tagName, $attributes, $content);
-        if (empty($remotes) && !$content) {
-            throw new \InvalidArgumentException('Either remote URL or hashable content is required to whitelist');
-        }
+        if (array_key_exists($tagData->getTag(), self::$tagMeta)) {
+            /** @var string $policyId */
+            $policyId = self::$tagMeta[$tagData->getTag()]['id'];
+            $remotes = $this->extractRemoteHosts($tagData->getTag(), $tagData->getAttributes(), $tagData->getContent());
+            if (empty($remotes) && !$tagData->getContent()) {
+                throw new \InvalidArgumentException('Either remote URL or hashable content is required to whitelist');
+            }
 
-        //Adding required policies.
-        if ($remotes) {
-            $this->dynamicCollector->add(
-                new FetchPolicy($policyId, false, $remotes)
-            );
-        }
-        if ($content && !empty(self::$tagMeta[$tagName]['hash'])) {
-            $this->dynamicCollector->add(
-                new FetchPolicy($policyId, false, [], [], false, false, false, [], $this->generateHashValue($content))
-            );
+            //Adding required policies.
+            if ($remotes) {
+                $this->dynamicCollector->add(
+                    new FetchPolicy($policyId, false, $remotes)
+                );
+            }
+            if ($tagData->getContent() && !empty(self::$tagMeta[$tagData->getTag()]['hash'])) {
+                $this->dynamicCollector->add(
+                    new FetchPolicy(
+                        $policyId,
+                        false,
+                        [],
+                        [],
+                        false,
+                        false,
+                        false,
+                        [],
+                        $this->generateHashValue($tagData->getContent())
+                    )
+                );
+            }
         }
 
-        return $this->render($tagName, $attributes, $content);
+        return $tagData;
     }
 
     /**
      * @inheritDoc
      */
-    public function renderEventListener(string $eventName, string $javascript): string
+    public function processEventHandler(EventHandlerData $eventHandlerData): EventHandlerData
     {
         if ($this->useUnsafeHashes) {
             $policy = new FetchPolicy(
@@ -198,7 +222,7 @@ public function renderEventListener(string $eventName, string $javascript): stri
                 false,
                 false,
                 [],
-                $this->generateHashValue($javascript),
+                $this->generateHashValue($eventHandlerData->getCode()),
                 false,
                 true
             );
@@ -207,6 +231,6 @@ public function renderEventListener(string $eventName, string $javascript): stri
         }
         $this->dynamicCollector->add($policy);
 
-        return $eventName .'="' .$javascript .'"';
+        return $eventHandlerData;
     }
 }
diff --git a/app/code/Magento/Csp/Model/Policy/FetchPolicy.php b/app/code/Magento/Csp/Model/Policy/FetchPolicy.php
index 7350cbe80aecb..d045ee48b0ba2 100644
--- a/app/code/Magento/Csp/Model/Policy/FetchPolicy.php
+++ b/app/code/Magento/Csp/Model/Policy/FetchPolicy.php
@@ -226,11 +226,13 @@ public function getValue(): string
             if ($this->areEventHandlersAllowed()) {
                 $sources[] = '\'unsafe-hashes\'';
             }
-            foreach ($this->getNonceValues() as $nonce) {
-                $sources[] = '\'nonce-' .base64_encode($nonce) .'\'';
-            }
-            foreach ($this->getHashes() as $hash => $algorithm) {
-                $sources[]= "'$algorithm-$hash'";
+            if (!$this->isInlineAllowed()) {
+                foreach ($this->getNonceValues() as $nonce) {
+                    $sources[] = '\'nonce-' . base64_encode($nonce) . '\'';
+                }
+                foreach ($this->getHashes() as $hash => $algorithm) {
+                    $sources[] = "'$algorithm-$hash'";
+                }
             }
 
             return implode(' ', $sources);
diff --git a/app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php b/app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php
deleted file mode 100644
index 781fb06e487a8..0000000000000
--- a/app/code/Magento/Csp/Plugin/TemplateRenderingPlugin.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-declare(strict_types=1);
-
-namespace Magento\Csp\Plugin;
-
-use Magento\Csp\Api\InlineUtilInterface;
-use Magento\Framework\View\Element\BlockInterface;
-use Magento\Framework\View\TemplateEngine\Php;
-
-/**
- * Plugin that adds CSP utility to templates context.
- */
-class TemplateRenderingPlugin
-{
-    /**
-     * @var InlineUtilInterface
-     */
-    private $util;
-
-    /**
-     * @param InlineUtilInterface $util
-     */
-    public function __construct(InlineUtilInterface $util)
-    {
-        $this->util = $util;
-    }
-
-    /**
-     * Add $csp variable to a template scope.
-     *
-     * @param Php $renderer
-     * @param BlockInterface $block
-     * @param string $fileName
-     * @param array $dictionary
-     * @return array
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    public function beforeRender(Php $renderer, BlockInterface $block, $fileName, array $dictionary): array
-    {
-        $dictionary['csp'] = $this->util;
-
-        return [$block, $fileName, $dictionary];
-    }
-}
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index 6b380ab2d00d7..5f9b9f7b0fc50 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -18,10 +18,10 @@
     <type name="Magento\Csp\Model\CompositePolicyCollector">
         <arguments>
             <argument name="collectors" xsi:type="array">
-                <item name="1" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector</item>
-                <item name="2" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector</item>
-                <item name="3" xsi:type="object">Magento\Csp\Model\Collector\DynamicCollector</item>
-                <item name="100" xsi:type="object">Magento\Csp\Model\Collector\ControllerCollector</item>
+                <item name="1" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector\Proxy</item>
+                <item name="2" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector\Proxy</item>
+                <item name="3" xsi:type="object">Magento\Csp\Model\Collector\DynamicCollector\Proxy</item>
+                <item name="100" xsi:type="object">Magento\Csp\Model\Collector\ControllerCollector\Proxy</item>
             </argument>
             <argument name="mergers" xsi:type="array">
                 <item name="fetch" xsi:type="object">Magento\Csp\Model\Collector\FetchPolicyMerger</item>
@@ -59,11 +59,43 @@
             <argument name="configReader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Data</argument>
         </arguments>
     </type>
+    <type name="Magento\Csp\Model\Collector\CspWhitelistXml\Data">
+        <arguments>
+            <argument name="reader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Reader\Proxy</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Csp\Model\Collector\CspWhitelistXmlCollector">
+        <arguments>
+            <argument name="configReader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Data</argument>
+        </arguments>
+    </type>
+    <preference for="Magento\Csp\Api\InlineUtilInterface" type="Magento\Csp\Helper\InlineUtil" />
+    <type name="Magento\Csp\Plugin\TemplateRenderingPlugin">
+        <arguments>
+            <argument name="util" xsi:type="object">Magento\Csp\Api\InlineUtilInterface\Proxy</argument>
+        </arguments>
+    </type>
     <type name="Magento\Framework\View\TemplateEngine\Php">
-        <plugin name="csp_helper_plugin" type="Magento\Csp\Plugin\TemplateRenderingPlugin" />
+        <arguments>
+            <argument name="blockVariables" xsi:type="array">
+                <item name="csp" xsi:type="object">Magento\Csp\Api\InlineUtilInterface\Proxy</item>
+                <item name="secureRenderer" xsi:type="object">Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy</item>
+            </argument>
+        </arguments>
     </type>
     <type name="Magento\Framework\App\RouterInterface">
         <plugin name="csp_aware_plugin" type="Magento\Csp\Plugin\CspAwareControllerPlugin" />
     </type>
-    <preference for="Magento\Csp\Api\InlineUtilInterface" type="Magento\Csp\Helper\InlineUtil" />
+    <type name="Magento\Framework\View\Helper\SecureHtmlRenderer">
+        <arguments>
+            <argument name="processors" xsi:type="array">
+                <item name="csp" xsi:type="object">Magento\Csp\Helper\InlineUtil\Proxy</item>
+            </argument>
+        </arguments>
+    </type>
+    <type name="Magento\Csp\Observer\Render">
+        <arguments>
+            <argument name="cspRenderer" xsi:type="object">Magento\Csp\Api\CspRendererInterface</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php b/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php
index e67adc47b8884..3db6b592b2e63 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Renderer/RegionTest.php
@@ -5,10 +5,32 @@
  */
 namespace Magento\Customer\Test\Unit\Model\Renderer;
 
+use Magento\Framework\Data\Form\Element\AbstractElement;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use PHPUnit\Framework\MockObject\MockObject;
 
 class RegionTest extends \PHPUnit\Framework\TestCase
 {
+    /**
+     * Simulate "serialize" method of a form element.
+     *
+     * @param string[] $keys
+     * @param array $data
+     * @return string
+     */
+    private function mockSerialize(array $keys, array $data): string
+    {
+        $attributes = [];
+        foreach ($keys as $key) {
+            if (empty($data[$key])) {
+                continue;
+            }
+            $attributes[] = $key .'="' .$data[$key] .'"';
+        }
+
+        return implode(' ', $attributes);
+    }
+
     /**
      * @param array $regionCollection
      * @dataProvider renderDataProvider
@@ -23,13 +45,24 @@ public function testRender($regionCollection)
             ['isRegionRequired']
         );
         $escaperMock = $this->createMock(\Magento\Framework\Escaper::class);
+        /** @var MockObject|AbstractElement $elementMock */
         $elementMock = $this->createPartialMock(
             \Magento\Framework\Data\Form\Element\AbstractElement::class,
-            ['getForm', 'getHtmlAttributes']
+            ['getForm', 'getHtmlAttributes', 'serialize']
+        );
+        $elementMock->method('serialize')->willReturnCallback(
+            function (array $attributes) use ($elementMock): string {
+                return $this->mockSerialize($attributes, $elementMock->getData());
+            }
         );
         $countryMock = $this->createPartialMock(
             \Magento\Framework\Data\Form\Element\AbstractElement::class,
-            ['getValue']
+            ['getValue', 'serialize']
+        );
+        $countryMock->method('serialize')->willReturnCallback(
+            function (array $attributes) use ($countryMock): string {
+                return $this->mockSerialize($attributes, $countryMock->getData());
+            }
         );
         $regionMock = $this->createMock(
             \Magento\Framework\Data\Form\Element\AbstractElement::class
diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
index a1fb2e449d7bf..8a8e06f8194aa 100644
--- a/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
+++ b/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
@@ -11,6 +11,8 @@
  */
 namespace Magento\OfflineShipping\Test\Unit\Block\Adminhtml\Form\Field;
 
+use Magento\Framework\Math\Random;
+
 class ImportTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -29,13 +31,16 @@ protected function setUp()
             \Magento\Framework\Data\Form::class,
             ['getFieldNameSuffix', 'addSuffixToName', 'getHtmlIdPrefix', 'getHtmlIdSuffix']
         );
+        $randomMock = $this->getMockBuilder(Random::class)->disableOriginalConstructor()->getMock();
+        $randomMock->method('getRandomString')->willReturn('123456abcdefg');
         $testData = ['name' => 'test_name', 'html_id' => 'test_html_id'];
         $testHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->_object = $testHelper->getObject(
             \Magento\OfflineShipping\Block\Adminhtml\Form\Field\Import::class,
             [
                 'data' => $testData,
-                '_escaper' => $testHelper->getObject(\Magento\Framework\Escaper::class)
+                '_escaper' => $testHelper->getObject(\Magento\Framework\Escaper::class),
+                'random' => $randomMock
             ]
         );
         $this->_object->setForm($this->_formMock);
@@ -78,9 +83,9 @@ public function testGetElementHtml()
             '<input id="time_condition" type="hidden" name="test_name" value="',
             $testString
         );
-        $this->assertStringEndsWith(
+        $this->assertContains(
             '<input id="test_name_prefixtest_html_idtest_name_suffix" ' .
-            'name="test_name"  data-ui-id="form-element-test_name" value="" type="file"/>',
+            'name="test_name"  data-ui-id="form-element-test_name" value="" type="file"',
             $testString
         );
     }
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php
index b9ea53c154014..e4253291cac57 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php
@@ -5,7 +5,12 @@
  */
 namespace Magento\Paypal\Test\Unit\Block\Adminhtml\System\Config\Field\Enable;
 
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+use PHPUnit\Framework\MockObject\MockObject;
 
 /**
  * Class AbstractEnableTest
@@ -26,6 +31,22 @@ class AbstractEnableTest extends \PHPUnit\Framework\TestCase
      */
     protected $elementMock;
 
+    /**
+     * Create mock objects.
+     *
+     * @param string[] $classes
+     * @return MockObject[]
+     */
+    private function createMocks(array $classes): array
+    {
+        $mocks = [];
+        foreach ($classes as $class) {
+            $mocks[] = $this->getMockBuilder($class)->disableOriginalConstructor()->getMock();
+        }
+
+        return $mocks;
+    }
+
     /**
      * Set up
      *
@@ -35,14 +56,24 @@ protected function setUp()
     {
         $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
 
+        $randomMock = $this->getMockBuilder(Random::class)->disableOriginalConstructor()->getMock();
+        $randomMock->method('getRandomString')->willReturn('12345abcdef');
+        $mockArguments = $this->createMocks([
+            \Magento\Framework\Data\Form\Element\Factory::class,
+            CollectionFactory::class,
+            Escaper::class
+        ]);
+        $mockArguments[] = [];
+        $mockArguments[] = $this->createMock(SecureHtmlRenderer::class);
+        $mockArguments[] = $randomMock;
         $this->elementMock = $this->getMockBuilder(\Magento\Framework\Data\Form\Element\AbstractElement::class)
             ->setMethods(
                 [
                     'getHtmlId',
                     'getTooltip',
-                    'getForm',
+                    'getForm'
                 ]
-            )->disableOriginalConstructor()
+            )->setConstructorArgs($mockArguments)
             ->getMockForAbstractClass();
 
         $objectManager = new ObjectManager($this);
diff --git a/app/code/Magento/Ui/Component/Control/Button.php b/app/code/Magento/Ui/Component/Control/Button.php
index 952f1f62fa2d7..7875713059cf7 100644
--- a/app/code/Magento/Ui/Component/Control/Button.php
+++ b/app/code/Magento/Ui/Component/Control/Button.php
@@ -5,14 +5,45 @@
  */
 namespace Magento\Ui\Component\Control;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
 use Magento\Framework\View\Element\Template;
 use Magento\Framework\View\Element\UiComponent\Control\ControlInterface;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+use Magento\Framework\View\Element\Template\Context;
 
 /**
- * Class Button
+ * Widget for standard button.
  */
 class Button extends Template implements ControlInterface
 {
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param Random|null $random
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?Random $random = null,
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct($context, $data);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * Define block template
      *
@@ -80,7 +111,7 @@ public function getAttributesHtml()
     public function getOnClick()
     {
         if ($this->hasData('on_click')) {
-            return $this->getData('on_click');
+            return $this->getData('on_click');//No onclick
         } else {
             $url = $this->hasData('url') ? $this->getData('url') : $this->getUrl();
             if (!empty($url)) {
@@ -91,6 +122,18 @@ public function getOnClick()
         }
     }
 
+    /**
+     * @inheritDoc
+     */
+    protected function _beforeToHtml()
+    {
+        parent::_beforeToHtml();
+
+        $this->setData('ui_button_widget_hook_id', 'buttonId' .$this->random->getRandomString(32));
+
+        return $this;
+    }
+
     /**
      * Prepare attributes
      *
@@ -107,8 +150,6 @@ protected function prepareAttributes($title, $classes, $disabled)
             'title' => $title,
             'type' => $this->getType(),
             'class' => implode(' ', $classes),
-            'onclick' => $this->getOnClick(),
-            'style' => $this->getStyle(),
             'value' => $this->getValue(),
             'disabled' => $disabled,
         ];
@@ -117,6 +158,9 @@ protected function prepareAttributes($title, $classes, $disabled)
                 $attributes['data-' . $key] = is_scalar($attr) ? $attr : json_encode($attr);
             }
         }
+        if ($this->hasData('ui_button_widget_hook_id')) {
+            $attributes['ui-button-widget-hook-id'] = $this->getData('ui_button_widget_hook_id');
+        }
 
         return $attributes;
     }
@@ -139,4 +183,54 @@ protected function attributesToHtml($attributes)
 
         return $html;
     }
+
+    /**
+     * Return HTML to be rendered after the button.
+     *
+     * @return string|null
+     */
+    public function getAfterHtml(): ?string
+    {
+        $afterHtml = $this->getData('after_html');
+        $buttonId = $this->getData('ui_button_widget_hook_id');
+        if ($handler = $this->getOnClick()) {
+            $functionName = 'OnClickHandler' . $this->random->getRandomString(32);
+            $afterHtml .= $this->secureRenderer->renderTag(
+                'script',
+                ['type' => 'text/javascript'],
+                <<<script
+                    function {$functionName} () {
+                            {$handler};
+                    }
+                    let button{$buttonId} = document.querySelector("*[ui-button-widget-hook-id='$buttonId']");
+                    if (button{$buttonId}) {
+                        button{$buttonId}.onclick = function (e) {
+                            {$functionName}.apply(e.target);
+                        };
+                    }
+script
+                ,
+                false
+            );
+        }
+        if ($this->getStyle()) {
+            $selector = "*[ui-button-widget-hook-id='$buttonId']";
+            if ($this->getId()) {
+                $selector = "#{$this->getId()}";
+            }
+            $afterHtml .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                     {$selector} {
+                         {$this->getStyle()}
+                     }
+style
+                ,
+                false
+            );
+        }
+
+        return $afterHtml;
+    }
 }
diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php
index 5c9d09565fc66..615627918e412 100644
--- a/app/code/Magento/Ui/Component/Control/SplitButton.php
+++ b/app/code/Magento/Ui/Component/Control/SplitButton.php
@@ -6,8 +6,13 @@
 
 namespace Magento\Ui\Component\Control;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Element\Template\Context;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
- * Class SplitButton
+ * Widget for standard button with a selection.
  *
  * @method string getTitle
  * @method string getLabel
@@ -22,6 +27,32 @@
  */
 class SplitButton extends Button
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @inheritDoc
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?Random $random = null,
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $htmlRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($context, $data, $random, $htmlRenderer);
+        $this->random = $random;
+        $this->secureRenderer = $htmlRenderer;
+    }
+
     /**
      * @inheritdoc
      */
@@ -54,6 +85,16 @@ public function getAttributesHtml()
         return $this->attributesToHtml(['title' => $title, 'class' => join(' ', $classes)]);
     }
 
+    /**
+     * Get main button's "id" attribute value.
+     *
+     * @return string
+     */
+    private function getButtonId(): string
+    {
+        return $this->getId() .'-button';
+    }
+
     /**
      * Retrieve button attributes html
      *
@@ -77,11 +118,10 @@ public function getButtonAttributesHtml()
         }
 
         $attributes = [
-            'id' => $this->getId() . '-button',
+            'id' => $this->getButtonId(),
             'title' => $title,
             'class' => join(' ', $classes),
             'disabled' => $disabled,
-            'style' => $this->getStyle(),
         ];
 
         if ($idHard = $this->getIdHard()) {
@@ -159,6 +199,22 @@ public function getOptionAttributesHtml($key, $option)
         return $html;
     }
 
+    /**
+     * Set and return "id" attribute value for an option.
+     *
+     * @param array $option
+     * @return string
+     */
+    private function identifyOption(array &$option): string
+    {
+        $id = isset($option['id'])
+            ? $option['id']
+            : (isset($option['id_attribute']) ? $option['id_attribute'] : 'topId' .$this->random->getRandomString(32));
+        $option['id_attribute'] = $id;
+
+        return $this->getId() .'-' .$id;
+    }
+
     /**
      * Prepare option attributes
      *
@@ -172,11 +228,9 @@ public function getOptionAttributesHtml($key, $option)
     protected function prepareOptionAttributes($option, $title, $classes, $disabled)
     {
         $attributes = [
-            'id' => isset($option['id']) ? $this->getId() . '-' . $option['id'] : '',
+            'id' => $this->identifyOption($option),
             'title' => $title,
             'class' => join(' ', $classes),
-            'onclick' => isset($option['onclick']) ? $option['onclick'] : '',
-            'style' => isset($option['style']) ? $option['style'] : '',
             'disabled' => $disabled,
         ];
 
@@ -215,4 +269,53 @@ protected function getDataAttributes($data, &$attributes)
             $attributes['data-' . $key] = is_scalar($attr) ? $attr : json_encode($attr);
         }
     }
+
+    /**
+     * @inheritDoc
+     */
+    protected function _beforeToHtml()
+    {
+        parent::_beforeToHtml();
+
+        /** @var array|null $options */
+        $options = $this->getOptions() ?? [];
+        foreach ($options as &$option) {
+            $this->identifyOption($option);
+        }
+        $this->setOptions($options);
+
+        return $this;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getAfterHtml(): ?string
+    {
+        $afterHtml = parent::getAfterHtml();
+
+        /** @var array|null $options */
+        $options = $this->getOptions() ?? [];
+        foreach ($options as $option) {
+            $id = $this->identifyOption($option);
+            if (!empty($option['onclick'])) {
+                $afterHtml .= $this->secureRenderer->renderEventListenerAsTag('onclick', $option['onclick'], "#$id");
+            }
+            if (!empty($option['style'])) {
+                $afterHtml .= $this->secureRenderer->renderTag(
+                    'style',
+                    [],
+                    <<<style
+                    #$id {
+                        {$option['style']}
+                    }
+style
+                    ,
+                    false
+                );
+            }
+        }
+
+        return $afterHtml;
+    }
 }
diff --git a/app/code/Magento/Ui/Test/Unit/Component/Control/ButtonTest.php b/app/code/Magento/Ui/Test/Unit/Component/Control/ButtonTest.php
index 97c77c158c147..9f46cb4bb5b86 100644
--- a/app/code/Magento/Ui/Test/Unit/Component/Control/ButtonTest.php
+++ b/app/code/Magento/Ui/Test/Unit/Component/Control/ButtonTest.php
@@ -11,7 +11,7 @@
 use Magento\Ui\Component\Control\Button;
 
 /**
- * Class ButtonTest
+ * Test for the Button widget.
  */
 class ButtonTest extends \PHPUnit\Framework\TestCase
 {
@@ -58,7 +58,7 @@ public function testGetType()
     public function testGetAttributesHtml()
     {
         $expected = 'type="button" class="action- scalable classValue disabled" '
-            . 'onclick="location.href = 'url2';" disabled="disabled" data-attributeKey="attributeValue" ';
+            . 'disabled="disabled" data-attributeKey="attributeValue" ';
         $this->button->setDisabled(true);
         $this->button->setData('url', 'url2');
         $this->button->setData('class', 'classValue');
diff --git a/app/code/Magento/Ui/view/base/templates/control/button/split.phtml b/app/code/Magento/Ui/view/base/templates/control/button/split.phtml
index 08230184d5a4d..ce7112c400509 100644
--- a/app/code/Magento/Ui/view/base/templates/control/button/split.phtml
+++ b/app/code/Magento/Ui/view/base/templates/control/button/split.phtml
@@ -11,19 +11,19 @@
     <button <?= $block->getButtonAttributesHtml() ?>>
         <span><?= $block->escapeHtml($block->getLabel()) ?></span>
     </button>
-    <?php if ($block->hasSplit()) : ?>
+    <?php if ($block->hasSplit()): ?>
         <button <?= $block->getToggleAttributesHtml() ?>>
             <span><?= $block->escapeHtml(__('Select')) ?></span>
         </button>
 
-        <?php if (!$block->getDisabled()) : ?>
+        <?php if (!$block->getDisabled()): ?>
             <ul class="dropdown-menu" <?= /* @noEscape */ $block->getUiId("dropdown-menu") ?>>
-                <?php foreach ($block->getOptions() as $key => $option) : ?>
+                <?php foreach ($block->getOptions() as $key => $option): ?>
                 <li>
                     <span <?= $block->getOptionAttributesHtml($key, $option) ?>>
                         <?= $block->escapeHtml($option['label']) ?>
                     </span>
-                    <?php if (isset($option['hint'])) : ?>
+                    <?php if (isset($option['hint'])): ?>
                     <div class="tooltip" <?= /* @noEscape */ $block->getUiId('item', $key, 'tooltip') ?>>
                         <a href="<?= $block->escapeUrl($option['hint']['href']) ?>" class="help">
                             <?= $block->escapeHtml($option['hint']['label']) ?>
@@ -36,6 +36,7 @@
         <?php endif; ?>
     <?php endif; ?>
 </div>
+<?= /* @noEscape */$block->getAfterHtml() ?>
 <script type="text/x-magento-init">
     {
         ".actions-split": {
diff --git a/app/etc/di.xml b/app/etc/di.xml
index d38138ce29965..3ec48b82e921b 100644
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -1825,4 +1825,11 @@
             </argument>
         </arguments>
     </type>
+    <type name="Magento\Framework\View\TemplateEngine\Php">
+        <arguments>
+            <argument name="blockVariables" xsi:type="array">
+                <item name="secureRenderer" xsi:type="object">Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy</item>
+            </argument>
+        </arguments>
+    </type>
 </config>
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php
index f460cd91167de..3da4eef9e08f1 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php
@@ -84,14 +84,14 @@ class Create extends Block
      *
      * @var string
      */
-    protected $updateItems = '[onclick="order.itemsUpdate()"]';
+    protected $updateItems = '[title="Update Items and Quantities"]';
 
     /**
      * 'Add Selected Product(s) to Order' button.
      *
      * @var string
      */
-    protected $addSelectedProducts = 'button[onclick="order.productGridAddSelected()"]';
+    protected $addSelectedProducts = 'button[title="Add Selected Product(s) to Order"]';
 
     /**
      * Sales order create account information block.
diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Coupons.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Coupons.php
index dd04f7d32968b..5d9872141fc0f 100644
--- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Coupons.php
+++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/Coupons.php
@@ -28,7 +28,7 @@ class Coupons extends Form
      *
      * @var string
      */
-    protected $applyButton = './/*[@id="coupons:code"]/following-sibling::button[contains(@onclick,"coupons:code")]';
+    protected $applyButton = './/*[@id="coupons:code"]/following-sibling::button[contains(@title,"Apply")]';
 
     /**
      * Selector for template block.
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/Controller/Secure/Helper.php b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/Controller/Secure/Helper.php
new file mode 100644
index 0000000000000..4657f10374514
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/Controller/Secure/Helper.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\TestModuleSecureHtmlRenderer\Controller\Secure;
+
+use Magento\Framework\App\Action\Action;
+use Magento\Framework\Controller\ResultFactory;
+
+/**
+ * .phtml template utilizing secure-html helper.
+ */
+class Helper extends Action
+{
+    /**
+     * @inheritDoc
+     */
+    public function execute()
+    {
+        return $this->resultFactory->create(ResultFactory::TYPE_PAGE);
+    }
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/composer.json b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/composer.json
new file mode 100644
index 0000000000000..316d3c8428d08
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/composer.json
@@ -0,0 +1,21 @@
+{
+  "name": "magento/module-secure-html-renderer",
+  "description": "test secure html renderer module",
+  "config": {
+    "sort-packages": true
+  },
+  "require": {
+    "php": "~7.1.3||~7.2.0||~7.3.0",
+    "magento/framework": "*",
+    "magento/module-integration": "*"
+  },
+  "type": "magento2-module",
+  "extra": {
+    "map": [
+      [
+        "*",
+        "Magento/TestModuleSecureHtmlRenderer"
+      ]
+    ]
+  }
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/frontend/routes.xml b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/frontend/routes.xml
new file mode 100644
index 0000000000000..8cfe6080149b8
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/frontend/routes.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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:framework:App/etc/routes.xsd">
+    <router id="standard">
+        <route id="securehtml" frontName="securehtml">
+            <module name="Magento_TestModuleSecureHtmlRenderer" />
+        </route>
+    </router>
+</config>
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/module.xml b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/module.xml
new file mode 100644
index 0000000000000..653ce176d4e0e
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/etc/module.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * 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:framework:Module/etc/module.xsd">
+    <module name="Magento_TestModuleSecureHtmlRenderer" active="true" />
+</config>
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/registration.php b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/registration.php
new file mode 100644
index 0000000000000..4fff392257f8a
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/registration.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+use Magento\Framework\Component\ComponentRegistrar;
+
+$registrar = new ComponentRegistrar();
+if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleSecureHtmlRenderer') === null) {
+    ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleSecureHtmlRenderer', __DIR__);
+}
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/layout/securehtml_secure_helper.xml b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/layout/securehtml_secure_helper.xml
new file mode 100644
index 0000000000000..0ea70a15a3299
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/layout/securehtml_secure_helper.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+-->
+<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
+    <body>
+        <referenceContainer name="content">
+            <block class="Magento\Framework\View\Element\Template"
+                   name="secure_helper"
+                   cacheable="false"
+                   template="Magento_TestModuleSecureHtmlRenderer::helper.phtml" />
+        </referenceContainer>
+    </body>
+</page>
diff --git a/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/templates/helper.phtml b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/templates/helper.phtml
new file mode 100644
index 0000000000000..a7a5eb9555cc3
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleSecureHtmlRenderer/view/frontend/templates/helper.phtml
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
+<h1 <?= /* @noEscape */$secureRenderer->renderEventListener('onclick', 'alert()') ?>>Hello there!</h1>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', ['src' => 'http://my.magento.com/static/script.js'], false); ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], "\n    let myVar = 1;\n", false) ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('div', [], 'I am just <a> text', true) ?>
+
diff --git a/dev/tests/integration/etc/di/preferences/ce.php b/dev/tests/integration/etc/di/preferences/ce.php
index 2770283637dc7..bb55f123aa251 100644
--- a/dev/tests/integration/etc/di/preferences/ce.php
+++ b/dev/tests/integration/etc/di/preferences/ce.php
@@ -30,11 +30,5 @@
     \Magento\Framework\Lock\Backend\Cache::class =>
         \Magento\TestFramework\Lock\Backend\DummyLocker::class,
     \Magento\Framework\Session\SessionStartChecker::class => \Magento\TestFramework\Session\SessionStartChecker::class,
-    \Magento\Framework\HTTP\AsyncClientInterface::class => \Magento\TestFramework\HTTP\AsyncClientInterfaceMock::class,
-    \Magento\Catalog\Model\Category\Attribute\LayoutUpdateManager::class =>
-        \Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager::class,
-    \Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager::class =>
-        \Magento\TestFramework\Catalog\Model\ProductLayoutUpdateManager::class,
-    \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
-        \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+    \Magento\Framework\HTTP\AsyncClientInterface::class => \Magento\TestFramework\HTTP\AsyncClientInterfaceMock::class
 ];
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
new file mode 100644
index 0000000000000..911ce8d0e25c2
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Backend\Block\Widget\Button;
+
+use Magento\Framework\View\LayoutInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Testing SplitButton widget
+ *
+ * @magentoAppArea adminhtml
+ */
+class SplitButtonTest extends TestCase
+{
+
+    /**
+     * @var LayoutInterface
+     */
+    private $layout;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+        $this->layout = $objectManager->get(LayoutInterface::class);
+    }
+
+    /**
+     * Create the block.
+     *
+     * @return SplitButton
+     */
+    private function createBlock(): SplitButton
+    {
+        /** @var SplitButton $block */
+        $block = $this->layout->createBlock(SplitButton::class, 'button_block');
+        $block->setLayout($this->layout);
+
+        return $block;
+    }
+
+    /**
+     * Test resulting button HTML.
+     *
+     * @return void
+     */
+    public function testToHtml(): void
+    {
+        $block = $this->createBlock();
+        $block->addData(
+            [
+                'title' => 'A button',
+                'label' => 'A button',
+                'has_split' => true,
+                'button_class' => 'aclass',
+                'id' => 'split-button',
+                'disabled' => false,
+                'class' => 'aclass',
+                'data_attribute' => ['bind' => ['var' => 'val']],
+                'options' => [
+                    [
+                        'disabled' => false,
+                        'title' => 'An option',
+                        'label' => 'An option',
+                        'onclick' => $onclick = 'console.log("option")',
+                        'style' => $style = 'width: 100px'
+                    ]
+                ]
+            ]
+        );
+
+        $html = $block->toHtml();
+        $this->assertContains('<button ', $html);
+        $this->assertContains('<span>A button</span>', $html);
+        $this->assertNotContains('onclick=', $html);
+        $this->assertNotContains('style=', $html);
+        $this->assertRegExp('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
+        $this->assertRegExp('/\<style.*?\>.*?' . preg_quote($style) . '.*?\<\/style\>/ims', $html);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
new file mode 100644
index 0000000000000..d627672fefd96
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Backend\Block\Widget;
+
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+use Magento\Framework\View\LayoutInterface;
+
+/**
+ * Test for the button widget.
+ *
+ * @magentoAppArea adminhtml
+ */
+class ButtonTest extends TestCase
+{
+    /**
+     * @var LayoutInterface
+     */
+    private $layout;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+        $this->layout = $objectManager->get(LayoutInterface::class);
+    }
+
+    /**
+     * Create the block.
+     *
+     * @return Button
+     */
+    private function createBlock(): Button
+    {
+        /** @var Button $block */
+        $block = $this->layout->createBlock(Button::class, 'button_block');
+        $block->setLayout($this->layout);
+
+        return $block;
+    }
+
+    /**
+     * Test resulting button HTML.
+     *
+     * @return void
+     */
+    public function testToHtml(): void
+    {
+        $block = $this->createBlock();
+        $block->addData(
+            [
+                'type' => 'button',
+                'onclick' => 'console.log("Button pressed!")',
+                'disabled' => false,
+                'title' => 'A button',
+                'label' => 'A button',
+                'class' => 'button',
+                'id' => 'button',
+                'element_name' => 'some-name',
+                'value' => 'Press a button',
+                'data-style' => 'width: 100px',
+                'style' => 'height: 200px'
+            ]
+        );
+
+        $html = $block->toHtml();
+        $this->assertContains('<button ', $html);
+        $this->assertContains('<span>A button</span>', $html);
+        $this->assertNotContains('onclick=', $html);
+        $this->assertNotContains('style=', $html);
+        $this->assertRegExp('/\<script.*?\>.*?' .preg_quote($block->getOnClick()) .'.*?\<\/script\>/ims', $html);
+        $this->assertRegExp('/\<style.*?\>.*?' .preg_quote($block->getStyle()) .'.*?\<\/style\>/ims', $html);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php
index b51edec1bcea3..14f6533c4107d 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/WidgetTest.php
@@ -27,7 +27,8 @@ public function testGetButtonHtml()
         $widget = $layout->createBlock(\Magento\Backend\Block\Widget::class);
 
         $this->assertRegExp(
-            '/<button.*onclick\=\"this.form.submit\(\)\".*\>[\s\S]*Button Label[\s\S]*<\/button>/iu',
+            '/\<button.*\>[\s\S]*Button Label[\s\S]*<\/button>'
+                . '.*?\<script.*?\>.*?this\.form\.submit\(\).*?\<\/script\>/is',
             $widget->getButtonHtml('Button Label', 'this.form.submit()')
         );
     }
@@ -49,12 +50,14 @@ public function testGetButtonHtmlForTwoButtonsInOneBlock()
         $widget = $layout->createBlock(\Magento\Backend\Block\Widget::class);
 
         $this->assertRegExp(
-            '/<button.*onclick\=\"this.form.submit\(\)\".*\>[\s\S]*Button Label[\s\S]*<\/button>/iu',
+            '/<button.*\>[\s\S]*Button Label[\s\S]*<\/button>'
+                . '.*?\<script.*?\>.*?this\.form\.submit\(\).*?\<\/script\>/ius',
             $widget->getButtonHtml('Button Label', 'this.form.submit()')
         );
 
         $this->assertRegExp(
-            '/<button.*onclick\=\"this.form.submit\(\)\".*\>[\s\S]*Button Label2[\s\S]*<\/button>/iu',
+            '/<button.*\>[\s\S]*Button Label2[\s\S]*<\/button>'
+                . '.*?\<script.*?\>.*?this\.form\.submit\(\).*?\<\/script\>/ius',
             $widget->getButtonHtml('Button Label2', 'this.form.submit()')
         );
     }
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
index 7e147156eec34..e5fb645cfb018 100644
--- a/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
+++ b/dev/tests/integration/testsuite/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/GridTest.php
@@ -27,7 +27,7 @@ public function testToHtmlHasOnClick()
 
         $html = $block->toHtml();
 
-        $regexpTemplate = '/<button [^>]* onclick="temp_id[^"]*\\.%s/i';
+        $regexpTemplate = '/\<script.*?\>.*?temp_id[^"]*\\.%s/is';
         $jsFuncs = ['doFilter', 'resetFilter'];
         foreach ($jsFuncs as $func) {
             $regexp = sprintf($regexpTemplate, $func);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php
index e89e5aae92cf5..d1fceb3f511cd 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php
@@ -67,6 +67,12 @@ class CategoryTest extends AbstractBackendController
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Category\Attribute\LayoutUpdateManager::class
+                => \Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager::class
+            ]
+        ]);
         parent::setUp();
 
         /** @var ProductResource $productResource */
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php
index 7ca04863f58a1..dd7c84f42ec57 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/ProductTest.php
@@ -49,6 +49,12 @@ class ProductTest extends \Magento\TestFramework\TestCase\AbstractBackendControl
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager::class =>
+                    \Magento\TestFramework\Catalog\Model\ProductLayoutUpdateManager::class
+            ]
+        ]);
         parent::setUp();
 
         $this->aclBuilder = Bootstrap::getObjectManager()->get(Builder::class);
@@ -412,6 +418,7 @@ private function getProductData(array $tierPrice)
         $repo = $this->repositoryFactory->create();
         $product = $repo->get('tier_prices')->getData();
         $product['tier_price'] = $tierPrice;
+        $product['entity_id'] = null;
         unset($product['entity_id']);
         return $product;
     }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php
index c18a867a9b76e..fd1006909543e 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php
@@ -53,6 +53,12 @@ protected function setUp()
         parent::setUp();
 
         $this->objectManager = Bootstrap::getObjectManager();
+        $this->objectManager->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Category\Attribute\LayoutUpdateManager::class
+                => \Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager::class
+            ]
+        ]);
         $this->registry = $this->objectManager->get(Registry::class);
         $this->layout = $this->objectManager->get(LayoutInterface::class);
         $this->session = $this->objectManager->get(Session::class);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php
index 20805271f6b5b..28c6d5cba7ce8 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/ProductTest.php
@@ -43,6 +43,12 @@ protected function setUp()
         if (defined('HHVM_VERSION')) {
             $this->markTestSkipped('Randomly fails due to known HHVM bug (DOMText mixed with DOMElement)');
         }
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager::class =>
+                    \Magento\TestFramework\Catalog\Model\ProductLayoutUpdateManager::class
+            ]
+        ]);
         parent::setUp();
 
         $this->registry = $this->_objectManager->get(Registry::class);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Attribute/Backend/AbstractLayoutUpdateTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Attribute/Backend/AbstractLayoutUpdateTest.php
index 40725d3ee58be..6770072e8a2d4 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Attribute/Backend/AbstractLayoutUpdateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Attribute/Backend/AbstractLayoutUpdateTest.php
@@ -55,6 +55,12 @@ private function recreateCategory(): void
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Category\Attribute\LayoutUpdateManager::class
+                => \Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager::class
+            ]
+        ]);
         $this->categoryFactory = Bootstrap::getObjectManager()->get(CategoryFactory::class);
         $this->recreateCategory();
         $this->attribute = $this->category->getAttributes()['custom_layout_update_file']->getBackend();
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/DataProviderTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/DataProviderTest.php
index 6d66055cd1548..3556942f63514 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/DataProviderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Category/DataProviderTest.php
@@ -62,8 +62,14 @@ private function createDataProvider(): DataProvider
      */
     protected function setUp()
     {
-        parent::setUp();
         $objectManager = Bootstrap::getObjectManager();
+        $objectManager->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Category\Attribute\LayoutUpdateManager::class
+                => \Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager::class
+            ]
+        ]);
+        parent::setUp();
         $this->dataProvider = $this->createDataProvider();
         $this->registry = $objectManager->get(Registry::class);
         $this->categoryFactory = $objectManager->get(CategoryFactory::class);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php
index c4cabe46f5b32..95c171ba321aa 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryRepositoryTest.php
@@ -53,6 +53,12 @@ class CategoryRepositoryTest extends TestCase
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Category\Attribute\LayoutUpdateManager::class
+                => \Magento\TestFramework\Catalog\Model\CategoryLayoutUpdateManager::class
+            ]
+        ]);
         $this->repositoryFactory = Bootstrap::getObjectManager()->get(CategoryRepositoryInterfaceFactory::class);
         $this->layoutManager = Bootstrap::getObjectManager()->get(CategoryLayoutUpdateManager::class);
         $this->productCollectionFactory = Bootstrap::getObjectManager()->get(CollectionFactory::class);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductRepositoryTest.php
index fb07d08faca58..d9c4a20f4a78e 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductRepositoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductRepositoryTest.php
@@ -58,6 +58,12 @@ class ProductRepositoryTest extends \PHPUnit\Framework\TestCase
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager::class =>
+                    \Magento\TestFramework\Catalog\Model\ProductLayoutUpdateManager::class
+            ]
+        ]);
         $this->productRepository = Bootstrap::getObjectManager()->create(ProductRepositoryInterface::class);
         $this->searchCriteriaBuilder = Bootstrap::getObjectManager()->get(SearchCriteriaBuilder::class);
         $this->productFactory = Bootstrap::getObjectManager()->get(ProductFactory::class);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdateTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdateTest.php
index ebfbd06d7edad..eabc3f8e8591a 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdateTest.php
@@ -58,6 +58,12 @@ class LayoutUpdateTest extends TestCase
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager::class =>
+                    \Magento\TestFramework\Catalog\Model\ProductLayoutUpdateManager::class
+            ]
+        ]);
         $this->locator = $this->getMockForAbstractClass(LocatorInterface::class);
         $store = Bootstrap::getObjectManager()->create(StoreInterface::class);
         $this->locator->method('getStore')->willReturn($store);
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/PageDesignTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/PageDesignTest.php
index 8bc7a89280559..9008464215a32 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/PageDesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/Adminhtml/PageDesignTest.php
@@ -66,6 +66,12 @@ class PageDesignTest extends AbstractBackendController
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
+                    \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+            ]
+        ]);
         parent::setUp();
 
         $this->aclBuilder = Bootstrap::getObjectManager()->get(Builder::class);
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php
index d80644caca086..4fb8685c491cc 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php
@@ -15,6 +15,20 @@
 
 class PageTest extends \Magento\TestFramework\TestCase\AbstractController
 {
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
+                    \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+            ]
+        ]);
+        parent::setUp();
+    }
+
     public function testViewAction()
     {
         $this->dispatch('/enable-cookies');
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Page/CustomLayoutRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Page/CustomLayoutRepositoryTest.php
index e3422cd81638b..8a500c97d0cd9 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Model/Page/CustomLayoutRepositoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Page/CustomLayoutRepositoryTest.php
@@ -21,6 +21,8 @@
 
 /**
  * Test the repository.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class CustomLayoutRepositoryTest extends TestCase
 {
@@ -50,6 +52,12 @@ class CustomLayoutRepositoryTest extends TestCase
     protected function setUp()
     {
         $objectManager = Bootstrap::getObjectManager();
+        $objectManager->configure([
+            'preferences' => [
+                \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
+                    \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+            ]
+        ]);
         $this->fakeManager = $objectManager->get(CustomLayoutManager::class);
         $this->repo = $objectManager->create(CustomLayoutRepositoryInterface::class, ['manager' => $this->fakeManager]);
         $this->pageFactory = $objectManager->get(PageFactory::class);
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Page/DataProviderTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Page/DataProviderTest.php
index 2028f5d8a04b6..e66d10eaa35a1 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Model/Page/DataProviderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Page/DataProviderTest.php
@@ -48,6 +48,12 @@ class DataProviderTest extends TestCase
     protected function setUp()
     {
         $objectManager = Bootstrap::getObjectManager();
+        $objectManager->configure([
+            'preferences' => [
+                \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
+                    \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+            ]
+        ]);
         $this->repo = $objectManager->get(GetPageByIdentifierInterface::class);
         $this->filesFaker = $objectManager->get(CustomLayoutManager::class);
         $this->request = $objectManager->get(HttpRequest::class);
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/PageRepositoryTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/PageRepositoryTest.php
index 5e7e0c962fcde..d9787c2ea49d6 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Model/PageRepositoryTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Model/PageRepositoryTest.php
@@ -34,6 +34,12 @@ class PageRepositoryTest extends TestCase
      */
     protected function setUp()
     {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
+                    \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+            ]
+        ]);
         $this->repo = Bootstrap::getObjectManager()->get(PageRepositoryInterface::class);
         $this->retriever = Bootstrap::getObjectManager()->get(GetPageByIdentifierInterface::class);
     }
diff --git a/dev/tests/integration/testsuite/Magento/Cms/_files/pages_with_layout_xml.php b/dev/tests/integration/testsuite/Magento/Cms/_files/pages_with_layout_xml.php
index 9734ed3abaeed..8092be3c426a9 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/_files/pages_with_layout_xml.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/_files/pages_with_layout_xml.php
@@ -12,6 +12,12 @@
 use Magento\TestFramework\Helper\Bootstrap;
 
 $objectManager = Bootstrap::getObjectManager();
+$objectManager->configure([
+    'preferences' => [
+        \Magento\Cms\Model\Page\CustomLayoutManagerInterface::class =>
+            \Magento\TestFramework\Cms\Model\CustomLayoutManager::class
+    ]
+]);
 $pageFactory = $objectManager->get(PageModelFactory::class);
 /** @var CustomLayoutManager $fakeManager */
 $fakeManager = $objectManager->get(CustomLayoutManager::class);
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
index 362fb412eae12..9b584ba7028ee 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
@@ -28,7 +28,10 @@ public function testPhtmlHelper(): void
         $this->dispatch('csputil/csp/helper');
         $content = $this->getResponse()->getContent();
 
-        $this->assertContains('<script src="http://my.magento.com/static/script.js" />', $content);
+        $this->assertContains(
+            '<script src="http://my.magento.com/static/script.js"/>',
+            $content
+        );
         $this->assertContains("<script>\n    let myVar = 1;\n</script>", $content);
         $header = $this->getResponse()->getHeader('Content-Security-Policy');
         $this->assertNotEmpty($header);
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
index 9dc08ca0337bb..e1b666bc351e6 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
@@ -9,7 +9,9 @@
 
 use Magento\Csp\Api\Data\PolicyInterface;
 use Magento\Csp\Model\Collector\DynamicCollector;
+use Magento\Csp\Model\Collector\DynamicCollectorMock;
 use Magento\Csp\Model\Policy\FetchPolicy;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\TestFramework\Helper\Bootstrap;
 use PHPUnit\Framework\TestCase;
 
@@ -24,24 +26,39 @@ class InlineUtilTest extends TestCase
     private $util;
 
     /**
-     * @var PolicyInterface[]
+     * @var SecureHtmlRenderer
      */
-    private $policiesAdded = [];
+    private $secureHtmlRenderer;
+
+    /**
+     * @var DynamicCollectorMock
+     */
+    private $dynamicCollector;
 
     /**
      * @inheritDoc
      */
     public function setUp()
     {
-        $this->policiesAdded = [];
-        $collectorMock = $this->getMockBuilder(DynamicCollector::class)->disableOriginalConstructor()->getMock();
-        $collectorMock->method('add')
-            ->willReturnCallback(
-                function (PolicyInterface $policy) {
-                    $this->policiesAdded[] = $policy;
-                }
-            );
-        $this->util = Bootstrap::getObjectManager()->create(InlineUtil::class, ['dynamicCollector' => $collectorMock]);
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                DynamicCollector::class => DynamicCollectorMock::class
+            ]
+        ]);
+        $this->util = Bootstrap::getObjectManager()->get(InlineUtil::class);
+        $this->secureHtmlRenderer = Bootstrap::getObjectManager()->get(SecureHtmlRenderer::class);
+        $this->dynamicCollector = Bootstrap::getObjectManager()->get(DynamicCollector::class);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    protected function tearDown()
+    {
+        $this->util = null;
+        $this->secureHtmlRenderer = null;
+        $this->dynamicCollector->consumeAdded();
+        $this->dynamicCollector = null;
     }
 
     /**
@@ -63,7 +80,7 @@ public function testRenderTag(
         array $policiesExpected
     ): void {
         $this->assertEquals($result, $this->util->renderTag($tagName, $attributes, $content));
-        $this->assertEquals($policiesExpected, $this->policiesAdded);
+        $this->assertEquals($policiesExpected, $this->dynamicCollector->consumeAdded());
     }
 
     /**
@@ -79,14 +96,14 @@ public function getTags(): array
                 'script',
                 ['src' => 'http://magento.com/static/some-script.js'],
                 null,
-                '<script src="http://magento.com/static/some-script.js" />',
+                '<script src="http://magento.com/static/some-script.js"/>',
                 [new FetchPolicy('script-src', false, ['http://magento.com'])]
             ],
             'inline-script' => [
                 'script',
                 ['type' => 'text/javascript'],
                 "\n    let someVar = 25;\n    document.getElementById('test').innerText = someVar;\n",
-                "<script type=\"text/javascript\">\n    let someVar = 25;"
+                "<script type=\"text/javascript\">\n    let someVar = 25;"
                     ."\n    document.getElementById('test').innerText = someVar;\n</script>",
                 [
                     new FetchPolicy(
@@ -106,7 +123,8 @@ public function getTags(): array
                 'link',
                 ['rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'http://magento.com/static/style.css'],
                 null,
-                '<link rel="stylesheet" type="text/css" href="http://magento.com/static/style.css" />',
+                '<link rel="stylesheet" type="text/css"'
+                    . ' href="http://magento.com/static/style.css"/>',
                 [new FetchPolicy('style-src', false, ['http://magento.com'])]
             ],
             'inline-style' => [
@@ -132,7 +150,7 @@ public function getTags(): array
                 'img',
                 ['src' => 'http://magento.com/static/my.jpg'],
                 null,
-                '<img src="http://magento.com/static/my.jpg" />',
+                '<img src="http://magento.com/static/my.jpg"/>',
                 [new FetchPolicy('img-src', false, ['http://magento.com'])]
             ],
             'remote-font' => [
@@ -145,7 +163,7 @@ public function getTags(): array
                     ."\n             url(static/font.ttf),"
                     ."\n             url(https://devdocs.magento.com/static/another-font.woff),"
                     ."\n             url(http://devdocs.magento.com/static/font.woff);\n    }\n",
-                "<style type=\"text/css\">"
+                "<style type=\"text/css\">"
                     ."\n    @font-face {\n        font-family: \"MyCustomFont\";"
                     ."\n        src: url(\"http://magento.com/static/font.ttf\");\n    }\n"
                     ."    @font-face {\n        font-family: \"MyCustomFont2\";"
@@ -182,7 +200,7 @@ public function getTags(): array
                 'form',
                 ['action' => 'https://magento.com/submit', 'method' => 'post'],
                 "\n    <input type=\"text\" name=\"test\" /><input type=\"submit\" value=\"Submit\" />\n",
-                "<form action=\"https://magento.com/submit\" method=\"post\">"
+                "<form action=\"https://magento.com/submit\" method=\"post\">"
                     ."\n    <input type=\"text\" name=\"test\" /><input type=\"submit\" value=\"Submit\" />\n"
                     ."</form>",
                 [new FetchPolicy('form-action', false, ['https://magento.com'])]
@@ -191,56 +209,57 @@ public function getTags(): array
                 'iframe',
                 ['src' => 'http://magento.com/some-page'],
                 null,
-                '<iframe src="http://magento.com/some-page" />',
+                '<iframe src="http://magento.com/some-page"/>',
                 [new FetchPolicy('frame-src', false, ['http://magento.com'])]
             ],
             'remote-track' => [
                 'track',
                 ['src' => 'http://magento.com/static/track.vtt', 'kind' => 'subtitles'],
                 null,
-                '<track src="http://magento.com/static/track.vtt" kind="subtitles" />',
+                '<track src="http://magento.com/static/track.vtt" kind="subtitles"/>',
                 [new FetchPolicy('media-src', false, ['http://magento.com'])]
             ],
             'remote-source' => [
                 'source',
                 ['src' => 'http://magento.com/static/track.ogg', 'type' => 'audio/ogg'],
                 null,
-                '<source src="http://magento.com/static/track.ogg" type="audio/ogg" />',
+                '<source src="http://magento.com/static/track.ogg" type="audio/ogg"/>',
                 [new FetchPolicy('media-src', false, ['http://magento.com'])]
             ],
             'remote-video' => [
                 'video',
                 ['src' => 'https://magento.com/static/video.mp4'],
                 null,
-                '<video src="https://magento.com/static/video.mp4" />',
+                '<video src="https://magento.com/static/video.mp4"/>',
                 [new FetchPolicy('media-src', false, ['https://magento.com'])]
             ],
             'remote-audio' => [
                 'audio',
                 ['src' => 'https://magento.com/static/audio.mp3'],
                 null,
-                '<audio src="https://magento.com/static/audio.mp3" />',
+                '<audio src="https://magento.com/static/audio.mp3"/>',
                 [new FetchPolicy('media-src', false, ['https://magento.com'])]
             ],
             'remote-object' => [
                 'object',
                 ['data' => 'http://magento.com/static/flash.swf'],
                 null,
-                '<object data="http://magento.com/static/flash.swf" />',
+                '<object data="http://magento.com/static/flash.swf"/>',
                 [new FetchPolicy('object-src', false, ['http://magento.com'])]
             ],
             'remote-embed' => [
                 'embed',
                 ['src' => 'http://magento.com/static/flash.swf'],
                 null,
-                '<embed src="http://magento.com/static/flash.swf" />',
+                '<embed src="http://magento.com/static/flash.swf"/>',
                 [new FetchPolicy('object-src', false, ['http://magento.com'])]
             ],
             'remote-applet' => [
                 'applet',
                 ['code' => 'SomeApplet.class', 'archive' => 'https://magento.com/applet/my-applet.jar'],
                 null,
-                '<applet code="SomeApplet.class" archive="https://magento.com/applet/my-applet.jar" />',
+                '<applet code="SomeApplet.class" '
+                    . 'archive="https://magento.com/applet/my-applet.jar"/>',
                 [new FetchPolicy('object-src', false, ['https://magento.com'])]
             ]
         ];
@@ -254,7 +273,36 @@ public function getTags(): array
     public function testRenderEventListener(): void
     {
         $result = $this->util->renderEventListener('onclick', 'alert()');
-        $this->assertEquals('onclick="alert()"', $result);
-        $this->assertEquals([new FetchPolicy('script-src', false, [], [], false, true)], $this->policiesAdded);
+        $this->assertEquals('onclick="alert()"', $result);
+        $this->assertEquals(
+            [new FetchPolicy('script-src', false, [], [], false, true)],
+            $this->dynamicCollector->consumeAdded()
+        );
+    }
+
+    /**
+     * Check that CSP logic was added to SecureHtmlRenderer
+     *
+     * @return void
+     */
+    public function testSecureHtmlRenderer(): void
+    {
+        $scriptTag = $this->secureHtmlRenderer->renderTag(
+            'script',
+            ['src' => 'https://test.magento.com/static/script.js']
+        );
+        $eventListener = $this->secureHtmlRenderer->renderEventListener('onclick', 'alert()');
+
+        $this->assertEquals(
+            '<script src="https://test.magento.com/static/script.js"/>',
+            $scriptTag
+        );
+        $this->assertEquals(
+            'onclick="alert()"',
+            $eventListener
+        );
+        $policies = $this->dynamicCollector->consumeAdded();
+        $this->assertTrue(in_array(new FetchPolicy('script-src', false, ['https://test.magento.com']), $policies));
+        $this->assertTrue(in_array(new FetchPolicy('script-src', false, [], [], false, true), $policies));
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/DynamicCollectorMock.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/DynamicCollectorMock.php
new file mode 100644
index 0000000000000..744df4c92018b
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/DynamicCollectorMock.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Model\Collector;
+
+use Magento\Csp\Api\Data\PolicyInterface;
+
+/**
+ * Helps with testing CSP policies.
+ */
+class DynamicCollectorMock extends DynamicCollector
+{
+    /**
+     * @var PolicyInterface[]
+     */
+    private $added = [];
+
+    /**
+     * @inheritDoc
+     */
+    public function add(PolicyInterface $policy): void
+    {
+        $this->added[] = $policy;
+
+        parent::add($policy);
+    }
+
+    /**
+     * Collect added policies and start a new cycle.
+     *
+     * @return PolicyInterface[]
+     */
+    public function consumeAdded(): array
+    {
+        $policies = $this->added;
+        $this->added = [];
+
+        return $policies;
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php
index a67665c6d3c48..2e02c78f2fb04 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Policy/Renderer/SimplePolicyHeaderRendererTest.php
@@ -99,7 +99,7 @@ public function testRenderReportMode(): void
             ['https://magento.com'],
             ['https'],
             true,
-            true,
+            false,
             true,
             ['5749837589457695'],
             ['B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=' => 'sha256'],
@@ -112,13 +112,48 @@ public function testRenderReportMode(): void
         $this->assertNotEmpty($header = $this->response->getHeader('Content-Security-Policy-Report-Only'));
         $this->assertEmpty($this->response->getHeader('Content-Security-Policy'));
         $this->assertEquals(
-            'default-src https://magento.com https: \'self\' \'unsafe-inline\' \'unsafe-eval\' \'strict-dynamic\''
+            'default-src https://magento.com https: \'self\' \'unsafe-eval\' \'strict-dynamic\''
             . ' \'unsafe-hashes\' \'nonce-'.base64_encode($policy->getNonceValues()[0]).'\''
             . ' \'sha256-B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=\';',
             $header->getFieldValue()
         );
     }
 
+    /**
+     * Test rendering a fetch policy with inline allowed.
+     *
+     * @magentoAppArea frontend
+     * @magentoConfigFixture default_store csp/mode/storefront/report_only 1
+     * @magentoConfigFixture default_store csp/mode/storefront/report_uri 0
+     *
+     * @return void
+     */
+    public function testFetchPolicyInlineAllowed(): void
+    {
+        $policy = new FetchPolicy(
+            'script-src',
+            false,
+            ['https://magento.com'],
+            ['https'],
+            true,
+            true,
+            true,
+            ['5749837589457695'],
+            ['B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=' => 'sha256'],
+            false,
+            false
+        );
+
+        $this->renderer->render($policy, $this->response);
+
+        $this->assertNotEmpty($header = $this->response->getHeader('Content-Security-Policy-Report-Only'));
+        $this->assertEmpty($this->response->getHeader('Content-Security-Policy'));
+        $this->assertEquals(
+            'script-src https://magento.com https: \'self\' \'unsafe-inline\' \'unsafe-eval\';',
+            $header->getFieldValue()
+        );
+    }
+
     /**
      * Test policy rendering in report-only mode with report URL provided.
      *
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php
new file mode 100644
index 0000000000000..154c6832b045d
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Framework\View\Helper;
+
+use Magento\TestFramework\TestCase\AbstractController;
+
+/**
+ * Test the secure HTML helper and templates.
+ *
+ * @magentoAppArea frontend
+ */
+class SecureHtmlRendererTemplateTest extends AbstractController
+{
+    /**
+     * Test using the helper inside templates.
+     *
+     * @return void
+     */
+    public function testTemplateUsage(): void
+    {
+        $this->getRequest()->setMethod('GET');
+        $this->dispatch('securehtml/secure/helper');
+        $content = $this->getResponse()->getContent();
+
+        $this->assertContains(
+            '<h1 onclick="alert()">Hello there!</h1>',
+            $content
+        );
+        $this->assertContains(
+            '<script src="http://my.magento.com/static/script.js"/>',
+            $content
+        );
+        $this->assertContains(
+            "<script>\n    let myVar = 1;\n</script>",
+            $content
+        );
+        $this->assertContains(
+            '<div>I am just <a> text</div>',
+            $content
+        );
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
new file mode 100644
index 0000000000000..aae50ec02857d
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Framework\View\Helper;
+
+use Magento\Framework\View\Helper\SecureHtmlRender\TagData;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Test for the secure HTML helper.
+ */
+class SecureHtmlRendererTest extends TestCase
+{
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $helper;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+        //Clearing the processors list to ensure stable results.
+        $this->helper = $objectManager->create(SecureHtmlRenderer::class, ['processors' => []]);
+    }
+
+    /**
+     * Provides tags to render.
+     *
+     * @return array
+     */
+    public function getTags(): array
+    {
+        return [
+            [
+                new TagData('div', ['style' => 'display: none;', 'width' => '20px'], 'some <text>', true),
+                '<div style="display: none;" width="20px">some <text></div>'
+            ],
+            [
+                new TagData('div', [], 'some <b>HTML</b>', false),
+                '<div>some <b>HTML</b></div>'
+            ],
+            [
+                new TagData('img', ['src' => 'https://magento.com/img.jpg'], null, true),
+                '<img src="https://magento.com/img.jpg"/>'
+            ]
+        ];
+    }
+
+    /**
+     * Test tag rendering.
+     *
+     * @param TagData $tagData
+     * @param string $expected Expected HTML.
+     * @return void
+     * @dataProvider getTags
+     */
+    public function testRenderTag(TagData $tagData, string $expected): void
+    {
+        $this->assertEquals(
+            $expected,
+            $this->helper->renderTag(
+                $tagData->getTag(),
+                $tagData->getAttributes(),
+                $tagData->getContent(),
+                $tagData->isTextContent()
+            )
+        );
+    }
+
+    /**
+     * Test rendering an event listener.
+     *
+     * @return void
+     */
+    public function testRenderEventHandler(): void
+    {
+        $this->assertEquals(
+            'onclick="alert(this.parent.getAttribute("data-title"))"',
+            $this->helper->renderEventListener('onclick', 'alert(this.parent.getAttribute("data-title"))')
+        );
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php
index b75501911be6b..5883856ec81ee 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Form/AccountTest.php
@@ -90,26 +90,26 @@ public function testGetFormWithCustomer()
 
         $expectedFields = ['group_id', 'email'];
         $form = $this->accountBlock->getForm();
-        self::assertEquals(1, $form->getElements()->count(), "Form has invalid number of fieldsets");
+        $this->assertEquals(1, $form->getElements()->count(), "Form has invalid number of fieldsets");
         $fieldset = $form->getElements()[0];
         $content = $form->toHtml();
 
-        self::assertEquals(count($expectedFields), $fieldset->getElements()->count());
+        $this->assertEquals(count($expectedFields), $fieldset->getElements()->count());
 
         foreach ($fieldset->getElements() as $element) {
-            self::assertTrue(
+            $this->assertTrue(
                 in_array($element->getId(), $expectedFields),
                 sprintf('Unexpected field "%s" in form.', $element->getId())
             );
         }
 
-        self::assertContains(
-            '<option value="'.$customerGroup.'" selected="selected">Wholesale</option>',
+        $this->assertRegExp(
+            '/<option value="'.$customerGroup.'".*?selected="selected"\>Wholesale\<\/option\>/is',
             $content,
             'The Customer Group specified for the chosen customer should be selected.'
         );
 
-        self::assertContains(
+        $this->assertContains(
             'value="'.$customer->getEmail().'"',
             $content,
             'The Customer Email specified for the chosen customer should be input '
@@ -146,14 +146,14 @@ public function testGetFormWithUserDefinedAttribute()
         $form->setUseContainer(true);
         $content = $form->toHtml();
 
-        self::assertContains(
-            '<option value="1" selected="selected">Yes</option>',
+        $this->assertRegExp(
+            '/\<option value="1".*?selected="selected"\>Yes\<\/option\>/is',
             $content,
             'Default value for user defined custom attribute should be selected.'
         );
 
-        self::assertContains(
-            '<option value="3" selected="selected">Retailer</option>',
+        $this->assertRegExp(
+            '/<option value="3".*?selected="selected"\>Retailer\<\/option\>/is',
             $content,
             'The Customer Group specified for the chosen store should be selected.'
         );
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
new file mode 100644
index 0000000000000..12154f9ff4683
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Ui\Component\Control;
+
+use Magento\Framework\View\LayoutInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Test for the button control.
+ *
+ * @magentoAppArea frontend
+ */
+class ButtonTest extends TestCase
+{
+    /**
+     * @var LayoutInterface
+     */
+    private $layout;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+        $this->layout = $objectManager->get(LayoutInterface::class);
+    }
+
+    /**
+     * Create the block.
+     *
+     * @return Button
+     */
+    private function createBlock(): Button
+    {
+        /** @var Button $block */
+        $block = $this->layout->createBlock(Button::class, 'button_block');
+        $block->setLayout($this->layout);
+
+        return $block;
+    }
+
+    /**
+     * Test resulting button HTML.
+     *
+     * @return void
+     */
+    public function testToHtml(): void
+    {
+        $block = $this->createBlock();
+        $block->addData(
+            [
+                'type' => 'button',
+                'on_click' => $onclick = 'console.log("Button pressed!")',
+                'disabled' => false,
+                'title' => 'A button control',
+                'label' => 'A button control',
+                'class' => 'button',
+                'id' => 'button',
+                'element_name' => 'some-name',
+                'value' => 'Press a button',
+                'data-style' => 'width: 100px',
+                'style' => $style = 'height: 200px'
+            ]
+        );
+
+        $html = $block->toHtml();
+        $this->assertContains('<button ', $html);
+        $this->assertContains('<span>A button control</span>', $html);
+        $this->assertNotContains('onclick=', $html);
+        $this->assertNotContains('style=', $html);
+        $this->assertRegExp('/\<script.*?\>.*?' .preg_quote($onclick) .'.*?\<\/script\>/ims', $html);
+        $this->assertRegExp('/\<style.*?\>.*?' .preg_quote($style) .'.*?\<\/style\>/ims', $html);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
new file mode 100644
index 0000000000000..ccc9723ce2729
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Ui\Component\Control;
+
+use Magento\Framework\View\LayoutInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Testing SplitButton widget
+ *
+ * @magentoAppArea frontend
+ */
+class SplitButtonTest extends TestCase
+{
+
+    /**
+     * @var LayoutInterface
+     */
+    private $layout;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        $objectManager = Bootstrap::getObjectManager();
+        $this->layout = $objectManager->get(LayoutInterface::class);
+    }
+
+    /**
+     * Create the block.
+     *
+     * @return SplitButton
+     */
+    private function createBlock(): SplitButton
+    {
+        /** @var SplitButton $block */
+        $block = $this->layout->createBlock(SplitButton::class, 'button_block');
+        $block->setLayout($this->layout);
+
+        return $block;
+    }
+
+    /**
+     * Test resulting button HTML.
+     *
+     * @return void
+     */
+    public function testToHtml(): void
+    {
+        $block = $this->createBlock();
+        $block->addData(
+            [
+                'title' => 'Split button control',
+                'label' => 'Split button control',
+                'has_split' => true,
+                'button_class' => 'aclass',
+                'id' => 'split-button',
+                'disabled' => false,
+                'class' => 'aclass',
+                'data_attribute' => ['bind' => ['var' => 'val']],
+                'id_hard' => 'split-button',
+                'options' => [
+                    [
+                        'id' => 'an-option',
+                        'disabled' => false,
+                        'title' => 'An option',
+                        'label' => 'An option',
+                        'onclick' => $onclick = 'console.log("option")',
+                        'style' => $style = 'width: 100px'
+                    ]
+                ]
+            ]
+        );
+
+        $html = $block->toHtml();
+        $this->assertContains('<button ', $html);
+        $this->assertContains('<span>Split button control</span>', $html);
+        $this->assertNotContains('onclick=', $html);
+        $this->assertNotContains('style=', $html);
+        $this->assertRegExp('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
+        $this->assertRegExp('/\<style.*?\>.*?' . preg_quote($style) . '.*?\<\/style\>/ims', $html);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category/EditTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category/EditTest.php
index cde7c1a28ac1f..8b976492a0a0f 100644
--- a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Category/EditTest.php
@@ -123,24 +123,20 @@ private function _checkButtons($block, $expected)
         if (isset($expected['back_button'])) {
             if ($expected['back_button']) {
                 if ($block->getCategory()->getId()) {
-                    $this->assertEquals(
-                        1,
-                        \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
-                            '//button[contains(@class, "back") and contains(@onclick, "/category")]',
-                            $buttonsHtml
-                        ),
-                        'Back button is not present in category URL rewrite edit block'
-                    );
-                } else {
-                    $this->assertEquals(
-                        1,
-                        \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
-                            '//button[contains(@class,"back")]',
-                            $buttonsHtml
-                        ),
+                    $this->assertRegExp(
+                        '/setLocation\([\\\'\"]\S+?\/category/i',
+                        $buttonsHtml,
                         'Back button is not present in category URL rewrite edit block'
                     );
                 }
+                $this->assertEquals(
+                    1,
+                    \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
+                        '//button[contains(@class,"back")]',
+                        $buttonsHtml
+                    ),
+                    'Back button is not present in category URL rewrite edit block'
+                );
             } else {
                 $this->assertEquals(
                     0,
diff --git a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Product/EditTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Product/EditTest.php
index 9a20f9430519d..5873cd856086e 100644
--- a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Product/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Catalog/Product/EditTest.php
@@ -155,24 +155,20 @@ private function _checkButtons($block, $expected)
         if (isset($expected['back_button'])) {
             if ($expected['back_button']) {
                 if ($block->getProduct()->getId()) {
-                    $this->assertEquals(
-                        1,
-                        \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
-                            '//button[contains(@class, "back") and contains(@onclick, "/product")]',
-                            $buttonsHtml
-                        ),
-                        'Back button is not present in product URL rewrite edit block'
-                    );
-                } else {
-                    $this->assertEquals(
-                        1,
-                        \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
-                            '//button[contains(@class,"back")]',
-                            $buttonsHtml
-                        ),
-                        'Back button is not present in product URL rewrite edit block'
+                    $this->assertRegExp(
+                        '/setLocation\([\\\'\"]\S+?\/product/i',
+                        $buttonsHtml,
+                        'Back button is not present in category URL rewrite edit block'
                     );
                 }
+                $this->assertEquals(
+                    1,
+                    \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
+                        '//button[contains(@class,"back")]',
+                        $buttonsHtml
+                    ),
+                    'Back button is not present in product URL rewrite edit block'
+                );
             } else {
                 $this->assertEquals(
                     0,
diff --git a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Cms/Page/EditTest.php b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Cms/Page/EditTest.php
index 19f595191051b..03b73e3161df0 100644
--- a/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Cms/Page/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/UrlRewrite/Block/Cms/Page/EditTest.php
@@ -123,24 +123,20 @@ private function _checkButtons($block, $expected)
         if (isset($expected['back_button'])) {
             if ($expected['back_button']) {
                 if ($block->getCmsPage()->getId()) {
-                    $this->assertEquals(
-                        1,
-                        \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
-                            '//button[contains(@class, "back") and contains(@onclick, "/cms_page")]',
-                            $buttonsHtml
-                        ),
-                        'Back button is not present in CMS page URL rewrite edit block'
-                    );
-                } else {
-                    $this->assertEquals(
-                        1,
-                        \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
-                            '//button[contains(@class,"back")]',
-                            $buttonsHtml
-                        ),
-                        'Back button is not present in CMS page URL rewrite edit block'
+                    $this->assertRegExp(
+                        '/setLocation\([\\\'\"]\S+?\/cms_page/i',
+                        $buttonsHtml,
+                        'Back button is not present in category URL rewrite edit block'
                     );
                 }
+                $this->assertEquals(
+                    1,
+                    \Magento\TestFramework\Helper\Xpath::getElementsCountForXpath(
+                        '//button[contains(@class, "back")]',
+                        $buttonsHtml
+                    ),
+                    'Back button is not present in CMS page URL rewrite edit block'
+                );
             } else {
                 $this->assertEquals(
                     0,
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php b/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php
index cc6f2793fcfef..2a85e7020964b 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/InstanceTest.php
@@ -33,7 +33,10 @@ protected function setUp()
     public function testEditAction()
     {
         $this->dispatch('backend/admin/widget_instance/edit');
-        $this->assertContains('<option value="cms_page_link" selected="selected">', $this->getResponse()->getBody());
+        $this->assertRegExp(
+            '/<option value="cms_page_link".*?selected="selected"\>/is',
+            $this->getResponse()->getBody()
+        );
     }
 
     public function testBlocksAction()
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
index ff1e3ba63ba8a..759db7c093abc 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
@@ -5,10 +5,13 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form;
 use Magento\Framework\Data\Form\AbstractForm;
 use Magento\Framework\Data\Form\Element\Renderer\RendererInterface;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Data form abstract class
@@ -64,21 +67,51 @@ abstract class AbstractElement extends AbstractForm
      */
     private $lockHtmlAttribute = 'data-locked';
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
         $this->_escaper = $escaper;
         parent::__construct($factoryElement, $factoryCollection, $data);
         $this->_renderer = \Magento\Framework\Data\Form::getElementRenderer();
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+    }
+
+    /**
+     * Generate this element's ID.
+     *
+     * @return string
+     */
+    private function generateElementId(): string
+    {
+        if (!$this->hasData('formelementhookid')) {
+            $this->setData('formelementhookid', 'elemId' .$this->random->getRandomString(32));
+        }
+
+        return $this->getData('formelementhookid');
     }
 
     /**
@@ -394,6 +427,56 @@ public function getBeforeElementHtml()
         return $this->getData('before_element_html');
     }
 
+    /**
+     * Generate HTML to replace unsecure attributes.
+     *
+     * @return string
+     */
+    private function generateAttributesSubstitute(): string
+    {
+        $html = '';
+
+        //Rendering element's style as separate tag.
+        if ($this->getStyle()) {
+            $selector = "*[formelementhookid='{$this->generateElementId()}']";
+            if ($id = $this->getHtmlId()) {
+                $selector = "#{$this->getHtmlId()}";
+            }
+            $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    {$selector} {
+                        {$this->getStyle()}
+                    }
+style
+                ,
+                false
+            );
+        }
+
+        //Rendering each event listener as a separate script tag.
+        $events = array_filter(
+            $this->getHtmlAttributes(),
+            function (string $attribute): bool {
+                return mb_strpos($attribute, 'on') === 0;
+            }
+        );
+        foreach ($events as $event) {
+            $eventShort = mb_substr($event, 2);
+            $methodName = 'getOn' .$eventShort;
+            if ($eventListener = $this->$methodName()) {
+                $html .= $this->secureRenderer->renderEventListenerAsTag(
+                    $event,
+                    $eventListener,
+                    "*[formelementhookid='{$this->generateElementId()}']"
+                );
+            }
+        }
+
+        return $html;
+    }
+
     /**
      * Get the after element html.
      *
@@ -401,7 +484,7 @@ public function getBeforeElementHtml()
      */
     public function getAfterElementHtml()
     {
-        return $this->getData('after_element_html');
+        return $this->getData('after_element_html') .$this->generateAttributesSubstitute();
     }
 
     /**
@@ -507,6 +590,16 @@ public function serialize($attributes = [], $valueSeparator = '=', $fieldSeparat
         } else {
             unset($this->_data['checked']);
         }
+        $attributes[] = 'formelementhookid';
+        $this->generateElementId();
+        //Unset attributes that are to be rendered as separate tags
+        $attributes = array_filter(
+            $attributes,
+            function (string $attribute): bool {
+                return $attribute !== 'style' && mb_strpos($attribute, 'on') !== 0;
+            }
+        );
+
         return parent::serialize($attributes, $valueSeparator, $fieldSeparator, $quote);
     }
 
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php b/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php
index 2a68432207b23..ce6639a98db2c 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php
@@ -110,15 +110,16 @@ public function getElementHtml()
     }
 
     /**
-     * @param mixed $value
-     * @return string|void
+     * Was given value selected?
+     *
+     * @param string $value
+     * @return string|null
      */
     public function getChecked($value)
     {
-        if ($checked = $this->getValue()) {
-        } elseif ($checked = $this->getData('checked')) {
-        } else {
-            return;
+        $checked = $this->getValue() ?? $this->getData('checked');
+        if (!$checked) {
+            return null;
         }
         if (!is_array($checked)) {
             $checked = [(string)$checked];
@@ -130,12 +131,14 @@ public function getChecked($value)
         if (in_array((string)$value, $checked)) {
             return 'checked';
         }
-        return;
+        return null;
     }
 
     /**
-     * @param mixed $value
-     * @return string
+     * Was value disabled for selection?
+     *
+     * @param string $value
+     * @return string|null
      */
     public function getDisabled($value)
     {
@@ -151,34 +154,40 @@ public function getDisabled($value)
                 return 'disabled';
             }
         }
-        return;
+        return null;
     }
 
     /**
-     * @param mixed $value
-     * @return mixed
+     * Get onclick event handler.
+     *
+     * @param string $value
+     * @return string|null
      */
-    public function getOnclick($value)
+    public function getOnclick($value = '$value')
     {
         if ($onclick = $this->getData('onclick')) {
             return str_replace('$value', $value, $onclick);
         }
-        return;
+        return null;
     }
 
     /**
-     * @param mixed $value
-     * @return mixed
+     * Get onchange event handler.
+     *
+     * @param string $value
+     * @return string|null
      */
-    public function getOnchange($value)
+    public function getOnchange($value = '$value')
     {
         if ($onchange = $this->getData('onchange')) {
             return str_replace('$value', $value, $onchange);
         }
-        return;
+        return null;
     }
 
     /**
+     * Render a checkbox.
+     *
      * @param array $option
      * @return string
      */
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
index 70dca9ec16618..c9e2a16f586dc 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
@@ -13,7 +13,10 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Form editable multiselect element.
@@ -26,24 +29,40 @@ class Editablemultiselect extends \Magento\Framework\Data\Form\Element\Multisele
     private $serializer;
 
     /**
-     * Editablemultiselect constructor.
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
      * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
-     * @throws \RuntimeException
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
         array $data = [],
-        \Magento\Framework\Serialize\Serializer\Json $serializer = null
+        \Magento\Framework\Serialize\Serializer\Json $serializer = null,
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
-        $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
+        $this->serializer = $serializer ?: ObjectManager::getInstance()
             ->get(\Magento\Framework\Serialize\Serializer\Json::class);
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
@@ -77,8 +96,10 @@ public function getElementHtml()
         $jsObjectName = $this->getJsObjectName();
 
         // TODO: TaxRateEditableMultiselect should be moved to a static .js module.
-        $html .= "
-                <script type='text/javascript'>
+        $html .= $this->secureRenderer->renderTag(
+            'script',
+            ['type' => 'text/javascript'],
+            <<<script
                 require([
                     'jquery'
                 ], function( $ ){
@@ -108,7 +129,11 @@ function check( tries, delay ){
                    check(8, 500);
 
                 });
-                </script>";
+script
+            ,
+            false
+        );
+
         return $html;
     }
 
@@ -121,9 +146,9 @@ function check( tries, delay ){
      */
     protected function _optionToHtml($option, $selected)
     {
-        $html = '<option value="' . $this->_escape($option['value']) . '"';
+        $optionId = 'optId' .$this->random->getRandomString(32);
+        $html = '<option value="' . $this->_escape($option['value']) . '" id="' . $optionId . '" ';
         $html .= isset($option['title']) ? 'title="' . $this->_escape($option['title']) . '"' : '';
-        $html .= isset($option['style']) ? 'style="' . $option['style'] . '"' : '';
         if (in_array((string)$option['value'], $selected)) {
             $html .= ' selected="selected"';
         }
@@ -134,6 +159,20 @@ protected function _optionToHtml($option, $selected)
         }
 
         $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
+        if (isset($option['style'])) {
+            $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    #$optionId {
+                        {$option['style']}
+                    }
+style
+                ,
+                false
+            );
+        }
+
         return $html;
     }
 }
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
index 08a5edd09bf35..bb0dea4c76088 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
@@ -6,7 +6,10 @@
 
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Form editor element
@@ -20,6 +23,16 @@ class Editor extends Textarea
      */
     private $serializer;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * Editor constructor.
      * @param Factory $factoryElement
@@ -27,6 +40,8 @@ class Editor extends Textarea
      * @param Escaper $escaper
      * @param array $data
      * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
+     * @param Random|null $random
+     * @param SecureHtmlRenderer|null $secureRenderer
      * @throws \RuntimeException
      */
     public function __construct(
@@ -34,7 +49,9 @@ public function __construct(
         CollectionFactory $factoryCollection,
         Escaper $escaper,
         $data = [],
-        \Magento\Framework\Serialize\Serializer\Json $serializer = null
+        \Magento\Framework\Serialize\Serializer\Json $serializer = null,
+        ?Random $random = null,
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
 
@@ -45,8 +62,10 @@ public function __construct(
             $this->setType('textarea');
             $this->setExtType('textarea');
         }
-        $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
-            ->get(\Magento\Framework\Serialize\Serializer\Json::class);
+        $this->serializer = $serializer ?? ObjectManager::getInstance()
+                ->get(\Magento\Framework\Serialize\Serializer\Json::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -120,9 +139,11 @@ public function getPluginConfigOptions($pluginName, $key = null)
      */
     public function getElementHtml()
     {
-        $js = '
-            <script type="text/javascript">
-            //<![CDATA[
+        $js = $this->secureRenderer->renderTag(
+            'script',
+            ['type' => 'text/javascript'],
+            <<<script
+                //<![CDATA[
                 openEditorPopup = function(url, name, specs, parent) {
                     if ((typeof popups == "undefined") || popups[name] == undefined || popups[name].closed) {
                         if (typeof popups == "undefined") {
@@ -142,7 +163,10 @@ public function getElementHtml()
                     }
                 }
             //]]>
-            </script>';
+script
+            ,
+            false
+        );
 
         if ($this->isEnabled()) {
             $jsSetupObject = 'wysiwyg' . $this->getHtmlId();
@@ -189,15 +213,21 @@ public function getElementHtml()
             if ($this->getPluginConfigOptions('magentowidget', 'window_url')) {
                 $html = $this->_getButtonsHtml() . $js . parent::getElementHtml();
                 if ($this->getConfig('add_widgets')) {
-                    $html .= '<script type="text/javascript">
-                    //<![CDATA[
-                    require(["jquery", "mage/translate", "mage/adminhtml/wysiwyg/widget"], function(jQuery){
-                        (function($) {
-                            $.mage.translate.add(' . $this->serializer->serialize($this->getButtonTranslations()) . ')
-                        })(jQuery);
-                    });
-                    //]]>
-                    </script>';
+                    $html .= $this->secureRenderer->renderTag(
+                        'script',
+                        ['type' => 'text/javascript'],
+                        <<<script
+                            //<![CDATA[
+                            require(["jquery", "mage/translate", "mage/adminhtml/wysiwyg/widget"], function(jQuery){
+                                (function($) {
+                                    $.mage.translate.add({$this->serializer->serialize($this->getButtonTranslations())})
+                                })(jQuery);
+                            });
+                            //]]>'
+script
+                        ,
+                        false
+                    );
                 }
                 $html = $this->_wrapIntoContainer($html);
                 return $html;
@@ -386,14 +416,30 @@ protected function _prepareOptions($options)
      */
     protected function _getButtonHtml($data)
     {
+        $id = empty($data['id']) ? 'buttonId' .$this->random->getRandomString(32) : $data['id'];
+
         $html = '<button type="button"';
         $html .= ' class="scalable ' . (isset($data['class']) ? $data['class'] : '') . '"';
-        $html .= isset($data['onclick']) ? ' onclick="' . $data['onclick'] . '"' : '';
-        $html .= isset($data['style']) ? ' style="' . $data['style'] . '"' : '';
-        $html .= isset($data['id']) ? ' id="' . $data['id'] . '"' : '';
+        $html .= ' id="' . $id . '"';
         $html .= '>';
         $html .= isset($data['title']) ? '<span><span><span>' . $data['title'] . '</span></span></span>' : '';
         $html .= '</button>';
+        if (isset($data['onclick'])) {
+            $html .= $this->secureRenderer->renderEventListenerAsTag('onclick', $data['onclick'], "#$id");
+        }
+        if (isset($data['style'])) {
+            $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    #{$id} {
+                        {$data['style']}
+                    }
+style
+                ,
+                false
+            );
+        }
 
         return $html;
     }
@@ -412,11 +458,24 @@ protected function _wrapIntoContainer($html)
             return '<div class="admin__control-wysiwig">' . $html . '</div>';
         }
 
-        $html = '<div id="editor' . $this->getHtmlId() . '"'
-            . ($this->getConfig('no_display') ? ' style="display:none;"' : '')
+        $id = 'editor' .$this->getHtmlId();
+        $html = '<div id="' .$id .'" '
             . ($this->getConfig('container_class') ? ' class="admin__control-wysiwig '
                 . $this->getConfig('container_class') . '"' : '')
             . '>' . $html . '</div>';
+        if ($this->getConfig('no_display')) {
+            $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    #{$id} {
+                        display: none;
+                    }
+style
+                ,
+                false
+            );
+        }
 
         return $html;
     }
@@ -494,15 +553,14 @@ protected function isToggleButtonVisible()
     protected function getInlineJs($jsSetupObject, $forceLoad)
     {
         $jsString = '
-                <script type="text/javascript">
                 //<![CDATA[
-                window.tinyMCE_GZ = window.tinyMCE_GZ || {}; 
+                window.tinyMCE_GZ = window.tinyMCE_GZ || {};
                 window.tinyMCE_GZ.loaded = true;
                 require([
-                "jquery", 
-                "mage/translate", 
-                "mage/adminhtml/events", 
-                "mage/adminhtml/wysiwyg/tiny_mce/setup", 
+                "jquery",
+                "mage/translate",
+                "mage/adminhtml/events",
+                "mage/adminhtml/wysiwyg/tiny_mce/setup",
                 "mage/adminhtml/wysiwyg/widget"
                 ], function(jQuery){' .
             "\n" .
@@ -534,9 +592,8 @@ protected function getInlineJs($jsSetupObject, $forceLoad)
             '));
                     varienGlobalEvents.attachEventHandler("formSubmit", editorFormValidationHandler);
                 //]]>
-                });
-                </script>';
-        return $jsString;
+                });';
+        return $this->secureRenderer->renderTag('script', ['type' => 'text/javascript'], $jsString, false);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php
index 9f9a3306ae65a..aaa48611b02c5 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php
@@ -11,28 +11,53 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Gallery form element widget.
+ */
 class Gallery extends AbstractElement
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
         $this->setType('file');
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
-     * @return string
+     * @inheritDoc
+     *
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      * @SuppressWarnings(PHPMD.UnusedLocalVariable)
      */
@@ -71,17 +96,12 @@ public function getElementHtml()
                 $i++;
                 $html .= '<tr class="gallery">';
                 foreach ($this->getValue()->getAttributeBackend()->getImageTypes() as $type) {
+                    $linkId = 'linkId' .$this->random->getRandomString(32);
                     $url = $image->setType($type)->getSourceUrl();
-                    $html .= '<td class="gallery" align="center" style="vertical-align:bottom;">';
-                    $html .= '<a href="' .
+                    $html .= '<td class="gallery vertical-gallery-cell" align="center">';
+                    $html .= '<a previewlinkid="' .$linkId .'" href="' .
                         $url .
-                        '" target="_blank" onclick="imagePreview(\'' .
-                        $this->getHtmlId() .
-                        '_image_' .
-                        $type .
-                        '_' .
-                        $image->getValueId() .
-                        '\');return false;" ' .
+                        '" target="_blank" ' .
                         $this->_getUiId(
                             'image-' . $image->getValueId()
                         ) .
@@ -107,8 +127,13 @@ public function getElementHtml()
                         $this->_getUiId(
                             'file'
                         ) . ' ></td>';
+                    $html .= $this->secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        "imagePreview('{$this->getHtmlId()}_image_{$type}_{$image->getValueId()}');\nreturn false;",
+                        "*[previewlinkid='{$linkId}']"
+                    );
                 }
-                $html .= '<td class="gallery" align="center" style="vertical-align:bottom;">' .
+                $html .= '<td class="gallery vertical-gallery-cell" align="center">' .
                     '<input type="input" name="' .
                     parent::getName() .
                     '[position][' .
@@ -123,7 +148,7 @@ public function getElementHtml()
                     $this->_getUiId(
                         'position-' . $image->getValueId()
                     ) . '/></td>';
-                $html .= '<td class="gallery" align="center" style="vertical-align:bottom;">' .
+                $html .= '<td class="gallery vertical-gallery-cell" align="center">' .
                     '<input type="checkbox" name="' .
                     parent::getName() .
                     '[delete][' .
@@ -140,11 +165,26 @@ public function getElementHtml()
                     ) . '/></td>';
                 $html .= '</tr>';
             }
+
+            $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    .vertical-gallery-cell {
+                        vertical-align:bottom;
+                    }
+style
+                ,
+                false
+            );
         }
         if ($i == 0) {
-            $html .= '<script type="text/javascript">' .
-                'document.getElementById("gallery_thead").style.visibility="hidden";' .
-                '</script>';
+            $html .= $this->secureRenderer->renderTag(
+                'script',
+                ['type' => 'text/javascript'],
+                'document.getElementById("gallery_thead").style.visibility="hidden";',
+                false
+            );
         }
 
         $html .= '</tbody></table>';
@@ -152,9 +192,10 @@ public function getElementHtml()
         $name = $this->getName();
         $parentName = parent::getName();
 
-        $html .= <<<EndSCRIPT
-
-        <script language="javascript">
+        $html .= $this->secureRenderer->renderTag(
+            'script',
+            ['type' => 'text/javascript'],
+            <<<EndSCRIPT
         id = 0;
 
         function addNewImg(){
@@ -218,15 +259,17 @@ function addNewImg(){
 		    };
 
 	    }
-        </script>
-
-EndSCRIPT;
+EndSCRIPT
+            ,
+            false
+        );
         $html .= $this->getAfterElementHtml();
+
         return $html;
     }
 
     /**
-     * @return mixed
+     * @inheritDoc
      */
     public function getName()
     {
@@ -234,7 +277,9 @@ public function getName()
     }
 
     /**
-     * @return mixed
+     * Get name in the usual way.
+     *
+     * @return string|null
      */
     public function getParentName()
     {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Image.php b/lib/internal/Magento/Framework/Data/Form/Element/Image.php
index 0b37a9ab18c8c..65c8424a75051 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Image.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Image.php
@@ -11,7 +11,10 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
 use Magento\Framework\UrlInterface;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class Image extends \Magento\Framework\Data\Form\Element\AbstractElement
 {
@@ -21,22 +24,40 @@ class Image extends \Magento\Framework\Data\Form\Element\AbstractElement
     protected $_urlBuilder;
 
     /**
-     * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
-     * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
      * @param \Magento\Framework\Escaper $escaper
      * @param UrlInterface $urlBuilder
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
-        \Magento\Framework\Data\Form\Element\Factory $factoryElement,
-        \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection,
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
         \Magento\Framework\Escaper $escaper,
         UrlInterface $urlBuilder,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
         $this->_urlBuilder = $urlBuilder;
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
         $this->setType('file');
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
@@ -55,12 +76,10 @@ public function getElementHtml()
                 $url = $this->_urlBuilder->getBaseUrl(['_type' => UrlInterface::URL_TYPE_MEDIA]) . $url;
             }
 
-            $html = '<a href="' .
+            $linkId = 'linkId' .$this->random->getRandomString(32);
+            $html = '<a previewlinkid="' .$linkId .'" href="' .
                 $url .
-                '"' .
-                ' onclick="imagePreview(\'' .
-                $this->getHtmlId() .
-                '_image\'); return false;" ' .
+                '" ' .
                 $this->_getUiId(
                     'link'
                 ) .
@@ -78,6 +97,11 @@ public function getElementHtml()
                 $this->_getUiId() .
                 ' />' .
                 '</a> ';
+            $html .= $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "imagePreview('{$this->getHtmlId()}_image');\nreturn false;",
+                "*[previewlinkid='{$linkId}']"
+            );
         }
         $this->setClass('input-file');
         $html .= parent::getElementHtml();
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Link.php b/lib/internal/Magento/Framework/Data/Form/Element/Link.php
index 83f9922304a5c..24e7a8253cdcd 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Link.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Link.php
@@ -11,8 +11,14 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Link form element widget.
+ */
 class Link extends AbstractElement
 {
     /**
@@ -20,14 +26,20 @@ class Link extends AbstractElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureHtmlRenderer
+     * @param Random|null $random
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureHtmlRenderer = null,
+        ?Random $random = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $secureHtmlRenderer = $secureHtmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureHtmlRenderer, $random);
         $this->setType('link');
     }
 
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
index 03daa6c08fff4..dc5462a81627a 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
@@ -11,26 +11,50 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Multi-select form element widget.
+ */
 class Multiselect extends AbstractElement
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
         $this->setType('select');
         $this->setExtType('multiple');
         $this->setSize(10);
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
@@ -129,38 +153,48 @@ public function getDefaultHtml()
         $result .= $this->getElementHtml();
 
         if ($this->getSelectAll() && $this->getDeselectAll()) {
-            $result .= '<a href="#" onclick="return ' .
-                $this->getJsObjectName() .
-                '.selectAll()">' .
-                $this->getSelectAll() .
-                '</a> <span class="separator"> | </span>';
-            $result .= '<a href="#" onclick="return ' .
-                $this->getJsObjectName() .
-                '.deselectAll()">' .
-                $this->getDeselectAll() .
-                '</a>';
+            $selectAllId = 'selId' .$this->random->getRandomString(32);
+            $deselectAllId = 'deselId' .$this->random->getRandomString(32);
+            $result .= '<a href="#" id="' .$selectAllId .'">' .$this->getSelectAll()
+                .'</a> <span class="separator"> | </span>';
+            $result .= '<a href="#" id="' .$deselectAllId .'">' .$this->getDeselectAll() .'</a>';
+
+            $result .= $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "return {$this->getJsObjectName()}.selectAll();\nreturn false;",
+                "#{$selectAllId}"
+            );
+            $result .= $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "return {$this->getJsObjectName()}.deselectAll();",
+                "#{$deselectAllId}"
+            );
         }
 
         $result .= $this->getNoSpan() === true ? '' : '</span>' . "\n";
 
-        $result .= '<script type="text/javascript">' . "\n";
-        $result .= '   var ' . $this->getJsObjectName() . ' = {' . "\n";
-        $result .= '     selectAll: function() { ' . "\n";
-        $result .= '         var sel = $("' . $this->getHtmlId() . '");' . "\n";
-        $result .= '         for(var i = 0; i < sel.options.length; i ++) { ' . "\n";
-        $result .= '             sel.options[i].selected = true; ' . "\n";
-        $result .= '         } ' . "\n";
-        $result .= '         return false; ' . "\n";
-        $result .= '     },' . "\n";
-        $result .= '     deselectAll: function() {' . "\n";
-        $result .= '         var sel = $("' . $this->getHtmlId() . '");' . "\n";
-        $result .= '         for(var i = 0; i < sel.options.length; i ++) { ' . "\n";
-        $result .= '             sel.options[i].selected = false; ' . "\n";
-        $result .= '         } ' . "\n";
-        $result .= '         return false; ' . "\n";
-        $result .= '     }' . "\n";
-        $result .= '  }' . "\n";
-        $result .= "\n" . '</script>';
+        $script = '   var ' . $this->getJsObjectName() . ' = {' . "\n";
+        $script .= '     selectAll: function() { ' . "\n";
+        $script .= '         var sel = $("' . $this->getHtmlId() . '");' . "\n";
+        $script .= '         for(var i = 0; i < sel.options.length; i ++) { ' . "\n";
+        $script .= '             sel.options[i].selected = true; ' . "\n";
+        $script .= '         } ' . "\n";
+        $script .= '         return false; ' . "\n";
+        $script .= '     },' . "\n";
+        $script .= '     deselectAll: function() {' . "\n";
+        $script .= '         var sel = $("' . $this->getHtmlId() . '");' . "\n";
+        $script .= '         for(var i = 0; i < sel.options.length; i ++) { ' . "\n";
+        $script .= '             sel.options[i].selected = false; ' . "\n";
+        $script .= '         } ' . "\n";
+        $script .= '         return false; ' . "\n";
+        $script .= '     }' . "\n";
+        $script .= '  }' . "\n";
+        $result .= $this->secureRenderer->renderTag(
+            'script',
+            ['type' => 'text/javascript'],
+            $script,
+            false
+        );
 
         return $result;
     }
@@ -176,19 +210,35 @@ public function getJsObjectName()
     }
 
     /**
+     * Render an option for the select.
+     *
      * @param array $option
-     * @param array $selected
+     * @param string[] $selected
      * @return string
      */
     protected function _optionToHtml($option, $selected)
     {
-        $html = '<option value="' . $this->_escape($option['value']) . '"';
+        $optionId = 'optId' .$this->random->getRandomString(32);
+        $html = '<option value="' . $this->_escape($option['value']) . '" id="' . $optionId . '" ';
         $html .= isset($option['title']) ? 'title="' . $this->_escape($option['title']) . '"' : '';
-        $html .= isset($option['style']) ? 'style="' . $option['style'] . '"' : '';
         if (in_array((string)$option['value'], $selected)) {
             $html .= ' selected="selected"';
         }
         $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
+        if (isset($option['style'])) {
+            $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    #$optionId {
+                        {$option['style']}
+                    }
+style
+                ,
+                false
+            );
+        }
+
         return $html;
     }
 }
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Radios.php b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php
index 1eb7c2e21c54a..cb48c3fde4fd9 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Radios.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php
@@ -11,28 +11,43 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\DataObject;
 use Magento\Framework\Escaper;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Radio buttons form element widget.
+ */
 class Radios extends AbstractElement
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $this->secureRenderer
+            = $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer);
         $this->setType('radios');
     }
 
     /**
-     * @return string
+     * @inheritDoc
      */
     public function getElementHtml()
     {
@@ -48,8 +63,10 @@ public function getElementHtml()
     }
 
     /**
+     * Render choices.
+     *
      * @param array $option
-     * @param array $selected
+     * @param string[] $selected
      * @return string
      */
     protected function _optionToHtml($option, $selected)
@@ -57,9 +74,11 @@ protected function _optionToHtml($option, $selected)
         $html = '<div class="admin__field admin__field-option">' .
             '<input type="radio"' . $this->getRadioButtonAttributes($option);
         if (is_array($option)) {
+            $option = new DataObject($option);
+            $optionId = $this->getHtmlId() . $option['value'];
             $html .= 'value="' . $this->_escape(
                 $option['value']
-            ) . '" class="admin__control-radio" id="' . $this->getHtmlId() . $option['value'] . '"';
+            ) . '" class="admin__control-radio" id="' .$optionId  .'"';
             if ($option['value'] == $selected) {
                 $html .= ' checked="checked"';
             }
@@ -70,9 +89,10 @@ protected function _optionToHtml($option, $selected)
                 '"><span>' .
                 $option['label'] .
                 '</span></label>';
-        } elseif ($option instanceof \Magento\Framework\DataObject) {
-            $html .= 'id="' . $this->getHtmlId() . $option->getValue() . '"' . $option->serialize(
-                ['label', 'title', 'value', 'class', 'style']
+        } elseif ($option instanceof DataObject) {
+            $optionId = $this->getHtmlId() . $option->getValue();
+            $html .= 'id="' .$optionId  .'"' .$option->serialize(
+                ['label', 'title', 'value', 'class']
             );
             if (in_array($option->getValue(), $selected)) {
                 $html .= ' checked="checked"';
@@ -85,12 +105,33 @@ protected function _optionToHtml($option, $selected)
                 $option->getLabel() .
                 '</label>';
         }
+
+        if ($option->getStyle()) {
+            $html .= $html .= $this->secureRenderer->renderTag(
+                'style',
+                [],
+                <<<style
+                    #$optionId {
+                        {$option->getStyle()}
+                    }
+style
+                ,
+                false
+            );
+        }
+        if ($option->getOnclick()) {
+            $this->secureRenderer->renderEventListenerAsTag('onclick', $option->getOnclick(), "#$optionId");
+        }
+        if ($option->getOnchange()) {
+            $this->secureRenderer->renderEventListenerAsTag('onchange', $option->getOnchange(), "#$optionId");
+        }
         $html .= '</div>';
+
         return $html;
     }
 
     /**
-     * @return array
+     * @inheritDoc
      */
     public function getHtmlAttributes()
     {
@@ -98,6 +139,8 @@ public function getHtmlAttributes()
     }
 
     /**
+     * Get a choice's HTML attributes.
+     *
      * @param array $option
      * @return string
      */
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Select.php b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
index d6d95ef9da63b..b9649206f1ffc 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Select.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
@@ -5,7 +5,10 @@
  */
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Form select element
@@ -15,22 +18,40 @@
  */
 class Select extends AbstractElement
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
         $this->setType('select');
         $this->setExtType('combobox');
         $this->_prepareOptions();
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
@@ -104,13 +125,26 @@ protected function _optionToHtml($option, $selected)
             }
             $html .= '</optgroup>' . "\n";
         } else {
-            $html = '<option value="' . $this->_escape($option['value']) . '"';
+            $optionId = 'optId' .$this->random->getRandomString(32);
+            $html = '<option value="' . $this->_escape($option['value']) . '" id="' .$optionId .'" ';
             $html .= isset($option['title']) ? 'title="' . $this->_escape($option['title']) . '"' : '';
-            $html .= isset($option['style']) ? 'style="' . $option['style'] . '"' : '';
             if (in_array($option['value'], $selected)) {
                 $html .= ' selected="selected"';
             }
             $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
+            if (isset($option['style'])) {
+                $html .= $this->secureRenderer->renderTag(
+                    'style',
+                    [],
+                    <<<style
+                    #$optionId {
+                        {$option['style']}
+                    }
+style
+                    ,
+                    false
+                );
+            }
         }
         return $html;
     }
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Time.php b/lib/internal/Magento/Framework/Data/Form/Element/Time.php
index f56dbedb744a5..53d72d704483c 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Time.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Time.php
@@ -6,7 +6,9 @@
 
 namespace Magento\Framework\Data\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Form time element
@@ -15,20 +17,29 @@
  */
 class Time extends AbstractElement
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
      * @param Escaper $escaper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         Factory $factoryElement,
         CollectionFactory $factoryCollection,
         Escaper $escaper,
-        $data = []
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
-        parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer);
         $this->setType('time');
+        $this->secureRenderer = $secureRenderer;
     }
 
     /**
@@ -51,6 +62,7 @@ public function getName()
     public function getElementHtml()
     {
         $this->addClass('select admin__control-select');
+        $this->addClass('select80wide');
 
         $valueHrs = 0;
         $valueMin = 0;
@@ -66,7 +78,7 @@ public function getElementHtml()
         }
 
         $html = '<input type="hidden" id="' . $this->getHtmlId() . '" ' . $this->_getUiId() . '/>';
-        $html .= '<select name="' . $this->getName() . '" style="width:80px" '
+        $html .= '<select name="' . $this->getName() . '" '
             . $this->serialize($this->getHtmlAttributes())
             . $this->_getUiId('hour') . '>' . "\n";
         for ($i = 0; $i < 24; $i++) {
@@ -77,7 +89,7 @@ public function getElementHtml()
         $html .= '</select>' . "\n";
 
         $html .= '<span class="time-separator">: </span><select name="'
-            . $this->getName() . '" style="width:80px" '
+            . $this->getName() . '" '
             . $this->serialize($this->getHtmlAttributes())
             . $this->_getUiId('minute') . '>' . "\n";
         for ($i = 0; $i < 60; $i++) {
@@ -88,7 +100,7 @@ public function getElementHtml()
         $html .= '</select>' . "\n";
 
         $html .= '<span class="time-separator">: </span><select name="'
-            . $this->getName() . '" style="width:80px" '
+            . $this->getName() . '" '
             . $this->serialize($this->getHtmlAttributes())
             . $this->_getUiId('second') . '>' . "\n";
         for ($i = 0; $i < 60; $i++) {
@@ -98,6 +110,18 @@ public function getElementHtml()
         }
         $html .= '</select>' . "\n";
         $html .= $this->getAfterElementHtml();
+        $html .= $this->secureRenderer->renderTag(
+            'style',
+            [],
+            <<<style
+                .select80wide {
+                    width: 80px;
+                }
+style
+            ,
+            false
+        );
+
         return $html;
     }
 }
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php
index 2bd6a29477050..8e9c5dfeaa1a8 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/AbstractElementTest.php
@@ -5,11 +5,16 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Tests for \Magento\Framework\Data\Form\Element\AbstractElement
  */
 class AbstractElementTest extends \PHPUnit\Framework\TestCase
 {
+    private const RANDOM_STRING = '123456abcdefg';
+
     /**
      * @var \Magento\Framework\Data\Form\Element\AbstractElement|\PHPUnit_Framework_MockObject_MockObject
      */
@@ -38,13 +43,18 @@ protected function setUp()
         $this->_collectionFactoryMock =
             $this->createMock(\Magento\Framework\Data\Form\Element\CollectionFactory::class);
         $this->_escaperMock = $objectManager->getObject(\Magento\Framework\Escaper::class);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn(self::RANDOM_STRING);
 
         $this->_model = $this->getMockForAbstractClass(
             \Magento\Framework\Data\Form\Element\AbstractElement::class,
             [
                 $this->_factoryMock,
                 $this->_collectionFactoryMock,
-                $this->_escaperMock
+                $this->_escaperMock,
+                [],
+                $this->createMock(SecureHtmlRenderer::class),
+                $randomMock
             ]
         );
     }
@@ -325,7 +335,8 @@ public function testGetHtmlWithoutRenderer()
         );
         $expectedHtml = '<div class="admin__field">'
             . "\n"
-            . '<input id="" name=""  data-ui-id="form-element-" value="" class=" required-entry _required"/></div>'
+            . '<input id="" name=""  data-ui-id="form-element-" value="" class=" required-entry _required"'
+            .' formelementhookid="elemId' .self::RANDOM_STRING .'"/></div>'
             . "\n";
 
         $this->assertEquals($expectedHtml, $this->_model->getHtml());
@@ -368,7 +379,8 @@ public function testSerialize(array $initialData, $expectedValue)
             unset($initialData['attributes']);
         }
         $this->_model->setData($initialData);
-        $this->assertEquals($expectedValue, $this->_model->serialize($attributes));
+        $expectedValue .= ' formelementhookid="elemId' .self::RANDOM_STRING .'"';
+        $this->assertEquals(trim($expectedValue), $this->_model->serialize($attributes));
     }
 
     /**
@@ -525,7 +537,8 @@ public function testGetDefaultHtmlDataProvider()
             [
                 [],
                 '<div class="admin__field">' . "\n"
-                . '<input id="" name=""  data-ui-id="form-element-" value="" /></div>' . "\n",
+                . '<input id="" name=""  data-ui-id="form-element-" value=""'
+                .' formelementhookid="elemId' .self::RANDOM_STRING .'"/></div>' . "\n",
             ],
             [
                 ['default_html' => 'some default html'],
@@ -541,7 +554,8 @@ public function testGetDefaultHtmlDataProvider()
                 '<div class="admin__field">' . "\n"
                 . '<label class="label admin__field-label" for="html-id" data-ui-id="form-element-some-namelabel">'
                 . '<span>some label</span></label>' . "\n"
-                . '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value" />'
+                . '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value"'
+                .' formelementhookid="elemId' .self::RANDOM_STRING .'"/>'
                 . '</div>' . "\n"
             ],
             [
@@ -554,7 +568,8 @@ public function testGetDefaultHtmlDataProvider()
                 ],
                 '<label class="label admin__field-label" for="html-id" data-ui-id="form-element-some-namelabel">'
                 . '<span>some label</span></label>' . "\n"
-                . '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value" />'
+                . '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value"'
+                .' formelementhookid="elemId' .self::RANDOM_STRING .'"/>'
             ],
         ];
     }
@@ -603,7 +618,8 @@ public function getElementHtmlDataProvider()
         return [
             [
                 [],
-                '<input id="" name=""  data-ui-id="form-element-" value="" />',
+                '<input id="" name=""  data-ui-id="form-element-" value="" formelementhookid="elemId'
+                    .self::RANDOM_STRING .'"/>',
             ],
             [
                 [
@@ -611,7 +627,8 @@ public function getElementHtmlDataProvider()
                     'name' => 'some-name',
                     'value' => 'some-value',
                 ],
-                '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value" />'
+                '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value"'
+                    .' formelementhookid="elemId' .self::RANDOM_STRING .'"/>'
             ],
             [
                 [
@@ -621,7 +638,8 @@ public function getElementHtmlDataProvider()
                     'before_element_html' => 'some-html',
                 ],
                 '<label class="addbefore" for="html-id">some-html</label>'
-                . '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value" />'
+                . '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value"'
+                .' formelementhookid="elemId' .self::RANDOM_STRING .'"/>'
             ],
             [
                 [
@@ -630,7 +648,8 @@ public function getElementHtmlDataProvider()
                     'value' => 'some-value',
                     'after_element_js' => 'some-js',
                 ],
-                '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value" />some-js'
+                '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value"'
+                    .' formelementhookid="elemId' .self::RANDOM_STRING .'"/>some-js'
             ],
             [
                 [
@@ -639,8 +658,9 @@ public function getElementHtmlDataProvider()
                     'value' => 'some-value',
                     'after_element_html' => 'some-html',
                 ],
-                '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value" />'
-                . '<label class="addafter" for="html-id">some-html</label>'
+                '<input id="html-id" name="some-name"  data-ui-id="form-element-some-name" value="some-value"'
+                    .' formelementhookid="elemId' .self::RANDOM_STRING .'"/>'
+                    . '<label class="addafter" for="html-id">some-html</label>'
             ]
         ];
     }
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php
index 930350b371a9e..329ce9292471a 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php
@@ -5,6 +5,14 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
+/**
+ * Test for the widget.
+ *
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
 class EditablemultiselectTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -12,10 +20,34 @@ class EditablemultiselectTest extends \PHPUnit\Framework\TestCase
      */
     protected $_model;
 
+    /**
+     * @inheritDoc
+     */
     protected function setUp()
     {
         $testHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
-        $this->_model = $testHelper->getObject(\Magento\Framework\Data\Form\Element\Editablemultiselect::class);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('some-rando-string');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $listener, string $selector): string {
+                    return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
+                }
+            );
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attrs, ?string $content): string {
+                    return "<$tag>$content</$tag>";
+                }
+            );
+        $this->_model = $testHelper->getObject(
+            \Magento\Framework\Data\Form\Element\Editablemultiselect::class,
+            [
+                'random' => $randomMock,
+                'secureRenderer' => $secureRendererMock
+            ]
+        );
         $values = [
             ['value' => 1, 'label' => 'Value1'],
             ['value' => 2, 'label' => 'Value2'],
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php
index 3296dd6b31c26..f207458899a7c 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php
@@ -10,7 +10,14 @@
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
 use Magento\Framework\Data\Form\Element\Editor;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Test for the widget.
+ *
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
 class EditorTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -53,9 +60,27 @@ class EditorTest extends \PHPUnit\Framework\TestCase
      */
     private $serializer;
 
+    /**
+     * @inheritDoc
+     */
     protected function setUp()
     {
         $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('some-rando-string');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $listener, string $selector): string {
+                    return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
+                }
+            );
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attrs, ?string $content): string {
+                    return "<$tag>$content</$tag>";
+                }
+            );
         $this->factoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\Factory::class);
         $this->collectionFactoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\CollectionFactory::class);
         $this->escaperMock = $this->createMock(\Magento\Framework\Escaper::class);
@@ -70,7 +95,9 @@ protected function setUp()
                 'factoryCollection' => $this->collectionFactoryMock,
                 'escaper' => $this->escaperMock,
                 'data' => ['config' => $this->configMock],
-                'serializer' => $this->serializer
+                'serializer' => $this->serializer,
+                'random' => $randomMock,
+                'secureRenderer' => $secureRendererMock
             ]
         );
 
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php
index 47df8390890bf..64031147679f8 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php
@@ -9,8 +9,15 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\Math\Random;
 use Magento\Framework\UrlInterface;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Test for the widget.
+ *
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
 class ImageTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -30,6 +37,21 @@ class ImageTest extends \PHPUnit\Framework\TestCase
 
     protected function setUp()
     {
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('some-rando-string');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $listener, string $selector): string {
+                    return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
+                }
+            );
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attrs, ?string $content): string {
+                    return "<$tag>$content</$tag>";
+                }
+            );
         $factoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\Factory::class);
         $collectionFactoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\CollectionFactory::class);
         $escaperMock = $this->createMock(\Magento\Framework\Escaper::class);
@@ -38,7 +60,10 @@ protected function setUp()
             $factoryMock,
             $collectionFactoryMock,
             $escaperMock,
-            $this->urlBuilder
+            $this->urlBuilder,
+            [],
+            $secureRendererMock,
+            $randomMock
         );
         $formMock = new \Magento\Framework\DataObject();
         $formMock->getHtmlIdPrefix('id_prefix');
@@ -92,9 +117,10 @@ public function testGetElementHtmlWithValue()
         $this->assertContains('type="file"', $html);
         $this->assertContains('value="test_value"', $html);
         $this->assertContains(
-            '<a href="http://localhost/media/test_value" onclick="imagePreview(\'_image\'); return false;"',
+            '<a previewlinkid="linkIdsome-rando-string" href="http://localhost/media/test_value"',
             $html
         );
+        $this->assertContains("imagePreview('_image');\nreturn false;", $html);
         $this->assertContains('<input type="checkbox"', $html);
     }
 }
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/LinkTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/LinkTest.php
index cf3cd0345e174..eec2d955f0344 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/LinkTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/LinkTest.php
@@ -9,8 +9,13 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class LinkTest extends \PHPUnit\Framework\TestCase
 {
+    private const RANDOM_STRING = '123456abcdef';
+
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -27,10 +32,15 @@ protected function setUp()
         $factoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\Factory::class);
         $collectionFactoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\CollectionFactory::class);
         $escaperMock = $objectManager->getObject(\Magento\Framework\Escaper::class);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn(self::RANDOM_STRING);
         $this->_link = new \Magento\Framework\Data\Form\Element\Link(
             $factoryMock,
             $collectionFactoryMock,
-            $escaperMock
+            $escaperMock,
+            [],
+            $this->createMock(SecureHtmlRenderer::class),
+            $randomMock
         );
         $formMock = new \Magento\Framework\DataObject();
         $formMock->getHtmlIdPrefix('id_prefix');
@@ -58,7 +68,8 @@ public function testGetElementHtml()
         $this->_link->setValue('Link Text');
         $html = $this->_link->getElementHtml();
         $this->assertEquals(
-            "link_before<a id=\"link_id\"  data-ui-id=\"form-element-\">Link Text</a>\nlink_after",
+            "link_before<a id=\"link_id\" formelementhookid=\"elemId" .self::RANDOM_STRING
+            ."\" data-ui-id=\"form-element-\">Link Text</a>\nlink_after",
             $html
         );
     }
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php
index c515e0aca01df..ce83705e105b8 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php
@@ -6,7 +6,14 @@
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
 use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Test for the widget.
+ *
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+ */
 class MultiselectTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -14,14 +21,34 @@ class MultiselectTest extends \PHPUnit\Framework\TestCase
      */
     protected $_model;
 
+    /**
+     * @inheritDoc
+     */
     protected function setUp()
     {
         $testHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('some-rando-string');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $listener, string $selector): string {
+                    return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
+                }
+            );
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attrs, ?string $content): string {
+                    return "<$tag>$content</$tag>";
+                }
+            );
         $escaper = new Escaper();
         $this->_model = $testHelper->getObject(
             \Magento\Framework\Data\Form\Element\Editablemultiselect::class,
             [
-                '_escaper' => $escaper
+                '_escaper' => $escaper,
+                'random' => $randomMock,
+                'secureRenderer' => $secureRendererMock
             ]
         );
         $this->_model->setForm(new \Magento\Framework\DataObject());
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/EventHandlerData.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/EventHandlerData.php
new file mode 100644
index 0000000000000..9d7afc5211cd2
--- /dev/null
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/EventHandlerData.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Framework\View\Helper\SecureHtmlRender;
+
+/**
+ * JS event handler data.
+ */
+class EventHandlerData
+{
+    /**
+     * @var string
+     */
+    private $event;
+
+    /**
+     * @var string
+     */
+    private $code;
+
+    /**
+     * @param string $event
+     * @param string $code
+     */
+    public function __construct(string $event, string $code)
+    {
+        $this->event = $event;
+        $this->code = $code;
+    }
+
+    /**
+     * Full event name like "onclick"
+     *
+     * @return string
+     */
+    public function getEvent(): string
+    {
+        return $this->event;
+    }
+
+    /**
+     * JavaScript code.
+     *
+     * @return string
+     */
+    public function getCode(): string
+    {
+        return $this->code;
+    }
+}
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/HtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/HtmlRenderer.php
new file mode 100644
index 0000000000000..d8705b63cd0a9
--- /dev/null
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/HtmlRenderer.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+namespace Magento\Framework\View\Helper\SecureHtmlRender;
+
+use Magento\Framework\Escaper;
+
+/**
+ * Renders HTML based on provided data.
+ */
+class HtmlRenderer
+{
+    /**
+     * @var Escaper
+     */
+    private $escaper;
+
+    /**
+     * @param Escaper $escaper
+     */
+    public function __construct(Escaper $escaper)
+    {
+        $this->escaper = $escaper;
+    }
+
+    /**
+     * Render the tag.
+     *
+     * @param TagData $tagData
+     * @return string
+     */
+    public function renderTag(TagData $tagData): string
+    {
+        $attributesHtmls = [];
+        foreach ($tagData->getAttributes() as $attribute => $value) {
+            $attributesHtmls[] = $attribute . '="' .$this->escaper->escapeHtmlAttr($value) .'"';
+        }
+        $content = null;
+        if ($tagData->getContent() !== null) {
+            $content = $tagData->isTextContent()
+                ? $this->escaper->escapeHtml($tagData->getContent()) : $tagData->getContent();
+        }
+        $attributesHtml = '';
+        if ($attributesHtmls) {
+            $attributesHtml = ' ' .implode(' ', $attributesHtmls);
+        }
+
+        $html = '<' .$tagData->getTag() .$attributesHtml;
+        if ($content) {
+            $html .= '>' .$content .'</' .$tagData->getTag() .'>';
+        } else {
+            $html .= '/>';
+        }
+
+        return $html;
+    }
+
+    /**
+     * Render the handler as an HTML attribute.
+     *
+     * @param EventHandlerData $eventHandlerData
+     * @return string
+     */
+    public function renderEventHandler(EventHandlerData $eventHandlerData): string
+    {
+        return $eventHandlerData->getEvent() .'="'
+            .$this->escaper->escapeHtmlAttr($eventHandlerData->getCode()) .'"';
+    }
+}
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/SecurityProcessorInterface.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/SecurityProcessorInterface.php
new file mode 100644
index 0000000000000..c02394a17e1aa
--- /dev/null
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/SecurityProcessorInterface.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Framework\View\Helper\SecureHtmlRender;
+
+/**
+ * Perform security related modifications or logic for HTML being rendered.
+ */
+interface SecurityProcessorInterface
+{
+    /**
+     * Process a tag.
+     *
+     * @param TagData $tagData
+     * @return TagData
+     */
+    public function processTag(TagData $tagData): TagData;
+
+    /**
+     * Process an event handler.
+     *
+     * @param EventHandlerData $eventHandlerData
+     * @return EventHandlerData
+     */
+    public function processEventHandler(EventHandlerData $eventHandlerData): EventHandlerData;
+}
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/TagData.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/TagData.php
new file mode 100644
index 0000000000000..c856dae75d023
--- /dev/null
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRender/TagData.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Framework\View\Helper\SecureHtmlRender;
+
+/**
+ * Tag data to render.
+ */
+class TagData
+{
+    /**
+     * @var string
+     */
+    private $tag;
+
+    /**
+     * @var string[]
+     */
+    private $attributes;
+
+    /**
+     * @var string|null
+     */
+    private $content;
+
+    /**
+     * @var bool
+     */
+    private $textContent;
+
+    /**
+     * @param string $tag
+     * @param string[] $attributes
+     * @param string|null $content
+     * @param bool $textContent
+     */
+    public function __construct(string $tag, array $attributes, ?string $content, bool $textContent)
+    {
+        $this->tag = $tag;
+        $this->attributes = $attributes;
+        $this->content = $content;
+        $this->textContent = $textContent;
+    }
+
+    /**
+     * Tag name (like "style", "script" etc)
+     *
+     * @return string
+     */
+    public function getTag(): string
+    {
+        return $this->tag;
+    }
+
+    /**
+     * Attributes list, not escaped.
+     *
+     * @return string[]
+     */
+    public function getAttributes(): array
+    {
+        return $this->attributes;
+    }
+
+    /**
+     * Text or HTML inner content.
+     *
+     * @return string|null
+     */
+    public function getContent(): ?string
+    {
+        return $this->content;
+    }
+
+    /**
+     * Is the content to be treated as text or HTML?
+     *
+     * @return bool
+     */
+    public function isTextContent(): bool
+    {
+        return $this->textContent;
+    }
+}
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
new file mode 100644
index 0000000000000..5213e0b35d94d
--- /dev/null
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -0,0 +1,117 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+declare(strict_types=1);
+
+namespace Magento\Framework\View\Helper;
+
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRender\EventHandlerData;
+use Magento\Framework\View\Helper\SecureHtmlRender\HtmlRenderer;
+use Magento\Framework\View\Helper\SecureHtmlRender\SecurityProcessorInterface;
+use Magento\Framework\View\Helper\SecureHtmlRender\TagData;
+
+/**
+ * Render HTML elements with consideration to application security.
+ */
+class SecureHtmlRenderer
+{
+    /**
+     * @var HtmlRenderer
+     */
+    private $renderer;
+
+    /**
+     * @var SecurityProcessorInterface[]
+     */
+    private $processors;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @param HtmlRenderer $renderer
+     * @param Random $random
+     * @param SecurityProcessorInterface[] $processors
+     */
+    public function __construct(HtmlRenderer $renderer, Random $random, array $processors = [])
+    {
+        $this->renderer = $renderer;
+        $this->random = $random;
+        $this->processors = $processors;
+    }
+
+    /**
+     * Renders HTML tag while possibly modifying or using it's attributes and content for security reasons.
+     *
+     * @param string $tagName Like "script" or "style"
+     * @param string[] $attributes Attributes map, values must not be escaped.
+     * @param string|null $content Tag's content.
+     * @param bool $textContent Whether to treat the tag's content as text or HTML.
+     * @return string
+     */
+    public function renderTag(
+        string $tagName,
+        array $attributes,
+        ?string $content = null,
+        bool $textContent = true
+    ): string {
+        $tag = new TagData($tagName, $attributes, $content, $textContent);
+        foreach ($this->processors as $processor) {
+            $tag = $processor->processTag($tag);
+        }
+
+        return $this->renderer->renderTag($tag);
+    }
+
+    /**
+     * Render event listener as an HTML attribute while possibly modifying or using it's content for security reasons.
+     *
+     * @param string $eventName Full attribute name like "onclick".
+     * @param string $javascript
+     * @return string
+     */
+    public function renderEventListener(string $eventName, string $javascript): string
+    {
+        $event = new EventHandlerData($eventName, $javascript);
+        foreach ($this->processors as $processor) {
+            $event = $processor->processEventHandler($event);
+        }
+
+        return $this->renderer->renderEventHandler($event);
+    }
+
+    /**
+     * Render event listener script as a separate tag instead of an attribute.
+     *
+     * @param string $eventName Full event name like "onclick".
+     * @param string $attributeJavascript JS that would've gone to an HTML attribute.
+     * @param string $elementSelector CSS selector for the element we handle the event for.
+     * @return string Result script tag.
+     */
+    public function renderEventListenerAsTag(
+        string $eventName,
+        string $attributeJavascript,
+        string $elementSelector
+    ): string {
+        $eventName = mb_strtolower(mb_substr($eventName, 2));
+        $listenerFunction = 'eventListener' .$this->random->getRandomString(32);
+        $elementName = 'listenedElement' .$this->random->getRandomString(32);
+        $script = <<<script
+            function {$listenerFunction} () {
+                {$attributeJavascript};
+            }
+            let {$elementName} = document.querySelector("{$elementSelector}");
+            if ({$elementName}) {
+                {$elementName}.addEventListener("{$eventName}", (event) => {$listenerFunction}.apply(event.target));
+            }
+script;
+
+        return $this->renderTag('script', ['type' => 'text/javascript'], $script, false);
+    }
+}
diff --git a/lib/internal/Magento/Framework/View/TemplateEngine/Php.php b/lib/internal/Magento/Framework/View/TemplateEngine/Php.php
index 0437386e4fc2b..6ffcf02f1b869 100644
--- a/lib/internal/Magento/Framework/View/TemplateEngine/Php.php
+++ b/lib/internal/Magento/Framework/View/TemplateEngine/Php.php
@@ -31,22 +31,22 @@ class Php implements TemplateEngineInterface
     protected $_helperFactory;
 
     /**
-     * @var Escaper
+     * @var object[]
      */
-    private $escaper;
+    private $blockVariables = [];
 
     /**
      * Constructor
      *
      * @param \Magento\Framework\ObjectManagerInterface $helperFactory
-     * @param Escaper|null $escaper
+     * @param object[] $blockVariables
      */
     public function __construct(
         \Magento\Framework\ObjectManagerInterface $helperFactory,
-        ?Escaper $escaper = null
+        array $blockVariables = []
     ) {
         $this->_helperFactory = $helperFactory;
-        $this->escaper = $escaper ?? $helperFactory->get(Escaper::class);
+        $this->blockVariables = $blockVariables;
     }
 
     /**
@@ -60,7 +60,6 @@ public function __construct(
      * @param array                    $dictionary
      * @return string
      * @throws \Exception
-     * @SuppressWarnings(PHPMD.UnusedLocalVariable)
      */
     public function render(BlockInterface $block, $fileName, array $dictionary = [])
     {
@@ -68,10 +67,8 @@ public function render(BlockInterface $block, $fileName, array $dictionary = [])
         try {
             $tmpBlock = $this->_currentBlock;
             $this->_currentBlock = $block;
+            $dictionary = array_merge($this->blockVariables, $dictionary);
             extract($dictionary, EXTR_SKIP);
-            //So it can be used in the template.
-            $escaper = $this->escaper;
-            // phpcs:ignore
             include $fileName;
             $this->_currentBlock = $tmpBlock;
         } catch (\Exception $exception) {

From 6cd54be7b4beb513f1bb3471dd0ea157c87de5bb Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:30:04 -0500
Subject: [PATCH 066/307] MC-24063: [2.4.x Port] Implement CSP

---
 app/etc/di.xml                                           | 1 +
 .../Magento/Framework/View/TemplateEngine/Php.php        | 9 ++++-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/etc/di.xml b/app/etc/di.xml
index 3ec48b82e921b..60335341d782a 100644
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -1829,6 +1829,7 @@
         <arguments>
             <argument name="blockVariables" xsi:type="array">
                 <item name="secureRenderer" xsi:type="object">Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy</item>
+                <item name="escaper" xsi:type="object">Magento\Framework\Escaper</item>
             </argument>
         </arguments>
     </type>
diff --git a/lib/internal/Magento/Framework/View/TemplateEngine/Php.php b/lib/internal/Magento/Framework/View/TemplateEngine/Php.php
index 6ffcf02f1b869..0a4e90504a350 100644
--- a/lib/internal/Magento/Framework/View/TemplateEngine/Php.php
+++ b/lib/internal/Magento/Framework/View/TemplateEngine/Php.php
@@ -7,7 +7,6 @@
 
 namespace Magento\Framework\View\TemplateEngine;
 
-use Magento\Framework\Escaper;
 use Magento\Framework\View\Element\BlockInterface;
 use Magento\Framework\View\TemplateEngineInterface;
 
@@ -55,11 +54,11 @@ public function __construct(
      * Include the named PHTML template using the given block as the $this
      * reference, though only public methods will be accessible.
      *
-     * @param BlockInterface           $block
-     * @param string                   $fileName
-     * @param array                    $dictionary
+     * @param BlockInterface $block
+     * @param string $fileName
+     * @param array $dictionary
      * @return string
-     * @throws \Exception
+     * @throws \Throwable
      */
     public function render(BlockInterface $block, $fileName, array $dictionary = [])
     {

From 0a3efcceea3fbadc0a07e3a5aa6ea3d940c3976c Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 16:48:58 -0500
Subject: [PATCH 067/307] MC-24063: [2.4.x Port] Implement CSP

---
 app/code/Magento/Csp/etc/di.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index 5f9b9f7b0fc50..489eefb7e1d31 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -80,6 +80,7 @@
             <argument name="blockVariables" xsi:type="array">
                 <item name="csp" xsi:type="object">Magento\Csp\Api\InlineUtilInterface\Proxy</item>
                 <item name="secureRenderer" xsi:type="object">Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy</item>
+                <item name="escaper" xsi:type="object">Magento\Framework\Escaper</item>
             </argument>
         </arguments>
     </type>

From 7aaf832a9f91398597bc90012af59ac2bd03d9f1 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 23 Mar 2020 18:18:33 -0500
Subject: [PATCH 068/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Magento/Backend/Block/AbstractBlock.php   |   4 +-
 .../Widget/Grid/Column/Renderer/Action.php    |  38 ++++-
 .../Widget/Grid/Column/Renderer/Checkbox.php  |  33 +++-
 .../Adminhtml/Grid/Renderer/Multiaction.php   |  37 +++-
 .../Widget/Grid/Column/Renderer/Button.php    | 158 +++++++++++++++---
 .../Framework/View/Element/Html/Link.php      |  73 +++++++-
 6 files changed, 307 insertions(+), 36 deletions(-)

diff --git a/app/code/Magento/Backend/Block/AbstractBlock.php b/app/code/Magento/Backend/Block/AbstractBlock.php
index fc91f99e3dbaf..bfac54f8c555c 100644
--- a/app/code/Magento/Backend/Block/AbstractBlock.php
+++ b/app/code/Magento/Backend/Block/AbstractBlock.php
@@ -22,10 +22,10 @@ class AbstractBlock extends \Magento\Framework\View\Element\AbstractBlock
     protected $_authorization;
 
     /**
-     * @param \Magento\Backend\Block\Context $context
+     * @param Context $context
      * @param array $data
      */
-    public function __construct(\Magento\Backend\Block\Context $context, array $data = [])
+    public function __construct(Context $context, array $data = [])
     {
         $this->_authorization = $context->getAuthorization();
         parent::__construct($context, $data);
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
index a7d85a4cfef4c..5cae7b838a5af 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
@@ -6,6 +6,10 @@
 
 namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Grid column widget for rendering action grid cells
  *
@@ -20,18 +24,34 @@ class Action extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
      */
     protected $_jsonEncoder;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureHtmlRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureHtmlRenderer
+     * @param Random|null $random
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureHtmlRenderer = null,
+        ?Random $random = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         parent::__construct($context, $data);
+        $this->secureHtmlRenderer = $secureHtmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
     }
 
     /**
@@ -111,8 +131,22 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
             unset($action['confirm']);
         }
 
+        if (empty($action['id'])) {
+            $action['id'] = 'id' .$this->random->getRandomString(32);
+        }
         $actionAttributes->setData($action);
-        return '<a ' . $actionAttributes->serialize() . '>' . $actionCaption . '</a>';
+        $onclick = $actionAttributes->getData('onclick');
+        $style = $actionAttributes->getData('style');
+        $actionAttributes->unsetData(['onclick', 'style']);
+        $html = '<a ' . $actionAttributes->serialize() . '>' . $actionCaption . '</a>';
+        if ($onclick) {
+            $html .= $this->secureHtmlRenderer->renderEventListenerAsTag('onclick', $onclick, "#{$action['id']}");
+        }
+        if ($style) {
+            $html .= $this->secureHtmlRenderer->renderTag('style', [], "#{$action['id']} { {$style} }", false);
+        }
+
+        return $html;
     }
 
     /**
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
index 1297f5cd330b8..a83527ccbe0a8 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Backend\Block\Widget\Grid\Column\Renderer;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Grid checkbox column renderer
  *
@@ -29,18 +33,34 @@ class Checkbox extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Abstra
      */
     protected $_converter;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param \Magento\Backend\Block\Context $context
-     * @param \Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter $converter
+     * @param Options\Converter $converter
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Block\Widget\Grid\Column\Renderer\Options\Converter $converter,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
         parent::__construct($context, $data);
         $this->_converter = $converter;
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
     }
 
     /**
@@ -154,11 +174,18 @@ public function renderHeader()
         if ($this->getColumn()->getDisabled()) {
             $disabled = ' disabled="disabled"';
         }
+        $id = 'id' .$this->random->getRandomString(32);
         $html = '<th class="data-grid-th data-grid-actions-cell"><input type="checkbox" ';
+        $html .= 'id="' .$id .'" ';
         $html .= 'name="' . $this->getColumn()->getFieldName() . '" ';
-        $html .= 'onclick="' . $this->getColumn()->getGrid()->getJsObjectName() . '.checkCheckboxes(this)" ';
         $html .= 'class="admin__control-checkbox"' . $checked . $disabled . ' ';
         $html .= 'title="' . __('Select All') . '"/><label></label></th>';
+        $html .= $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            $this->getColumn()->getGrid()->getJsObjectName() . '.checkCheckboxes(this)',
+            "#$id"
+        );
+
         return $html;
     }
 }
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
index bd6e8b69a29ea..b440e8d17de53 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Customer\Block\Adminhtml\Grid\Renderer;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Adminhtml customers wishlist grid item action renderer for few action controls in one cell
  *
@@ -12,6 +16,32 @@
  */
 class Multiaction extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Action
 {
+
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureHtmlRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @inheritDoc
+     */
+    public function __construct(
+        \Magento\Backend\Block\Context $context,
+        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
+        array $data = [],
+        ?SecureHtmlRenderer $secureHtmlRenderer = null,
+        ?Random $random = null
+    ) {
+        parent::__construct($context, $jsonEncoder, $data, $secureHtmlRenderer, $random);
+        $this->secureHtmlRenderer = $secureHtmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+    }
+
     /**
      * Renders column
      *
@@ -55,9 +85,10 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
 
         if (isset($action['process']) && $action['process'] == 'configurable') {
             if ($product->canConfigure()) {
-                $style = '';
-                $onClick = sprintf('onclick="return %s.configureItem(%s)"', $action['control_object'], $row->getId());
-                return sprintf('<a href="%s" %s %s>%s</a>', $action['url'], $style, $onClick, $action['caption']);
+                $id = 'id' .$this->random->getRandomString(32);
+                $onClick = sprintf('return %s.configureItem(%s)', $action['control_object'], $row->getId());
+                return sprintf('<a href="%s" id="%s">%s</a>', $action['url'], $id, $action['caption'])
+                    .$this->secureHtmlRenderer->renderEventListenerAsTag('onclick', $onClick, "#$id");
             } else {
                 return false;
             }
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
index 1345a04b357ab..4e100b4a816fc 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
@@ -6,8 +6,12 @@
 namespace Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer;
 
 use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\DataObject;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Integration\Model\Integration;
+use Magento\Backend\Block\Context;
 
 /**
  * Render HTML <button> tag.
@@ -15,20 +19,76 @@
  */
 class Button extends AbstractRenderer
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * Button constructor.
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
+    ) {
+        parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+    }
+
     /**
      * {@inheritdoc}
      */
-    public function render(\Magento\Framework\DataObject $row)
+    public function render(DataObject $row)
     {
-        /** @var array $attributes */
-        $attributes = $this->_prepareAttributes($row);
-        return sprintf('<button %s>%s</button>', $this->_getAttributesStr($attributes), $this->_getValue($row));
+        $attributes = $this->extractAttributes($row);
+        $attributes['button-renderer-hook-id'] = 'hook' .$this->random->getRandomString(32);
+
+        return sprintf('<button %s>%s</button>', $this->renderAttributes($attributes), $this->_getValue($row))
+            .$this->renderSpecialAttributes($attributes);
+    }
+
+    /**
+     * Extract attributes to render.
+     *
+     * @param DataObject $row
+     * @return string[]
+     */
+    private function extractAttributes(DataObject $row): array
+    {
+        $attributes = [];
+        foreach ($this->_getValidAttributes() as $attributeName) {
+            $methodName = sprintf('_get%sAttribute', ucfirst($attributeName));
+            $rowMethodName = sprintf('get%s', ucfirst($attributeName));
+            $attributeValue = method_exists(
+                $this,
+                $methodName
+            ) ? $this->{$methodName}(
+                $row
+            ) : $this->getColumn()->{$rowMethodName}();
+            if ($attributeValue) {
+                $attributes[$attributeName] = $attributeValue;
+            }
+        }
+
+        return $attributes;
     }
 
     /**
      * Determine whether current integration came from config file
      *
-     * @param \Magento\Framework\DataObject $row
+     * @param DataObject $row
      * @return bool
      */
     protected function _isConfigBasedIntegration(DataObject $row)
@@ -43,7 +103,7 @@ protected function _isConfigBasedIntegration(DataObject $row)
     /**
      * Whether current item is disabled.
      *
-     * @param \Magento\Framework\DataObject $row
+     * @param DataObject $row
      * @return bool
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
@@ -53,7 +113,7 @@ protected function _isDisabled(DataObject $row)
     }
 
     /**
-     * @param \Magento\Framework\DataObject $row
+     * @param DataObject $row
      * @return string
      */
     protected function _getDisabledAttribute(DataObject $row)
@@ -68,33 +128,47 @@ protected function _getDisabledAttribute(DataObject $row)
      * - Then it tries to get it from the button's column layout description.
      * If received attribute value is empty - attribute is not added to final HTML.
      *
-     * @param \Magento\Framework\DataObject $row
+     * @param DataObject $row
      * @return array
      */
     protected function _prepareAttributes(DataObject $row)
     {
-        $attributes = [];
-        foreach ($this->_getValidAttributes() as $attributeName) {
-            $methodName = sprintf('_get%sAttribute', ucfirst($attributeName));
-            $rowMethodName = sprintf('get%s', ucfirst($attributeName));
-            $attributeValue = method_exists(
-                $this,
-                $methodName
-            ) ? $this->{$methodName}(
-                $row
-            ) : $this->getColumn()->{$rowMethodName}();
-
-            if ($attributeValue) {
-                $attributes[] = sprintf(
-                    '%s="%s"',
-                    $attributeName,
-                    $this->escapeHtmlAttr($attributeValue, false)
-                );
+        $attributes = $this->extractAttributes($row);
+        foreach ($attributes as $attributeName => $attributeValue) {
+            if ($attributeName === 'style' || mb_strpos($attributeName, 'on') === 0) {
+                //Will render event handlers and style as separate tags
+                continue;
             }
+            $attributes[] = sprintf(
+                '%s="%s"',
+                $attributeName,
+                $this->escapeHtmlAttr($attributeValue, false)
+            );
         }
+
         return $attributes;
     }
 
+    /**
+     * Render HTML attributes.
+     *
+     * @param array $attributes
+     * @return string
+     */
+    private function renderAttributes(array $attributes): string
+    {
+        $html = '';
+        foreach ($attributes as $attributeName => $attributeValue) {
+            if ($attributeName === 'style' || mb_strpos($attributeName, 'on') === 0) {
+                //Will render event handlers and style as separate tags
+                continue;
+            }
+            $html .= ($html ? ' ' : '') ."{$attributeName}=\"{$this->escapeHtmlAttr($attributeValue)}\"";
+        }
+
+        return $html;
+    }
+
     /**
      * Get list of available HTML attributes for this element.
      *
@@ -140,4 +214,38 @@ protected function _getAttributesStr($attributes)
     {
         return join(' ', $attributes);
     }
+
+    /**
+     * Render special attributes as separate tags.
+     *
+     * @param string[]
+     * @return string
+     */
+    private function renderSpecialAttributes(array $attributes): string
+    {
+        if (!$hookId = $attributes['button-renderer-hook-id']) {
+            return '';
+        }
+
+        $html = '';
+        if (isset($attributes['style'])) {
+            $html = $this->secureRenderer->renderTag(
+                'style',
+                [],
+                "[button-renderer-hook-id='$hookId'] { {$attributes['style']} }",
+                false
+            );
+        }
+        foreach ($this->_getValidAttributes() as $attr) {
+            if (isset($attributes[$attr]) && mb_strpos($attr, 'on') === 0) {
+                $html .= $this->secureRenderer->renderEventListenerAsTag(
+                    $attr,
+                    $attributes[$attr],
+                    "*[button-renderer-hook-id='$hookId']"
+                );
+            }
+        }
+
+        return $html;
+    }
 }
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php
index 6c5761f8cea25..97ad6031c1a76 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link.php
@@ -5,6 +5,12 @@
  */
 namespace Magento\Framework\View\Element\Html;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Element\Template;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+use Magento\Framework\View\Element\Template\Context;
+
 /**
  * HTML anchor element block
  *
@@ -51,6 +57,33 @@ class Link extends \Magento\Framework\View\Element\Template
         'onkeyup', // %events
     ];
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
+    ) {
+        parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+    }
+
     /**
      * Prepare link attributes as serialized and formatted string
      *
@@ -60,6 +93,9 @@ public function getLinkAttributes()
     {
         $attributes = [];
         foreach ($this->allowedAttributes as $attribute) {
+            if ($attribute === 'style' || mb_strpos($attribute, 'on') === 0) {
+                continue;
+            }
             $value = $this->getDataUsingMethod($attribute);
             if ($value !== null) {
                 $attributes[$attribute] = $this->escapeHtml($value);
@@ -103,7 +139,12 @@ protected function _toHtml()
             return parent::_toHtml();
         }
 
-        return '<li><a ' . $this->getLinkAttributes() . ' >' . $this->escapeHtml($this->getLabel()) . '</a></li>';
+        if (!$this->getDataUsingMethod('id')) {
+            $this->setDataUsingMethod('id', 'id' .$this->random->getRandomString(32));
+        }
+
+        return '<li><a ' . $this->getLinkAttributes() . ' >' . $this->escapeHtml($this->getLabel()) . '</a></li>'
+            .$this->renderSpecialAttributes();
     }
 
     /**
@@ -115,4 +156,34 @@ public function getHref()
     {
         return $this->getUrl($this->getPath());
     }
+
+    /**
+     * Render attributes that require separate tags.
+     *
+     * @return string
+     */
+    private function renderSpecialAttributes(): string
+    {
+        $id = $this->getDataUsingMethod('id');
+        if (!$id) {
+            throw new \RuntimeException('ID is required to render the link');
+        }
+
+        $html = '';
+        $style = $this->getDataUsingMethod('style');
+        if ($style) {
+            $html .= $this->secureRenderer->renderTag('style', [], "#$id { $style }", false);
+        }
+        foreach ($this->allowedAttributes as  $attribute) {
+            if (mb_strpos($attribute, 'on') === 0) {
+                $html .= $this->secureRenderer->renderEventListenerAsTag(
+                    $attribute,
+                    $this->getDataUsingMethod($attribute),
+                    "#$id"
+                );
+            }
+        }
+
+        return $html;
+    }
 }

From d201c3c0639c1db423876ae2e802d3bf2be1349f Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 24 Mar 2020 11:41:05 -0500
Subject: [PATCH 069/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../System/Config/CollectionTimeLabelTest.php          |  5 -----
 app/code/Magento/Csp/etc/di.xml                        | 10 ----------
 .../Magento/Framework/View/Element/Html/Link.php       |  4 ++--
 3 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
index cf2c6d46539fa..60aab4bcb0ffc 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
@@ -53,11 +53,6 @@ class CollectionTimeLabelTest extends TestCase
      */
     private $abstractElementMock;
 
-    /**
-     * @var \PHPUnit\Framework\MockObject\MockObject
-     */
-    private $formMock;
-
     /**
      * @inheritDoc
      */
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index 489eefb7e1d31..1de1191390725 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -49,11 +49,6 @@
             <argument name="fileName" xsi:type="string">csp_whitelist.xml</argument>
         </arguments>
     </type>
-    <type name="Magento\Csp\Model\Collector\CspWhitelistXml\Data">
-        <arguments>
-            <argument name="reader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Reader\Proxy</argument>
-        </arguments>
-    </type>
     <type name="Magento\Csp\Model\Collector\CspWhitelistXmlCollector">
         <arguments>
             <argument name="configReader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Data</argument>
@@ -64,11 +59,6 @@
             <argument name="reader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Reader\Proxy</argument>
         </arguments>
     </type>
-    <type name="Magento\Csp\Model\Collector\CspWhitelistXmlCollector">
-        <arguments>
-            <argument name="configReader" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXml\Data</argument>
-        </arguments>
-    </type>
     <preference for="Magento\Csp\Api\InlineUtilInterface" type="Magento\Csp\Helper\InlineUtil" />
     <type name="Magento\Csp\Plugin\TemplateRenderingPlugin">
         <arguments>
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php
index 97ad6031c1a76..f5f1bdbbbb40c 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link.php
@@ -175,10 +175,10 @@ private function renderSpecialAttributes(): string
             $html .= $this->secureRenderer->renderTag('style', [], "#$id { $style }", false);
         }
         foreach ($this->allowedAttributes as  $attribute) {
-            if (mb_strpos($attribute, 'on') === 0) {
+            if (mb_strpos($attribute, 'on') === 0 && $value = $this->getDataUsingMethod($attribute)) {
                 $html .= $this->secureRenderer->renderEventListenerAsTag(
                     $attribute,
-                    $this->getDataUsingMethod($attribute),
+                    $value,
                     "#$id"
                 );
             }

From 99033804fd57f19b7f6f39591173eeb637a809fd Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 24 Mar 2020 14:38:23 -0500
Subject: [PATCH 070/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Widget/Grid/Column/Renderer/Checkbox.php  |  2 +
 .../Adminhtml/Grid/Renderer/Multiaction.php   |  9 ++-
 .../Widget/Grid/Column/Renderer/Button.php    |  6 +-
 .../Grid/Column/Renderer/ButtonTest.php       | 45 +++++++++--
 .../Customer/Edit/Tab/Wishlist/Grid.php       |  4 +-
 .../Column/Renderer/Button/DeleteTest.php     | 14 ++--
 .../Grid/Column/Renderer/Button/EditTest.php  |  6 +-
 .../HTTP/PhpEnvironment/Response.php          |  3 +
 .../Framework/View/Element/Html/Link.php      |  2 +-
 .../View/Test/Unit/Element/Html/LinkTest.php  | 75 +++++++++++++------
 10 files changed, 122 insertions(+), 44 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
index a83527ccbe0a8..6609e03baeed3 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
@@ -132,6 +132,8 @@ public function render(\Magento\Framework\DataObject $row)
     }
 
     /**
+     * Render checkbox HTML.
+     *
      * @param string $value   Value of the element
      * @param bool   $checked Whether it is checked
      * @return string
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
index b440e8d17de53..5de36c60f0212 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
@@ -87,8 +87,13 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
             if ($product->canConfigure()) {
                 $id = 'id' .$this->random->getRandomString(32);
                 $onClick = sprintf('return %s.configureItem(%s)', $action['control_object'], $row->getId());
-                return sprintf('<a href="%s" id="%s">%s</a>', $action['url'], $id, $action['caption'])
-                    .$this->secureHtmlRenderer->renderEventListenerAsTag('onclick', $onClick, "#$id");
+                return sprintf(
+                    '<a href="%s" id="%s" class="configure-item-link">%s</a>%s',
+                    $action['url'],
+                    $id,
+                    $action['caption'],
+                    $this->secureHtmlRenderer->renderEventListenerAsTag('onclick', $onClick, "#$id")
+                );
             } else {
                 return false;
             }
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
index 4e100b4a816fc..66718d981e84e 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
@@ -48,7 +48,7 @@ public function __construct(
     }
 
     /**
-     * {@inheritdoc}
+     * @inheritDoc
      */
     public function render(DataObject $row)
     {
@@ -113,6 +113,8 @@ protected function _isDisabled(DataObject $row)
     }
 
     /**
+     * Retrieve "disabled" attribute value for the row.
+     *
      * @param DataObject $row
      * @return string
      */
@@ -218,7 +220,7 @@ protected function _getAttributesStr($attributes)
     /**
      * Render special attributes as separate tags.
      *
-     * @param string[]
+     * @param string[] $attributes
      * @return string
      */
     private function renderSpecialAttributes(array $attributes): string
diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
index 583ee91857c28..68c412697a463 100644
--- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
+++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
@@ -6,6 +6,10 @@
 
 namespace Magento\Integration\Test\Unit\Block\Adminhtml\Widget\Grid\Column\Renderer;
 
+use Magento\Framework\DataObject;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class ButtonTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -32,13 +36,31 @@ protected function setUp()
     {
         $this->escaperMock = $this->createMock(\Magento\Framework\Escaper::class);
         $this->escaperMock->expects($this->any())->method('escapeHtml')->willReturnArgument(0);
+        $this->escaperMock->expects($this->any())->method('escapeHtmlAttr')->willReturnArgument(0);
         $this->contextMock = $this->createPartialMock(\Magento\Backend\Block\Context::class, ['getEscaper']);
         $this->contextMock->expects($this->any())->method('getEscaper')->will($this->returnValue($this->escaperMock));
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('random');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
 
         $this->objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->buttonRenderer = $this->objectManagerHelper->getObject(
             \Magento\Integration\Block\Adminhtml\Widget\Grid\Column\Renderer\Button::class,
-            ['context' => $this->contextMock]
+            ['context' => $this->contextMock, 'random' => $randomMock, 'secureRenderer' => $secureRendererMock]
         );
     }
 
@@ -47,10 +69,9 @@ protected function setUp()
      */
     public function testRender()
     {
-        $expectedResult = '<button id="1" type="bigButton">my button</button>';
         $column = $this->getMockBuilder(\Magento\Backend\Block\Widget\Grid\Column::class)
             ->disableOriginalConstructor()
-            ->setMethods(['getType', 'getId', 'getIndex'])
+            ->setMethods(['getType', 'getId', 'getIndex', 'getStyle', 'getOnclick'])
             ->getMock();
         $column->expects($this->any())
             ->method('getType')
@@ -58,15 +79,25 @@ public function testRender()
         $column->expects($this->any())
             ->method('getId')
             ->willReturn('1');
-        $this->escaperMock->expects($this->at(0))->method('escapeHtmlAttr')->willReturn('1');
-        $this->escaperMock->expects($this->at(1))->method('escapeHtmlAttr')->willReturn('bigButton');
         $column->expects($this->any())
             ->method('getIndex')
             ->willReturn('name');
+        $column->expects($this->any())
+            ->method('getStyle')
+            ->willReturn('display: block;');
+        $column->expects($this->any())
+            ->method('getOnclick')
+            ->willReturn('alert(1);');
         $this->buttonRenderer->setColumn($column);
 
-        $object = new \Magento\Framework\DataObject(['name' => 'my button']);
+        $object = new DataObject(['name' => 'my button']);
         $actualResult = $this->buttonRenderer->render($object);
-        $this->assertEquals($expectedResult, $actualResult);
+        $this->assertEquals(
+            '<button id="1" type="bigButton" button-renderer-hook-id="hookrandom">my button</button>'
+            .'<style >[button-renderer-hook-id=\'hookrandom\'] { display: block; }</style>'
+            .'<script>document.querySelector(\'*[button-renderer-hook-id=\'hookrandom\']\').onclick = '
+            .'function () { alert(1); };</script>',
+            $actualResult
+        );
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
index f3c462de91893..c7c75757c585e 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
@@ -41,14 +41,14 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid
      *
      * @var string
      */
-    protected $deleteLink = 'a[onclick*="removeItem"]';
+    protected $deleteLink = 'a[text()="Delete"]';
 
     /**
      * Configure link selector
      *
      * @var string
      */
-    protected $configureLink = 'a[onclick*="configureItem"]';
+    protected $configureLink = 'a.configure-item-link';
 
     /**
      * Secondary part of row locator template for getRow() method with strict option.
diff --git a/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/DeleteTest.php
index c6cc68582ae6b..a44d21f0ef180 100644
--- a/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/DeleteTest.php
+++ b/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/DeleteTest.php
@@ -39,8 +39,8 @@ public function testRender()
         $buttonHtml = $this->deleteButtonBlock->render($integration);
         $this->assertContains('title="Remove"', $buttonHtml);
         $this->assertContains(
-            'onclick="this.setAttribute('data-url', '
-            . ''http://localhost/index.php/backend/admin/integration/delete/id/'
+            'this.setAttribute(\'data-url\', '
+            . '\'http://localhost/index.php/backend/admin/integration/delete/id/'
             . $integration->getId(),
             $buttonHtml
         );
@@ -52,10 +52,14 @@ public function testRenderDisabled()
         $integration = $this->getFixtureIntegration();
         $integration->setSetupType(Integration::TYPE_CONFIG);
         $buttonHtml = $this->deleteButtonBlock->render($integration);
-        $this->assertContains('title="Uninstall the extension to remove this integration"', $buttonHtml);
         $this->assertContains(
-            'onclick="this.setAttribute('data-url', '
-            . ''http://localhost/index.php/backend/admin/integration/delete/id/'
+            'title="' .$this->deleteButtonBlock->escapeHtmlAttr('Uninstall the extension to remove this integration')
+            .'"',
+            $buttonHtml
+        );
+        $this->assertContains(
+            'this.setAttribute(\'data-url\', '
+            . '\'http://localhost/index.php/backend/admin/integration/delete/id/'
             . $integration->getId(),
             $buttonHtml
         );
diff --git a/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/EditTest.php b/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/EditTest.php
index 0463053e6b5f1..7c78750a66cad 100644
--- a/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/EditTest.php
+++ b/dev/tests/integration/testsuite/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button/EditTest.php
@@ -38,9 +38,9 @@ public function testRenderEdit()
         $integration = $this->getFixtureIntegration();
         $buttonHtml = $this->editButtonBlock->render($integration);
         $this->assertContains('title="Edit"', $buttonHtml);
-        $this->assertContains('class="action edit"', $buttonHtml);
+        $this->assertContains('class="' .$this->editButtonBlock->escapeHtmlAttr('action edit') .'"', $buttonHtml);
         $this->assertContains(
-            'onclick="window.location.href='http://localhost/index.php/backend/admin/integration/edit/id/'
+            'window.location.href=\'http://localhost/index.php/backend/admin/integration/edit/id/'
             . $integration->getId(),
             $buttonHtml
         );
@@ -52,7 +52,7 @@ public function testRenderView()
         $integration->setSetupType(Integration::TYPE_CONFIG);
         $buttonHtml = $this->editButtonBlock->render($integration);
         $this->assertContains('title="View"', $buttonHtml);
-        $this->assertContains('class="action info"', $buttonHtml);
+        $this->assertContains('class="' .$this->editButtonBlock->escapeHtmlAttr('action info') .'"', $buttonHtml);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
index dd8e1a9ccd634..f5180eb96acfc 100644
--- a/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
+++ b/lib/internal/Magento/Framework/HTTP/PhpEnvironment/Response.php
@@ -28,6 +28,9 @@ public function getHeader($name)
         $headers = $this->getHeaders();
         if ($headers->has($name)) {
             $header = $headers->get($name);
+            if (is_iterable($header)) {
+                $header = $header[0];
+            }
         }
         return $header;
     }
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php
index f5f1bdbbbb40c..8322e904f940e 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link.php
@@ -174,7 +174,7 @@ private function renderSpecialAttributes(): string
         if ($style) {
             $html .= $this->secureRenderer->renderTag('style', [], "#$id { $style }", false);
         }
-        foreach ($this->allowedAttributes as  $attribute) {
+        foreach ($this->allowedAttributes as $attribute) {
             if (mb_strpos($attribute, 'on') === 0 && $value = $this->getDataUsingMethod($attribute)) {
                 $html .= $this->secureRenderer->renderEventListenerAsTag(
                     $attribute,
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
index 4c76087bfea12..a5c7d899086de 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
@@ -6,15 +6,17 @@
 
 namespace Magento\Framework\View\Test\Unit\Element\Html;
 
+use Magento\Framework\DataObject;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class LinkTest extends \PHPUnit\Framework\TestCase
 {
+    /**
+     * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager
+     */
     private $objectManager;
 
-    protected function setUp()
-    {
-        $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
-    }
-
     /**
      * @var array
      */
@@ -32,18 +34,18 @@ protected function setUp()
      */
     protected $link;
 
-    public function testGetLinkAttributes()
+    protected function setUp()
     {
+        $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+
         $escaperMock = $this->getMockBuilder(\Magento\Framework\Escaper::class)
             ->setMethods(['escapeHtml'])->disableOriginalConstructor()->getMock();
-
         $escaperMock->expects($this->any())
             ->method('escapeHtml')
             ->will($this->returnArgument(0));
 
         $urlBuilderMock = $this->getMockBuilder(\Magento\Framework\UrlInterface::class)
             ->setMethods(['getUrl'])->disableOriginalConstructor()->getMockForAbstractClass();
-
         $urlBuilderMock->expects($this->any())
             ->method('getUrl')
             ->willReturn('http://site.com/link.html');
@@ -55,7 +57,8 @@ public function testGetLinkAttributes()
             ->willReturn(false);
 
         $scopeConfigMock = $this->getMockBuilder(\Magento\Framework\App\Config::class)
-            ->setMethods(['isSetFlag'])->disableOriginalConstructor()->getMock();
+            ->disableOriginalConstructor()
+            ->getMock();
         $scopeConfigMock->expects($this->any())
             ->method('isSetFlag')
             ->willReturn(true);
@@ -64,54 +67,82 @@ public function testGetLinkAttributes()
             ->setMethods([])->disableOriginalConstructor()->getMock();
 
         $contextMock = $this->getMockBuilder(\Magento\Framework\View\Element\Template\Context::class)
-            ->setMethods(['getEscaper', 'getUrlBuilder', 'getValidator', 'getResolver', 'getScopeConfig'])
             ->disableOriginalConstructor()
             ->getMock();
-
         $contextMock->expects($this->any())
             ->method('getValidator')
             ->willReturn($validtorMock);
-
         $contextMock->expects($this->any())
             ->method('getResolver')
             ->willReturn($resolverMock);
-
         $contextMock->expects($this->any())
             ->method('getEscaper')
             ->willReturn($escaperMock);
-
         $contextMock->expects($this->any())
             ->method('getUrlBuilder')
             ->willReturn($urlBuilderMock);
-
         $contextMock->expects($this->any())
             ->method('getScopeConfig')
             ->willReturn($scopeConfigMock);
+        $contextMock->method('getEventManager')
+            ->willReturn($this->createMock(\Magento\Framework\Event\ManagerInterface::class));
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('random');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
 
         /** @var \Magento\Framework\View\Element\Html\Link $linkWithAttributes */
-        $linkWithAttributes = $this->objectManager->getObject(
+        $this->link = $this->objectManager->getObject(
             \Magento\Framework\View\Element\Html\Link::class,
-            ['context' => $contextMock]
+            ['context' => $contextMock, 'random' => $randomMock, 'secureRenderer' => $secureRendererMock]
         );
+    }
 
+    public function testGetLinkAttributes()
+    {
+        $linkWithAttributes = clone $this->link;
         $this->assertEquals(
             'href="http://site.com/link.html"',
             $linkWithAttributes->getLinkAttributes()
         );
 
         /** @var \Magento\Framework\View\Element\Html\Link $linkWithoutAttributes */
-        $linkWithoutAttributes = $this->objectManager->getObject(
-            \Magento\Framework\View\Element\Html\Link::class,
-            ['context' => $contextMock]
-        );
+        $linkWithoutAttributes = clone $this->link;
         foreach ($this->allowedAttributes as $attribute) {
             $linkWithoutAttributes->setDataUsingMethod($attribute, $attribute);
         }
 
         $this->assertEquals(
             'href="http://site.com/link.html" shape="shape" tabindex="tabindex"'
-            . ' onfocus="onfocus" onblur="onblur" id="id"',
+            . ' id="id"',
             $linkWithoutAttributes->getLinkAttributes()
         );
     }
+
+    public function testLinkHtml(): void
+    {
+        $this->link->setDataUsingMethod('style', 'display: block;');
+        $this->link->setDataUsingMethod('onclick', 'alert("clicked");');
+
+        $html = $this->link->toHtml();
+        $this->assertEquals(
+            '<li><a href="http://site.com/link.html" id="idrandom" ></a></li>'
+            .'<style >#idrandom { display: block; }</style>'
+            .'<script>document.querySelector(\'#idrandom\').onclick = function () { alert("clicked"); };</script>',
+            $html
+        );
+    }
 }

From 0031c45e144a8284f4d2d73b157eb471f825ea3b Mon Sep 17 00:00:00 2001
From: Sachin Admane <sadmane@adobe.com>
Date: Tue, 24 Mar 2020 16:20:36 -0500
Subject: [PATCH 071/307] MC-22963: Identify and Refactor GET requests that
 modify data.

Fix  delete button code.
---
 .../Search/Block/Adminhtml/Synonyms/Edit/DeleteButton.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Search/Block/Adminhtml/Synonyms/Edit/DeleteButton.php b/app/code/Magento/Search/Block/Adminhtml/Synonyms/Edit/DeleteButton.php
index a73edcce99760..3fa8fa9d417f3 100644
--- a/app/code/Magento/Search/Block/Adminhtml/Synonyms/Edit/DeleteButton.php
+++ b/app/code/Magento/Search/Block/Adminhtml/Synonyms/Edit/DeleteButton.php
@@ -8,11 +8,13 @@
 use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
 
 /**
- * Class DeleteButton
+ * Delete Synonyms Group Button Class
  */
 class DeleteButton extends GenericButton implements ButtonProviderInterface
 {
     /**
+     * Delete Button Data
+     *
      * @return array
      */
     public function getButtonData()
@@ -24,7 +26,7 @@ public function getButtonData()
                 'class' => 'delete',
                 'on_click' => 'deleteConfirm(\''
                     . __('Are you sure you want to delete this synonym group?')
-                    . '\', \'' . $this->getDeleteUrl() . '\')',
+                    . '\', \'' . $this->getDeleteUrl() . '\', {data: {}})',
                 'sort_order' => 20,
             ];
         }
@@ -32,6 +34,8 @@ public function getButtonData()
     }
 
     /**
+     * Delete Url
+     *
      * @return string
      */
     public function getDeleteUrl()

From 65cae6e82206e45da773eb3c232a7050e6290d8b Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 25 Mar 2020 11:02:44 -0500
Subject: [PATCH 072/307] MC-24063: [2.4.x Port] Implement CSP

---
 app/code/Magento/Backend/Block/Widget/Button.php         | 1 -
 .../integration/testsuite/Magento/Csp/CspUtilTest.php    | 1 +
 .../Framework/Data/Form/Element/AbstractElement.php      | 2 +-
 .../Test/Unit/Form/Element/EditablemultiselectTest.php   | 7 +++++--
 .../Framework/Data/Test/Unit/Form/Element/EditorTest.php | 9 ++++++---
 .../Framework/Data/Test/Unit/Form/Element/ImageTest.php  | 7 +++++--
 .../Data/Test/Unit/Form/Element/MultiselectTest.php      | 7 +++++--
 .../Framework/View/Test/Unit/Element/Html/LinkTest.php   | 5 +++++
 8 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index 6e449b4a33382..7aa7a7a36056e 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -162,7 +162,6 @@ protected function _attributesToHtml($attributes)
      */
     private function generateStyle(): string
     {
-        $buttonId = $this->getData('backend_button_widget_hook_id');
         $style = $this->getStyle();
 
         return <<<style
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
index 9b584ba7028ee..6af97bf83b4d0 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
@@ -21,6 +21,7 @@ class CspUtilTest extends AbstractController
      *
      * @return void
      * @magentoConfigFixture default_store csp/mode/storefront/report_only 0
+     * @magentoConfigFixture default_store csp/policies/storefront/scripts/inline 0
      */
     public function testPhtmlHelper(): void
     {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
index 759db7c093abc..0df5f2a9ca52f 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
@@ -440,7 +440,7 @@ private function generateAttributesSubstitute(): string
         if ($this->getStyle()) {
             $selector = "*[formelementhookid='{$this->generateElementId()}']";
             if ($id = $this->getHtmlId()) {
-                $selector = "#{$this->getHtmlId()}";
+                $selector = "#{$id}";
             }
             $html .= $this->secureRenderer->renderTag(
                 'style',
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php
index 329ce9292471a..956e09db87959 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditablemultiselectTest.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
@@ -38,7 +39,9 @@ function (string $event, string $listener, string $selector): string {
         $secureRendererMock->method('renderTag')
             ->willReturnCallback(
                 function (string $tag, array $attrs, ?string $content): string {
-                    return "<$tag>$content</$tag>";
+                    $attrs = new DataObject($attrs);
+
+                    return "<$tag {$attrs->serialize()}>$content</$tag>";
                 }
             );
         $this->_model = $testHelper->getObject(
@@ -54,7 +57,7 @@ function (string $tag, array $attrs, ?string $content): string {
             ['value' => 3, 'label' => 'Value3'],
         ];
         $value = [1, 3];
-        $this->_model->setForm(new \Magento\Framework\DataObject());
+        $this->_model->setForm(new DataObject());
         $this->_model->setData(['values' => $values, 'value' => $value]);
     }
 
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php
index f207458899a7c..6e5c80a15caea 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/EditorTest.php
@@ -10,6 +10,7 @@
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
 use Magento\Framework\Data\Form\Element\Editor;
+use Magento\Framework\DataObject;
 use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
@@ -78,13 +79,15 @@ function (string $event, string $listener, string $selector): string {
         $secureRendererMock->method('renderTag')
             ->willReturnCallback(
                 function (string $tag, array $attrs, ?string $content): string {
-                    return "<$tag>$content</$tag>";
+                    $attrs = new DataObject($attrs);
+
+                    return "<$tag {$attrs->serialize()}>$content</$tag>";
                 }
             );
         $this->factoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\Factory::class);
         $this->collectionFactoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\CollectionFactory::class);
         $this->escaperMock = $this->createMock(\Magento\Framework\Escaper::class);
-        $this->configMock = $this->createPartialMock(\Magento\Framework\DataObject::class, ['getData']);
+        $this->configMock = $this->createPartialMock(DataObject::class, ['getData']);
 
         $this->serializer = $this->createMock(\Magento\Framework\Serialize\Serializer\Json::class);
 
@@ -213,7 +216,7 @@ public function testTranslate()
 
     public function testGetConfig()
     {
-        $config = $this->createPartialMock(\Magento\Framework\DataObject::class, ['getData']);
+        $config = $this->createPartialMock(DataObject::class, ['getData']);
         $this->assertEquals($config, $this->model->getConfig());
 
         $this->configMock->expects($this->once())->method('getData')->with('test')->willReturn('test');
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php
index 64031147679f8..f0235badf5a54 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/ImageTest.php
@@ -9,6 +9,7 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\Math\Random;
 use Magento\Framework\UrlInterface;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
@@ -49,7 +50,9 @@ function (string $event, string $listener, string $selector): string {
         $secureRendererMock->method('renderTag')
             ->willReturnCallback(
                 function (string $tag, array $attrs, ?string $content): string {
-                    return "<$tag>$content</$tag>";
+                    $attrs = new DataObject($attrs);
+
+                    return "<$tag {$attrs->serialize()}>$content</$tag>";
                 }
             );
         $factoryMock = $this->createMock(\Magento\Framework\Data\Form\Element\Factory::class);
@@ -65,7 +68,7 @@ function (string $tag, array $attrs, ?string $content): string {
             $secureRendererMock,
             $randomMock
         );
-        $formMock = new \Magento\Framework\DataObject();
+        $formMock = new DataObject();
         $formMock->getHtmlIdPrefix('id_prefix');
         $formMock->getHtmlIdPrefix('id_suffix');
         $this->_image->setForm($formMock);
diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php
index ce83705e105b8..68b4670a13aad 100644
--- a/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php
+++ b/lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/MultiselectTest.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Framework\Data\Test\Unit\Form\Element;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\Escaper;
 use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
@@ -39,7 +40,9 @@ function (string $event, string $listener, string $selector): string {
         $secureRendererMock->method('renderTag')
             ->willReturnCallback(
                 function (string $tag, array $attrs, ?string $content): string {
-                    return "<$tag>$content</$tag>";
+                    $attrs = new DataObject($attrs);
+
+                    return "<$tag {$attrs->serialize()}>$content</$tag>";
                 }
             );
         $escaper = new Escaper();
@@ -51,7 +54,7 @@ function (string $tag, array $attrs, ?string $content): string {
                 'secureRenderer' => $secureRendererMock
             ]
         );
-        $this->_model->setForm(new \Magento\Framework\DataObject());
+        $this->_model->setForm(new DataObject());
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
index a5c7d899086de..2cc07c88cc6df 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
@@ -10,6 +10,11 @@
 use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
+/**
+ * Test Link widget.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class LinkTest extends \PHPUnit\Framework\TestCase
 {
     /**

From 0138a2c7c4b74e8060ca259932f32d5aa5629c9d Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 25 Mar 2020 11:23:02 -0500
Subject: [PATCH 073/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Wishlist/view/adminhtml/layout/customer_index_wishlist.xml  | 1 +
 .../Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
index e364087405ed9..0ee4233029105 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
+++ b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
@@ -99,6 +99,7 @@
                                 <item name="caption" xsi:type="string" translate="true">Delete</item>
                                 <item name="url" xsi:type="string">#</item>
                                 <item name="onclick" xsi:type="string">return wishlistControl.removeItem($wishlist_item_id);</item>
+                                <item name="class" xsi:type="string">wishlist-remove-button</item>
                             </item>
                         </argument>
                     </arguments>
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
index c7c75757c585e..541fcacd45b1a 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
@@ -41,7 +41,7 @@ class Grid extends \Magento\Backend\Test\Block\Widget\Grid
      *
      * @var string
      */
-    protected $deleteLink = 'a[text()="Delete"]';
+    protected $deleteLink = 'a.wishlist-remove-button';
 
     /**
      * Configure link selector

From 0233a975b7026969fbb93f25ace9cfb1da3effc7 Mon Sep 17 00:00:00 2001
From: Sachin Admane <sadmane@adobe.com>
Date: Wed, 25 Mar 2020 15:13:01 -0500
Subject: [PATCH 074/307] MC-22963: Identify and refactor GET requests that
 modify data.

Refactor Tax rate delete class to use POST.
Add integration test.
---
 .../Tax/Block/Adminhtml/Rate/Toolbar/Save.php |  2 +-
 .../Tax/Controller/Adminhtml/Rate/Delete.php  |  3 +-
 .../Tax/Controller/Adminhtml/RateTest.php     | 32 +++++++++++++++++++
 3 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php
index 87e9d9e006064..8ba846dc710b2 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php
@@ -133,7 +133,7 @@ protected function _prepareLayout()
                     ) . '\', \'' . $this->getUrl(
                         'tax/*/delete',
                         ['rate' => $rate]
-                    ) . '\')',
+                    ) . '\', {data: {}})',
                     'class' => 'delete'
                 ]
             );
diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Rate/Delete.php b/app/code/Magento/Tax/Controller/Adminhtml/Rate/Delete.php
index 1c5013c34c6e9..a77216cd3b46a 100644
--- a/app/code/Magento/Tax/Controller/Adminhtml/Rate/Delete.php
+++ b/app/code/Magento/Tax/Controller/Adminhtml/Rate/Delete.php
@@ -8,8 +8,9 @@
 
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Controller\ResultFactory;
+use Magento\Framework\App\Action\HttpPostActionInterface;
 
-class Delete extends \Magento\Tax\Controller\Adminhtml\Rate
+class Delete extends \Magento\Tax\Controller\Adminhtml\Rate implements HttpPostActionInterface
 {
     /**
      * Delete Rate and Data
diff --git a/dev/tests/integration/testsuite/Magento/Tax/Controller/Adminhtml/RateTest.php b/dev/tests/integration/testsuite/Magento/Tax/Controller/Adminhtml/RateTest.php
index ae5f81817ddbf..ddf5b10af1639 100644
--- a/dev/tests/integration/testsuite/Magento/Tax/Controller/Adminhtml/RateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Tax/Controller/Adminhtml/RateTest.php
@@ -6,6 +6,8 @@
 
 namespace Magento\Tax\Controller\Adminhtml;
 
+use Magento\Framework\App\Request\Http as HttpRequest;
+
 /**
  * @magentoAppArea adminhtml
  */
@@ -283,4 +285,34 @@ public function testAjaxNonLoadAction()
         $this->assertArrayHasKey('error_message', $result);
         $this->assertTrue(strlen($result['error_message'])>0);
     }
+
+    /** Test Delete Tax Rate
+     * @magentoAppIsolation enabled
+     * @magentoDbIsolation enabled
+     * @return void
+     */
+    public function testDeleteRate(): void
+    {
+        $rateId = 2;
+        $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
+        $this->getRequest()->setPostValue(['rate' => $rateId]);
+        $this->dispatch('backend/tax/rate/delete');
+        $successMessage = (string)__('You deleted the tax rate.');
+        $this->assertSessionMessages($this->equalTo([$successMessage]));
+    }
+
+    /** Test Delete Incorrect Tax Rate
+     * @magentoAppIsolation enabled
+     * @magentoDbIsolation enabled
+     * @return void
+     */
+    public function testDeleteIncorrectRate(): void
+    {
+        $incorrectRateId = 20999;
+        $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
+        $this->getRequest()->setPostValue(['rate' => $incorrectRateId]);
+        $this->dispatch('backend/tax/rate/delete');
+        $errorMessage = (string)_("We can't delete this rate because of an incorrect rate ID.");
+        $this->assertSessionMessages($this->equalTo([$errorMessage]));
+    }
 }

From 6b0b28eb889ed264a44f3f8de1e4ba4a70ada7cd Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 25 Mar 2020 16:30:16 -0500
Subject: [PATCH 075/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Magento/Backend/Block/Widget/Button.php   |  7 +--
 .../Block/Widget/Button/SplitButton.php       | 12 +----
 .../Widget/Grid/Column/Renderer/Action.php    |  2 +-
 .../Widget/Grid/Column/Renderer/Button.php    |  8 ++-
 .../Magento/Ui/Component/Control/Button.php   | 33 ++----------
 .../Ui/Component/Control/SplitButton.php      | 12 +----
 .../View/Helper/SecureHtmlRendererTest.php    | 50 +++++++++++++++++++
 .../Data/Form/Element/AbstractElement.php     | 12 +----
 .../Data/Form/Element/Editablemultiselect.php | 12 +----
 .../Framework/Data/Form/Element/Editor.php    | 24 +--------
 .../Data/Form/Element/Multiselect.php         | 12 +----
 .../Framework/Data/Form/Element/Radios.php    | 12 +----
 .../Framework/Data/Form/Element/Select.php    | 12 +----
 .../Framework/View/Element/Html/Link.php      |  2 +-
 .../View/Helper/SecureHtmlRenderer.php        | 45 +++++++++++++++++
 15 files changed, 115 insertions(+), 140 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index 7aa7a7a36056e..cc3629d1c70a9 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -189,12 +189,7 @@ protected function _beforeToHtml()
             );
         }
         if ($this->getStyle()) {
-            $afterHtml .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                $this->generateStyle(),
-                false
-            );
+            $afterHtml .= $this->secureRenderer->renderStyleAsTag($this->getStyle(), "#{$this->getId()}");
         }
         $this->setAfterHtml($afterHtml);
 
diff --git a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
index a458097751698..0ca9d2e0449c4 100644
--- a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
+++ b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
@@ -307,17 +307,7 @@ protected function _beforeToHtml()
                 $afterHtml .= $this->secureRenderer->renderEventListenerAsTag('onclick', $option['onclick'], "#$id");
             }
             if (!empty($option['style'])) {
-                $afterHtml .= $this->secureRenderer->renderTag(
-                    'style',
-                    [],
-                    <<<style
-                    #$id {
-                        {$option['style']}
-                    }
-style
-                    ,
-                    false
-                );
+                $afterHtml .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$id");
             }
         }
         $this->setOptions($options);
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
index 5cae7b838a5af..c12b0c0e11b7b 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
@@ -143,7 +143,7 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
             $html .= $this->secureHtmlRenderer->renderEventListenerAsTag('onclick', $onclick, "#{$action['id']}");
         }
         if ($style) {
-            $html .= $this->secureHtmlRenderer->renderTag('style', [], "#{$action['id']} { {$style} }", false);
+            $html .= $this->secureHtmlRenderer->renderStyleAsTag($style, "#{$action['id']}");
         }
 
         return $html;
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
index 66718d981e84e..608ea5f012e67 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
@@ -231,11 +231,9 @@ private function renderSpecialAttributes(array $attributes): string
 
         $html = '';
         if (isset($attributes['style'])) {
-            $html = $this->secureRenderer->renderTag(
-                'style',
-                [],
-                "[button-renderer-hook-id='$hookId'] { {$attributes['style']} }",
-                false
+            $html .= $this->secureRenderer->renderStyleAsTag(
+                $attributes['style'],
+                "[button-renderer-hook-id='$hookId']"
             );
         }
         foreach ($this->_getValidAttributes() as $attr) {
diff --git a/app/code/Magento/Ui/Component/Control/Button.php b/app/code/Magento/Ui/Component/Control/Button.php
index 7875713059cf7..3d9b4206b2a7b 100644
--- a/app/code/Magento/Ui/Component/Control/Button.php
+++ b/app/code/Magento/Ui/Component/Control/Button.php
@@ -194,23 +194,10 @@ public function getAfterHtml(): ?string
         $afterHtml = $this->getData('after_html');
         $buttonId = $this->getData('ui_button_widget_hook_id');
         if ($handler = $this->getOnClick()) {
-            $functionName = 'OnClickHandler' . $this->random->getRandomString(32);
-            $afterHtml .= $this->secureRenderer->renderTag(
-                'script',
-                ['type' => 'text/javascript'],
-                <<<script
-                    function {$functionName} () {
-                            {$handler};
-                    }
-                    let button{$buttonId} = document.querySelector("*[ui-button-widget-hook-id='$buttonId']");
-                    if (button{$buttonId}) {
-                        button{$buttonId}.onclick = function (e) {
-                            {$functionName}.apply(e.target);
-                        };
-                    }
-script
-                ,
-                false
+            $afterHtml .= $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                $handler,
+                "*[ui-button-widget-hook-id='$buttonId']"
             );
         }
         if ($this->getStyle()) {
@@ -218,17 +205,7 @@ function {$functionName} () {
             if ($this->getId()) {
                 $selector = "#{$this->getId()}";
             }
-            $afterHtml .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                     {$selector} {
-                         {$this->getStyle()}
-                     }
-style
-                ,
-                false
-            );
+            $afterHtml .= $this->secureRenderer->renderStyleAsTag($this->getStyle(), $selector);
         }
 
         return $afterHtml;
diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php
index 615627918e412..3d7f902ad0bf6 100644
--- a/app/code/Magento/Ui/Component/Control/SplitButton.php
+++ b/app/code/Magento/Ui/Component/Control/SplitButton.php
@@ -302,17 +302,7 @@ public function getAfterHtml(): ?string
                 $afterHtml .= $this->secureRenderer->renderEventListenerAsTag('onclick', $option['onclick'], "#$id");
             }
             if (!empty($option['style'])) {
-                $afterHtml .= $this->secureRenderer->renderTag(
-                    'style',
-                    [],
-                    <<<style
-                    #$id {
-                        {$option['style']}
-                    }
-style
-                    ,
-                    false
-                );
+                $this->secureRenderer->renderStyleAsTag($option['style'], "#$id");
             }
         }
 
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
index aae50ec02857d..7cee8d5b33fc7 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
@@ -88,4 +88,54 @@ public function testRenderEventHandler(): void
             $this->helper->renderEventListener('onclick', 'alert(this.parent.getAttribute("data-title"))')
         );
     }
+
+    /**
+     * Test rendering JS listeners as separate tags.
+     *
+     * @return void
+     */
+    public function testRenderEventListenerAsTag(): void
+    {
+        $html = $this->helper->renderEventListenerAsTag('onclick', 'alert(1)', '#id');
+        $this->assertContains('alert(1)', $html);
+        $this->assertContains('#id', $html);
+        $this->assertContains('click', $html);
+    }
+
+    /**
+     * Check handler validation
+     *
+     * @return void
+     * @expectedException \InvalidArgumentException
+     */
+    public function testInvalidEventListener(): void
+    {
+        $this->helper->renderEventListenerAsTag('nonevent', '', '');
+    }
+
+    /**
+     * Test rendering "style" attribute as separate tag.
+     *
+     * @return void
+     */
+    public function testRenderStyleAsTag(): void
+    {
+        $html = $this->helper->renderStyleAsTag('display: none; font-size: 3em;', '#id');
+        $this->assertContains('#id', $html);
+        $this->assertContains('display', $html);
+        $this->assertContains('none', $html);
+        $this->assertContains('fontSize', $html);
+        $this->assertContains('3em', $html);
+    }
+
+    /**
+     * Check style validation
+     *
+     * @return void
+     * @expectedException \InvalidArgumentException
+     */
+    public function testInvalidStyle(): void
+    {
+        $this->helper->renderStyleAsTag('display;', '');
+    }
 }
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
index 0df5f2a9ca52f..08c94a9c310d0 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
@@ -442,17 +442,7 @@ private function generateAttributesSubstitute(): string
             if ($id = $this->getHtmlId()) {
                 $selector = "#{$id}";
             }
-            $html .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                    {$selector} {
-                        {$this->getStyle()}
-                    }
-style
-                ,
-                false
-            );
+            $html .= $this->secureRenderer->renderStyleAsTag($this->getStyle(), $selector);
         }
 
         //Rendering each event listener as a separate script tag.
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
index c9e2a16f586dc..7ef5892e54c09 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
@@ -160,17 +160,7 @@ protected function _optionToHtml($option, $selected)
 
         $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
         if (isset($option['style'])) {
-            $html .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                    #$optionId {
-                        {$option['style']}
-                    }
-style
-                ,
-                false
-            );
+            $html .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$optionId");
         }
 
         return $html;
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
index bb0dea4c76088..300056ad61188 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
@@ -428,17 +428,7 @@ protected function _getButtonHtml($data)
             $html .= $this->secureRenderer->renderEventListenerAsTag('onclick', $data['onclick'], "#$id");
         }
         if (isset($data['style'])) {
-            $html .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                    #{$id} {
-                        {$data['style']}
-                    }
-style
-                ,
-                false
-            );
+            $html .= $this->secureRenderer->renderStyleAsTag($data['style'], "#$id");
         }
 
         return $html;
@@ -464,17 +454,7 @@ protected function _wrapIntoContainer($html)
                 . $this->getConfig('container_class') . '"' : '')
             . '>' . $html . '</div>';
         if ($this->getConfig('no_display')) {
-            $html .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                    #{$id} {
-                        display: none;
-                    }
-style
-                ,
-                false
-            );
+            $html .= $this->secureRenderer->renderStyleAsTag('display: none;', "#$id");
         }
 
         return $html;
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
index dc5462a81627a..275aea9022c8c 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
@@ -226,17 +226,7 @@ protected function _optionToHtml($option, $selected)
         }
         $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
         if (isset($option['style'])) {
-            $html .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                    #$optionId {
-                        {$option['style']}
-                    }
-style
-                ,
-                false
-            );
+            $html .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$optionId");
         }
 
         return $html;
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Radios.php b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php
index cb48c3fde4fd9..d7ac0d115a3f2 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Radios.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Radios.php
@@ -107,17 +107,7 @@ protected function _optionToHtml($option, $selected)
         }
 
         if ($option->getStyle()) {
-            $html .= $html .= $this->secureRenderer->renderTag(
-                'style',
-                [],
-                <<<style
-                    #$optionId {
-                        {$option->getStyle()}
-                    }
-style
-                ,
-                false
-            );
+            $html .= $this->secureRenderer->renderStyleAsTag($option->getStyle(), "#$optionId");
         }
         if ($option->getOnclick()) {
             $this->secureRenderer->renderEventListenerAsTag('onclick', $option->getOnclick(), "#$optionId");
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Select.php b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
index b9649206f1ffc..e0a81c49c1577 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Select.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
@@ -133,17 +133,7 @@ protected function _optionToHtml($option, $selected)
             }
             $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
             if (isset($option['style'])) {
-                $html .= $this->secureRenderer->renderTag(
-                    'style',
-                    [],
-                    <<<style
-                    #$optionId {
-                        {$option['style']}
-                    }
-style
-                    ,
-                    false
-                );
+                $html .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$optionId");
             }
         }
         return $html;
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php
index 8322e904f940e..f92c35ddedd6d 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link.php
@@ -172,7 +172,7 @@ private function renderSpecialAttributes(): string
         $html = '';
         $style = $this->getDataUsingMethod('style');
         if ($style) {
-            $html .= $this->secureRenderer->renderTag('style', [], "#$id { $style }", false);
+            $html .= $this->secureRenderer->renderStyleAsTag($style, "#$id");
         }
         foreach ($this->allowedAttributes as $attribute) {
             if (mb_strpos($attribute, 'on') === 0 && $value = $this->getDataUsingMethod($attribute)) {
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index 5213e0b35d94d..b23b988d17bc6 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -8,6 +8,7 @@
 
 namespace Magento\Framework\View\Helper;
 
+use Magento\Framework\Api\SimpleDataObjectConverter;
 use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRender\EventHandlerData;
 use Magento\Framework\View\Helper\SecureHtmlRender\HtmlRenderer;
@@ -99,6 +100,9 @@ public function renderEventListenerAsTag(
         string $attributeJavascript,
         string $elementSelector
     ): string {
+        if (!$eventName || !$attributeJavascript || !$elementSelector || mb_strpos($eventName, 'on') !== 0) {
+            throw new \InvalidArgumentException('Invalid JS event handler data provided');
+        }
         $eventName = mb_strtolower(mb_substr($eventName, 2));
         $listenerFunction = 'eventListener' .$this->random->getRandomString(32);
         $elementName = 'listenedElement' .$this->random->getRandomString(32);
@@ -114,4 +118,45 @@ function {$listenerFunction} () {
 
         return $this->renderTag('script', ['type' => 'text/javascript'], $script, false);
     }
+
+    /**
+     * Render "style" attribute as a separate tag instead.
+     *
+     * @param string $style
+     * @param string $selector Must resolve to a single node.
+     * @return string
+     */
+    public function renderStyleAsTag(string $style, string $selector): string
+    {
+        $stylePairs = array_filter(explode(';', $style));
+        if (!$stylePairs || !$selector) {
+            throw new \InvalidArgumentException('Invalid style data given');
+        }
+
+        $elementVariable = 'elem' .$this->random->getRandomString(32);
+        /** @var string[] $styles */
+        $stylesAssignments = [];
+        foreach ($stylePairs as $stylePair) {
+            $exploded = explode(':', $stylePair);
+            if (count($exploded) < 2) {
+                throw new \InvalidArgumentException('Invalid CSS given');
+            }
+            $styleAttribute = SimpleDataObjectConverter::snakeCaseToCamelCase(
+                str_replace('-', '_', trim($exploded[0]))
+            );
+            if (count($exploded) > 2) {
+                //For cases when ":" is encountered in the style's value.
+                $exploded[1] = join('', array_slice($exploded, 1));
+            }
+            $styleValue = trim($exploded[1]);
+            $stylesAssignments[] = "$elementVariable.style.$styleAttribute = '$styleValue';";
+        }
+
+        return $this->renderTag(
+            'script',
+            ['type' => 'text/javascript'],
+            "let $elementVariable = document.querySelector('$selector');\n" .join("\n", $stylesAssignments),
+            false
+        );
+    }
 }

From d274261fe08c9a927a38ff44bef697cbe30e80a4 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 26 Mar 2020 10:07:19 -0500
Subject: [PATCH 076/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php    | 4 ++--
 .../Framework/Data/Form/Element/Editablemultiselect.php       | 2 +-
 lib/internal/Magento/Framework/Data/Form/Element/Editor.php   | 4 ++--
 .../Magento/Framework/Data/Form/Element/Multiselect.php       | 2 +-
 lib/internal/Magento/Framework/Data/Form/Element/Select.php   | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
index 608ea5f012e67..e5f5870c0154a 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
@@ -230,14 +230,14 @@ private function renderSpecialAttributes(array $attributes): string
         }
 
         $html = '';
-        if (isset($attributes['style'])) {
+        if (!empty($attributes['style'])) {
             $html .= $this->secureRenderer->renderStyleAsTag(
                 $attributes['style'],
                 "[button-renderer-hook-id='$hookId']"
             );
         }
         foreach ($this->_getValidAttributes() as $attr) {
-            if (isset($attributes[$attr]) && mb_strpos($attr, 'on') === 0) {
+            if (!empty($attributes[$attr]) && mb_strpos($attr, 'on') === 0) {
                 $html .= $this->secureRenderer->renderEventListenerAsTag(
                     $attr,
                     $attributes[$attr],
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
index 7ef5892e54c09..a5a8ac8b7c52d 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
@@ -159,7 +159,7 @@ protected function _optionToHtml($option, $selected)
         }
 
         $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
-        if (isset($option['style'])) {
+        if (!empty($option['style'])) {
             $html .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$optionId");
         }
 
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
index 300056ad61188..a00a8549d125d 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
@@ -424,10 +424,10 @@ protected function _getButtonHtml($data)
         $html .= '>';
         $html .= isset($data['title']) ? '<span><span><span>' . $data['title'] . '</span></span></span>' : '';
         $html .= '</button>';
-        if (isset($data['onclick'])) {
+        if (!empty($data['onclick'])) {
             $html .= $this->secureRenderer->renderEventListenerAsTag('onclick', $data['onclick'], "#$id");
         }
-        if (isset($data['style'])) {
+        if (!empty($data['style'])) {
             $html .= $this->secureRenderer->renderStyleAsTag($data['style'], "#$id");
         }
 
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
index 275aea9022c8c..f8984de7a647a 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
@@ -225,7 +225,7 @@ protected function _optionToHtml($option, $selected)
             $html .= ' selected="selected"';
         }
         $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
-        if (isset($option['style'])) {
+        if (!empty($option['style'])) {
             $html .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$optionId");
         }
 
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Select.php b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
index e0a81c49c1577..e50db9271d5a9 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Select.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
@@ -132,7 +132,7 @@ protected function _optionToHtml($option, $selected)
                 $html .= ' selected="selected"';
             }
             $html .= '>' . $this->_escape($option['label']) . '</option>' . "\n";
-            if (isset($option['style'])) {
+            if (!empty($option['style'])) {
                 $html .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$optionId");
             }
         }

From 77b6ba2a511244dca3903ac5be6147aa7a348c30 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 26 Mar 2020 11:59:13 -0500
Subject: [PATCH 077/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Framework/View/Helper/SecureHtmlRendererTest.php       | 2 +-
 .../Magento/Framework/View/Helper/SecureHtmlRenderer.php   | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
index 7cee8d5b33fc7..a4ec5f0170e52 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
@@ -120,7 +120,7 @@ public function testInvalidEventListener(): void
      */
     public function testRenderStyleAsTag(): void
     {
-        $html = $this->helper->renderStyleAsTag('display: none; font-size: 3em;', '#id');
+        $html = $this->helper->renderStyleAsTag('display: none; font-size: 3em;  ', '#id');
         $this->assertContains('#id', $html);
         $this->assertContains('display', $html);
         $this->assertContains('none', $html);
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index b23b988d17bc6..7bd0fa7ae50f3 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -103,7 +103,6 @@ public function renderEventListenerAsTag(
         if (!$eventName || !$attributeJavascript || !$elementSelector || mb_strpos($eventName, 'on') !== 0) {
             throw new \InvalidArgumentException('Invalid JS event handler data provided');
         }
-        $eventName = mb_strtolower(mb_substr($eventName, 2));
         $listenerFunction = 'eventListener' .$this->random->getRandomString(32);
         $elementName = 'listenedElement' .$this->random->getRandomString(32);
         $script = <<<script
@@ -112,7 +111,7 @@ function {$listenerFunction} () {
             }
             let {$elementName} = document.querySelector("{$elementSelector}");
             if ({$elementName}) {
-                {$elementName}.addEventListener("{$eventName}", (event) => {$listenerFunction}.apply(event.target));
+                {$elementName}.{$eventName} = (event) => {$listenerFunction}.apply(event.target);
             }
 script;
 
@@ -128,7 +127,7 @@ function {$listenerFunction} () {
      */
     public function renderStyleAsTag(string $style, string $selector): string
     {
-        $stylePairs = array_filter(explode(';', $style));
+        $stylePairs = array_filter(array_map('trim', explode(';', $style)));
         if (!$stylePairs || !$selector) {
             throw new \InvalidArgumentException('Invalid style data given');
         }
@@ -137,7 +136,7 @@ public function renderStyleAsTag(string $style, string $selector): string
         /** @var string[] $styles */
         $stylesAssignments = [];
         foreach ($stylePairs as $stylePair) {
-            $exploded = explode(':', $stylePair);
+            $exploded = array_map('trim', explode(':', $stylePair));
             if (count($exploded) < 2) {
                 throw new \InvalidArgumentException('Invalid CSS given');
             }

From 05434a2b5d634ea574eb3baa99d36b6c5f7105af Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 26 Mar 2020 12:20:18 -0500
Subject: [PATCH 078/307] MC-24063: [2.4.x Port] Implement CSP

---
 app/code/Magento/Backend/Block/Widget/Button.php | 16 ----------------
 .../Widget/Grid/Column/Renderer/ButtonTest.php   |  8 +++++++-
 .../Magento/Ui/Component/Control/SplitButton.php |  2 +-
 .../Block/Widget/Button/SplitButtonTest.php      |  5 +++--
 .../Magento/Backend/Block/Widget/ButtonTest.php  |  3 ++-
 .../Magento/Ui/Component/Control/ButtonTest.php  |  5 +++--
 .../Ui/Component/Control/SplitButtonTest.php     |  5 +++--
 .../View/Test/Unit/Element/Html/LinkTest.php     |  8 +++++++-
 8 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index cc3629d1c70a9..a06c280a14e90 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -155,22 +155,6 @@ protected function _attributesToHtml($attributes)
         return $html;
     }
 
-    /**
-     * Generate "style" tag aimed to replace "style" attribute of the button.
-     *
-     * @return string
-     */
-    private function generateStyle(): string
-    {
-        $style = $this->getStyle();
-
-        return <<<style
-            #{$this->getId()} {
-                $style
-            }
-style;
-    }
-
     /**
      * @inheritDoc
      */
diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
index 68c412697a463..b3227a4068899 100644
--- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
+++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
@@ -56,6 +56,12 @@ function (string $event, string $js, string $selector): string {
                     return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
                 }
             );
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
 
         $this->objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->buttonRenderer = $this->objectManagerHelper->getObject(
@@ -94,7 +100,7 @@ public function testRender()
         $actualResult = $this->buttonRenderer->render($object);
         $this->assertEquals(
             '<button id="1" type="bigButton" button-renderer-hook-id="hookrandom">my button</button>'
-            .'<style >[button-renderer-hook-id=\'hookrandom\'] { display: block; }</style>'
+            .'<style>[button-renderer-hook-id=\'hookrandom\'] { display: block; }</style>'
             .'<script>document.querySelector(\'*[button-renderer-hook-id=\'hookrandom\']\').onclick = '
             .'function () { alert(1); };</script>',
             $actualResult
diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php
index 3d7f902ad0bf6..b430e05cedd2a 100644
--- a/app/code/Magento/Ui/Component/Control/SplitButton.php
+++ b/app/code/Magento/Ui/Component/Control/SplitButton.php
@@ -302,7 +302,7 @@ public function getAfterHtml(): ?string
                 $afterHtml .= $this->secureRenderer->renderEventListenerAsTag('onclick', $option['onclick'], "#$id");
             }
             if (!empty($option['style'])) {
-                $this->secureRenderer->renderStyleAsTag($option['style'], "#$id");
+                $afterHtml .= $this->secureRenderer->renderStyleAsTag($option['style'], "#$id");
             }
         }
 
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
index 911ce8d0e25c2..d35b0802eb2f1 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
@@ -72,7 +72,7 @@ public function testToHtml(): void
                         'title' => 'An option',
                         'label' => 'An option',
                         'onclick' => $onclick = 'console.log("option")',
-                        'style' => $style = 'width: 100px'
+                        'style' => 'width: 100px'
                     ]
                 ]
             ]
@@ -84,6 +84,7 @@ public function testToHtml(): void
         $this->assertNotContains('onclick=', $html);
         $this->assertNotContains('style=', $html);
         $this->assertRegExp('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
-        $this->assertRegExp('/\<style.*?\>.*?' . preg_quote($style) . '.*?\<\/style\>/ims', $html);
+        $this->assertContains('width', $html);
+        $this->assertContains('100px', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
index d627672fefd96..d0df81e8b2309 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
@@ -77,6 +77,7 @@ public function testToHtml(): void
         $this->assertNotContains('onclick=', $html);
         $this->assertNotContains('style=', $html);
         $this->assertRegExp('/\<script.*?\>.*?' .preg_quote($block->getOnClick()) .'.*?\<\/script\>/ims', $html);
-        $this->assertRegExp('/\<style.*?\>.*?' .preg_quote($block->getStyle()) .'.*?\<\/style\>/ims', $html);
+        $this->assertContains('height', $html);
+        $this->assertContains('200px', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
index 12154f9ff4683..988d9a387add3 100644
--- a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
@@ -67,7 +67,7 @@ public function testToHtml(): void
                 'element_name' => 'some-name',
                 'value' => 'Press a button',
                 'data-style' => 'width: 100px',
-                'style' => $style = 'height: 200px'
+                'style' => 'height: 200px'
             ]
         );
 
@@ -77,6 +77,7 @@ public function testToHtml(): void
         $this->assertNotContains('onclick=', $html);
         $this->assertNotContains('style=', $html);
         $this->assertRegExp('/\<script.*?\>.*?' .preg_quote($onclick) .'.*?\<\/script\>/ims', $html);
-        $this->assertRegExp('/\<style.*?\>.*?' .preg_quote($style) .'.*?\<\/style\>/ims', $html);
+        $this->assertContains('height', $html);
+        $this->assertContains('200px', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
index ccc9723ce2729..e4a2d2809cf08 100644
--- a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
@@ -74,7 +74,7 @@ public function testToHtml(): void
                         'title' => 'An option',
                         'label' => 'An option',
                         'onclick' => $onclick = 'console.log("option")',
-                        'style' => $style = 'width: 100px'
+                        'style' => 'width: 100px'
                     ]
                 ]
             ]
@@ -86,6 +86,7 @@ public function testToHtml(): void
         $this->assertNotContains('onclick=', $html);
         $this->assertNotContains('style=', $html);
         $this->assertRegExp('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
-        $this->assertRegExp('/\<style.*?\>.*?' . preg_quote($style) . '.*?\<\/style\>/ims', $html);
+        $this->assertContains('width', $html);
+        $this->assertContains('100px', $html);
     }
 }
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
index 2cc07c88cc6df..cbbcfc1c3ac6d 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
@@ -108,6 +108,12 @@ function (string $event, string $js, string $selector): string {
                     return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
                 }
             );
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
 
         /** @var \Magento\Framework\View\Element\Html\Link $linkWithAttributes */
         $this->link = $this->objectManager->getObject(
@@ -145,7 +151,7 @@ public function testLinkHtml(): void
         $html = $this->link->toHtml();
         $this->assertEquals(
             '<li><a href="http://site.com/link.html" id="idrandom" ></a></li>'
-            .'<style >#idrandom { display: block; }</style>'
+            .'<style>#idrandom { display: block; }</style>'
             .'<script>document.querySelector(\'#idrandom\').onclick = function () { alert("clicked"); };</script>',
             $html
         );

From bf17a5acfce2ed6ee55a49649c9dad2a78c48818 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 26 Mar 2020 14:47:07 -0500
Subject: [PATCH 079/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Test/Mftf/Section/AdminEncryptionKeyChangeFormSection.xml  | 2 +-
 .../Magento/Framework/View/Helper/SecureHtmlRenderer.php       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/EncryptionKey/Test/Mftf/Section/AdminEncryptionKeyChangeFormSection.xml b/app/code/Magento/EncryptionKey/Test/Mftf/Section/AdminEncryptionKeyChangeFormSection.xml
index 7ce37af60fd7f..b0bf115915c2d 100644
--- a/app/code/Magento/EncryptionKey/Test/Mftf/Section/AdminEncryptionKeyChangeFormSection.xml
+++ b/app/code/Magento/EncryptionKey/Test/Mftf/Section/AdminEncryptionKeyChangeFormSection.xml
@@ -10,7 +10,7 @@
           xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
     <section name="AdminEncryptionKeyChangeFormSection">
         <element name="autoGenerate" type="select" selector="#generate_random"/>
-        <element name="cryptKey" type="input" selector="#crypt_key"/>
+        <element name="cryptKey" type="input" selector="input#crypt_key"/>
         <element name="changeEncryptionKey" type="button" selector=".page-actions-buttons #save" timeout="10"/>
     </section>
 </sections>
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index 7bd0fa7ae50f3..53ae5ab684142 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -154,7 +154,8 @@ public function renderStyleAsTag(string $style, string $selector): string
         return $this->renderTag(
             'script',
             ['type' => 'text/javascript'],
-            "let $elementVariable = document.querySelector('$selector');\n" .join("\n", $stylesAssignments),
+            "let $elementVariable = document.querySelector('$selector');\n"
+            ."if ($elementVariable) {\n" .join("\n", $stylesAssignments) ." }",
             false
         );
     }

From f738e4fc5d670c4f871ee142629b923233b46254 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 1 Apr 2020 15:48:15 -0500
Subject: [PATCH 080/307] MC-24063: [2.4.x Port] Implement CSP

---
 app/code/Magento/Backend/Block/Widget/Button.php           | 3 ++-
 .../Magento/Backend/Block/Widget/Button/SplitButton.php    | 7 +++----
 app/code/Magento/Ui/Component/Control/Button.php           | 2 +-
 app/code/Magento/Ui/Component/Control/SplitButton.php      | 7 +++----
 4 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index a06c280a14e90..6dba39bdee7e8 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -162,7 +162,8 @@ protected function _beforeToHtml()
     {
         parent::_beforeToHtml();
 
-        $this->setData('backend_button_widget_hook_id', $buttonId = 'buttonId' .$this->random->getRandomString(32));
+        $buttonId = 'buttonId' .$this->random->getRandomString(32);
+        $this->setData('backend_button_widget_hook_id', $buttonId);
 
         $afterHtml = $this->getAfterHtml();
         if ($this->getOnClick()) {
diff --git a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
index 0ca9d2e0449c4..611668cb20f24 100644
--- a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
+++ b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
@@ -232,17 +232,16 @@ protected function _getDataAttributes($data, &$attributes)
     }
 
     /**
-     * Set and return "id" attribute value for an option.
+     * Retrieve "id" attribute value for an option.
      *
      * @param array $option
      * @return string
      */
-    private function identifyOption(array &$option): string
+    private function identifyOption(array $option): string
     {
         $id = isset($option['id'])
             ? $option['id']
             : (isset($option['id_attribute']) ? $option['id_attribute'] : 'optId' .$this->random->getRandomString(32));
-        $option['id_attribute'] = $id;
 
         return $this->getId() .'-' .$id;
     }
@@ -302,7 +301,7 @@ protected function _beforeToHtml()
         /** @var array|null $options */
         $options = $this->getOptions() ?? [];
         foreach ($options as &$option) {
-            $id = $this->identifyOption($option);
+            $id = $option['id_attribute'] = $this->identifyOption($option);
             if (!empty($option['onclick'])) {
                 $afterHtml .= $this->secureRenderer->renderEventListenerAsTag('onclick', $option['onclick'], "#$id");
             }
diff --git a/app/code/Magento/Ui/Component/Control/Button.php b/app/code/Magento/Ui/Component/Control/Button.php
index 3d9b4206b2a7b..0944b9d17a7e5 100644
--- a/app/code/Magento/Ui/Component/Control/Button.php
+++ b/app/code/Magento/Ui/Component/Control/Button.php
@@ -111,7 +111,7 @@ public function getAttributesHtml()
     public function getOnClick()
     {
         if ($this->hasData('on_click')) {
-            return $this->getData('on_click');//No onclick
+            return $this->getData('on_click');
         } else {
             $url = $this->hasData('url') ? $this->getData('url') : $this->getUrl();
             if (!empty($url)) {
diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php
index b430e05cedd2a..7d7b6a902c79f 100644
--- a/app/code/Magento/Ui/Component/Control/SplitButton.php
+++ b/app/code/Magento/Ui/Component/Control/SplitButton.php
@@ -200,17 +200,16 @@ public function getOptionAttributesHtml($key, $option)
     }
 
     /**
-     * Set and return "id" attribute value for an option.
+     * Retrieve "id" attribute value for an option.
      *
      * @param array $option
      * @return string
      */
-    private function identifyOption(array &$option): string
+    private function identifyOption(array $option): string
     {
         $id = isset($option['id'])
             ? $option['id']
             : (isset($option['id_attribute']) ? $option['id_attribute'] : 'topId' .$this->random->getRandomString(32));
-        $option['id_attribute'] = $id;
 
         return $this->getId() .'-' .$id;
     }
@@ -280,7 +279,7 @@ protected function _beforeToHtml()
         /** @var array|null $options */
         $options = $this->getOptions() ?? [];
         foreach ($options as &$option) {
-            $this->identifyOption($option);
+            $option['id_attribute'] = $this->identifyOption($option);
         }
         $this->setOptions($options);
 

From b3d0090b0d51285162c40cbae02a5e6f63e0a107 Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Thu, 2 Apr 2020 11:11:03 +0300
Subject: [PATCH 081/307] MC-31491: Export file controller improvement

---
 .../Adminhtml/Export/File/Delete.php          | 21 ++++++++-----------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
index 0b96895db84fa..937197fb0e046 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
@@ -10,15 +10,12 @@
 use Magento\Backend\App\Action;
 use Magento\Framework\App\Action\HttpPostActionInterface;
 use Magento\Framework\Exception\FileSystemException;
-use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Exception\ValidatorException;
 use Magento\ImportExport\Controller\Adminhtml\Export as ExportController;
 use Magento\Framework\Filesystem;
-use Magento\Framework\App\ResponseInterface;
 use Magento\Framework\Controller\ResultInterface;
 use Magento\Framework\Filesystem\Directory\WriteFactory;
-use Magento\Backend\Model\View\Result\Redirect;
 
 /**
  * Controller that delete file by name.
@@ -61,7 +58,6 @@ public function __construct(
      * Controller basic method implementation.
      *
      * @return ResultInterface
-     * @throws LocalizedException
      */
     public function execute()
     {
@@ -79,17 +75,18 @@ public function execute()
                 $directoryWrite->delete($directoryWrite->getAbsolutePath($fileName));
                 $this->messageManager->addSuccessMessage(__('File %1 deleted', $fileName));
             } catch (ValidatorException $exception) {
-                $this->messageManager->addErrorMessage(__('%1 is not a valid file', $fileName));
+                $this->messageManager->addErrorMessage(
+                    __('Sorry, but the data is invalid or the file is not uploaded.')
+                );
             } catch (FileSystemException $exception) {
-                $this->messageManager->addErrorMessage(__('%1 is not a valid file', $fileName));
-                throw new LocalizedException(__('Sorry, but the data is invalid or the file is not uploaded.'));
+                $this->messageManager->addErrorMessage(
+                    __('Sorry, but the data is invalid or the file is not uploaded.')
+                );
             }
-
-            return $resultRedirect;
         } catch (FileSystemException $exception) {
-            $this->messageManager->addErrorMessage(__('%1 is not a valid file', $fileName));
-            throw new LocalizedException(__('There are no export file with such name %1', $fileName));
-            return $resultRedirect;
+            $this->messageManager->addErrorMessage(__('There are no export file with such name %1', $fileName));
         }
+
+        return $resultRedirect;
     }
 }

From d09d8a133e9e97029c86d3036b1189e77b653c6e Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Thu, 2 Apr 2020 12:27:15 +0300
Subject: [PATCH 082/307] MC-31491: Export file controller improvement

---
 .../Adminhtml/Export/File/Delete.php          |   4 +-
 .../Adminhtml/Export/File/DeleteTest.php      | 198 ------------------
 2 files changed, 2 insertions(+), 200 deletions(-)
 delete mode 100644 app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php

diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
index 937197fb0e046..e31f36e627a66 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/File/Delete.php
@@ -33,9 +33,9 @@ class Delete extends ExportController implements HttpPostActionInterface
     private $filesystem;
 
     /**
-     * @var DriverInterface
+     * @var WriteFactory
      */
-    private $file;
+    private $writeFactory;
 
     /**
      * Delete constructor.
diff --git a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php b/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php
deleted file mode 100644
index ef40651f95be9..0000000000000
--- a/app/code/Magento/ImportExport/Test/Unit/Controller/Adminhtml/Export/File/DeleteTest.php
+++ /dev/null
@@ -1,198 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-declare(strict_types=1);
-
-namespace Magento\ImportExport\Test\Unit\Controller\Adminhtml\Export\File;
-
-use Magento\Backend\App\Action\Context;
-use Magento\Backend\Model\View\Result\Redirect;
-use Magento\Framework\App\Request\Http;
-use Magento\Framework\Controller\Result\Raw;
-use Magento\Framework\Controller\Result\RedirectFactory;
-use Magento\Framework\Filesystem;
-use Magento\Framework\Filesystem\Directory\ReadInterface;
-use Magento\Framework\Filesystem\DriverInterface;
-use Magento\Framework\Message\ManagerInterface;
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
-use Magento\ImportExport\Controller\Adminhtml\Export\File\Delete;
-use PHPUnit\Framework\MockObject\MockObject;
-use PHPUnit\Framework\TestCase;
-
-/**
- * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- */
-class DeleteTest extends TestCase
-{
-    /**
-     * @var Context|MockObject
-     */
-    private $contextMock;
-
-    /**
-     * @var ObjectManagerHelper
-     */
-    private $objectManagerHelper;
-
-    /**
-     * @var Http|MockObject
-     */
-    private $requestMock;
-
-    /**
-     * @var Raw|MockObject
-     */
-    private $redirectMock;
-
-    /**
-     * @var RedirectFactory|MockObject
-     */
-    private $resultRedirectFactoryMock;
-
-    /**
-     * @var Filesystem|MockObject
-     */
-    private $fileSystemMock;
-
-    /**
-     * @var DriverInterface|MockObject
-     */
-    private $fileMock;
-
-    /**
-     * @var Delete|MockObject
-     */
-    private $deleteControllerMock;
-
-    /**
-     * @var ManagerInterface|MockObject
-     */
-    private $messageManagerMock;
-
-    /**
-     * @var ReadInterface|MockObject
-     */
-    private $directoryMock;
-
-    /**
-     * Set up
-     */
-    protected function setUp()
-    {
-        $this->requestMock = $this->getMockBuilder(Http::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->fileSystemMock = $this->getMockBuilder(Filesystem::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->directoryMock = $this->getMockBuilder(ReadInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->fileMock = $this->getMockBuilder(DriverInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->messageManagerMock = $this->getMockBuilder(ManagerInterface::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->contextMock = $this->createPartialMock(
-            Context::class,
-            ['getRequest', 'getResultRedirectFactory', 'getMessageManager']
-        );
-
-        $this->redirectMock = $this->createPartialMock(Redirect::class, ['setPath']);
-
-        $this->resultRedirectFactoryMock = $this->createPartialMock(
-            RedirectFactory::class,
-            ['create']
-        );
-        $this->resultRedirectFactoryMock->expects($this->any())->method('create')->willReturn($this->redirectMock);
-        $this->contextMock->expects($this->any())->method('getRequest')->willReturn($this->requestMock);
-        $this->contextMock->expects($this->any())
-            ->method('getResultRedirectFactory')
-            ->willReturn($this->resultRedirectFactoryMock);
-
-        $this->contextMock->expects($this->any())
-            ->method('getMessageManager')
-            ->willReturn($this->messageManagerMock);
-
-        $this->objectManagerHelper = new ObjectManagerHelper($this);
-        $this->deleteControllerMock = $this->objectManagerHelper->getObject(
-            Delete::class,
-            [
-                'context' => $this->contextMock,
-                'filesystem' => $this->fileSystemMock,
-                'file' => $this->fileMock
-            ]
-        );
-    }
-
-    /**
-     * Tests download controller with different file names in request.
-     */
-    public function testExecuteSuccess()
-    {
-        $this->requestMock->method('getParam')
-            ->with('filename')
-            ->willReturn('sampleFile');
-
-        $this->fileSystemMock->expects($this->once())
-            ->method('getDirectoryRead')
-            ->will($this->returnValue($this->directoryMock));
-        $this->directoryMock->expects($this->once())->method('isFile')->willReturn(true);
-        $this->fileMock->expects($this->once())->method('deleteFile')->willReturn(true);
-        $this->messageManagerMock->expects($this->once())->method('addSuccessMessage');
-
-        $this->deleteControllerMock->execute();
-    }
-
-    /**
-     * Tests download controller with different file names in request.
-     */
-    public function testExecuteFileDoesntExists()
-    {
-        $this->requestMock->method('getParam')
-            ->with('filename')
-            ->willReturn('sampleFile');
-
-        $this->fileSystemMock->expects($this->once())
-            ->method('getDirectoryRead')
-            ->will($this->returnValue($this->directoryMock));
-        $this->directoryMock->expects($this->once())->method('isFile')->willReturn(false);
-        $this->messageManagerMock->expects($this->once())->method('addErrorMessage');
-
-        $this->deleteControllerMock->execute();
-    }
-
-    /**
-     * Test execute() with invalid file name
-     * @param string $requestFilename
-     * @dataProvider invalidFileDataProvider
-     */
-    public function testExecuteInvalidFileName($requestFilename)
-    {
-        $this->requestMock->method('getParam')->with('filename')->willReturn($requestFilename);
-        $this->messageManagerMock->expects($this->once())->method('addErrorMessage');
-
-        $this->deleteControllerMock->execute();
-    }
-
-    /**
-     * Data provider to test possible invalid filenames
-     * @return array
-     */
-    public function invalidFileDataProvider()
-    {
-        return [
-            'Relative file name' => ['../.htaccess'],
-            'Empty file name' => [''],
-            'Null file name' => [null],
-        ];
-    }
-}

From eba218b8981e2693e2300c12501c7ff7daa7eb3b Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 2 Apr 2020 13:35:45 -0500
Subject: [PATCH 083/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Block/Widget/Button/SplitButton.php       | 10 +++----
 .../templates/widget/button/split.phtml       |  2 +-
 .../Model/Collector/ControllerCollector.php   | 11 ++++++--
 .../PrioritizedPolicyCollectorInterface.php   | 23 ++++++++++++++++
 .../Csp/Model/CompositePolicyCollector.php    | 11 +++++++-
 app/code/Magento/Csp/etc/di.xml               |  8 +++---
 .../Ui/Component/Control/SplitButton.php      | 10 +++----
 .../Config/Form/Field/YtdStartTest.php        | 27 +++++++++----------
 8 files changed, 70 insertions(+), 32 deletions(-)
 create mode 100644 app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php

diff --git a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
index 611668cb20f24..0e3d51dfe3721 100644
--- a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
+++ b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
@@ -239,11 +239,11 @@ protected function _getDataAttributes($data, &$attributes)
      */
     private function identifyOption(array $option): string
     {
-        $id = isset($option['id'])
-            ? $option['id']
-            : (isset($option['id_attribute']) ? $option['id_attribute'] : 'optId' .$this->random->getRandomString(32));
-
-        return $this->getId() .'-' .$id;
+        return isset($option['id'])
+            ? $this->getId() .'-' .$option['id']
+            : (isset($option['id_attribute']) ?
+                $option['id_attribute']
+                : $this->getId() .'-optId' .$this->random->getRandomString(32));
     }
 
     /**
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
index 49b79ddfd7c16..6ebbd4118e7a0 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml
@@ -19,7 +19,7 @@
 
         <?php if (!$block->getDisabled()): ?>
             <ul class="dropdown-menu" <?= /* @noEscape */ $block->getUiId("dropdown-menu") ?>>
-                <?php foreach ($block->getOptions() as $key => &$option): ?>
+                <?php foreach ($block->getOptions() as $key => $option): ?>
                 <li>
                     <span <?= $block->getOptionAttributesHtml($key, $option) ?>>
                         <?= $block->escapeHtml($option['label']) ?>
diff --git a/app/code/Magento/Csp/Model/Collector/ControllerCollector.php b/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
index 0239601951744..aef68a27a7735 100644
--- a/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
+++ b/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
@@ -8,12 +8,11 @@
 namespace Magento\Csp\Model\Collector;
 
 use Magento\Csp\Api\CspAwareActionInterface;
-use Magento\Csp\Api\PolicyCollectorInterface;
 
 /**
  * Asks for route-specific policies from a compatible controller.
  */
-class ControllerCollector implements PolicyCollectorInterface
+class ControllerCollector implements PrioritizedPolicyCollectorInterface
 {
     /**
      * @var CspAwareActionInterface|null
@@ -42,4 +41,12 @@ public function collect(array $defaultPolicies = []): array
 
         return $defaultPolicies;
     }
+
+    /**
+     * @inheritDoc
+     */
+    public function getPriority(): int
+    {
+        return -100;
+    }
 }
diff --git a/app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php b/app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php
new file mode 100644
index 0000000000000..677aa2678f9ae
--- /dev/null
+++ b/app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Model\Collector;
+
+use Magento\Csp\Api\PolicyCollectorInterface;
+
+/**
+ * Policy collector that has a priority over other collectors.
+ */
+interface PrioritizedPolicyCollectorInterface extends PolicyCollectorInterface
+{
+    /**
+     * The higher the priority the earlier the collector will be called.
+     *
+     * @return int
+     */
+    public function getPriority(): int;
+}
diff --git a/app/code/Magento/Csp/Model/CompositePolicyCollector.php b/app/code/Magento/Csp/Model/CompositePolicyCollector.php
index 6c1459b791835..e89eba677ff98 100644
--- a/app/code/Magento/Csp/Model/CompositePolicyCollector.php
+++ b/app/code/Magento/Csp/Model/CompositePolicyCollector.php
@@ -10,6 +10,7 @@
 use Magento\Csp\Api\Data\PolicyInterface;
 use Magento\Csp\Api\PolicyCollectorInterface;
 use Magento\Csp\Model\Collector\MergerInterface;
+use Magento\Csp\Model\Collector\PrioritizedPolicyCollectorInterface;
 
 /**
  * Delegates collecting to multiple collectors.
@@ -32,7 +33,15 @@ class CompositePolicyCollector implements PolicyCollectorInterface
      */
     public function __construct(array $collectors, array $mergers)
     {
-        ksort($collectors);
+        usort(
+            $collectors,
+            function (PolicyCollectorInterface $a, PolicyCollectorInterface $b): int {
+                $priorityA = ($a instanceof PrioritizedPolicyCollectorInterface) ? $a->getPriority() : 0;
+                $priorityB = ($b instanceof PrioritizedPolicyCollectorInterface) ? $b->getPriority() : 0;
+
+                return $priorityB <=> $priorityA;
+            }
+        );
         $this->collectors = $collectors;
         $this->mergers = $mergers;
     }
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index 1de1191390725..c3a8cc8104463 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -18,10 +18,10 @@
     <type name="Magento\Csp\Model\CompositePolicyCollector">
         <arguments>
             <argument name="collectors" xsi:type="array">
-                <item name="1" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector\Proxy</item>
-                <item name="2" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector\Proxy</item>
-                <item name="3" xsi:type="object">Magento\Csp\Model\Collector\DynamicCollector\Proxy</item>
-                <item name="100" xsi:type="object">Magento\Csp\Model\Collector\ControllerCollector\Proxy</item>
+                <item name="config" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector\Proxy</item>
+                <item name="whitelist" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector\Proxy</item>
+                <item name="dynamic" xsi:type="object">Magento\Csp\Model\Collector\DynamicCollector\Proxy</item>
+                <item name="controller" xsi:type="object">Magento\Csp\Model\Collector\ControllerCollector\Proxy</item>
             </argument>
             <argument name="mergers" xsi:type="array">
                 <item name="fetch" xsi:type="object">Magento\Csp\Model\Collector\FetchPolicyMerger</item>
diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php
index 7d7b6a902c79f..38ff5e4473b54 100644
--- a/app/code/Magento/Ui/Component/Control/SplitButton.php
+++ b/app/code/Magento/Ui/Component/Control/SplitButton.php
@@ -207,11 +207,11 @@ public function getOptionAttributesHtml($key, $option)
      */
     private function identifyOption(array $option): string
     {
-        $id = isset($option['id'])
-            ? $option['id']
-            : (isset($option['id_attribute']) ? $option['id_attribute'] : 'topId' .$this->random->getRandomString(32));
-
-        return $this->getId() .'-' .$id;
+        return isset($option['id'])
+            ? $this->getId() .'-' .$option['id']
+            : (isset($option['id_attribute']) ?
+                $option['id_attribute']
+                : $this->getId() .'-optId' .$this->random->getRandomString(32));
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStartTest.php b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStartTest.php
index d378b3e7344e1..2ff5b7c6ee3d2 100644
--- a/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStartTest.php
+++ b/dev/tests/integration/testsuite/Magento/Reports/Block/Adminhtml/Config/Form/Field/YtdStartTest.php
@@ -33,26 +33,25 @@ public function testGetElementHtml(): void
         $this->dispatch('backend/admin/system_config/edit/section/reports/');
         $body = $this->getResponse()->getBody();
 
-        $this->assertContains($this->getOptionsHtml('01'), $body);
+        $this->assertOptionSelected('01', $body);
     }
 
     /**
-     * Options html
+     * Assert that given option is selected.
      *
-     * @param string $selected
-     * @return string
+     * @param string $option Option value.
+     * @param string $content HTML content
+     * @return void
      */
-    private function getOptionsHtml(string $selected): string
+    private function assertOptionSelected(string $option, string $content): void
     {
-        $html = '';
-        foreach ($this->monthNumbers as $number) {
-            $html .= $number === $selected
-                ? '<option value="' . $selected . '" selected="selected">' . $selected . '</option>'
-                : '<option value="' . $number . '">' . $number . '</option>';
-
-            $html .= PHP_EOL;
+        foreach ($this->monthNumbers as $monthNumber) {
+            $regEx = "\<option[^\>]+value\=\\\"$monthNumber\\\"[^\>]*?";
+            if ($monthNumber ===  $option) {
+                $regEx .= 'selected\=\"selected\"[^\>]*?';
+            }
+            $regEx .= "\>$monthNumber\<\/option\>";
+            $this->assertRegExp("#$regEx#", $content);
         }
-
-        return $html;
     }
 }

From b769ae9f2d311fac7a44800e25a6610ef049a6b2 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 2 Apr 2020 16:59:21 -0500
Subject: [PATCH 084/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Magento/Framework/View/Helper/SecureHtmlRenderer.php  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index 53ae5ab684142..22e53c5751f86 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -111,7 +111,13 @@ function {$listenerFunction} () {
             }
             let {$elementName} = document.querySelector("{$elementSelector}");
             if ({$elementName}) {
-                {$elementName}.{$eventName} = (event) => {$listenerFunction}.apply(event.target);
+                {$elementName}.{$eventName} = (event) => {
+                    let targetElement = {$elementName};
+                    if (event && event.target) {
+                        targetElement = event.target;
+                    }
+                    {$listenerFunction}.apply(targetElement);
+                }
             }
 script;
 

From 6633a3cdf9e8b2930f6a4e688ecd0513f16fbbb1 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 2 Apr 2020 17:46:06 -0500
Subject: [PATCH 085/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml | 2 +-
 .../Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml
index a2f35b9c5fca8..6526c28d6d3e1 100644
--- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml
+++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml
@@ -16,6 +16,6 @@
             <argument name="messageType" defaultValue="error" type="string"/>
             <argument name="message" defaultValue="The requested qty is not available" type="string"/>
         </arguments>
-        <see userInput="{{message}}" selector="{{AdminOrderFormItemsOrderedSection.productMessage(productName, messageType)}}" stepKey="assertItemErrorVisible"/>
+        <see userInput="{{message}}" selector="{{AdminOrderFormItemsOrderedSection.flashMessage(messageType)}}" stepKey="assertItemErrorVisible"/>
     </actionGroup>
 </actionGroups>
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml
index 4437f6e6775f2..8a51941292104 100644
--- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml
@@ -19,5 +19,6 @@
         <element name="itemsSKU" type="text" selector="(//div[contains(@class, 'product-sku-block')])[{{productNumber}}]" parameterized="true"/>
         <element name="moveProduct" type="select" selector="//td[contains(.,'{{productName}}')]/../..//td//select" parameterized="true"/>
         <element name="productMessage" type="text" selector="//section[@id = 'order-items']//span[text()='{{productName}}']/ancestor::tr/..//div[contains(@class, 'message-{{messageType}}')]" parameterized="true"/>
+        <element name="flashMessage" type="text" selector="//div[@id = 'order-message']//div[contains(@class, 'message-{{messageType}}')]" parameterized="true"/>
     </section>
 </sections>

From cbb2c4c33ccc81f2d1e8178da7710e31156fe06c Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 2 Apr 2020 18:20:46 -0500
Subject: [PATCH 086/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Model/Collector/ControllerCollector.php   | 11 ++-------
 .../PrioritizedPolicyCollectorInterface.php   | 23 -------------------
 .../Csp/Model/CompositePolicyCollector.php    | 10 --------
 app/code/Magento/Csp/etc/di.xml               |  8 +++----
 4 files changed, 6 insertions(+), 46 deletions(-)
 delete mode 100644 app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php

diff --git a/app/code/Magento/Csp/Model/Collector/ControllerCollector.php b/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
index aef68a27a7735..0239601951744 100644
--- a/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
+++ b/app/code/Magento/Csp/Model/Collector/ControllerCollector.php
@@ -8,11 +8,12 @@
 namespace Magento\Csp\Model\Collector;
 
 use Magento\Csp\Api\CspAwareActionInterface;
+use Magento\Csp\Api\PolicyCollectorInterface;
 
 /**
  * Asks for route-specific policies from a compatible controller.
  */
-class ControllerCollector implements PrioritizedPolicyCollectorInterface
+class ControllerCollector implements PolicyCollectorInterface
 {
     /**
      * @var CspAwareActionInterface|null
@@ -41,12 +42,4 @@ public function collect(array $defaultPolicies = []): array
 
         return $defaultPolicies;
     }
-
-    /**
-     * @inheritDoc
-     */
-    public function getPriority(): int
-    {
-        return -100;
-    }
 }
diff --git a/app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php b/app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php
deleted file mode 100644
index 677aa2678f9ae..0000000000000
--- a/app/code/Magento/Csp/Model/Collector/PrioritizedPolicyCollectorInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-declare(strict_types=1);
-
-namespace Magento\Csp\Model\Collector;
-
-use Magento\Csp\Api\PolicyCollectorInterface;
-
-/**
- * Policy collector that has a priority over other collectors.
- */
-interface PrioritizedPolicyCollectorInterface extends PolicyCollectorInterface
-{
-    /**
-     * The higher the priority the earlier the collector will be called.
-     *
-     * @return int
-     */
-    public function getPriority(): int;
-}
diff --git a/app/code/Magento/Csp/Model/CompositePolicyCollector.php b/app/code/Magento/Csp/Model/CompositePolicyCollector.php
index e89eba677ff98..d2c35fe993ed5 100644
--- a/app/code/Magento/Csp/Model/CompositePolicyCollector.php
+++ b/app/code/Magento/Csp/Model/CompositePolicyCollector.php
@@ -10,7 +10,6 @@
 use Magento\Csp\Api\Data\PolicyInterface;
 use Magento\Csp\Api\PolicyCollectorInterface;
 use Magento\Csp\Model\Collector\MergerInterface;
-use Magento\Csp\Model\Collector\PrioritizedPolicyCollectorInterface;
 
 /**
  * Delegates collecting to multiple collectors.
@@ -33,15 +32,6 @@ class CompositePolicyCollector implements PolicyCollectorInterface
      */
     public function __construct(array $collectors, array $mergers)
     {
-        usort(
-            $collectors,
-            function (PolicyCollectorInterface $a, PolicyCollectorInterface $b): int {
-                $priorityA = ($a instanceof PrioritizedPolicyCollectorInterface) ? $a->getPriority() : 0;
-                $priorityB = ($b instanceof PrioritizedPolicyCollectorInterface) ? $b->getPriority() : 0;
-
-                return $priorityB <=> $priorityA;
-            }
-        );
         $this->collectors = $collectors;
         $this->mergers = $mergers;
     }
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index c3a8cc8104463..ac2d73fd01add 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -18,10 +18,10 @@
     <type name="Magento\Csp\Model\CompositePolicyCollector">
         <arguments>
             <argument name="collectors" xsi:type="array">
-                <item name="config" xsi:type="object">Magento\Csp\Model\Collector\ConfigCollector\Proxy</item>
-                <item name="whitelist" xsi:type="object">Magento\Csp\Model\Collector\CspWhitelistXmlCollector\Proxy</item>
-                <item name="dynamic" xsi:type="object">Magento\Csp\Model\Collector\DynamicCollector\Proxy</item>
-                <item name="controller" xsi:type="object">Magento\Csp\Model\Collector\ControllerCollector\Proxy</item>
+                <item name="config" xsi:type="object" sortOrder="1">Magento\Csp\Model\Collector\ConfigCollector\Proxy</item>
+                <item name="whitelist" xsi:type="object" sortOrder="2">Magento\Csp\Model\Collector\CspWhitelistXmlCollector\Proxy</item>
+                <item name="controller" xsi:type="object" sortOrder="100">Magento\Csp\Model\Collector\ControllerCollector\Proxy</item>
+                <item name="dynamic" xsi:type="object" sortOrder="3">Magento\Csp\Model\Collector\DynamicCollector\Proxy</item>
             </argument>
             <argument name="mergers" xsi:type="array">
                 <item name="fetch" xsi:type="object">Magento\Csp\Model\Collector\FetchPolicyMerger</item>

From 3b47faf1ffe74d8235943c253146ea089be5115c Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 3 Apr 2020 13:38:41 -0500
Subject: [PATCH 087/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../NoOptionAvailableToConfigureDisabledProductTest.xml   | 8 ++++----
 .../Mftf/Section/AdminInvoicePaymentShippingSection.xml   | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
index 99d905b6d5467..0a954ce79e770 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
@@ -156,17 +156,17 @@
         <see userInput="This product is out of stock." stepKey="seeTheErrorMessageDisplayed"/>
         <!-- Select shipping method -->
         <comment userInput="Select shipping method" stepKey="selectShippingMethod"/>
+        <!-- Shipping is not available because we couldn't add the product -->
         <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
         <waitForPageLoad stepKey="waitForShippingMethods"/>
-        <click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
-        <waitForPageLoad stepKey="waitForShippingMethodLoad"/>
+        <waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.shippingNotAvailable}}" stepKey="checkThatShippingIsUnavailable"/>
         <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder"/>
         <waitForPageLoad stepKey="waitForError"/>
-        <!-- Check that error remains -->
+        <!-- Check order could not be created without products -->
         <actionGroup ref="AssertAdminItemOrderedErrorActionGroup" stepKey="assertProductErrorRemains">
             <argument name="productName" value="$createConfigChildProduct2.name$"/>
             <argument name="messageType" value="error"/>
-            <argument name="message" value="This product is out of stock."/>
+            <argument name="message" value="Validation is failed"/>
         </actionGroup>
     </test>
 </tests>
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml
index 32e987bea919b..185330f4f7fac 100644
--- a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml
@@ -19,5 +19,6 @@
         <element name="shippingMethod" type="button" selector="//label[contains(text(), 'Fixed')]" timeout="60"/>
         <element name="fixedPriceShippingMethod" type="button" selector="#s_method_{{methodName}}_{{methodTitle}}"  parameterized="true"/>
         <element name="getShippingMethod" type="button" selector="#order-shipping-method-summary a"/>
+        <element name="shippingNotAvailable" type="button" selector=".order-shipping-method-summary .order-shipping-method-not-available"/>
     </section>
 </sections>

From 55f780673a113b154191111ac3c36fc363d2a63c Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 3 Apr 2020 15:27:08 -0500
Subject: [PATCH 088/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml | 2 +-
 .../Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml     | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml
index 6526c28d6d3e1..a2f35b9c5fca8 100644
--- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml
+++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AssertAdminItemOrderedErrorActionGroup.xml
@@ -16,6 +16,6 @@
             <argument name="messageType" defaultValue="error" type="string"/>
             <argument name="message" defaultValue="The requested qty is not available" type="string"/>
         </arguments>
-        <see userInput="{{message}}" selector="{{AdminOrderFormItemsOrderedSection.flashMessage(messageType)}}" stepKey="assertItemErrorVisible"/>
+        <see userInput="{{message}}" selector="{{AdminOrderFormItemsOrderedSection.productMessage(productName, messageType)}}" stepKey="assertItemErrorVisible"/>
     </actionGroup>
 </actionGroups>
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml
index 8a51941292104..4437f6e6775f2 100644
--- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormItemsOrderedSection.xml
@@ -19,6 +19,5 @@
         <element name="itemsSKU" type="text" selector="(//div[contains(@class, 'product-sku-block')])[{{productNumber}}]" parameterized="true"/>
         <element name="moveProduct" type="select" selector="//td[contains(.,'{{productName}}')]/../..//td//select" parameterized="true"/>
         <element name="productMessage" type="text" selector="//section[@id = 'order-items']//span[text()='{{productName}}']/ancestor::tr/..//div[contains(@class, 'message-{{messageType}}')]" parameterized="true"/>
-        <element name="flashMessage" type="text" selector="//div[@id = 'order-message']//div[contains(@class, 'message-{{messageType}}')]" parameterized="true"/>
     </section>
 </sections>

From a24925fd84097adb68645668f53958ec6861ba77 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 3 Apr 2020 15:31:09 -0500
Subject: [PATCH 089/307] MC-24063: [2.4.x Port] Implement CSP

---
 .../NoOptionAvailableToConfigureDisabledProductTest.xml   | 8 ++++----
 .../Mftf/Section/AdminInvoicePaymentShippingSection.xml   | 1 -
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
index 0a954ce79e770..99d905b6d5467 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NoOptionAvailableToConfigureDisabledProductTest.xml
@@ -156,17 +156,17 @@
         <see userInput="This product is out of stock." stepKey="seeTheErrorMessageDisplayed"/>
         <!-- Select shipping method -->
         <comment userInput="Select shipping method" stepKey="selectShippingMethod"/>
-        <!-- Shipping is not available because we couldn't add the product -->
         <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
         <waitForPageLoad stepKey="waitForShippingMethods"/>
-        <waitForElementVisible selector="{{AdminInvoicePaymentShippingSection.shippingNotAvailable}}" stepKey="checkThatShippingIsUnavailable"/>
+        <click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
+        <waitForPageLoad stepKey="waitForShippingMethodLoad"/>
         <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder"/>
         <waitForPageLoad stepKey="waitForError"/>
-        <!-- Check order could not be created without products -->
+        <!-- Check that error remains -->
         <actionGroup ref="AssertAdminItemOrderedErrorActionGroup" stepKey="assertProductErrorRemains">
             <argument name="productName" value="$createConfigChildProduct2.name$"/>
             <argument name="messageType" value="error"/>
-            <argument name="message" value="Validation is failed"/>
+            <argument name="message" value="This product is out of stock."/>
         </actionGroup>
     </test>
 </tests>
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml
index 185330f4f7fac..32e987bea919b 100644
--- a/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminInvoicePaymentShippingSection.xml
@@ -19,6 +19,5 @@
         <element name="shippingMethod" type="button" selector="//label[contains(text(), 'Fixed')]" timeout="60"/>
         <element name="fixedPriceShippingMethod" type="button" selector="#s_method_{{methodName}}_{{methodTitle}}"  parameterized="true"/>
         <element name="getShippingMethod" type="button" selector="#order-shipping-method-summary a"/>
-        <element name="shippingNotAvailable" type="button" selector=".order-shipping-method-summary .order-shipping-method-not-available"/>
     </section>
 </sections>

From fda92b13ea4859974b213a0698173a668db836b5 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Wed, 8 Apr 2020 19:47:34 +0300
Subject: [PATCH 090/307] MC-31149: Improve customer custom attribute value
 validation

---
 .../Magento/Eav/Model/Attribute/Data/File.php | 28 +++++++---
 .../Unit/Model/Attribute/Data/FileTest.php    | 53 +++++++++++++------
 2 files changed, 57 insertions(+), 24 deletions(-)

diff --git a/app/code/Magento/Eav/Model/Attribute/Data/File.php b/app/code/Magento/Eav/Model/Attribute/Data/File.php
index a52c88261166e..4ff1a602ec7ea 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/File.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php
@@ -7,12 +7,14 @@
 
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\RequestInterface;
+use Magento\Framework\Filesystem\Io\File as FileIo;
 
 /**
  * EAV Entity Attribute File Data Model
  *
  * @api
  * @since 100.0.2
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
 {
@@ -38,6 +40,11 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
      */
     protected $_directory;
 
+    /**
+     * @var FileIo
+     */
+    private $fileIo;
+
     /**
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Psr\Log\LoggerInterface $logger
@@ -45,6 +52,7 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
      * @param \Magento\Framework\Url\EncoderInterface $urlEncoder
      * @param \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $fileValidator
      * @param \Magento\Framework\Filesystem $filesystem
+     * @param FileIo $fileIo
      * @codeCoverageIgnore
      */
     public function __construct(
@@ -53,12 +61,14 @@ public function __construct(
         \Magento\Framework\Locale\ResolverInterface $localeResolver,
         \Magento\Framework\Url\EncoderInterface $urlEncoder,
         \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $fileValidator,
-        \Magento\Framework\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem,
+        FileIo $fileIo
     ) {
         parent::__construct($localeDate, $logger, $localeResolver);
         $this->urlEncoder = $urlEncoder;
         $this->_fileValidator = $fileValidator;
         $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+        $this->fileIo = $fileIo;
     }
 
     /**
@@ -86,7 +96,7 @@ public function extractValue(RequestInterface $request)
                 $mainScope = $this->_requestScope;
                 $scopes = [];
             }
-
+            // phpcs:disable Magento2.Security.Superglobal
             if (!empty($_FILES[$mainScope])) {
                 foreach ($_FILES[$mainScope] as $fileKey => $scopeData) {
                     foreach ($scopes as $scopeName) {
@@ -104,12 +114,15 @@ public function extractValue(RequestInterface $request)
             } else {
                 $value = [];
             }
+            // phpcs:enable Magento2.Security.Superglobal
         } else {
+            // phpcs:disable Magento2.Security.Superglobal
             if (isset($_FILES[$attrCode])) {
                 $value = $_FILES[$attrCode];
             } else {
                 $value = [];
             }
+            // phpcs:enable Magento2.Security.Superglobal
         }
 
         if (!empty($extend['delete'])) {
@@ -129,7 +142,7 @@ protected function _validateByRules($value)
     {
         $label = $this->getAttribute()->getStoreLabel();
         $rules = $this->getAttribute()->getValidateRules();
-        $extension = pathinfo($value['name'], PATHINFO_EXTENSION);
+        $extension = $this->fileIo->getPathInfo($value['name'])[PATHINFO_EXTENSION];
 
         if (!empty($rules['file_extensions'])) {
             $extensions = explode(',', $rules['file_extensions']);
@@ -146,7 +159,9 @@ protected function _validateByRules($value)
             return $this->_fileValidator->getMessages();
         }
 
-        if (!empty($value['tmp_name']) && !file_exists($value['tmp_name'])) {
+        if (!empty($value['tmp_name'])
+            && !$this->_directory->getDriver()->isExists($value['tmp_name'])
+        ) {
             return [__('"%1" is not a valid file.', $label)];
         }
 
@@ -177,8 +192,9 @@ public function validateValue($value)
 
         if (is_string($value) && !empty($value)) {
             $dir = $this->_directory->getAbsolutePath($this->getAttribute()->getEntityType()->getEntityTypeCode());
+            $stat = $this->_directory->getDriver()->stat($dir . $value);
             $fileData = [
-                'size' => filesize($dir . $value),
+                'size' => $stat['size'],
                 'name' => $value,
                 'tmp_name' => $dir . $value
             ];
@@ -209,8 +225,6 @@ public function validateValue($value)
 
         if (count($errors) == 0) {
             return true;
-        } elseif (is_string($value) && !empty($value)) {
-            $this->_directory->delete($dir . $value);
         }
 
         return $errors;
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php b/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php
index eca6bd212b2dd..3060aaa60ec3f 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php
@@ -6,15 +6,32 @@
 
 namespace Magento\Eav\Test\Unit\Model\Attribute\Data;
 
+use Magento\Eav\Model\Attribute;
+use Magento\Eav\Model\Attribute\Data\File;
+use Magento\Eav\Model\AttributeDataFactory;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\Io\File as FileIo;
+use Magento\Framework\Locale\ResolverInterface;
+use Magento\Framework\Model\AbstractModel;
+use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
+use Magento\Framework\Url\EncoderInterface;
+use Magento\MediaStorage\Model\File\Validator\NotProtectedExtension;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Test for Magento\Eav\Model\Attribute\Data\File class.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class FileTest extends \PHPUnit\Framework\TestCase
 {
     /**
-     * @var \Magento\Eav\Model\Attribute\Data\File
+     * @var File
      */
     protected $model;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Url\EncoderInterface
+     * @var \PHPUnit_Framework_MockObject_MockObject|EncoderInterface
      */
     protected $urlEncoder;
 
@@ -25,23 +42,25 @@ class FileTest extends \PHPUnit\Framework\TestCase
 
     protected function setUp()
     {
-        $timezoneMock = $this->createMock(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::class);
-        $loggerMock = $this->createMock(\Psr\Log\LoggerInterface::class);
-        $localeResolverMock = $this->createMock(\Magento\Framework\Locale\ResolverInterface::class);
-        $this->urlEncoder = $this->createMock(\Magento\Framework\Url\EncoderInterface::class);
+        $timezoneMock = $this->createMock(TimezoneInterface::class);
+        $loggerMock = $this->createMock(LoggerInterface::class);
+        $localeResolverMock = $this->createMock(ResolverInterface::class);
+        $this->urlEncoder = $this->createMock(EncoderInterface::class);
         $this->fileValidatorMock = $this->createPartialMock(
-            \Magento\MediaStorage\Model\File\Validator\NotProtectedExtension::class,
+            NotProtectedExtension::class,
             ['isValid', 'getMessages']
         );
-        $filesystemMock = $this->createMock(\Magento\Framework\Filesystem::class);
+        $filesystemMock = $this->createMock(Filesystem::class);
+        $fileIo = $this->createMock(FileIo::class);
 
-        $this->model = new \Magento\Eav\Model\Attribute\Data\File(
+        $this->model = new File(
             $timezoneMock,
             $loggerMock,
             $localeResolverMock,
             $this->urlEncoder,
             $this->fileValidatorMock,
-            $filesystemMock
+            $filesystemMock,
+            $fileIo
         );
     }
 
@@ -56,10 +75,10 @@ protected function setUp()
      */
     public function testOutputValue($format, $value, $callTimes, $expectedResult)
     {
-        $entityMock = $this->createMock(\Magento\Framework\Model\AbstractModel::class);
+        $entityMock = $this->createMock(AbstractModel::class);
         $entityMock->expects($this->once())->method('getData')->will($this->returnValue($value));
 
-        $attributeMock = $this->createMock(\Magento\Eav\Model\Attribute::class);
+        $attributeMock = $this->createMock(Attribute::class);
         $this->urlEncoder->expects($this->exactly($callTimes))
             ->method('encode')
             ->will($this->returnValue('url_key'));
@@ -76,19 +95,19 @@ public function outputValueDataProvider()
     {
         return [
             [
-                'format' => \Magento\Eav\Model\AttributeDataFactory::OUTPUT_FORMAT_JSON,
+                'format' => AttributeDataFactory::OUTPUT_FORMAT_JSON,
                 'value' => 'value',
                 'callTimes' => 1,
                 'expectedResult' => ['value' => 'value', 'url_key' => 'url_key'],
             ],
             [
-                'format' => \Magento\Eav\Model\AttributeDataFactory::OUTPUT_FORMAT_TEXT,
+                'format' => AttributeDataFactory::OUTPUT_FORMAT_TEXT,
                 'value' => 'value',
                 'callTimes' => 0,
                 'expectedResult' => ''
             ],
             [
-                'format' => \Magento\Eav\Model\AttributeDataFactory::OUTPUT_FORMAT_TEXT,
+                'format' => AttributeDataFactory::OUTPUT_FORMAT_TEXT,
                 'value' => false,
                 'callTimes' => 0,
                 'expectedResult' => ''
@@ -119,10 +138,10 @@ public function testValidateValue(
         $expectedResult
     ) {
         $this->markTestSkipped('MAGETWO-34751: Test fails after being moved.  Might have hidden dependency.');
-        $entityMock = $this->createMock(\Magento\Framework\Model\AbstractModel::class);
+        $entityMock = $this->createMock(AbstractModel::class);
         $entityMock->expects($this->any())->method('getData')->will($this->returnValue($originalValue));
 
-        $attributeMock = $this->createMock(\Magento\Eav\Model\Attribute::class);
+        $attributeMock = $this->createMock(Attribute::class);
         $attributeMock->expects($this->any())->method('getStoreLabel')->will($this->returnValue('Label'));
         $attributeMock->expects($this->any())->method('getIsRequired')->will($this->returnValue($isRequired));
         $attributeMock->expects($this->any())->method('getIsAjaxRequest')->will($this->returnValue($isAjaxRequest));

From b2a3ad6b105c7cf44e7703fc6ac3afd0466b9b31 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Thu, 9 Apr 2020 12:25:49 +0300
Subject: [PATCH 091/307] MC-31149: Improve customer custom attribute value
 validation

---
 app/code/Magento/Eav/Model/Attribute/Data/File.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Eav/Model/Attribute/Data/File.php b/app/code/Magento/Eav/Model/Attribute/Data/File.php
index 4ff1a602ec7ea..be237c70ffd93 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/File.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php
@@ -142,7 +142,7 @@ protected function _validateByRules($value)
     {
         $label = $this->getAttribute()->getStoreLabel();
         $rules = $this->getAttribute()->getValidateRules();
-        $extension = $this->fileIo->getPathInfo($value['name'])[PATHINFO_EXTENSION];
+        $extension = $this->fileIo->getPathInfo($value['name'])['extension'];
 
         if (!empty($rules['file_extensions'])) {
             $extensions = explode(',', $rules['file_extensions']);

From df40d239f58f862fb9f5fc10678b7ab7d096ba9d Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 9 Apr 2020 17:48:40 +0300
Subject: [PATCH 092/307] MC-29420: Remove event handlers from CE

---
 .../adminhtml/templates/notification.phtml    |  16 +-
 .../view/adminhtml/templates/tracking.phtml   |  18 +-
 .../templates/notification/window.phtml       |   2 +
 .../templates/system/messages/popup.phtml     |   6 +-
 .../templates/directpost/iframe.phtml         |  32 +--
 .../adminhtml/templates/directpost/info.phtml |  42 ++--
 .../adminhtml/templates/payment/script.phtml  |  13 +-
 .../Block/Widget/Form/Element/Dependence.php  |  14 +-
 .../Block/Widget/Form/Element/Gallery.php     |  26 ++-
 .../adminhtml/templates/dashboard/chart.phtml |   9 +-
 .../adminhtml/templates/dashboard/grid.phtml  | 164 +++++++------
 .../templates/dashboard/store/switcher.phtml  |  36 ++-
 .../templates/page/js/calendar.phtml          |  48 ++--
 .../templates/page/js/require_js.phtml        |  17 +-
 .../adminhtml/templates/store/switcher.phtml  | 124 ++++++----
 .../templates/system/cache/edit.phtml         |  56 ++++-
 .../templates/system/design/edit.phtml        |   9 +-
 .../system/shipping/applicable_country.phtml  |  11 +-
 .../widget/form/element/gallery.phtml         |  88 +++++--
 .../adminhtml/templates/widget/grid.phtml     | 216 +++++++++++-------
 .../templates/widget/grid/massaction.phtml    |  66 +++---
 .../adminhtml/templates/widget/tabs.phtml     |  67 ++++--
 .../templates/widget/tabshoriz.phtml          |  57 +++--
 .../view/adminhtml/templates/confirm.phtml    |  22 +-
 .../frontend/templates/cart/minicart.phtml    |  21 +-
 .../frontend/templates/cart/shipping.phtml    |  17 +-
 .../view/frontend/templates/onepage.phtml     |  21 +-
 .../templates/system/config/edit.phtml        |  74 +++---
 .../templates/system/config/js.phtml          |  18 +-
 .../view/base/templates/html/cookie.phtml     |   9 +-
 .../templates/system/config/validatevat.phtml |  42 +++-
 .../account/authentication-popup.phtml        |  13 +-
 .../templates/page_cache_validation.phtml     |  11 +-
 .../templates/system/config/rules.phtml       |  14 +-
 .../view/frontend/templates/js/calendar.phtml |  45 ++--
 .../frontend/templates/js/cookie_status.phtml |   7 +-
 .../templates/page/js/require_js.phtml        |  15 +-
 .../view/base/templates/translate.phtml       |  31 ++-
 .../Ui/view/base/templates/logger.phtml       |  12 +-
 .../templates/wysiwyg/active_editor.phtml     |  12 +-
 .../Block/Backend/System/CarrierConfig.php    |   3 +
 .../system/shipping/carrier_config.phtml      |  43 ++--
 .../Magento/Framework/View/Helper/Js.php      |  10 +-
 43 files changed, 1018 insertions(+), 559 deletions(-)

diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
index 4b1f971670184..a8fdb2e04ef31 100644
--- a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
+++ b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
@@ -4,13 +4,21 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<script>
+<?php
+$isAnaliticsVisible = $block->getNotification()->isAnalyticsVisible() ? 1 : 0;
+$isReleaseVisible = $block->getNotification()->isReleaseVisible() ? 1 : 0;
+$scriptString = <<<script
     define('analyticsPopupConfig', function () {
         return {
-            analyticsVisible: <?= $block->getNotification()->isAnalyticsVisible() ? 1 : 0; ?>,
-            releaseVisible: <?= $block->getNotification()->isReleaseVisible() ? 1 : 0; ?>,
+            analyticsVisible: {$isAnaliticsVisible},
+            releaseVisible: {$isReleaseVisible},
         }
     });
-</script>
+script
+?>
+
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
index 0ea5c753c9337..7e01f84b8322c 100644
--- a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
+++ b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
@@ -3,13 +3,19 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/**
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 
 <script src="<?= $block->escapeUrl($block->getTrackingUrl()) ?>" async></script>
-<script>
+
+<?php $scriptString = '
     var adminAnalyticsMetadata = {
-        "version": "<?= $block->escapeJs($block->getMetadata()->getMagentoVersion()) ?>",
-        "user": "<?= $block->escapeJs($block->getMetadata()->getCurrentUser()) ?>",
-        "mode": "<?= $block->escapeJs($block->getMetadata()->getMode()) ?>"
-    };
-</script>
+        "version": "' . $block->escapeJs($block->getMetadata()->getMagentoVersion()) . '",
+        "user": "' . $block->escapeJs($block->getMetadata()->getCurrentUser()) . '",
+        "mode": "' . $block->escapeJs($block->getMetadata()->getMode()) . '"
+    };';
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
index b4f19bda36cbf..980d8e89137ba 100644
--- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
+++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
@@ -6,6 +6,7 @@
 
 /**
  * @see \Magento\AdminNotification\Block\Window
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <ul class="message-system-list"
@@ -25,3 +26,4 @@
         </a>
     </li>
 </ul>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '.message-system-list'); ?>
diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml
index 494e60865623b..2217d441d96ad 100644
--- a/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml
+++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml
@@ -5,18 +5,20 @@
  */
 
 /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<div style="display:none" id="system_messages_list" data-role="system_messages_list"
+<div id="system_messages_list" data-role="system_messages_list"
      title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
     <ul class="message-system-list messages">
-        <?php foreach ($block->getUnreadMessages() as $message) : ?>
+        <?php foreach ($block->getUnreadMessages() as $message): ?>
             <li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
                 <?= $block->escapeHtml($message->getText()) ?>
             </li>
         <?php endforeach;?>
     </ul>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#system_messages_list'); ?>
 
 <script type="text/x-magento-init">
     {
diff --git a/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml
index 3088713989453..8c61f441be3f0 100644
--- a/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml
+++ b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml
@@ -6,26 +6,30 @@
 
 /**
  * @var $block \Magento\Authorizenet\Block\Transparent\Iframe
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $params = $block->getParams();
 $helper = $block->getHelper('adminhtml');
 ?>
 <html>
     <head>
-        <script>
-        <?php if (isset($params['redirect'])) : ?>
-            window.location="<?= $block->escapeUrl($params['redirect']) ?>";
-        <?php endif; ?>
-        <?php if (isset($params['redirect_parent'])) : ?>
-            window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
-        <?php endif; ?>
-        <?php if (isset($params['error_msg'])) : ?>
-            window.top.directPostModel.showError(<?= /* @noEscape */ json_encode((array)$params['error_msg']) ?>);
-            <?php if (isset($params['x_invoice_num'])) : ?>
-                window.top.directPostModel.successUrl="<?= $block->escapeUrl($helper->getSuccessOrderUrl($params)) ?>";
-            <?php endif; ?>
-        <?php endif; ?>
-        </script>
+<?php $scriptString = '';
+if (isset($params['redirect'])) {
+    $scriptString .= 'window.location="<?=' . $block->escapeUrl($params['redirect']) . '";' . PHP_EOL;
+}
+if (isset($params['redirect_parent'])) {
+    $scriptString .= 'window.top.location="' . $block->escapeUrl($params['redirect_parent']) . '";' . PHP_EOL;
+}
+if (isset($params['error_msg'])) {
+    $scriptString .= 'window.top.directPostModel.showError(<?=' .
+        /* @noEscape */ json_encode((array)$params['error_msg']) . ');' . PHP_EOL;
+    if (isset($params['x_invoice_num'])) {
+        $scriptString .= 'window.top.directPostModel.successUrl="' .
+            $block->escapeUrl($helper->getSuccessOrderUrl($params)) . '";' . PHP_EOL;
+    }
+}
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </head>
     <body></body>
 </html>
diff --git a/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml
index bec87738a83c1..6f196c70b2e88 100644
--- a/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml
+++ b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml
@@ -7,6 +7,7 @@
 /**
  * @var \Magento\Authorizenet\Block\Transparent\Iframe $block
  * @see \Magento\Authorizenet\Block\Transparent\Iframe
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $code = $block->escapeHtml($block->getMethodCode());
 $method = $block->getMethod();
@@ -40,9 +41,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
                         'validate-cc-type-select':'#<?= /* @noEscape */ $code ?>_cc_number'
                         }">
                 <option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
-                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
+                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
                     <option value="<?= $block->escapeHtml($typeCode) ?>"
-                            <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif; ?>>
+                            <?php if ($typeCode == $ccType): ?>selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($typeName) ?>
                     </option>
                 <?php endforeach; ?>
@@ -80,9 +81,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
                         'required':true,
                         'validate-cc-exp':'#<?= /* @noEscape */ $code ?>_expiration_yr'
                         }">
-                <?php foreach ($block->getCcMonths() as $k => $v) : ?>
+                <?php foreach ($block->getCcMonths() as $k => $v): ?>
                     <option value="<?= $block->escapeHtml($k) ?>"
-                            <?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif; ?>>
+                            <?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach; ?>
@@ -92,9 +93,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
                     class="admin__control-select admin__control-select-year"
                     data-container="<?= /* @noEscape */ $code ?>-cc-year"
                     data-validate="{required:true}">
-                <?php foreach ($block->getCcYears() as $k => $v) : ?>
-                    <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                            <?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif; ?>>
+                <?php foreach ($block->getCcYears() as $k => $v): ?>
+                    <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k): '' ?>"
+                            <?php if ($k == $ccExpYear): ?>selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach; ?>
@@ -102,7 +103,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         </div>
     </div>
 
-    <?php if ($block->hasVerification()) : ?>
+    <?php if ($block->hasVerification()): ?>
     <div class="admin__field _required field-cvv">
         <label class="admin__field-label"
                for="<?= /* @noEscape */ $code ?>_cc_cid"
@@ -126,7 +127,12 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
     </div>
     <?php endif; ?>
 </fieldset>
-<script>
+<?php
+$codeString = /* @noEscape */ $code;
+$controllerString = /* @noEscape */ $controller;
+$orderUrlString = /* @noEscape */ $orderUrl;
+
+$scriptString = <<<script
     require([
         'prototype',
         'Magento_Sales/order/create/scripts',
@@ -137,16 +143,16 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         /**
          * Disable card server validation in admin
          */
-        order.addExcludedPaymentMethod('<?= /* @noEscape */ $code ?>');
+        order.addExcludedPaymentMethod('{$codeString}');
 
         directPostModel = new directPost(
-            '<?= /* @noEscape */ $code ?>',
+            '{$codeString}',
             'directpost-iframe',
-            '<?= /* @noEscape */ $controller ?>',
-            '<?= /* @noEscape */ $orderUrl ?>',
-            '<?= $block->escapeUrl($method->getCgiUrl()) ?>',
-            '<?= $block->escapeUrl($block->getUrl('*/*/save', [
-                '_secure' => $block->getRequest()->isSecure()
-            ]));?>');
+            '$controllerString',
+            '$orderUrlString',
+            '{$block->escapeUrl($method->getCgiUrl())}',
+            '{$block->escapeUrl($block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()]))}');
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml b/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
index 6be6008dba507..d9cfc62c9b247 100644
--- a/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
+++ b/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
@@ -5,8 +5,9 @@
  */
 
 /** @var Magento\AuthorizenetAcceptjs\Block\Payment $block */
+/** @var Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $scriptString = <<<script
     //<![CDATA[
     require(
         [
@@ -14,11 +15,15 @@
             'jquery',
             'domReady!'
         ], function(AuthorizenetAcceptjs, $) {
-            var config = <?= /* @noEscape */ $block->getPaymentConfig() ?>,
-                form = $('#payment_form_<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($block->getMethodCode())) ?>');
+script;
+$scriptString .= 'var config = ' . /* @noEscape */ $block->getPaymentConfig() . ',
+    form = $(\'#payment_form_' . /* @noEscape */ $block->escapeJs($block->escapeHtml($block->getMethodCode())) . '\');';
+$scriptString .= <<<script
 
             config.active = form.length > 0 && !form.is(':hidden');
             new AuthorizenetAcceptjs(config);
         });
     //]]>
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
index d599d5fbad5e0..45024ad16b31f 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
@@ -6,6 +6,9 @@
 
 namespace Magento\Backend\Block\Widget\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Form element dependencies mapper
  * Assumes that one element may depend on other element values.
@@ -131,11 +134,12 @@ protected function _toHtml()
             $params .= ', ' .  $this->_jsonEncoder->encode($this->_configOptions);
         }
 
-        return "<script>
-require(['mage/adminhtml/form'], function(){
-    new FormElementDependenceController({$params});
-});
-</script>";
+        $secureHtmlRenderer = ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $scriptString = 'require([\'mage/adminhtml/form\'], function(){
+    new FormElementDependenceController(' . $params . ');
+});';
+
+        return /* @noEscape */ $secureHtmlRenderer->renderTag('script', [], $scriptString, false);
     }
 
     /**
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php
index aa0b0c3352ebe..95d3d17f9f342 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php
@@ -6,7 +6,9 @@
 
 namespace Magento\Backend\Block\Widget\Form\Element;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\AbstractElement;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Backend image gallery item renderer
@@ -27,6 +29,18 @@ class Gallery extends \Magento\Backend\Block\Template implements
     protected $_template = 'Magento_Backend::widget/form/element/gallery.phtml';
 
     /**
+     * @param Template\Context $context
+     * @param array $data
+     */
+    public function __construct(Template\Context $context, array $data = [])
+    {
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
+        parent::__construct($context, $data);
+    }
+
+    /**
+     * Renderer.
+     *
      * @param AbstractElement $element
      * @return string
      */
@@ -37,6 +51,8 @@ public function render(AbstractElement $element)
     }
 
     /**
+     * Set element.
+     *
      * @param AbstractElement $element
      * @return $this
      */
@@ -47,6 +63,8 @@ public function setElement(AbstractElement $element)
     }
 
     /**
+     * Get element.
+     *
      * @return AbstractElement|null
      */
     public function getElement()
@@ -55,6 +73,8 @@ public function getElement()
     }
 
     /**
+     * Get value.
+     *
      * @return array
      */
     public function getValues()
@@ -63,7 +83,7 @@ public function getValues()
     }
 
     /**
-     * {@inheritdoc}
+     * @inheritdoc
      */
     protected function _prepareLayout()
     {
@@ -82,6 +102,8 @@ protected function _prepareLayout()
     }
 
     /**
+     * Return add button.
+     *
      * @return string
      */
     public function getAddButtonHtml()
@@ -90,6 +112,8 @@ public function getAddButtonHtml()
     }
 
     /**
+     * Return delete button.
+     *
      * @param string $image
      * @return string|string[]
      */
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml
index 65c0d292ee187..df47f3f41be1b 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml
@@ -7,18 +7,23 @@
 use Magento\Backend\ViewModel\ChartsPeriod;
 use Magento\Framework\Escaper;
 use Magento\Framework\View\Element\Template;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * @var Template $block
  * @var Escaper $escaper
  * @var ChartsPeriod $viewModel
+ * @var SecureHtmlRenderer $secureRenderer
  */
 $viewModel = $block->getViewModel();
 ?>
 <div class="dashboard-diagram">
     <div class="dashboard-diagram-graph">
-        <canvas id="chart_<?= $escaper->escapeHtmlAttr($block->getData('html_id')) ?>_period"
-                style="display: none;"></canvas>
+        <canvas id="chart_<?= $escaper->escapeHtmlAttr($block->getData('html_id')) ?>_period"/>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display:none',
+            '#chart_' . $escaper->escapeHtmlAttr($block->getData('html_id')) . '_period'
+        ) ?>
         <div class="dashboard-diagram-nodata">
             <span><?= $escaper->escapeHtml(__('No Data Found')) ?></span>
         </div>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml
index 7c05335642ba7..a2eb24476726e 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/grid.phtml
@@ -3,89 +3,113 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 
 $numColumns = count($block->getColumns());
 ?>
-<?php if ($block->getCollection()) : ?>
-<div class="dashboard-item-content">
-    <?php if ($block->getCollection()->getSize() > 0) : ?>
-        <table class="admin__table-primary dashboard-data" id="<?= $block->escapeHtmlAttr($block->getId()) ?>_table">
-            <?php
-            /* This part is commented to remove all <col> tags from the code. */
-            /* foreach ($block->getColumns() as $_column): ?>
-            <col <?= $_column->getHtmlProperty() ?> />
-            <?php endforeach; */ ?>
-            <?php if ($block->getHeadersVisibility() || $block->getFilterVisibility()) : ?>
-                <thead>
-                <?php if ($block->getHeadersVisibility()) : ?>
-                    <tr>
-                        <?php foreach ($block->getColumns() as $_column) : ?>
-                            <?= $_column->getHeaderHtml() ?>
-                        <?php endforeach; ?>
-                    </tr>
+<?php if ($block->getCollection()): ?>
+    <div class="dashboard-item-content">
+        <?php if ($block->getCollection()->getSize() > 0): ?>
+            <table class="admin__table-primary dashboard-data"
+                   id="<?= $block->escapeHtmlAttr($block->getId()) ?>_table">
+                <?php
+                /* This part is commented to remove all <col> tags from the code. */
+                /* foreach ($block->getColumns() as $_column): ?>
+                <col <?= $_column->getHtmlProperty() ?> />
+                <?php endforeach; */ ?>
+                <?php if ($block->getHeadersVisibility() || $block->getFilterVisibility()): ?>
+                    <thead>
+                    <?php if ($block->getHeadersVisibility()): ?>
+                        <tr>
+                            <?php foreach ($block->getColumns() as $_column): ?>
+                                <?= $_column->getHeaderHtml() ?>
+                            <?php endforeach; ?>
+                        </tr>
+                    <?php endif; ?>
+                    </thead>
                 <?php endif; ?>
-                </thead>
-            <?php endif; ?>
-            <?php if (!$block->getIsCollapsed()) : ?>
-                <tbody>
-                <?php foreach ($block->getCollection() as $_index => $_item) : ?>
-                    <tr title="<?= $block->escapeHtmlAttr($block->getRowUrl($_item)) ?>">
-                    <?php $i = 0; foreach ($block->getColumns() as $_column) : ?>
-                        <td class="<?= $block->escapeHtmlAttr($_column->getCssProperty()) ?> <?= /* @noEscape */ ++$i == $numColumns ? 'last' : '' ?>"><?= /* @noEscape */ (($_html = $_column->getRowField($_item)) != '' ? $_html : ' ') ?></td>
+                <?php if (!$block->getIsCollapsed()): ?>
+                    <tbody>
+                    <?php foreach ($block->getCollection() as $_index => $_item): ?>
+                        <tr title="<?= $block->escapeHtmlAttr($block->getRowUrl($_item)) ?>">
+                            <?php $i = 0; foreach ($block->getColumns() as $_column): ?>
+                                <td class="<?= $block->escapeHtmlAttr($_column->getCssProperty());
+                                ?> <?= /* @noEscape */ ++$i == $numColumns ? 'last' : '';
+?>"><?= /* @noEscape */ (($_html = $_column->getRowField($_item)) != '' ?
+                                        $_html : ' ') ?></td>
+                            <?php endforeach; ?>
+                        </tr>
                     <?php endforeach; ?>
-                    </tr>
-                <?php endforeach; ?>
-                </tbody>
-            <?php endif; ?>
-        </table>
-    <?php else : ?>
-        <div class="<?= $block->escapeHtmlAttr($block->getEmptyTextClass()) ?>"><?= $block->escapeHtml($block->getEmptyText()) ?></div>
-    <?php endif; ?>
-</div>
-    <?php if ($block->canDisplayContainer()) : ?>
-<script>
-var deps = [];
-
-        <?php if ($block->getDependencyJsObject()) : ?>
-deps.push('uiRegistry');
+                    </tbody>
+                <?php endif; ?>
+            </table>
+        <?php else: ?>
+            <div class="<?= $block->escapeHtmlAttr($block->getEmptyTextClass());
+            ?>"><?= $block->escapeHtml($block->getEmptyText()) ?></div>
         <?php endif; ?>
+    </div>
+    <?php if ($block->canDisplayContainer()): ?>
+        <?php $scriptString = 'var deps = [];' . PHP_EOL;
+        if ($block->getDependencyJsObject()) {
+            $scriptString .= 'deps.push(\'uiRegistry\');' . PHP_EOL;
+        }
 
-        <?php if (strpos($block->getRowClickCallback(), 'order.') !== false) : ?>
-deps.push('Magento_Sales/order/create/form');
-        <?php endif; ?>
+        if (strpos($block->getRowClickCallback(), 'order.') !== false) {
+            $scriptString .= 'deps.push(\'Magento_Sales/order/create/form\');' . PHP_EOL;
+        }
 
-deps.push('mage/adminhtml/grid');
+        $scriptString .= 'deps.push(\'mage/adminhtml/grid\');' . PHP_EOL;
 
-require(deps, function(<?= ($block->getDependencyJsObject() ? 'registry' : '') ?>){
-        <?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
+        $scriptString .= 'require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'){' .
+            PHP_EOL .
+        '//TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed' . PHP_EOL;
 
-        <?php if ($block->getDependencyJsObject()) : ?>
-        registry.get('<?= $block->escapeJs($block->getDependencyJsObject()) ?>', function (<?= $block->escapeJs($block->getDependencyJsObject()) ?>) {
-        <?php endif; ?>
+        if ($block->getDependencyJsObject()) {
+            $scriptString .= 'registry.get(\'' . $block->escapeJs($block->getDependencyJsObject()) .
+                '\', function ('. $block->escapeJs($block->getDependencyJsObject()) . ') {' . PHP_EOL;
+        }
 
-        <?= $block->escapeJs($block->getJsObjectName()) ?> = new varienGrid('<?= $block->escapeJs($block->getId()) ?>', '<?= $block->escapeJs($block->getGridUrl()) ?>', '<?= $block->escapeJs($block->getVarNamePage()) ?>', '<?= $block->escapeJs($block->getVarNameSort()) ?>', '<?= $block->escapeJs($block->getVarNameDir()) ?>', '<?= $block->escapeJs($block->getVarNameFilter()) ?>');
-        <?= $block->escapeJs($block->getJsObjectName()) ?>.useAjax = '<?= $block->escapeJs($block->getUseAjax()) ?>';
-        <?php if ($block->getRowClickCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.rowClickCallback = <?= /* @noEscape */ $block->getRowClickCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getCheckboxCheckCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.checkboxCheckCallback = <?= /* @noEscape */ $block->getCheckboxCheckCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getRowInitCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.rows.each(function(row){<?= /* @noEscape */ $block->getRowInitCallback() ?>(<?= $block->escapeJs($block->getJsObjectName()) ?>, row)});
-        <?php endif; ?>
-        <?php if ($block->getMassactionBlock()->isAvailable()) : ?>
-            <?= /* @noEscape */ $block->getMassactionBlock()->getJavaScript() ?>
-        <?php endif ?>
+        $scriptString .= $block->escapeJs($block->getJsObjectName()) . ' = new varienGrid(\'' .
+            $block->escapeJs($block->getId()) . '\', \'' . $block->escapeJs($block->getGridUrl()) . '\', \'' .
+            $block->escapeJs($block->getVarNamePage()) .'\', \'' .
+            $block->escapeJs($block->getVarNameSort()) . '\', \'' .
+            $block->escapeJs($block->getVarNameDir()) . '\', \'' .
+            $block->escapeJs($block->getVarNameFilter()) .'\');' . PHP_EOL;
 
-        <?php if ($block->getDependencyJsObject()) : ?>
-    });
-        <?php endif; ?>
+        $scriptString .= $block->escapeJs($block->getJsObjectName()) .'.useAjax = \'' .
+            $block->escapeJs($block->getUseAjax()) . '\';' . PHP_EOL;
+        if ($block->getRowClickCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.rowClickCallback = ' .
+                /* @noEscape */ $block->getRowClickCallback() . ';' . PHP_EOL;
+        }
+
+        if ($block->getCheckboxCheckCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.checkboxCheckCallback = ' .
+                /* @noEscape */ $block->getCheckboxCheckCallback() . ';' . PHP_EOL;
+        }
+
+        if ($block->getRowInitCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.initRowCallback = ' .
+                /* @noEscape */ $block->getRowInitCallback() . ';' . PHP_EOL;
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.rows.each(function(row){' .
+                /* @noEscape */ $block->getRowInitCallback() . '(' . $block->escapeJs($block->getJsObjectName()) .
+                ', row)});' . PHP_EOL;
+        }
 
-});
-</script>
-<?php endif; ?>
+        if ($block->getMassactionBlock()->isAvailable()) {
+            $scriptString .= /* @noEscape */ $block->getMassactionBlock()->getJavaScript();
+        }
+
+        if ($block->getDependencyJsObject()) {
+            $scriptString .=  '});' . PHP_EOL;
+        }
+
+        $scriptString .= '});' . PHP_EOL;
+
+        echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
+        ?>
+    <?php endif; ?>
 <?php endif ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
index 87e5399ddda44..870c1dbb7ef1e 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
@@ -3,35 +3,45 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <p class="switcher"><label for="store_switcher"><?= $block->escapeHtml(__('View Statistics For:')) ?></label>
 <?= $block->getHintHtml() ?>
 <select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
     <option value=""><?= $block->escapeHtml(__('All Websites')) ?></option>
-    <?php foreach ($block->getWebsiteCollection() as $_website) : ?>
+    <?php foreach ($block->getWebsiteCollection() as $_website): ?>
         <?php $showWebsite = false; ?>
-        <?php foreach ($block->getGroupCollection($_website) as $_group) : ?>
+        <?php foreach ($block->getGroupCollection($_website) as $_group): ?>
             <?php $showGroup = false; ?>
-            <?php foreach ($block->getStoreCollection($_group) as $_store) : ?>
-                <?php if ($showWebsite == false) : ?>
+            <?php foreach ($block->getStoreCollection($_group) as $_store): ?>
+                <?php if ($showWebsite == false): ?>
                     <?php $showWebsite = true; ?>
-                    <option website="true" value="<?= $block->escapeHtmlAttr($_website->getId()) ?>"<?php if ($block->getRequest()->getParam('website') == $_website->getId()) : ?> selected="selected"<?php endif; ?>><?= $block->escapeHtml($_website->getName()) ?></option>
+                    <option website="true"
+                            value="<?= $block->escapeHtmlAttr($_website->getId()) ?>"<?php
+                            if ($block->getRequest()->getParam('website') == $_website->getId()):
+                                ?> selected="selected"<?php endif; ?>><?= $block->escapeHtml($_website->getName()) ?>
+                    </option>
                 <?php endif; ?>
-                <?php if ($showGroup == false) : ?>
+                <?php if ($showGroup == false): ?>
                     <?php $showGroup = true; ?>
                     <!--optgroup label="   <?= $block->escapeHtmlAttr($_group->getName()) ?>"-->
-                    <option group="true" value="<?= $block->escapeHtmlAttr($_group->getId()) ?>"<?php if ($block->getRequest()->getParam('group') == $_group->getId()) : ?> selected="selected"<?php endif; ?>>   <?= $block->escapeHtml($_group->getName()) ?></option>
+                    <option group="true" value="<?= $block->escapeHtmlAttr($_group->getId()) ?>"<?php
+                    if ($block->getRequest()->getParam('group') == $_group->getId()): ?> selected="selected"<?php
+                    endif; ?>>   <?= $block->escapeHtml($_group->getName()) ?></option>
                 <?php endif; ?>
-                <option value="<?= $block->escapeHtmlAttr($_store->getId()) ?>"<?php if ($block->getStoreId() == $_store->getId()) : ?> selected="selected"<?php endif; ?>>      <?= $block->escapeHtml($_store->getName()) ?></option>
+                <option value="<?= $block->escapeHtmlAttr($_store->getId()) ?>"<?php
+                if ($block->getStoreId() == $_store->getId()): ?> selected="selected"<?php
+                endif; ?>>      <?= $block->escapeHtml($_store->getName()) ?></option>
             <?php endforeach; ?>
-            <?php if ($showGroup) : ?>
+            <?php if ($showGroup): ?>
                 <!--</optgroup>-->
             <?php endif; ?>
         <?php endforeach; ?>
     <?php endforeach; ?>
 </select>
 </p>
-<script>
+<?php $scriptString = <<<script
     require([
         'prototype'
     ], function () {
@@ -54,7 +64,9 @@
                 var select = $('order_amounts_period');
             }
             var periodParam = select.value ? 'period/' + select.value + '/' : '';
-            setLocation('<?= $block->escapeJs($block->getSwitchUrl()) ?>' + storeParam + periodParam);
+            setLocation('{$block->escapeJs($block->getSwitchUrl())}' + storeParam + periodParam);
         }
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml
index 94df9ef9eb872..1ea5e225c8402 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml
@@ -11,9 +11,10 @@
  *
  * @see \Magento\Framework\View\Element\Html\Calendar
  */
-?>
 
-<script>
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+$scriptString = '
 require([
     "jquery",
     "jquery/ui"
@@ -21,20 +22,20 @@ require([
 
     $.extend(true, $, {
         calendarConfig: {
-            dayNames: <?= /* @noEscape */ $days['wide'] ?>,
-            dayNamesMin: <?= /* @noEscape */ $days['abbreviated'] ?>,
-            monthNames: <?= /* @noEscape */ $months['wide'] ?>,
-            monthNamesShort: <?= /* @noEscape */ $months['abbreviated'] ?>,
-            infoTitle: "<?= $block->escapeJs(__('About the calendar')) ?>",
-            firstDay: <?= /* @noEscape */ $firstDay ?>,
-            closeText: "<?= $block->escapeJs(__('Close')) ?>",
-            currentText: "<?= $block->escapeJs(__('Go Today')) ?>",
-            prevText: "<?= $block->escapeJs(__('Previous')) ?>",
-            nextText: "<?= $block->escapeJs(__('Next')) ?>",
-            weekHeader: "<?= $block->escapeJs(__('WK')) ?>",
-            timeText: "<?= $block->escapeJs(__('Time')) ?>",
-            hourText: "<?= $block->escapeJs(__('Hour')) ?>",
-            minuteText: "<?= $block->escapeJs(__('Minute')) ?>",
+            dayNames: ' .  /* @noEscape */ $days['wide'] . ',
+            dayNamesMin: ' . /* @noEscape */ $days['abbreviated'] . ',
+            monthNames: ' . /* @noEscape */ $months['wide'] . ',
+            monthNamesShort: ' . /* @noEscape */ $months['abbreviated'] . ',
+            infoTitle: "' . $block->escapeJs(__('About the calendar')) . '",
+            firstDay: ' . /* @noEscape */ $firstDay . ',
+            closeText: "' . $block->escapeJs(__('Close')) . '",
+            currentText: "' . $block->escapeJs(__('Go Today')) . '",
+            prevText: "' . $block->escapeJs(__('Previous')) . '",
+            nextText: "' . $block->escapeJs(__('Next')) . '",
+            weekHeader: "' . $block->escapeJs(__('WK')) . '",
+            timeText: "' . $block->escapeJs(__('Time')) . '",
+            hourText: "' . $block->escapeJs(__('Hour')) . '",
+            minuteText: "' . $block->escapeJs(__('Minute')) . '",
             dateFormat: $.datepicker.RFC_2822,
             showOn: "button",
             showAnim: "",
@@ -45,17 +46,18 @@ require([
             showButtonPanel: true,
             showOtherMonths: true,
             showWeek: false,
-            timeFormat: '',
+            timeFormat: \'\',
             showTime: false,
             showHour: false,
             showMinute: false,
-            serverTimezoneSeconds: <?= (int) $block->getStoreTimestamp() ?>,
-            serverTimezoneOffset: <?= (int) $block->getTimezoneOffsetSeconds() ?>,
-            yearRange: '<?= $block->escapeJs($block->getYearRange()) ?>'
+            serverTimezoneSeconds: ' . (int) $block->getStoreTimestamp() . ',
+            serverTimezoneOffset: ' . (int) $block->getTimezoneOffsetSeconds() . ',
+            yearRange: \'' . $block->escapeJs($block->getYearRange()) . '\'
         }
     });
 
-enUS = <?= /* @noEscape */ $enUS ?>; // en_US locale reference
+enUS = ' . /* @noEscape */ $enUS . '; // en_US locale reference
+
+});';
 
-});
-</script>
+echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml
index 68453d9ff8ff2..6fa41e1079950 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/page/js/require_js.phtml
@@ -3,11 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-?>
-<script>
-    var BASE_URL = '<?= /* @noEscape */ $block->getUrl('*') ?>';
-    var FORM_KEY = '<?= /* @noEscape */ $block->getFormKey() ?>';
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+$scriptString = '
+    var BASE_URL = \'' . /* @noEscape */ $block->getUrl('*') . '\';
+    var FORM_KEY = \'' . /* @noEscape */ $block->getFormKey() . '\';
     var require = {
-        "baseUrl": "<?= /* @noEscape */ $block->getViewFileUrl('/') ?>"
-    };
-</script>
+        \'baseUrl\': \'' . /* @noEscape */ $block->getViewFileUrl('/') . '\'
+    };';
+
+echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
index df9323a7276df..3251b367b6f56 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
@@ -5,24 +5,27 @@
  */
 
 /* @var $block \Magento\Backend\Block\Store\Switcher */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($websites = $block->getWebsites()) : ?>
-
+<?php if ($websites = $block->getWebsites()): ?>
 <div class="store-switcher store-view">
     <span class="store-switcher-label"><?= $block->escapeHtml(__('Scope:')) ?></span>
     <div class="actions dropdown closable">
         <input type="hidden" name="store_switcher" id="store_switcher"
                data-role="store-view-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreVarName()) ?>"
                value="<?= $block->escapeHtml($block->getStoreId()) ?>"
-               onchange="switchScope(this);"<?= /* @noEscape */ $block->getUiId() ?> />
+               <?= /* @noEscape */ $secureRenderer->renderEventListener('onchange', 'switchScope(this);') ?>
+               <?= /* @noEscape */ $block->getUiId() ?> />
         <input type="hidden" name="store_group_switcher" id="store_group_switcher"
                data-role="store-group-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreGroupVarName()) ?>"
                value="<?= $block->escapeHtml($block->getStoreGroupId()) ?>"
-               onchange="switchScope(this);"<?= /* @noEscape */ $block->getUiId() ?> />
+                <?= /* @noEscape */ $secureRenderer->renderEventListener('onchange', 'switchScope(this);') ?>
+               <?= /* @noEscape */ $block->getUiId() ?> />
         <input type="hidden" name="website_switcher" id="website_switcher"
                data-role="website-id" data-param="<?= $block->escapeHtmlAttr($block->getWebsiteVarName()) ?>"
                value="<?= $block->escapeHtml($block->getWebsiteId()) ?>"
-               onchange="switchScope(this);"<?= /* @noEscape */ $block->getUiId() ?> />
+               <?= /* @noEscape */ $secureRenderer->renderEventListener('onchange', 'switchScope(this);') ?>
+               <?= /* @noEscape */ $block->getUiId() ?> />
         <button
             type="button"
             class="admin__action-dropdown"
@@ -33,61 +36,75 @@
             <?= $block->escapeHtml($block->getCurrentSelectionName()) ?>
         </button>
         <ul class="dropdown-menu" data-role="stores-list">
-            <?php if ($block->hasDefaultOption()) : ?>
-                <li class="store-switcher-all <?php if (!($block->getDefaultSelectionName() != $block->getCurrentSelectionName())) : ?>disabled<?php endif; ?> <?php if (!$block->hasScopeSelected()) : ?>current<?php endif; ?>">
-                    <?php if ($block->getDefaultSelectionName() != $block->getCurrentSelectionName()) : ?>
+            <?php if ($block->hasDefaultOption()): ?>
+                <li class="store-switcher-all <?php
+                if (!($block->getDefaultSelectionName() != $block->getCurrentSelectionName())): ?>disabled<?php endif;
+                ?> <?php if (!$block->hasScopeSelected()): ?>current<?php endif; ?>">
+                    <?php if ($block->getDefaultSelectionName() != $block->getCurrentSelectionName()): ?>
                         <a data-role="store-view-id" data-value="" href="#">
                             <?= $block->escapeHtml($block->getDefaultSelectionName()) ?>
                         </a>
-                    <?php else : ?>
+                    <?php else: ?>
                         <span><?= $block->escapeHtml($block->getDefaultSelectionName()) ?></span>
                     <?php endif; ?>
                 </li>
             <?php endif; ?>
-            <?php foreach ($websites as $website) : ?>
+            <?php foreach ($websites as $website): ?>
                 <?php $showWebsite = false; ?>
-                <?php foreach ($website->getGroups() as $group) : ?>
+                <?php foreach ($website->getGroups() as $group): ?>
                     <?php $showGroup = false; ?>
-                    <?php foreach ($block->getStores($group) as $store) : ?>
-                        <?php if ($showWebsite == false) : ?>
+                    <?php foreach ($block->getStores($group) as $store): ?>
+                        <?php if ($showWebsite == false): ?>
                             <?php $showWebsite = true; ?>
-                            <li class="store-switcher-website <?php if (!($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website))) : ?>disabled<?php endif; ?> <?php if ($block->isWebsiteSelected($website)) : ?>current<?php endif; ?>">
-                                <?php if ($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website)) : ?>
-                                    <a data-role="website-id" data-value="<?= $block->escapeHtml($website->getId()) ?>" href="#">
+                            <li class="store-switcher-website <?php if (!($block->isWebsiteSwitchEnabled() &&
+                                ! $block->isWebsiteSelected($website))): ?>disabled<?php endif; ?> <?php
+if ($block->isWebsiteSelected($website)): ?>current<?php endif; ?>">
+                                <?php if ($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website)): ?>
+                                    <a data-role="website-id" data-value="<?= $block->escapeHtmlAttr($website->getId());
+                                    ?>" href="#">
                                         <?= $block->escapeHtml($website->getName()) ?>
                                     </a>
-                                <?php else : ?>
+                                <?php else: ?>
                                     <span><?= $block->escapeHtml($website->getName()) ?></span>
                                 <?php endif; ?>
                             </li>
                         <?php endif; ?>
-                        <?php if ($showGroup == false) : ?>
+                        <?php if ($showGroup == false): ?>
                             <?php $showGroup = true; ?>
-                            <li class="store-switcher-store <?php if (!($block->isStoreGroupSwitchEnabled() && ! $block->isStoreGroupSelected($group))) : ?>disabled<?php endif; ?> <?php if ($block->isStoreGroupSelected($group)) : ?>current<?php endif; ?>">
-                                <?php if ($block->isStoreGroupSwitchEnabled() && ! $block->isStoreGroupSelected($group)) : ?>
-                                    <a data-role="store-group-id" data-value="<?= $block->escapeHtml($group->getId()) ?>" href="#">
+                            <li class="store-switcher-store <?php if (!($block->isStoreGroupSwitchEnabled() &&
+                                ! $block->isStoreGroupSelected($group))): ?>disabled<?php endif; ?> <?php
+if ($block->isStoreGroupSelected($group)): ?>current<?php endif; ?>">
+                                <?php if ($block->isStoreGroupSwitchEnabled() &&
+                                    ! $block->isStoreGroupSelected($group)): ?>
+                                    <a data-role="store-group-id"
+                                       data-value="<?= $block->escapeHtmlAttr($group->getId()) ?>" href="#">
                                         <?= $block->escapeHtml($group->getName()) ?>
                                     </a>
-                                <?php else : ?>
+                                <?php else: ?>
                                     <span><?= $block->escapeHtml($group->getName()) ?></span>
                                 <?php endif; ?>
                             </li>
                         <?php endif; ?>
-                        <li class="store-switcher-store-view <?php if (!($block->isStoreSwitchEnabled() && !$block->isStoreSelected($store))) : ?>disabled<?php endif; ?> <?php if ($block->isStoreSelected($store)) :?>current<?php endif; ?>">
-                            <?php if ($block->isStoreSwitchEnabled() && ! $block->isStoreSelected($store)) : ?>
-                                <a data-role="store-view-id" data-value="<?= $block->escapeHtml($store->getId()) ?>" href="#">
+                        <li class="store-switcher-store-view <?php if (!($block->isStoreSwitchEnabled() &&
+                        !$block->isStoreSelected($store))): ?>disabled<?php endif; ?> <?php
+if ($block->isStoreSelected($store)):?>current<?php endif; ?>">
+                            <?php if ($block->isStoreSwitchEnabled() && ! $block->isStoreSelected($store)): ?>
+                                <a data-role="store-view-id"
+                                   data-value="<?= $block->escapeHtmlAttr($store->getId()) ?>" href="#">
                                     <?= $block->escapeHtml($store->getName()) ?>
                                 </a>
-                            <?php else : ?>
+                            <?php else: ?>
                                 <span><?= $block->escapeHtml($store->getName()) ?></span>
                             <?php endif; ?>
                         </li>
                     <?php endforeach; ?>
                 <?php endforeach; ?>
             <?php endforeach; ?>
-            <?php if ($block->getShowManageStoresLink() && $block->getAuthorization()->isAllowed('Magento_Backend::store')) : ?>
+            <?php if ($block->getShowManageStoresLink() &&
+                $block->getAuthorization()->isAllowed('Magento_Backend::store')): ?>
                 <li class="dropdown-toolbar">
-                    <a href="<?= /* @noEscape */ $block->getUrl('*/system_store') ?>"><?= $block->escapeHtml(__('Stores Configuration')) ?></a>
+                    <a href="<?= /* @noEscape */ $block->getUrl('*/system_store');
+                    ?>"><?= $block->escapeHtml(__('Stores Configuration')) ?></a>
                 </li>
             <?php endif; ?>
         </ul>
@@ -95,15 +112,17 @@
     <?= $block->getHintHtml() ?>
 </div>
 
-<script>
+    <?php
+    $useConfirm = (int)$block->getUseConfirm();
+    $scriptString = <<<script
 require([
     'jquery',
     'Magento_Ui/js/modal/confirm'
 ], function(jQuery, confirm){
 
     (function($) {
-        var $storesList = $('[data-role=stores-list]');
-        $storesList.on('click', '[data-value]', function(event) {
+        var storesList = $('[data-role=stores-list]');
+        storesList.on('click', '[data-value]', function(event) {
             var val = $(event.target).data('value');
             var role = $(event.target).data('role');
             var switcher = $('[data-role='+role+']');
@@ -134,35 +153,42 @@ require([
             var switcherParams = {
                 scopeId: scopeId,
                 scopeParams: scopeParams,
-                useConfirm: <?= (int)$block->getUseConfirm() ?>
+                useConfirm: {$useConfirm}
             };
             scopeSwitcherHandler(switcherParams);
         } else {
-
-            <?php if ($block->getUseConfirm()) : ?>
-
+script;
+    if ($block->getUseConfirm()) {
+                $scriptString .= '
             confirm({
-                content:  "<?= $block->escapeJs(__('Please confirm scope switching. All data that hasn\'t been saved will be lost.')) ?>",
+                content:  "' . $block->escapeJs(__(
+                    'Please confirm scope switching. All data that hasn\'t been saved will be lost.'
+                )) . '",
                 actions: {
                     confirm: function() {
                         reload();
                     },
                     cancel: function() {
-                        obj.value = '<?= $block->escapeHtml($block->getStoreId()) ?>';
+                        obj.value = \'' . $block->escapeHtml($block->getStoreId()) . '\';
                     }
                 }
             });
-
-            <?php else : ?>
-                reload();
-            <?php endif; ?>
+';
+    } else {
+        $scriptString .= 'reload();';
+    }
+    $scriptString .= '
         }
 
         function reload() {
-            <?php if (!$block->isUsingIframe()) : ?>
-            var url = '<?= $block->escapeJs($block->getSwitchUrl()) ?>' + scopeParams;
-            setLocation(url);
-            <?php else : ?>
+        ';
+    if (!$block->isUsingIframe()) {
+        $scriptString .= '
+                var url = \'' . $block->escapeJs($block->getSwitchUrl()) . '\' + scopeParams;
+                setLocation(url);
+';
+    } else {
+        $scriptString .= <<<script
             jQuery('#preview_selected_store').val(scopeId);
             jQuery('#preview_form').submit();
 
@@ -175,7 +201,9 @@ require([
             });
 
             jQuery('#store-change-button').click();
-            <?php endif; ?>
+script;
+    }
+    $scriptString .= <<<script
         }
     }
 
@@ -183,5 +211,7 @@ require([
     window.switchScope = switchScope;
 
 });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
index d1c51f0755a72..1361b46a3cec9 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 /**
@@ -14,16 +16,19 @@
  */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions"><?= $block->getSaveButtonHtml() ?></div>
-<form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="config-edit-form" enctype="multipart/form-data">
+<form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="config-edit-form"
+      enctype="multipart/form-data">
     <?= $block->getBlockHtml('formkey') ?>
 
-    <script>
+    <?php $scriptString = <<<script
     window.setCacheAction = function(id, button) {
         document.getElementById(id).value = button.id;
 
         configForm.submit();
     }
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 
     <input type="hidden" id="catalog_action" name="catalog_action" value="" />
     <input type="hidden" id="jscss_action" name="jscss_action" value="" />
@@ -36,7 +41,7 @@
         <fieldset id="catalog">
             <table class="form-list">
                 <tbody>
-                    <?php foreach ($block->getCatalogData() as $_item) : ?>
+                    <?php foreach ($block->getCatalogData() as $_item): ?>
                         <?php /* disable reindex buttons. functionality moved to index management*/?>
                         <?php
                         if ($_item['buttons'][0]['name'] != 'clear_images_cache') {
@@ -46,15 +51,30 @@
                     <tr>
                         <td class="label"><label><?= $block->escapeHtml($_item['label']) ?></label></td>
                         <td class="value">
-                            <?php foreach ($_item['buttons'] as $_button) : ?>
+                            <?php foreach ($_item['buttons'] as $_button): ?>
                                 <?php $clickAction = "setCacheAction('catalog_action',this)"; ?>
-                                <?php if (isset($_button['warning']) && $_button['warning']) : ?>
+                                <?php if (isset($_button['warning']) && $_button['warning']): ?>
                                     <?php //phpcs:disable ?>
-                                    <?php $clickAction = "if (confirm('" . addslashes($_button['warning']) . "')) {{$clickAction}}"; ?>
+                                    <?php $clickAction = "if (confirm('" . addslashes($_button['warning']) .
+                                        "')) {{$clickAction}}"; ?>
                                     <?php //phpcs:enable ?>
                                 <?php endif; ?>
-                                <button <?php if (!isset($_button['disabled']) || !$_button['disabled']) :?>onclick="<?=  /* @noEscape */ $clickAction ?>"<?php endif; ?> id="<?= $block->escapeHtmlAttr($_button['name']) ?>" type="button" class="scalable <?php if (isset($_button['disabled']) && $_button['disabled']) :?>disabled<?php endif; ?>" style=""><span><span><span><?= $block->escapeHtml($_button['action']) ?></span></span></span></button>
-                                <?php if (isset($_button['comment'])) : ?> <br /> <small><?= $block->escapeHtml($_button['comment']) ?></small> <?php endif; ?>
+                                <button <?php if (!isset($_button['disabled']) || !$_button['disabled']):?>
+                                    <?= /* @noEscape */ $secureRenderer->renderEventListener(
+                                        'onclick',
+                                        /* @noEscape */ $clickAction
+                                    ) ?>
+                                <?php endif; ?>
+                                    id="<?= $block->escapeHtmlAttr($_button['name']) ?>"
+                                    type="button"
+                                    class="scalable
+                                <?php if (isset($_button['disabled']) && $_button['disabled']):?>disabled<?php endif;?>"
+                                        style=""
+                                ><span><span><span><?= $block->escapeHtml($_button['action']) ?></span></span></span>
+                                </button>
+                                <?php if (isset($_button['comment'])): ?> <br />
+                                    <small><?= $block->escapeHtml($_button['comment']) ?></small>
+                                <?php endif; ?>
                             <?php endforeach; ?>
                         </td>
                         <td><small> </small></td>
@@ -76,7 +96,16 @@
                     <tr>
                         <td class="label"><label><?= $block->escapeHtml(__('JavaScript/CSS Cache')) ?></label></td>
                         <td class="value">
-                            <button onclick="setCacheAction('jscss_action', this)" id='jscss_action' type="button" class="scalable"><span><span><span><?= $block->escapeHtml(__('Clear')) ?></span></span></span></button>
+                            <button
+                                <?= /* @noEscape */ $secureRenderer->renderEventListener(
+                                    'onclick',
+                                    "setCacheAction('jscss_action', this)"
+                                ) ?>
+                                    id='jscss_action'
+                                    type="button"
+                                    class="scalable">
+                                <span><span><span><?= $block->escapeHtml(__('Clear')) ?></span></span></span>
+                            </button>
                         </td>
                     </tr>
                 </tbody>
@@ -84,8 +113,11 @@
         </fieldset>
     </div>
 </form>
-<script>
+<?php $scriptString = <<<script
     require(["jquery","mage/mage"],function($){
        $('#config-edit-form').mage('form').mage('validation');
     });
-</script>
+script;
+?>
+
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/design/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/design/edit.phtml
index c9cd765de35be..2d68012b2c5dc 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/design/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/design/edit.phtml
@@ -3,11 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="design-edit-form">
     <?= $block->getBlockHtml('formkey') ?>
 </form>
-<script>
+
+<?php $scriptString = <<<script
 require([
     "jquery",
     "mage/mage"
@@ -16,4 +19,6 @@ require([
     $('#design-edit-form').mage('form').mage('validation');
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml
index 2a43baa4e24c8..0846fd2020b36 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/shipping/applicable_country.phtml
@@ -3,8 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/**
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require([
     'prototype'
 ], function () {
@@ -115,4 +120,6 @@ CountryModel.prototype = {
 }
 countryApply = new CountryModel();
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
index 5c07b35e72a19..b2f1530dd865b 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <tr>
 <td colspan="2">
@@ -25,35 +27,70 @@
 
 <tbody class="gallery">
 
-<?php $i = 0; if ($block->getValues() !== null) : ?>
-    <?php foreach ($block->getValues() as $image) : $i++; ?>
-        <tr id="<?= $block->getElement()->getHtmlId() ?>_tr_<?= $block->escapeHtmlAttr($image->getValueId()) ?>" class="gallery">
-        <?php foreach ($block->getValues()->getAttributeBackend()->getImageTypes() as $type) : ?>
+<?php $i = 0; if ($block->getValues() !== null): ?>
+    <?php foreach ($block->getValues() as $image): $i++; ?>
+        <tr id="<?= $block->getElement()->getHtmlId() ?>_tr_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"
+            class="gallery">
+        <?php foreach ($block->getValues()->getAttributeBackend()->getImageTypes() as $type): ?>
             <td class="gallery" align="center" style="vertical-align:bottom;">
-            <a href="<?= $block->escapeUrl($image->setType($type)->getSourceUrl()) ?>" target="_blank" onclick="imagePreview('<?= $block->getElement()->getHtmlId() ?>_image_<?= $block->escapeHtmlAttr($block->escapeJs($type)) ?>_<?= $block->escapeHtmlAttr($block->escapeJs($image->getValueId())) ?>');return false;">
-            <img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= $block->escapeHtmlAttr($type) ?>_<?= $block->escapeHtmlAttr($image->getValueId()) ?>" src="<?= $block->escapeUrl($image->setType($type)->getSourceUrl()) ?>?<?= /* @noEscape */ time() ?>" alt="<?= $block->escapeHtmlAttr($image->getValue()) ?>" title="<?= $block->escapeHtmlAttr($image->getValue()) ?>" height="25" class="small-image-preview v-middle"/></a><br/>
-            <input type="file" name="<?= $block->escapeHtmlAttr($block->getElement()->getName()) ?>_<?= $block->escapeHtmlAttr($type) ?>[<?= $block->escapeHtmlAttr($image->getValueId()) ?>]" size="1"></td>
+            <a href="<?= $block->escapeUrl($image->setType($type)->getSourceUrl()) ?>"
+               target="_blank"
+               <?= /* @noEscape */ $secureRenderer->renderEventListener(
+                   'onclick',
+                   "imagePreview('<?= $block->getElement()->getHtmlId() ?>_image_<?=
+                $block->escapeHtmlAttr($block->escapeJs($type)) ?>_<?=
+                 $block->escapeHtmlAttr($block->escapeJs($image->getValueId())) ?>');return false;"
+               ) ?>
+            <img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= $block->escapeHtmlAttr($type)
+            ?>_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"
+                 src="<?= $block->escapeUrl($image->setType($type)->getSourceUrl()) ?>?<?= /* @noEscape */ time() ?>"
+                 alt="<?= $block->escapeHtmlAttr($image->getValue()) ?>"
+                 title="<?= $block->escapeHtmlAttr($image->getValue()) ?>"
+                 height="25"
+                 class="small-image-preview v-middle"/>
+            </a><br/>
+            <input type="file"
+                   name="<?= $block->escapeHtmlAttr($block->getElement()->getName())
+                    ?>_<?= $block->escapeHtmlAttr($type) ?>[<?= $block->escapeHtmlAttr($image->getValueId()) ?>]"
+                   size="1"></td>
         <?php endforeach; ?>
-        <td class="gallery" align="center" style="vertical-align:bottom;"><input type="input" name="<?= $block->escapeHtmlAttr($block->getElement()->getParentName()) ?>[position][<?= $block->escapeHtmlAttr($image->getValueId()) ?>]" value="<?= $block->escapeHtmlAttr($image->getPosition()) ?>" id="<?= $block->getElement()->getHtmlId() ?>_position_<?= $block->escapeHtmlAttr($image->getValueId()) ?>" size="3"/></td>
-        <td class="gallery" align="center" style="vertical-align:bottom;"><?= $block->getDeleteButtonHtml($image->getValueId()) ?><input type="hidden" name="<?= $block->escapeHtmlAttr($block->getElement()->getParentName()) ?>[delete][<?= $block->escapeHtmlAttr($image->getValueId()) ?>]" id="<?= $block->getElement()->getHtmlId() ?>_delete_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"/></td>
+        <td class="gallery" align="center" style="vertical-align:bottom;">
+            <input type="input"
+                   name="<?= $block->escapeHtmlAttr($block->getElement()->getParentName())
+                    ?>[position][<?= $block->escapeHtmlAttr($image->getValueId()) ?>]"
+                   value="<?= $block->escapeHtmlAttr($image->getPosition()) ?>"
+                   id="<?= $block->getElement()->getHtmlId()
+                    ?>_position_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"
+                   size="3"/></td>
+        <td class="gallery" align="center"
+            style="vertical-align:bottom;"><?= $block->getDeleteButtonHtml($image->getValueId()) ?>
+            <input type="hidden"
+                   name="<?= $block->escapeHtmlAttr($block->getElement()->getParentName())
+                    ?>[delete][<?= $block->escapeHtmlAttr($image->getValueId()) ?>]"
+                   id="<?= $block->getElement()->getHtmlId()
+                    ?>_delete_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"/></td>
         </tr>
     <?php endforeach; ?>
 <?php endif; ?>
 
-<?php if ($i == 0) : ?>
-    <script>
+<?php if ($i == 0): ?>
+    <?php $scriptString = <<<script
 document.getElementById("gallery_thead").style.visibility="hidden";
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 <?php endif; ?>
 
 </tbody></table>
 
-<script>
+<?php $jsonHelper = $block->getData('jsonHelper');
+
+$scriptString = <<<script
 require([
     'prototype'
 ], function () {
 id = 0;
-num_of_images = <?= /* @noEscape */ $i ?>;
+num_of_images = {$i};
 
 window.addNewImage = function()
 {
@@ -62,19 +99,24 @@ window.addNewImage = function()
 
     id--;
     num_of_images++;
-    new_file_input = '<input type="file" name="<?= $block->escapeHtmlAttr($block->getElement()->getName()) ?>_%j%[%id%]" size="1">';
+script;
+
+    $elementName = $block->escapeHtmlAttr($block->getElement()->getName());
+    $parentName = $block->escapeJs($block->getElement()->getParentName());
+    $deleteButton = /* @noEscape */ $jsonHelper->jsonEncode($block->getDeleteButtonHtml("this"));
+    $elementNameDel = $block->escapeJs($block->getElement()->getName());
+    $scriptString .= <<<script
+    new_file_input = '<input type="file" name="{$elementName}_%j%[%id%]" size="1">';
 
     // Sort order input
     var new_row_input = document.createElement( 'input' );
     new_row_input.type = 'text';
-    new_row_input.name = '<?= $block->escapeJs($block->getElement()->getParentName()) ?>[position]['+id+']';
+    new_row_input.name = '{$parentName}[position]['+id+']';
     new_row_input.size = '3';
     new_row_input.value = '0';
 
     // Delete button
-    <?php //phpcs:disable ?>
-    new_row_button = <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getDeleteButtonHtml("this")) ?>;
-    <?php // phpcs:enable ?>
+    new_row_button = {$deleteButton};
 
     table = document.getElementById( "gallery" );
 
@@ -113,13 +155,15 @@ window.deleteImage = function(image)
         document.getElementById("gallery_thead").style.visibility="hidden";
     }
     if (image>0) {
-        document.getElementById('<?= $block->escapeJs($block->getElement()->getName()) ?>_delete_'+image).value=image;
-        document.getElementById('<?= $block->escapeJs($block->getElement()->getName()) ?>_tr_'+image).style.display='none';
+        document.getElementById('{$elementNameDel}_delete_'+image).value=image;
+        document.getElementById('{$elementNameDel}_tr_'+image).style.display='none';
     } else {
         image.parentNode.parentNode.parentNode.removeChild( image.parentNode.parentNode );
     }
 }
 });
-</script>
+script;
+?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
     </td>
 </tr>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index 7f6f2bbd13fa5..80a5638555dc2 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -16,63 +16,73 @@
  *
  */
 /* @var $block \Magento\Backend\Block\Widget\Grid */
-$numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+$numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
 ?>
-<?php if ($block->getCollection()) : ?>
+<?php if ($block->getCollection()): ?>
 
-    <?php if ($block->canDisplayContainer()) : ?>
+    <?php if ($block->canDisplayContainer()): ?>
 <div id="<?= $block->escapeHtml($block->getId()) ?>" data-grid-id="<?= $block->escapeHtml($block->getId()) ?>">
-    <?php else : ?>
+    <?php else: ?>
         <?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
     <?php endif; ?>
 
         <div class="admin__data-grid-header admin__data-grid-toolbar">
-            <?php $massActionAvailable = $block->getChildBlock('grid.massaction') && $block->getChildBlock('grid.massaction')->isAvailable() ?>
-            <?php if ($block->getPagerVisibility() || $block->getExportTypes() || $block->getChildBlock('grid.columnSet')->getFilterVisibility() || $massActionAvailable) : ?>
+            <?php $massActionAvailable = $block->getChildBlock('grid.massaction') &&
+                $block->getChildBlock('grid.massaction')->isAvailable() ?>
+            <?php if ($block->getPagerVisibility() || $block->getExportTypes() ||
+                $block->getChildBlock('grid.columnSet')->getFilterVisibility() || $massActionAvailable): ?>
             <div class="admin__data-grid-header-row">
-                <?php if ($massActionAvailable) : ?>
-                    <?= $block->getMainButtonsHtml() ? '<div class="admin__filter-actions">' . $block->getMainButtonsHtml() . '</div>' : '' ?>
+                <?php if ($massActionAvailable): ?>
+                    <?= $block->getMainButtonsHtml() ? '<div class="admin__filter-actions">' .
+                        $block->getMainButtonsHtml() . '</div>' : '' ?>
                 <?php endif; ?>
 
-                <?php if ($block->getChildBlock('grid.export')) : ?>
+                <?php if ($block->getChildBlock('grid.export')): ?>
                     <?= $block->getChildHtml('grid.export') ?>
                 <?php endif; ?>
             </div>
             <?php endif; ?>
             <div class="<?php if ($massActionAvailable) { echo '_massaction ';} ?>admin__data-grid-header-row">
-                <?php if ($massActionAvailable) : ?>
+                <?php if ($massActionAvailable): ?>
                     <?= $block->getChildHtml('grid.massaction') ?>
-                <?php else : ?>
-                    <?= $block->getMainButtonsHtml() ? '<div class="admin__filter-actions">' . $block->getMainButtonsHtml() . '</div>' : '' ?>
+                <?php else: ?>
+                    <?= $block->getMainButtonsHtml() ? '<div class="admin__filter-actions">' .
+                        $block->getMainButtonsHtml() . '</div>' : '' ?>
                 <?php endif; ?>
                     <?php $countRecords = $block->getCollection()->getSize(); ?>
                     <div class="admin__control-support-text">
-                        <span id="<?= $block->escapeHtml($block->getHtmlId()) ?>-total-count" <?= /* @noEscape */ $block->getUiId('total-count') ?>>
+                        <span id="<?= $block->escapeHtml($block->getHtmlId()) ?>-total-count"
+                            <?= /* @noEscape */ $block->getUiId('total-count') ?>>
                             <?= /* @noEscape */ $countRecords ?>
                         </span>
                         <?= $block->escapeHtml(__('records found')) ?>
                         <span id="<?= $block->escapeHtml($block->getHtmlId()) ?>_massaction-count"
-                              class="mass-select-info _empty"><strong data-role="counter">0</strong> <span><?= $block->escapeHtml(__('selected')) ?></span></span>
+                              class="mass-select-info _empty"><strong data-role="counter">0</strong>
+                            <span><?= $block->escapeHtml(__('selected')) ?></span>
+                        </span>
                     </div>
-                <?php if ($block->getPagerVisibility()) : ?>
+                <?php if ($block->getPagerVisibility()): ?>
                     <div class="admin__data-grid-pager-wrap">
                         <select name="<?= $block->escapeHtmlAttr($block->getVarNameLimit()) ?>"
                                 id="<?= $block->escapeHtml($block->getHtmlId()) ?>_page-limit"
-                                onchange="<?= /* @noEscape */ $block->getJsObjectName() ?>.loadByElement(this)" <?= /* @noEscape */ $block->getUiId('per-page') ?>
+                                onchange="<?= /* @noEscape */ $block->getJsObjectName() ?>.loadByElement(this)"
+                            <?= /* @noEscape */ $block->getUiId('per-page') ?>
                                 class="admin__control-select">
-                            <option value="20"<?php if ($block->getCollection()->getPageSize() == 20) : ?>
+                            <option value="20"<?php if ($block->getCollection()->getPageSize() == 20): ?>
                                 selected="selected"<?php endif; ?>>20
                             </option>
-                            <option value="30"<?php if ($block->getCollection()->getPageSize() == 30) : ?>
+                            <option value="30"<?php if ($block->getCollection()->getPageSize() == 30): ?>
                                 selected="selected"<?php endif; ?>>30
                             </option>
-                            <option value="50"<?php if ($block->getCollection()->getPageSize() == 50) : ?>
+                            <option value="50"<?php if ($block->getCollection()->getPageSize() == 50): ?>
                                 selected="selected"<?php endif; ?>>50
                             </option>
-                            <option value="100"<?php if ($block->getCollection()->getPageSize() == 100) : ?>
+                            <option value="100"<?php if ($block->getCollection()->getPageSize() == 100): ?>
                                 selected="selected"<?php endif; ?>>100
                             </option>
-                            <option value="200"<?php if ($block->getCollection()->getPageSize() == 200) : ?>
+                            <option value="200"<?php if ($block->getCollection()->getPageSize() == 200): ?>
                                 selected="selected"<?php endif; ?>>200
                             </option>
                         </select>
@@ -82,14 +92,17 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
                             <?php $_curPage = $block->getCollection()->getCurPage() ?>
                             <?php $_lastPage = $block->getCollection()->getLastPageNumber() ?>
 
-                            <?php if ($_curPage > 1) : ?>
+                            <?php if ($_curPage > 1): ?>
                                 <button class="action-previous"
                                         type="button"
-                                        onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?= /* @noEscape */ ($_curPage - 1) ?>');return false;">
+                                        onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?=
+                                        /* @noEscape */ ($_curPage - 1) ?>');return false;">
                                             <span><?= $block->escapeHtml(__('Previous page')) ?></span>
                                 </button>
-                            <?php else : ?>
-                                <button type="button" class="action-previous disabled"><span><?= $block->escapeHtml(__('Previous page')) ?></span></button>
+                            <?php else: ?>
+                                <button type="button" class="action-previous disabled">
+                                    <span><?= $block->escapeHtml(__('Previous page')) ?></span>
+                                </button>
                             <?php endif; ?>
 
                             <input type="text"
@@ -97,20 +110,26 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
                                    name="<?= $block->escapeHtmlAttr($block->getVarNamePage()) ?>"
                                    value="<?= $block->escapeHtmlAttr($_curPage) ?>"
                                    class="admin__control-text"
-                                   onkeypress="<?= /* @noEscape */ $block->getJsObjectName() ?>.inputPage(event, '<?= /* @noEscape */ $_lastPage ?>')" <?= /* @noEscape */ $block->getUiId('current-page') ?> />
+                                   onkeypress="<?= /* @noEscape */ $block->getJsObjectName() ?>.inputPage(event, '<?=
+                                   /* @noEscape */ $_lastPage ?>')" <?=
+                            /* @noEscape */ $block->getUiId('current-page') ?> />
 
                             <label class="admin__control-support-text" for="<?= $block->escapeHtml($block->getHtmlId())
                             ?>_page-current">
-                                <?= /* @noEscape */ __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
+                                <?= /* @noEscape */ __('of %1', '<span>' .
+                                    $block->getCollection()->getLastPageNumber() . '</span>') ?>
                             </label>
-                            <?php if ($_curPage < $_lastPage) : ?>
+                            <?php if ($_curPage < $_lastPage): ?>
                                 <button type="button" title="<?= $block->escapeHtmlAttr(__('Next page')) ?>"
                                         class="action-next"
-                                        onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?= /* @noEscape */ ($_curPage + 1) ?>');return false;">
+                                        onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?=
+                                        /* @noEscape */ ($_curPage + 1) ?>');return false;">
+                                    <span><?= $block->escapeHtml(__('Next page')) ?></span>
+                                </button>
+                            <?php else: ?>
+                                <button type="button" class="action-next disabled">
                                     <span><?= $block->escapeHtml(__('Next page')) ?></span>
                                 </button>
-                            <?php else : ?>
-                                <button type="button" class="action-next disabled"><span><?= $block->escapeHtml(__('Next page')) ?></span></button>
                             <?php endif; ?>
                         </div>
                     </div>
@@ -118,79 +137,104 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
             </div>
         </div>
         <div class="admin__data-grid-wrap admin__data-grid-wrap-static">
-        <?php if ($block->getGridCssClass()) : ?>
-            <table class="<?= $block->escapeHtmlAttr($block->getGridCssClass()) ?> data-grid" id="<?= $block->escapeHtml($block->getId()) ?>_table">
+        <?php if ($block->getGridCssClass()): ?>
+            <table class="<?= $block->escapeHtmlAttr($block->getGridCssClass()) ?> data-grid"
+                   id="<?= $block->escapeHtml($block->getId()) ?>_table">
                 <!-- Rendering column set -->
                 <?= $block->getChildHtml('grid.columnSet') ?>
             </table>
-        <?php else : ?>
+        <?php else: ?>
 
             <table class="data-grid" id="<?= $block->escapeHtml($block->getId()) ?>_table">
                 <!-- Rendering column set -->
                 <?= $block->getChildHtml('grid.columnSet') ?>
             </table>
 
-            <?php if ($block->getChildBlock('grid.bottom.links')) : ?>
+            <?php if ($block->getChildBlock('grid.bottom.links')): ?>
                 <?= $block->getChildHtml('grid.bottom.links') ?>
             <?php endif; ?>
 
         <?php endif ?>
         </div>
-    <?php if ($block->canDisplayContainer()) : ?>
+    <?php if ($block->canDisplayContainer()): ?>
 </div>
-<script>
-    var deps = [];
-
-        <?php if ($block->getDependencyJsObject()) : ?>
-    deps.push('uiRegistry');
-        <?php endif; ?>
-
-        <?php if (strpos($block->getRowClickCallback(), 'order.') !== false) : ?>
-    deps.push('Magento_Sales/order/create/form');
-    deps.push('jquery');
-        <?php endif; ?>
-
-    deps.push('mage/adminhtml/grid');
-
-    require(deps, function(<?= ($block->getDependencyJsObject() ? 'registry' : '') ?>){
-        <?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
-
-        <?php if ($block->getDependencyJsObject()) : ?>
-            registry.get('<?= $block->escapeJs($block->getDependencyJsObject()) ?>', function (<?= $block->escapeJs($block->getDependencyJsObject()) ?>) {
-        <?php endif; ?>
-
-        <?= $block->escapeJs($block->getJsObjectName()) ?> = new varienGrid('<?= $block->escapeHtml($block->getId()) ?>', '<?= $block->escapeJs($block->getGridUrl()) ?>', '<?= $block->escapeJs($block->getVarNamePage()) ?>', '<?= $block->escapeJs($block->getVarNameSort()) ?>', '<?= $block->escapeJs($block->getVarNameDir()) ?>', '<?= $block->escapeJs($block->getVarNameFilter()) ?>');
-        <?= $block->escapeJs($block->getJsObjectName()) ?>.useAjax = <?= /* @noEscape */ $block->getUseAjax() ? 'true' : 'false' ?>;
-        <?php if ($block->getRowClickCallback()) : ?>
-                <?= $block->escapeJs($block->getJsObjectName()) ?>.rowClickCallback = <?= /* @noEscape */ $block->getRowClickCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getCheckboxCheckCallback()) : ?>
-                <?= $block->escapeJs($block->getJsObjectName()) ?>.checkboxCheckCallback = <?= /* @noEscape */ $block->getCheckboxCheckCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getSortableUpdateCallback()) : ?>
-                <?= $block->escapeJs($block->getJsObjectName()) ?>.sortableUpdateCallback = <?= /* @noEscape */ $block->getSortableUpdateCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getFilterKeyPressCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.filterKeyPressCallback = <?= /* @noEscape */ $block->getFilterKeyPressCallback() ?>;
-        <?php endif; ?>
-        <?= $block->escapeJs($block->getJsObjectName()) ?>.bindSortable();
-        <?php if ($block->getRowInitCallback()) : ?>
-                <?= $block->escapeJs($block->getJsObjectName()) ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;
-                <?= $block->escapeJs($block->getJsObjectName()) ?>.initGridRows();
-        <?php endif; ?>
-        <?php if ($block->getChildBlock('grid.massaction') && $block->getChildBlock('grid.massaction')->isAvailable()) : ?>
-                <?= /* @noEscape */ $block->getChildBlock('grid.massaction')->getJavaScript() ?>
-        <?php endif ?>
-        <?= /* @noEscape */ $block->getAdditionalJavaScript() ?>
+        <?php
+        $scriptString = 'var deps = [];' . PHP_EOL;
+
+        if ($block->getDependencyJsObject()) {
+            $scriptString .= 'deps.push(\'uiRegistry\');' . PHP_EOL;
+        }
+
+        if (strpos($block->getRowClickCallback(), 'order.') !== false) {
+            $scriptString .= 'deps.push(\'Magento_Sales/order/create/form\');' . PHP_EOL;
+            $scriptString .= 'deps.push(\'jquery\');' . PHP_EOL;
+        }
+
+        $scriptString .= 'deps.push(\'mage/adminhtml/grid\');' . PHP_EOL;
+
+        $scriptString .= '
+require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'){' . PHP_EOL .'
+        //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed' . PHP_EOL;
+        if ($block->getDependencyJsObject()) {
+            $scriptString .= 'registry.get(\'' . $block->escapeJs($block->getDependencyJsObject()) .
+                '\', function ('. $block->escapeJs($block->getDependencyJsObject()) . ') {' . PHP_EOL;
+        }
+
+        $scriptString .= $block->escapeJs($block->getJsObjectName()) . ' = new varienGrid(\'' .
+            $block->escapeJs($block->getId()) . '\', \'' . $block->escapeJs($block->getGridUrl()) . '\', \'' .
+            $block->escapeJs($block->getVarNamePage()) .'\', \'' .
+            $block->escapeJs($block->getVarNameSort()) . '\', \'' .
+            $block->escapeJs($block->getVarNameDir()) . '\', \'' . $block->escapeJs($block->getVarNameFilter()) .'\');
+' . PHP_EOL;
+        $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.useAjax = ' .
+            (/* @noEscape */ $block->escapeJs($block->getUseAjax()) ? 'true' : 'false') . ';' . PHP_EOL;
+        if ($block->getRowClickCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.rowClickCallback = ' .
+                /* @noEscape */ $block->getRowClickCallback() . ';' . PHP_EOL;
+        }
+
+        if ($block->getCheckboxCheckCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.checkboxCheckCallback = ' .
+                /* @noEscape */ $block->getCheckboxCheckCallback() . ';' . PHP_EOL;
+        }
+
+        if ($block->getSortableUpdateCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.sortableUpdateCallback = ' .
+                /* @noEscape */ $block->getSortableUpdateCallback() . ';' . PHP_EOL;
+        }
+
+        if ($block->getFilterKeyPressCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.filterKeyPressCallback = ' .
+                /* @noEscape */ $block->getFilterKeyPressCallback() . ';' . PHP_EOL;
+        }
+
+        $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.bindSortable();' . PHP_EOL;
+
+        if ($block->getRowInitCallback()) {
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '.initRowCallback = ' .
+                /* @noEscape */ $block->getRowInitCallback() . ';' . PHP_EOL;
+            $scriptString .= $block->escapeJs($block->getJsObjectName()) . '..initGridRows();' . PHP_EOL;
+        }
+
+        if ($block->getChildBlock('grid.massaction') &&
+            $block->getChildBlock('grid.massaction')->isAvailable()) {
+            $scriptString .= /* @noEscape */ $block->getChildBlock('grid.massaction')->getJavaScript();
+        }
+
+        $scriptString .= /* @noEscape */ $block->getAdditionalJavaScript();
+
+        if ($block->getDependencyJsObject()) {
+            $scriptString .=  '});' . PHP_EOL;
+        }
+
+        $scriptString .= '});' . PHP_EOL;
+
+        echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
+        ?>
 
-        <?php if ($block->getDependencyJsObject()) : ?>
-            });
-        <?php endif; ?>
-    });
-</script>
 <?php endif; ?>
 
-    <?php if ($block->getChildBlock('grid.js')) : ?>
+    <?php if ($block->getChildBlock('grid.js')): ?>
         <?= $block->getChildHtml('grid.js') ?>
     <?php endif; ?>
 
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml
index 9a21cd4ef71a1..179557c2984e5 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml
@@ -3,11 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?= /* @noEscape */ $block->getSomething() ?>
 <div id="<?= $block->getHtmlId() ?>" class="admin__grid-massaction">
 
-    <?php if ($block->getHideFormElement() !== true) : ?>
+    <?php if ($block->getHideFormElement() !== true): ?>
     <form action="" id="<?= $block->getHtmlId() ?>-form" method="post">
     <?php endif ?>
         <div class="admin__grid-massaction-form">
@@ -16,22 +18,26 @@
                 id="<?= $block->getHtmlId() ?>-select"
                 class="required-entry local-validation admin__control-select"
                 <?= /* @noEscape */ $block->getUiId('select') ?>>
-                <option class="admin__control-select-placeholder" value="" selected><?= $block->escapeHtml(__('Actions')) ?></option>
-                <?php foreach ($block->getItems() as $_item) : ?>
-                    <option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"<?= ($_item->getSelected() ? ' selected="selected"' : '') ?>><?= $block->escapeHtml($_item->getLabel()) ?></option>
+                <option class="admin__control-select-placeholder" value="" selected>
+                    <?= $block->escapeHtml(__('Actions')) ?></option>
+                <?php foreach ($block->getItems() as $_item): ?>
+                    <option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"
+                        <?= ($_item->getSelected() ? ' selected="selected"' : '') ?>>
+                        <?= $block->escapeHtml($_item->getLabel()) ?>
+                    </option>
                 <?php endforeach; ?>
             </select>
             <span class="outer-span" id="<?= $block->getHtmlId() ?>-form-hiddens"></span>
             <span class="outer-span" id="<?= $block->getHtmlId() ?>-form-additional"></span>
             <?= $block->getApplyButtonHtml() ?>
         </div>
-    <?php if ($block->getHideFormElement() !== true) :?>
+    <?php if ($block->getHideFormElement() !== true):?>
     </form>
     <?php endif ?>
     <div class="no-display">
-    <?php foreach ($block->getItems() as $_item) : ?>
+    <?php foreach ($block->getItems() as $_item): ?>
         <div id="<?= $block->getHtmlId() ?>-item-<?= /* @noEscape */ $_item->getId() ?>-block">
-            <?php if ('' != $_item->getBlockName()) :?>
+            <?php if ('' != $_item->getBlockName()):?>
                 <?= $block->getChildHtml($_item->getBlockName()) ?>
             <?php endif;?>
         </div>
@@ -46,7 +52,7 @@
             data-menu="grid-mass-select">
             <optgroup label="<?= $block->escapeHtmlAttr(__('Mass Actions')) ?>">
                 <option disabled selected></option>
-                <?php if ($block->getUseSelectAll()) :?>
+                <?php if ($block->getUseSelectAll()):?>
                     <option value="selectAll">
                         <?= $block->escapeHtml(__('Select All')) ?>
                     </option>
@@ -65,35 +71,43 @@
         <label for="<?= $block->getHtmlId() ?>-mass-select"></label>
     </div>
 
-<script>
+<?php $scriptString = <<<script
     require(['jquery', 'domReady!'], function($){
         'use strict';
-        $('#<?= $block->getHtmlId() ?>-mass-select')
+script;
+$scriptString .= '$(\'#' . $block->getHtmlId() . '-mass-select\')';
+$scriptString .= <<<script
             .removeClass('_disabled')
             .prop('disabled', false)
             .change(function () {
             var massAction = $('option:selected', this).val();
             this.blur();
             switch (massAction) {
-                <?php if ($block->getUseSelectAll()) : ?>
-                case 'selectAll':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.selectAll();
-                    break;
-                case 'unselectAll':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.unselectAll();
+script;
+if ($block->getUseSelectAll()):
+    $scriptString .= '
+                case \'selectAll\':
+                    return ' . $block->escapeJs($block->getJsObjectName()) . '.selectAll();
                     break;
-                <?php endif; ?>
-                case 'selectVisible':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.selectVisible();
+                case \'unselectAll\':
+                    return ' . $block->escapeJs($block->getJsObjectName()) . '.unselectAll();
+                    break;';
+endif;
+    $scriptString .= '
+                case \'selectVisible\':
+                    return  ' . $block->escapeJs($block->getJsObjectName()) . '.selectVisible();
                     break;
-                case 'unselectVisible':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.unselectVisible();
+                case \'unselectVisible\':
+                    return ' . $block->escapeJs($block->getJsObjectName()) . '.unselectVisible();
                     break;
             }
         });
-    });
-    <?php if (!$block->getParentBlock()->canDisplayContainer()) : ?>
-        <?= $block->escapeJs($block->getJsObjectName()) ?>.setGridIds('<?= $block->escapeJs($block->getGridIdsJson()) ?>');
-    <?php endif; ?>
-</script>
+    });';
+
+if (!$block->getParentBlock()->canDisplayContainer()):
+    $scriptString .= $block->escapeJs($block->getJsObjectName()) .
+        '.setGridIds(\'' . $block->escapeJs($block->getGridIdsJson()) .'\');';
+endif;
+?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 </div>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
index 5246aac088a5b..f48af7d066df3 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
@@ -5,29 +5,38 @@
  */
 
 /** @var $block \Magento\Backend\Block\Widget\Tabs */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if (!empty($tabs)) : ?>
+<?php if (!empty($tabs)): ?>
 
 <div class="admin__page-nav" data-role="container" id="<?=  $block->escapeHtmlAttr($block->getId()) ?>">
-    <?php if ($block->getTitle()) : ?>
+    <?php if ($block->getTitle()): ?>
         <div class="admin__page-nav-title" data-role="title" <?= /* @noEscape */ $block->getUiId('title') ?>>
             <strong><?= $block->escapeHtml($block->getTitle()) ?></strong>
             <span data-role="title-messages" class="admin__page-nav-title-messages"></span>
         </div>
     <?php endif ?>
-    <ul <?= /* @noEscape */ $block->getUiId('tab', $block->getId()) ?> class="<?= /* @noEscape */ $block->getIsHoriz() ? 'tabs-horiz' : 'tabs admin__page-nav-items' ?>">
-        <?php foreach ($tabs as $_tab) : ?>
+    <ul <?= /* @noEscape */ $block->getUiId('tab', $block->getId()) ?>
+        class="<?= /* @noEscape */ $block->getIsHoriz() ? 'tabs-horiz' : 'tabs admin__page-nav-items' ?>">
+        <?php foreach ($tabs as $_tab): ?>
             <?php
-            if (!$block->canShowTab($_tab)) :
+            if (!$block->canShowTab($_tab)):
                 continue;
             endif;
             ?>
-            <?php $_tabClass = 'tab-item-link ' . $block->getTabClass($_tab) . ' ' . (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
-            <?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
-            <?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
+            <?php $_tabClass = 'tab-item-link ' . $block->getTabClass($_tab) . ' ' .
+                (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
+            <?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ?
+                'link' : '' ?>
+            <?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' :
+                $block->getTabUrl($_tab) ?>
 
-            <li class="admin__page-nav-item" <?php if ($block->getTabIsHidden($_tab)) : ?> style="display:none"<?php endif; ?><?= /* @noEscape */ $block->getUiId('tab', 'item', $_tab->getId()) ?>>
-                <a href="<?=  $block->escapeUrl($_tabHref) ?>" id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" name="<?=  $block->escapeHtmlAttr($block->getTabId($_tab, false)) ?>" title="<?=  $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>"
+            <li class="admin__page-nav-item" <?php if ($block->getTabIsHidden($_tab)): ?> style="display:none"<?php
+            endif; ?><?= /* @noEscape */ $block->getUiId('tab', 'item', $_tab->getId()) ?>>
+                <a href="<?=  $block->escapeUrl($_tabHref) ?>"
+                   id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
+                   name="<?=  $block->escapeHtmlAttr($block->getTabId($_tab, false)) ?>"
+                   title="<?=  $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>"
                    class="admin__page-nav-link <?= $block->escapeHtmlAttr($_tabClass) ?>"
                    data-tab-type="<?=  $block->escapeHtmlAttr($_tabType) ?>"
                    <?= /* @noEscape */ $block->getUiId('tab', 'link', $_tab->getId()) ?>>
@@ -38,13 +47,17 @@
                        <span class="admin__page-nav-item-message _changed">
                            <span class="admin__page-nav-item-message-icon"></span>
                            <span class="admin__page-nav-item-message-tooltip">
-                               <?= $block->escapeHtml(__('Changes have been made to this section that have not been saved.')) ?>
+                               <?= $block->escapeHtml(__(
+                                   'Changes have been made to this section that have not been saved.'
+                               )) ?>
                            </span>
                        </span>
                        <span class="admin__page-nav-item-message _error">
                            <span class="admin__page-nav-item-message-icon"></span>
                            <span class="admin__page-nav-item-message-tooltip">
-                               <?= $block->escapeHtml(__('This tab contains invalid data. Please resolve this before saving.')) ?>
+                               <?= $block->escapeHtml(__(
+                                   'This tab contains invalid data. Please resolve this before saving.'
+                               )) ?>
                            </span>
                        </span>
                         <span class="admin__page-nav-item-message-loader">
@@ -55,23 +68,33 @@
                        </span>
                    </span>
                 </a>
-                <div id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>_content" style="display:none;"<?= /* @noEscape */ $block->getUiId('tab', 'content', $_tab->getId()) ?>><?= /* @noEscape */ $block->getTabContent($_tab) ?></div>
+                <div id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>_content"
+                    <?= /* @noEscape */ $block->getUiId('tab', 'content', $_tab->getId()) ?>>
+                    <?= /* @noEscape */ $block->getTabContent($_tab) ?>
+                </div>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                    'display:none',
+                    '#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+                ); ?>
             </li>
         <?php endforeach; ?>
     </ul>
 </div>
-
-<script>
-require(['jquery',"mage/backend/tabs"], function($){
+    <?php $scriptString = <<<script
+require(['jquery','mage/backend/tabs'], function($){
     $(function() {
-        $('#<?= /* @noEscape */ $block->getId() ?>').tabs({
-            active: '<?= /* @noEscape */ $block->getActiveTabId() ?>',
-            destination: '#<?= /* @noEscape */ $block->getDestElementId() ?>',
-            shadowTabs: <?= /* @noEscape */ $block->getAllShadowTabs() ?>,
-            tabsBlockPrefix: '<?= /* @noEscape */ $block->getId() ?>_',
+script;
+    $scriptString .= '$(\'#' . /* @noEscape */ $block->getId() . '\').tabs({' . PHP_EOL .
+            'active: \'' . /* @noEscape */ $block->getActiveTabId() . '\',' . PHP_EOL .
+            'destination: \'#' . /* @noEscape */ $block->getDestElementId() . '\',' . PHP_EOL .
+            'shadowTabs: ' . /* @noEscape */ $block->getAllShadowTabs() . ',' . PHP_EOL .
+            'tabsBlockPrefix: \'' . /* @noEscape */ $block->getId() . '_\',' . PHP_EOL;
+    $scriptString .= <<<script
             tabIdArgument: 'active_tab'
         });
     });
 });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
index 747dc577d2348..3d77d12604930 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
@@ -3,40 +3,61 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<!-- <?php if ($block->getTitle()) : ?>
+<!-- <?php if ($block->getTitle()): ?>
     <h3><?= $block->escapeHtml($block->getTitle()) ?></h3>
 <?php endif ?> -->
-<?php if (!empty($tabs)) : ?>
+<?php if (!empty($tabs)): ?>
 <div id="<?=  $block->escapeHtmlAttr($block->getId()) ?>">
 <ul  class="tabs-horiz">
-    <?php foreach ($tabs as $_tab) : ?>
-        <?php $_tabClass = 'tab-item-link ' . $block->getTabClass($_tab) . ' ' . (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
+    <?php foreach ($tabs as $_tab): ?>
+        <?php $_tabClass = 'tab-item-link ' . $block->getTabClass($_tab) . ' ' .
+            (preg_match('/\s?ajax\s?/', $_tab->getClass()) ? 'notloaded' : '') ?>
         <?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
-        <?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
+        <?php $_tabHref = $block->getTabUrl($_tab) == '#' ?
+            '#' . $block->getTabId($_tab) . '_content' :
+            $block->getTabUrl($_tab) ?>
     <li>
-        <a href="<?= $block->escapeHtmlAttr($_tabHref) ?>" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>" class="<?= $block->escapeHtmlAttr($_tabClass) ?>" data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
+        <a href="<?= $block->escapeUrl($_tabHref) ?>"
+           id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
+           title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>"
+           class="<?= $block->escapeHtmlAttr($_tabClass) ?>"
+           data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
             <span>
-                <span class="changed" title="<?= $block->escapeHtmlAttr(__('The information in this tab has been changed.')) ?>"></span>
-                <span class="error" title="<?= $block->escapeHtmlAttr(__('This tab contains invalid data. Please resolve this before saving.')) ?>"></span>
-                <span class="loader" title="<?= $block->escapeHtmlAttr(__('Loading...')) ?>"></span>
+                <span class="changed"
+                      title="<?= $block->escapeHtmlAttr(__('The information in this tab has been changed.')) ?>"></span>
+                <span class="error"
+                      title="<?= $block->escapeHtmlAttr(__(
+                          'This tab contains invalid data. Please resolve this before saving.'
+                      )) ?>"></span>
+                <span class="loader"
+                      title="<?= $block->escapeHtmlAttr(__('Loading...')) ?>"></span>
                 <?= $block->escapeHtml($block->getTabLabel($_tab)) ?>
             </span>
         </a>
-        <div id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>_content" style="display:none"><?= /* @noEscape */ $block->getTabContent($_tab) ?></div>
+        <div id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>_content">
+            <?= /* @noEscape */ $block->getTabContent($_tab) ?>
+        </div>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display:none',
+            '#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+        ); ?>
     </li>
     <?php endforeach; ?>
 </ul>
 </div>
-<script>
-require(["jquery","mage/backend/tabs"], function($){
+    <?php $scriptString = '
+require([\'jquery\',\'mage/backend/tabs\'], function($){
     $(function() {
-        $('#<?= /* @noEscape */ $block->getId() ?>').tabs({
-            active: '<?= /* @noEscape */ $block->getActiveTabId() ?>',
-            destination: '#<?= /* @noEscape */ $block->getDestElementId() ?>',
-            shadowTabs: <?= /* @noEscape */ $block->getAllShadowTabs() ?>
+        $(\'#' . /* @noEscape */ $block->getId() . '\').tabs({
+            active: \'' . /* @noEscape */ $block->getActiveTabId() . '\',
+            destination: \'#' . /* @noEscape */ $block->getDestElementId() . '\',
+            shadowTabs: ' . /* @noEscape */ $block->getAllShadowTabs() . '
         });
     });
-});
-</script>
+});';
+    ?>
+    <?= $secureRenderer->renderTag('script', [], /* @noEscape */ $scriptString, false); ?>
 <?php endif; ?>
diff --git a/app/code/Magento/CatalogUrlRewrite/view/adminhtml/templates/confirm.phtml b/app/code/Magento/CatalogUrlRewrite/view/adminhtml/templates/confirm.phtml
index 800ecfd8a6e2f..9708f89f6377f 100644
--- a/app/code/Magento/CatalogUrlRewrite/view/adminhtml/templates/confirm.phtml
+++ b/app/code/Magento/CatalogUrlRewrite/view/adminhtml/templates/confirm.phtml
@@ -3,20 +3,28 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/**
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<script>
+
+<?php $scriptString = <<<script
     require([
         "jquery",
         "Magento_Ui/js/modal/confirm",
         "mage/translate",
-    ], function(jQuery, confirmation, $t) {
+    ], function(jQuery, confirmation, _t) {
     //confirmation for removing category/product URL rewrites
         jQuery('select.generate_category_product_rewrites').on('change', function () {
             if (this.value == 0) {
                 confirmation({
-                    title: $t('Turn off "category/products" URL rewrites?'),
-                    content: $t('Turning off automatic generation of "category/products" URL rewrites will result in permanent removal of all the currently existing “category/product” type URL rewrites without an ability to restore them back. ' +
-                        'This may potentially cause unresolved “category/product” type URL conflicts which you have to resolve by updating URL key manually.'),
+                    title: _t('Turn off "category/products" URL rewrites?'),
+                    content: _t('Turning off automatic generation of "category/products" URL rewrites will result in ' +
+                     'permanent removal of all the currently existing “category/product” type URL rewrites without ' +
+                      'an ability to restore them back. ' +
+                        'This may potentially cause unresolved “category/product” type URL conflicts which you have ' +
+                        'to resolve by updating URL key manually.'),
                     actions: {
                         cancel: function () {
                             jQuery('select.generate_category_product_rewrites').val(1);
@@ -27,4 +35,6 @@
             }
         });
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml
index 28275e0223936..56cd8cd7a1fab 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\Checkout\Block\Cart\Sidebar */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div data-block="minicart" class="minicart-wrapper">
@@ -12,7 +13,8 @@
        data-bind="scope: 'minicart_content'">
         <span class="text"><?= $block->escapeHtml(__('My Cart')) ?></span>
         <span class="counter qty empty"
-              data-bind="css: { empty: !!getCartParam('summary_count') == false && !isLoading() }, blockLoader: isLoading">
+              data-bind="css: { empty: !!getCartParam('summary_count') == false && !isLoading() },
+               blockLoader: isLoading">
             <span class="counter-number"><!-- ko text: getCartParam('summary_count') --><!-- /ko --></span>
             <span class="counter-label">
             <!-- ko if: getCartParam('summary_count') -->
@@ -22,7 +24,7 @@
             </span>
         </span>
     </a>
-    <?php if ($block->getIsNeedToDisplaySideBar()) :?>
+    <?php if ($block->getIsNeedToDisplaySideBar()):?>
         <div class="block block-minicart"
              data-role="dropdownDialog"
              data-mage-init='{"dropdownDialog":{
@@ -39,18 +41,19 @@
             </div>
             <?= $block->getChildHtml('minicart.addons') ?>
         </div>
-    <?php else :?>
-        <script>
+    <?php else: ?>
+        <?php $scriptString = <<<script
             require(['jquery'], function ($) {
                 $('a.action.showcart').click(function() {
                     $(document.body).trigger('processStart');
                 });
             });
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
     <?php endif ?>
-    <script>
-        window.checkout = <?= /* @noEscape */ $block->getSerializedConfig() ?>;
-    </script>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], 'window.checkout = ' .
+     /* @noEscape */ $block->getSerializedConfig(), false); ?>
     <script type="text/x-magento-init">
     {
         "[data-block='minicart']": {
@@ -64,5 +67,3 @@
     }
     </script>
 </div>
-
-
diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml
index a44d37dccfdc5..78625521403a4 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/cart/shipping.phtml
@@ -6,7 +6,7 @@
 
 ?>
 <?php /** @var $block \Magento\Checkout\Block\Cart\Shipping */ ?>
-
+<?php /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ ?>
 <div id="block-shipping"
      class="block shipping"
      data-mage-init='{"collapsible":{"openedState": "active", "saveState": true}}'
@@ -33,8 +33,11 @@
                 }
             }
         </script>
-        <script>
-            window.checkoutConfig = <?= /* @noEscape */ $block->getSerializedCheckoutConfig() ?>;
+<?php $serializedCheckoutConfig = /* @noEscape */ $block->getSerializedCheckoutConfig();
+
+$scriptString = <<<script
+
+            window.checkoutConfig = {$serializedCheckoutConfig};
             window.customerData = window.checkoutConfig.customerData;
             window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
             require([
@@ -42,10 +45,12 @@
                 'Magento_Ui/js/block-loader'
             ], function(url, blockLoader) {
                 blockLoader(
-                    "<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl('images/loader-1.gif'))) ?>"
+                    "{$block->escapeJs($block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')))}"
                 );
-                return url.setBaseUrl('<?= $block->escapeJs($block->escapeUrl($block->getBaseUrl())) ?>');
+                return url.setBaseUrl('{$block->escapeJs($block->escapeUrl($block->getBaseUrl()))}');
             })
-        </script>
+script;
+?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
 </div>
diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
index 55f7039f33344..39df3cb121ba5 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
@@ -5,7 +5,9 @@
  */
 
 /** @var $block \Magento\Checkout\Block\Onepage */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
+
 <div id="checkout" data-bind="scope:'checkout'" class="checkout-container">
     <div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"checkoutLoader": {}}'>
         <div class="loader">
@@ -22,19 +24,24 @@
             }
         }
     </script>
-    <script>
-        window.checkoutConfig = <?= /* @noEscape */ $block->getSerializedCheckoutConfig() ?>;
+    <?php $serializedCheckoutConfig = /* @noEscape */ $block->getSerializedCheckoutConfig();
+    $scriptString = <<<script
+        window.checkoutConfig = {$serializedCheckoutConfig};
         // Create aliases for customer.js model from customer module
         window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
         window.customerData = window.checkoutConfig.customerData;
-    </script>
-    <script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+    <?php $scriptString = <<<script
         require([
             'mage/url',
             'Magento_Ui/js/block-loader'
         ], function(url, blockLoader) {
-            blockLoader("<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl('images/loader-1.gif'))) ?>");
-            return url.setBaseUrl('<?= $block->escapeJs($block->escapeUrl($block->getBaseUrl())) ?>');
+            blockLoader("{$block->escapeJs($block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')))}");
+            return url.setBaseUrl('{$block->escapeJs($block->escapeUrl($block->getBaseUrl()))}');
         })
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml
index 7e7a540e88b2e..5b9a17fca15c3 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/edit.phtml
@@ -3,6 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/**
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <?php
 /**
@@ -14,11 +18,13 @@
  *  getConfigSearchParamsJson() - string
  */
 ?>
-<style>
-    .highlighted {
-        background-color: #DFF7FF!important;
-    }
-</style>
+
+<?= /* @noEscape */ $secureRenderer->renderTag(
+    'style',
+    [],
+    '.highlighted { background-color: #DFF7FF!important; }'
+) ?>
+
 <form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="config-edit-form"
       enctype="multipart/form-data">
     <?= $block->getBlockHtml('formkey') ?>
@@ -26,7 +32,8 @@
         <?= $block->getChildHtml('form') ?>
     </div>
 </form>
-<script>
+
+<?php $scriptString = <<<script
 require([
     "jquery",
     "uiRegistry",
@@ -73,14 +80,14 @@ require([
             }
         },
         getUp: function (element, tag) {
-            var $element = Element.extend(element);
-            if (typeof $element.upTag == 'undefined') {
-                $element.upTag = {};
+            var _element = Element.extend(element);
+            if (typeof _element.upTag == 'undefined') {
+                _element.upTag = {};
             }
-            if (typeof $element.upTag[tag] == 'undefined') {
-                $element.upTag[tag] = Element.extend($element.up(tag));
+            if (typeof _element.upTag[tag] == 'undefined') {
+                _element.upTag[tag] = Element.extend(_element.up(tag));
             }
-            return $element.upTag[tag];
+            return _element.upTag[tag];
         },
         getUpTd: function (element) {
             return this.getUp(element, 'td');
@@ -89,26 +96,26 @@ require([
             return this.getUp(element, 'tr');
         },
         getScopeElement: function(element) {
-            var $element = Element.extend(element);
-            if (typeof $element.scopeElement == 'undefined') {
+            var _element = Element.extend(element);
+            if (typeof _element.scopeElement == 'undefined') {
                 var scopeElementName = element.getAttribute('name').replace(/\[value\]$/, '[inherit]');
-                $element.scopeElement = this.getUpTr(element).select('input[name="' + scopeElementName + '"]')[0];
-                if (typeof $element.scopeElement == 'undefined') {
-                    $element.scopeElement = false;
+                _element.scopeElement = this.getUpTr(element).select('input[name="' + scopeElementName + '"]')[0];
+                if (typeof _element.scopeElement == 'undefined') {
+                    _element.scopeElement = false;
                 }
             }
-            return $element.scopeElement;
+            return _element.scopeElement;
         },
         getDeleteElement: function(element) {
-            var $element = Element.extend(element);
-            if (typeof $element.deleteElement == 'undefined') {
-                $element.deleteElement = this.getUpTd(element)
+            var _element = Element.extend(element);
+            if (typeof _element.deleteElement == 'undefined') {
+                _element.deleteElement = this.getUpTd(element)
                     .select('input[name="'+ element.getAttribute('name') + '[delete]"]')[0];
-                if (typeof $element.deleteElement == 'undefined') {
-                    $element.deleteElement = false;
+                if (typeof _element.deleteElement == 'undefined') {
+                    _element.deleteElement = false;
                 }
             }
-            return $element.deleteElement;
+            return _element.deleteElement;
         },
         mapClasses: function(element, full, callback, classPrefix) {
             if (typeof classPrefix == 'undefined') {
@@ -159,11 +166,11 @@ require([
 
                     var tagName = el.tagName.toLowerCase();
                     if (tagName == 'input' && el.getAttribute('type') == 'file') {
-                        var $el = Element.extend(el);
+                        var _el = Element.extend(el);
                         var events = adminSystemConfig.getRegisteredEvents(el);
-                        $el.stopObserving('change');
-                        var elId = $el.id;
-                        $el.replace($el.outerHTML);
+                        _el.stopObserving('change');
+                        var elId = _el.id;
+                        _el.replace(_el.outerHTML);
                         events.each(function(event) {
                             Event.observe(
                                 Element.extend(document.getElementById(elId)), event.eventName, event.handler
@@ -176,9 +183,9 @@ require([
                                 Element.extend(el).click();
                             }
                         } else if (tagName == 'select') {
-                            var $el = Element.extend(el);
+                            var _el = Element.extend(el);
                             Element.extend(element).select('option').each(function(option) {
-                                var relatedOption = $el.select('option[value="' + option.value + '"]')[0];
+                                var relatedOption = _el.select('option[value="' + option.value + '"]')[0];
                                 if (typeof relatedOption != 'undefined') {
                                     relatedOption.selected = option.selected;
                                 }
@@ -392,7 +399,8 @@ require([
     handleHash();
 
     registry.set('adminSystemConfig', adminSystemConfig);
+script;
+$scriptString .= 'adminSystemConfig.navigateToElement(' . /* @noEscape */ $block->getConfigSearchParamsJson() . ');
+});';
 
-    adminSystemConfig.navigateToElement(<?= /* @noEscape */ $block->getConfigSearchParamsJson(); ?>);
-});
-</script>
+echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml
index 297687786833d..de83471e5eff4 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml
@@ -3,8 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/**
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require([
     'prototype'
 ], function () {
@@ -68,7 +73,11 @@ originModel.prototype = {
     {
         this.reload = false;
         this.loader = new varienLoader(true);
-        this.regionsUrl = "<?= $block->escapeJs($block->escapeUrl($block->getUrl('directory/json/countryRegion'))) ?>";
+script;
+
+$scriptString .= 'this.regionsUrl = "' .
+    $block->escapeJs($block->escapeUrl($block->getUrl('directory/json/countryRegion'))) . '";';
+$scriptString .= <<<script
 
         this.bindCountryRegionRelation();
     },
@@ -259,4 +268,7 @@ function showHint() {
 Event.observe(window, 'load', showHint);
 
 });
-</script>
+script;
+?>
+
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Cookie/view/base/templates/html/cookie.phtml b/app/code/Magento/Cookie/view/base/templates/html/cookie.phtml
index b05c53db02abf..f9d9c9071d69d 100644
--- a/app/code/Magento/Cookie/view/base/templates/html/cookie.phtml
+++ b/app/code/Magento/Cookie/view/base/templates/html/cookie.phtml
@@ -8,10 +8,11 @@
  * Cookie settings initialization script
  *
  * @var $block \Magento\Framework\View\Element\Js\Cookie
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
-?>
 
-<script>
+$scriptString = '
     window.cookiesConfig = window.cookiesConfig || {};
-    window.cookiesConfig.secure = <?= /* @noEscape */ $block->getSessionConfig()->getCookieSecure() ? 'true' : 'false' ?>;
-</script>
+    window.cookiesConfig.secure = ' . /* @noEscape */ $block->getSessionConfig()->getCookieSecure() ? 'true' : 'false';
+
+echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
index 6525e7f29f36b..60b351100eb33 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
@@ -5,8 +5,16 @@
  */
 
 /** @var \Magento\Customer\Block\Adminhtml\System\Config\Validatevat $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php
+ $merchantCountryField = $block->escapeJs($block->getMerchantCountryField());
+ $merchantVatNumberField = $block->escapeJs($block->getMerchantVatNumberField());
+ $ajaxUrl = $block->escapeJs($block->escapeUrl($block->getAjaxUrl()));
+ $errorMessage = $block->escapeJs($block->escapeHtml(__('Error during VAT Number verification.')));
+
+ $scriptString = <<<script
 require(['prototype'], function(){
 
 //<![CDATA[
@@ -14,21 +22,22 @@ require(['prototype'], function(){
         var validationMessage = $('validation_result');
 
         params = {
-            country: $('<?= $block->escapeJs($block->getMerchantCountryField()) ?>').value,
-            vat: $('<?= $block->escapeJs($block->getMerchantVatNumberField()) ?>').value
+            country: $('{$merchantCountryField}').value,
+            vat: $('{$merchantVatNumberField}').value
         };
 
-        new Ajax.Request('<?= $block->escapeJs($block->escapeUrl($block->getAjaxUrl())) ?>', {
+        new Ajax.Request('{$ajaxUrl}', {
             parameters: params,
             onSuccess: function(response) {
-                var result = '<?= $block->escapeJs($block->escapeHtml(__('Error during VAT Number verification.'))) ?>';
+                var result = '{$errorMessage}';
                 try {
                     if (response.responseText.isJSON()) {
                         response = response.responseText.evalJSON();
                         result = response.message;
                     }
                     if (response.valid == 1) {
-                        validationMessage.removeClassName('hidden').removeClassName('admin__field-error').addClassName('note');
+                        validationMessage.removeClassName('hidden').removeClassName('admin__field-error').
+                        addClassName('note');
                         validationMessage.setStyle({color:'green'});
                     } else {
                         validationMessage.removeClassName('hidden').addClassName('admin__field-error');
@@ -45,11 +54,26 @@ require(['prototype'], function(){
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
+
 <div class="actions actions-validate-vat">
-    <p class="admin__field-error hidden" id="validation_result" style="margin-bottom:10px;"></p>
-    <button onclick="javascript:validateVat(); return false;" class="action-validate-vat" type="button" id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>">
+    <p class="admin__field-error hidden" id="validation_result"></p>
+    <button class="action-validate-vat" type="button" id="<?= /* @noEscape */ $block->getHtmlId() ?>">
         <span><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
     </button>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderTag('style', [], '#validation_result {margin-bottom: 10px;}', false); ?>
 
+<?php
+ $htmlId = /* @noEscape */ $block->getHtmlId();
+ $scriptString =<<<script
+require(['jquery'], function($) {
+    $('#{$htmlId}').on('click', function() {
+        javascript:validateVat(); return false;
+        });
+    });
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
index 0d4cf3c721d14..55ff54a519afd 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
@@ -5,11 +5,11 @@
  */
 
 /** @var \Magento\Customer\Block\Account\AuthenticationPopup $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div id="authenticationPopup" data-bind="scope:'authenticationPopup'" style="display: none;">
-    <script>
-        window.authenticationPopup = <?= /* @noEscape */ $block->getSerializedConfig() ?>;
-    </script>
+<div id="authenticationPopup" data-bind="scope:'authenticationPopup'">
+    <?php $scriptString = 'window.authenticationPopup = ' . /* @noEscape */ $block->getSerializedConfig(); ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>;
     <!-- ko template: getTemplate() --><!-- /ko -->
     <script type="text/x-magento-init">
         {
@@ -17,8 +17,11 @@
                 "Magento_Ui/js/core/app": <?= /* @noEscape */ $block->getJsLayout() ?>
             },
             "*": {
-                "Magento_Ui/js/block-loader": "<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl('images/loader-1.gif'))) ?>"
+                "Magento_Ui/js/block-loader": "<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl(
+                    'images/loader-1.gif'
+                ))) ?>"
             }
         }
     </script>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#authenticationPopup'); ?>
diff --git a/app/code/Magento/PageCache/view/adminhtml/templates/page_cache_validation.phtml b/app/code/Magento/PageCache/view/adminhtml/templates/page_cache_validation.phtml
index 57bb5be87e138..b83e0a172574b 100644
--- a/app/code/Magento/PageCache/view/adminhtml/templates/page_cache_validation.phtml
+++ b/app/code/Magento/PageCache/view/adminhtml/templates/page_cache_validation.phtml
@@ -4,9 +4,12 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\PageCache\Block\System\Config\Form\Field\Export $block */
+/**
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require(['jquery'], function($){
 
     //<![CDATA[
@@ -31,4 +34,6 @@ require(['jquery'], function($){
     //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/rules.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/rules.phtml
index ee97d60aa72f8..cd52dd06f9bc1 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/rules.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/rules.phtml
@@ -6,14 +6,18 @@
 
 /**
  * @var \Magento\Paypal\Block\Adminhtml\System\Config\ResolutionRules $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
-
 ?>
-<script>
+
+<?php $scriptString = <<<script
     require([
         "Magento_Paypal/js/solutions",
         "domReady!"
     ], function (Solutions) {
-        var solutions = new Solutions({config: {solutions: <?= /* @noEscape */ $block->getJson() ?>}});
-    });
-</script>
+script;
+
+$scriptString .= 'var solutions = new Solutions({config: {solutions: ' . /* @noEscape */ $block->getJson() . '}});
+    });';
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Theme/view/frontend/templates/js/calendar.phtml b/app/code/Magento/Theme/view/frontend/templates/js/calendar.phtml
index 55798169cdf75..596333595eb5c 100644
--- a/app/code/Magento/Theme/view/frontend/templates/js/calendar.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/js/calendar.phtml
@@ -4,6 +4,9 @@
  * See COPYING.txt for license details.
  */
 
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+/** @var \Magento\Framework\View\Element\Html\Calendar $block */
+
 /**
  * Calendar localization script. Should be put into page header.
  *
@@ -11,7 +14,9 @@
  */
 ?>
 
-<script>
+<?php $intFirstDay = (int)$firstDay;
+$scriptString = <<<script
+
 require([
     'jquery',
     'jquery-ui-modules/datepicker'
@@ -20,23 +25,23 @@ require([
 //<![CDATA[
     $.extend(true, $, {
         calendarConfig: {
-            dayNames: <?= /* @noEscape */ $days['wide'] ?>,
-            dayNamesMin: <?= /* @noEscape */ $days['abbreviated'] ?>,
-            monthNames: <?= /* @noEscape */ $months['wide'] ?>,
-            monthNamesShort: <?= /* @noEscape */ $months['abbreviated'] ?>,
-            infoTitle: "<?= $block->escapeJs(__('About the calendar')) ?>",
-            firstDay: <?= (int)$firstDay ?>,
-            closeText: "<?= $block->escapeJs(__('Close')) ?>",
-            currentText: "<?= $block->escapeJs(__('Go Today')) ?>",
-            prevText: "<?= $block->escapeJs(__('Previous')) ?>",
-            nextText: "<?= $block->escapeJs(__('Next')) ?>",
-            weekHeader: "<?= $block->escapeJs(__('WK')) ?>",
-            timeText: "<?= $block->escapeJs(__('Time')) ?>",
-            hourText: "<?= $block->escapeJs(__('Hour')) ?>",
-            minuteText: "<?= $block->escapeJs(__('Minute')) ?>",
+            dayNames: {$days['wide']},
+            dayNamesMin: {$days['abbreviated']},
+            monthNames: {$months['wide']},
+            monthNamesShort: {$months['abbreviated']},
+            infoTitle: '{$block->escapeJs(__('About the calendar'))}',
+            firstDay: {$intFirstDay},
+            closeText: '{$block->escapeJs(__('Close'))}',
+            currentText: '{$block->escapeJs(__('Go Today'))}',
+            prevText: '{$block->escapeJs(__('Previous'))}',
+            nextText: '{$block->escapeJs(__('Next'))}',
+            weekHeader: '{$block->escapeJs(__('WK'))}',
+            timeText: '{$block->escapeJs(__('Time'))}',
+            hourText: '{$block->escapeJs(__('Hour'))}',
+            minuteText: '{$block->escapeJs(__('Minute'))}',
             dateFormat: $.datepicker.RFC_2822,
-            showOn: "button",
-            showAnim: "",
+            showOn: 'button',
+            showAnim: '',
             changeMonth: true,
             changeYear: true,
             buttonImageOnly: null,
@@ -50,8 +55,10 @@ require([
         }
     });
 
-    enUS = <?= /* @noEscape */ $enUS ?>; // en_US locale reference
+    enUS = {$enUS}; // en_US locale reference
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml b/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
index 2da71c90b5657..ad6c88fc2108d 100644
--- a/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
@@ -3,11 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<div id="cookie-status" style="display: none">
+<div id="cookie-status">
     <?= $block->escapeHtml(__('The store will not work correctly in the case when cookies are disabled.')); ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#cookie-status'); ?>
 
 <script type="text/x-magento-init">
     {
@@ -16,5 +19,3 @@
         }
     }
 </script>
-
-
diff --git a/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml b/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml
index ad998c56b963f..b56468ba07f9d 100644
--- a/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml
@@ -3,10 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-?>
-<script>
-    var BASE_URL = '<?= $block->escapeUrl($block->getBaseUrl()) ?>';
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+$scriptString = '
+    var BASE_URL = \'' . /* @noEscape */ $block->escapeUrl($block->getBaseUrl()) .'\';
     var require = {
-        "baseUrl": "<?= $block->escapeUrl($block->getViewFileUrl('/')) ?>"
-    };
-</script>
+        \'baseUrl\': \'' . /* @noEscape */ $block->escapeUrl($block->getViewFileUrl('/')) . '\'
+    };';
+
+echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
diff --git a/app/code/Magento/Translation/view/base/templates/translate.phtml b/app/code/Magento/Translation/view/base/templates/translate.phtml
index 4c257eb76843f..bd74db151387d 100644
--- a/app/code/Magento/Translation/view/base/templates/translate.phtml
+++ b/app/code/Magento/Translation/view/base/templates/translate.phtml
@@ -4,14 +4,22 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Translation\Block\Js $block */
+/**
+ * @var \Magento\Translation\Block\Js $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <!--
-    For frontend area dictionary file is inserted into html head in Magento/Translation/view/base/templates/dictionary.phtml
-    Same translation mechanism should be introduced for admin area in 2.4 version.
+For frontend area dictionary file is inserted into html head in Magento/Translation/view/base/templates/dictionary.phtml
+Same translation mechanism should be introduced for admin area in 2.4 version.
 -->
-<?php if ($block->dictionaryEnabled()) : ?>
-    <script>
+<?php
+if ($block->dictionaryEnabled()) {
+    $version = $block->getTranslationFileVersion();
+    $escapedVersion = $block->escapeJs($version);
+    $dictionaryFileName = /* @noEscape */ Magento\Translation\Model\Js\Config::DICTIONARY_FILE_NAME;
+
+    $scriptString = <<<script
         require.config({
             deps: [
                 'jquery',
@@ -28,11 +36,9 @@
                 $.initNamespaceStorage('mage-translation-file-version');
                 versionObj = $.localStorage.get('mage-translation-file-version');
 
-                <?php $version = $block->getTranslationFileVersion(); ?>
-
-                if (versionObj.version !== '<?= $block->escapeJs($version) ?>') {
+                if (versionObj.version !== '{$escapedVersion}') {
                     dependencies.push(
-                        'text!<?= /* @noEscape */ Magento\Translation\Model\Js\Config::DICTIONARY_FILE_NAME ?>'
+                        'text!{$dictionaryFileName}'
                     );
 
                 }
@@ -46,7 +52,7 @@
                             $.localStorage.set(
                                 'mage-translation-file-version',
                                 {
-                                    version: '<?= $block->escapeJs($version) ?>'
+                                    version: '{$escapedVersion}'
                                 }
                             );
                         } else {
@@ -56,5 +62,6 @@
                 });
             }
         });
-    </script>
-<?php endif; ?>
+script;
+    echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
+}
diff --git a/app/code/Magento/Ui/view/base/templates/logger.phtml b/app/code/Magento/Ui/view/base/templates/logger.phtml
index 7466781a606f1..b93ac7542464b 100644
--- a/app/code/Magento/Ui/view/base/templates/logger.phtml
+++ b/app/code/Magento/Ui/view/base/templates/logger.phtml
@@ -5,11 +5,13 @@
  */
 
 /** @var $block \Magento\Ui\Block\Logger */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($block->isLoggingEnabled()) : ?>
-    <script>
+<?php if ($block->isLoggingEnabled()): ?>
+    <?php $scriptString = <<<script
+
         window.onerror = function(msg, url, line) {
-            var key = "<?= $block->escapeJs($block->getSessionStorageKey()) ?>";
+            var key = "{$block->escapeJs($block->getSessionStorageKey())}";
             var errors = {};
             if (sessionStorage.getItem(key)) {
                 errors = JSON.parse(sessionStorage.getItem(key));
@@ -20,5 +22,7 @@
             errors[window.location.href].push("error: \'" + msg + "\' " + "file: " + url + " " + "line: " + line);
             sessionStorage.setItem(key, JSON.stringify(errors));
         };
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Ui/view/base/templates/wysiwyg/active_editor.phtml b/app/code/Magento/Ui/view/base/templates/wysiwyg/active_editor.phtml
index a7c279c431665..ff8236478bbbd 100644
--- a/app/code/Magento/Ui/view/base/templates/wysiwyg/active_editor.phtml
+++ b/app/code/Magento/Ui/view/base/templates/wysiwyg/active_editor.phtml
@@ -5,13 +5,17 @@
  */
 
 /** @var Magento\Ui\Block\Wysiwyg\ActiveEditor $block */
-?>
-<script>
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+$wysiwygAdapterPath = /* @noEscape */ $block->getWysiwygAdapterPath();
+$scriptString = <<<script
     require.config({
         map: {
             '*': {
-                wysiwygAdapter: '<?= /* @noEscape */ $block->getWysiwygAdapterPath() ?>'
+                wysiwygAdapter: '{$wysiwygAdapterPath}'
             }
         }
     });
-</script>
+script;
+
+echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
diff --git a/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php b/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php
index 15e782efd0757..94540b13f13c6 100644
--- a/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php
+++ b/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php
@@ -7,8 +7,10 @@
 
 use Magento\Backend\Block\Template;
 use Magento\Backend\Block\Template\Context as TemplateContext;
+use Magento\Framework\App\ObjectManager;
 use Magento\Store\Model\Website;
 use Magento\Ups\Helper\Config as ConfigHelper;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Backend shipping UPS content block
@@ -44,6 +46,7 @@ public function __construct(
     ) {
         $this->carrierConfig = $carrierConfig;
         $this->_websiteModel = $websiteModel;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
index c4298cd8dc046..8ebb1155c9f51 100644
--- a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
+++ b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
@@ -8,6 +8,8 @@
 
 /** @var $upsModel \Magento\Ups\Helper\Config */
 /** @var $block \Magento\Ups\Block\Backend\System\CarrierConfig */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $upsCarrierConfig = $block->getCarrierConfig();
 $orShipArr = $upsCarrierConfig->getCode('originShipment');
 $defShipArr = $upsCarrierConfig->getCode('method');
@@ -16,6 +18,8 @@ $sectionCode = $block->getRequest()->getParam('section');
 $websiteCode = $block->getRequest()->getParam('website');
 $storeCode = $block->getRequest()->getParam('store');
 
+$jsonHelper = $block->getData('jsonHelper');
+
 if (!$storeCode && $websiteCode) {
     /** @var $web \Magento\Store\Model\Website */
     $web = $block->getWebsiteModel()->load($websiteCode);
@@ -35,7 +39,8 @@ if (!$storeCode && $websiteCode) {
     $storedUpsType        = $block->escapeHtml($block->getConfig('carriers/ups/type'));
 }
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require(["prototype"], function(){
 
 //<![CDATA[
@@ -85,14 +90,17 @@ require(["prototype"], function(){
                 'carriers_ups_mode_xml','carriers_ups_include_taxes'];
             this.onlyUpsElements = ['carriers_ups_gateway_url'];
 
-            this.storedOriginShipment = '<?= /* @noEscape */ $storedOriginShipment ?>';
-            this.storedFreeShipment = '<?= /* @noEscape */ $storedFreeShipment ?>';
-            this.storedUpsType = '<?= /* @noEscape */ $storedUpsType ?>';
-            <?php /** @var $jsonHelper \Magento\Framework\Json\Helper\Data */ $jsonHelper = $this->helper(\Magento\Framework\Json\Helper\Data::class); ?>
-            this.storedAllowedMethods = <?= /* @noEscape */ $jsonHelper->jsonEncode($storedAllowedMethods) ?>;
-            this.originShipmentObj = <?= /* @noEscape */ $jsonHelper->jsonEncode($orShipArr) ?>;
-            this.originShipmentObj['default'] = <?= /* @noEscape */ $jsonHelper->jsonEncode($defShipArr) ?>;
+script;
+$scriptString .= 'this.storedOriginShipment = \'' . /* @noEscape */ $storedOriginShipment . '\';
+            this.storedFreeShipment = \'' . /* @noEscape */ $storedFreeShipment . '\';
+            this.storedUpsType = \'' .  /* @noEscape */ $storedUpsType . '\';';
+?>
+<?php $scriptString .= 'this.storedAllowedMethods = ' . /* @noEscape */ $jsonHelper->jsonEncode($storedAllowedMethods) .
+    ';
+            this.originShipmentObj = ' . /* @noEscape */ $jsonHelper->jsonEncode($orShipArr) . ';
+            this.originShipmentObj[\'default\'] = ' . /* @noEscape */ $jsonHelper->jsonEncode($defShipArr) . ';';
 
+$scriptString .= <<<script
             this.setFormValues();
             Event.observe($(this.carriersUpsTypeId), 'change', this.setFormValues.bind(this));
             Event.observe($(this.carriersUpsActiveId), 'change', this.setFormValues.bind(this));
@@ -110,8 +118,13 @@ require(["prototype"], function(){
             while (freeMethod.length > 0) {
                 freeMethod.remove(0);
             }
-            freeMethod.insert(new Element('option', {value:''}).update('<?= $block->escapeHtml(__('None')) ?>'));
 
+script;
+
+$scriptString .= 'freeMethod.insert(new Element(\'option\', {value:\'\'}).update(\'' . $block->escapeHtml(__('None')) .
+    '\'));';
+
+$scriptString .= <<<script
             var code, option;
             for (code in originShipment) {
                 option = new Element('option', {value:code}).update(originShipment[code]);
@@ -145,7 +158,7 @@ require(["prototype"], function(){
         setFormValues: function()
         {
             var a;
-            if ($F(this.carriersUpsTypeId) == 'UPS') {
+            if ($(this.carriersUpsTypeId) == 'UPS') {
                 for (a = 0; a < this.checkingUpsXmlId.length; a++) {
                     $(this.checkingUpsXmlId[a]).removeClassName('required-entry');
                 }
@@ -173,13 +186,13 @@ require(["prototype"], function(){
         },
         changeOriginShipment: function(Event, key)
         {
-            this.originShipmentTitle = key ? key : $F('carriers_ups_origin_shipment');
+            this.originShipmentTitle = key ? key : $('carriers_ups_origin_shipment');
             this.updateAllowedMethods(this.originShipmentTitle);
         },
         changeFieldsDisabledState: function (fields, key) {
-            $(fields[key]).disabled = $F(this.carriersUpsActiveId) !== '1'
+            $(fields[key]).disabled = $(this.carriersUpsActiveId) !== '1'
                 || $(fields[key] + '_inherit') !== null
-                && $F(fields[key] + '_inherit') === '1';
+                && $(fields[key] + '_inherit') === '1';
 
             if ($(fields[key]).next() !== undefined) {
                 $(fields[key]).removeClassName('mage-error').next().remove();
@@ -191,4 +204,6 @@ require(["prototype"], function(){
     //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/lib/internal/Magento/Framework/View/Helper/Js.php b/lib/internal/Magento/Framework/View/Helper/Js.php
index e2a30cdd1a527..fe120562cb79e 100644
--- a/lib/internal/Magento/Framework/View/Helper/Js.php
+++ b/lib/internal/Magento/Framework/View/Helper/Js.php
@@ -9,6 +9,11 @@
  */
 namespace Magento\Framework\View\Helper;
 
+use Magento\Framework\App\ObjectManager;
+
+/**
+ * Class Js help render script.
+ */
 class Js
 {
     /**
@@ -19,6 +24,9 @@ class Js
      */
     public function getScript($script)
     {
-        return '<script type="text/javascript">//<![CDATA[' . "\n{$script}\n" . '//]]></script>';
+        $secureHtmlRenderer = ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $scriptString = '//<![CDATA[' . "\n{$script}\n" . '//]]>';
+
+        return /* @noEscape */ $secureHtmlRenderer->renderTag('script', [], $scriptString, false);
     }
 }

From 6f2b414aa6160e770d647e221ed59b11b5b5b9b5 Mon Sep 17 00:00:00 2001
From: Sachin Admane <sadmane@adobe.com>
Date: Thu, 9 Apr 2020 18:35:34 -0500
Subject: [PATCH 093/307] MC-22963: Identify and Refactor GET requests which
 modify data.

Fix typo in function.
---
 .../Search/Controller/Adminhtml/Synonyms/DeleteTest.php       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php b/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php
index 39624a725ad72..ed8c3dba8f8d0 100644
--- a/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php
+++ b/dev/tests/integration/testsuite/Magento/Search/Controller/Adminhtml/Synonyms/DeleteTest.php
@@ -29,7 +29,7 @@ class DeleteTest extends AbstractBackendController
      */
     public function testExecute(): void
     {
-        $synonymGroupModel=$this->gettestFixture();
+        $synonymGroupModel=$this->getTestFixture();
         $this->getRequest()->setMethod(HttpRequest::METHOD_POST);
         $this->getRequest()->setPostValue(['group_id' => $synonymGroupModel->getGroupId()]);
         $this->dispatch('backend/search/synonyms/delete');
@@ -53,7 +53,7 @@ public function testExecuteNoId(): void
      *
      * @return SynonymGroup
      */
-    private function gettestFixture(): SynonymGroup
+    private function getTestFixture(): SynonymGroup
     {
         /** @var Collection */
         $synonymGroupCollection = Bootstrap::getObjectManager()->get(Collection::class);

From 71bb134ba3cd0b45da7d7e7c857ae2cdd412b05b Mon Sep 17 00:00:00 2001
From: Buba Suma <soumah@adobe.com>
Date: Tue, 7 Apr 2020 18:17:34 -0500
Subject: [PATCH 094/307] MC-32962: [Magento Cloud] - Shopping Cart Rules not
 applying to children of Bundle

- Fix cart price rule should not be applied to all children of bundle item if only some child items pass the condition
---
 .../SalesRule/Model/Quote/Discount.php        |  95 ++++---
 .../Magento/SalesRule/Model/RulesApplier.php  |  23 +-
 .../Magento/SalesRule/Model/Validator.php     |   7 +
 .../Test/Unit/Model/Quote/DiscountTest.php    | 255 +++++-------------
 .../Test/Unit/Model/RulesApplierTest.php      |  46 ++--
 .../bundle_product_with_dynamic_price.php     |  84 ++++++
 ...le_product_with_dynamic_price_rollback.php |  32 +++
 ...with_bundle_product_with_dynamic_price.php |  53 ++++
 ...le_product_with_dynamic_price_rollback.php |  27 ++
 .../SalesRule/Model/Quote/DiscountTest.php    | 153 +++++++++++
 .../_files/cart_rule_product_sku.php          |  77 ++++++
 .../_files/cart_rule_product_sku_rollback.php |  39 +++
 12 files changed, 633 insertions(+), 258 deletions(-)
 create mode 100644 dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price_rollback.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price_rollback.php
 create mode 100644 dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku.php
 create mode 100644 dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku_rollback.php

diff --git a/app/code/Magento/SalesRule/Model/Quote/Discount.php b/app/code/Magento/SalesRule/Model/Quote/Discount.php
index a580a8f9d2eaa..a32fe249920b1 100644
--- a/app/code/Magento/SalesRule/Model/Quote/Discount.php
+++ b/app/code/Magento/SalesRule/Model/Quote/Discount.php
@@ -6,37 +6,53 @@
 namespace Magento\SalesRule\Model\Quote;
 
 use Magento\Framework\App\ObjectManager;
-use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory;
+use Magento\Framework\Event\ManagerInterface;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
+use Magento\Quote\Api\Data\AddressInterface;
+use Magento\Quote\Api\Data\ShippingAssignmentInterface;
+use Magento\Quote\Model\Quote;
+use Magento\Quote\Model\Quote\Address\Total;
+use Magento\Quote\Model\Quote\Address\Total\AbstractTotal;
+use Magento\Quote\Model\Quote\Item;
+use Magento\Quote\Model\Quote\Item\AbstractItem;
+use Magento\SalesRule\Api\Data\DiscountDataInterface;
 use Magento\SalesRule\Api\Data\DiscountDataInterfaceFactory;
+use Magento\SalesRule\Api\Data\RuleDiscountInterfaceFactory;
+use Magento\SalesRule\Model\Data\RuleDiscount;
+use Magento\SalesRule\Model\Discount\PostProcessorFactory;
+use Magento\SalesRule\Model\Validator;
+use Magento\Store\Model\StoreManagerInterface;
 
 /**
  * Discount totals calculation model.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
+class Discount extends AbstractTotal
 {
     const COLLECTOR_TYPE_CODE = 'discount';
 
     /**
      * Discount calculation object
      *
-     * @var \Magento\SalesRule\Model\Validator
+     * @var Validator
      */
     protected $calculator;
 
     /**
      * Core event manager proxy
      *
-     * @var \Magento\Framework\Event\ManagerInterface
+     * @var ManagerInterface
      */
     protected $eventManager = null;
 
     /**
-     * @var \Magento\Store\Model\StoreManagerInterface
+     * @var StoreManagerInterface
      */
     protected $storeManager;
 
     /**
-     * @var \Magento\Framework\Pricing\PriceCurrencyInterface
+     * @var PriceCurrencyInterface
      */
     protected $priceCurrency;
 
@@ -51,18 +67,18 @@ class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
     private $discountDataInterfaceFactory;
 
     /**
-     * @param \Magento\Framework\Event\ManagerInterface $eventManager
-     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
-     * @param \Magento\SalesRule\Model\Validator $validator
-     * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
+     * @param ManagerInterface $eventManager
+     * @param StoreManagerInterface $storeManager
+     * @param Validator $validator
+     * @param PriceCurrencyInterface $priceCurrency
      * @param RuleDiscountInterfaceFactory|null $discountInterfaceFactory
      * @param DiscountDataInterfaceFactory|null $discountDataInterfaceFactory
      */
     public function __construct(
-        \Magento\Framework\Event\ManagerInterface $eventManager,
-        \Magento\Store\Model\StoreManagerInterface $storeManager,
-        \Magento\SalesRule\Model\Validator $validator,
-        \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
+        ManagerInterface $eventManager,
+        StoreManagerInterface $storeManager,
+        Validator $validator,
+        PriceCurrencyInterface $priceCurrency,
         RuleDiscountInterfaceFactory $discountInterfaceFactory = null,
         DiscountDataInterfaceFactory $discountDataInterfaceFactory = null
     ) {
@@ -80,17 +96,17 @@ public function __construct(
     /**
      * Collect address discount amount
      *
-     * @param \Magento\Quote\Model\Quote $quote
-     * @param \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment
-     * @param \Magento\Quote\Model\Quote\Address\Total $total
+     * @param Quote $quote
+     * @param ShippingAssignmentInterface $shippingAssignment
+     * @param Total $total
      * @return $this
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
     public function collect(
-        \Magento\Quote\Model\Quote $quote,
-        \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment,
-        \Magento\Quote\Model\Quote\Address\Total $total
+        Quote $quote,
+        ShippingAssignmentInterface $shippingAssignment,
+        Total $total
     ) {
         parent::collect($quote, $shippingAssignment, $total);
 
@@ -122,7 +138,7 @@ public function collect(
         $address->getExtensionAttributes()->setDiscounts([]);
         $addressDiscountAggregator = [];
 
-        /** @var \Magento\Quote\Model\Quote\Item $item */
+        /** @var Item $item */
         foreach ($items as $item) {
             if ($item->getNoDiscount() || !$this->calculator->canApplyDiscount($item)) {
                 $item->setDiscountAmount(0);
@@ -147,7 +163,6 @@ public function collect(
 
             if ($item->getHasChildren() && $item->isChildrenCalculated()) {
                 $this->calculator->process($item);
-                $this->distributeDiscount($item);
                 foreach ($item->getChildren() as $child) {
                     $eventArgs['item'] = $child;
                     $this->eventManager->dispatch('sales_quote_address_discount_item', $eventArgs);
@@ -175,13 +190,13 @@ public function collect(
     /**
      * Aggregate item discount information to total data and related properties
      *
-     * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item
-     * @param \Magento\Quote\Model\Quote\Address\Total $total
+     * @param AbstractItem $item
+     * @param Total $total
      * @return $this
      */
     protected function aggregateItemDiscount(
-        \Magento\Quote\Model\Quote\Item\AbstractItem $item,
-        \Magento\Quote\Model\Quote\Address\Total $total
+        AbstractItem $item,
+        Total $total
     ) {
         $total->addTotalAmount($this->getCode(), -$item->getDiscountAmount());
         $total->addBaseTotalAmount($this->getCode(), -$item->getBaseDiscountAmount());
@@ -191,10 +206,12 @@ protected function aggregateItemDiscount(
     /**
      * Distribute discount at parent item to children items
      *
-     * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item
+     * @param AbstractItem $item
      * @return $this
+     * @deprecated No longer used.
+     * @see \Magento\SalesRule\Model\RulesApplier::applyRule()
      */
-    protected function distributeDiscount(\Magento\Quote\Model\Quote\Item\AbstractItem $item)
+    protected function distributeDiscount(AbstractItem $item)
     {
         $parentBaseRowTotal = $item->getBaseRowTotal();
         $keys = [
@@ -230,12 +247,12 @@ protected function distributeDiscount(\Magento\Quote\Model\Quote\Item\AbstractIt
     /**
      * Add discount total information to address
      *
-     * @param \Magento\Quote\Model\Quote $quote
-     * @param \Magento\Quote\Model\Quote\Address\Total $total
+     * @param Quote $quote
+     * @param Total $total
      * @return array|null
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Quote\Address\Total $total)
+    public function fetch(Quote $quote, Total $total)
     {
         $result = null;
         $amount = $total->getDiscountAmount();
@@ -254,25 +271,25 @@ public function fetch(\Magento\Quote\Model\Quote $quote, \Magento\Quote\Model\Qu
     /**
      * Aggregates discount per rule
      *
-     * @param \Magento\Quote\Model\Quote\Item\AbstractItem $item
-     * @param \Magento\Quote\Api\Data\AddressInterface $address
+     * @param AbstractItem $item
+     * @param AddressInterface $address
      * @param array $addressDiscountAggregator
      * @return void
      */
     private function aggregateDiscountPerRule(
-        \Magento\Quote\Model\Quote\Item\AbstractItem $item,
-        \Magento\Quote\Api\Data\AddressInterface $address,
+        AbstractItem $item,
+        AddressInterface $address,
         array &$addressDiscountAggregator
     ) {
         $discountBreakdown = $item->getExtensionAttributes()->getDiscounts();
         if ($discountBreakdown) {
             foreach ($discountBreakdown as $value) {
-                /* @var \Magento\SalesRule\Api\Data\DiscountDataInterface $discount */
+                /* @var DiscountDataInterface $discount */
                 $discount = $value->getDiscountData();
                 $ruleLabel = $value->getRuleLabel();
                 $ruleID = $value->getRuleID();
                 if (isset($addressDiscountAggregator[$ruleID])) {
-                    /** @var \Magento\SalesRule\Model\Data\RuleDiscount $cartDiscount */
+                    /** @var RuleDiscount $cartDiscount */
                     $cartDiscount = $addressDiscountAggregator[$ruleID];
                     $discountData = $cartDiscount->getDiscountData();
                     $discountData->setBaseAmount($discountData->getBaseAmount()+$discount->getBaseAmount());
@@ -294,12 +311,12 @@ private function aggregateDiscountPerRule(
                         'rule' => $ruleLabel,
                         'rule_id' => $ruleID,
                     ];
-                    /** @var \Magento\SalesRule\Model\Data\RuleDiscount $cartDiscount */
+                    /** @var RuleDiscount $cartDiscount */
                     $cartDiscount = $this->discountInterfaceFactory->create(['data' => $data]);
                     $addressDiscountAggregator[$ruleID] = $cartDiscount;
                 }
             }
         }
-            $address->getExtensionAttributes()->setDiscounts(array_values($addressDiscountAggregator));
+        $address->getExtensionAttributes()->setDiscounts(array_values($addressDiscountAggregator));
     }
 }
diff --git a/app/code/Magento/SalesRule/Model/RulesApplier.php b/app/code/Magento/SalesRule/Model/RulesApplier.php
index 270732c8e0278..ede889c79fb9d 100644
--- a/app/code/Magento/SalesRule/Model/RulesApplier.php
+++ b/app/code/Magento/SalesRule/Model/RulesApplier.php
@@ -16,9 +16,7 @@
 use Magento\SalesRule\Api\Data\DiscountDataInterfaceFactory;
 
 /**
- * Class RulesApplier
- *
- * @package Magento\SalesRule\Model\Validator
+ * Rule applier model
  */
 class RulesApplier
 {
@@ -115,7 +113,6 @@ public function applyRules($item, $rules, $skipValidation, $couponCode)
             if (!$this->validatorUtility->canProcessRule($rule, $address)) {
                 continue;
             }
-
             if (!$skipValidation && !$rule->getActions()->validate($item)) {
                 if (!$this->childrenValidationLocator->isChildrenValidationRequired($item)) {
                     continue;
@@ -189,8 +186,22 @@ public function addDiscountDescription($address, $rule)
      */
     protected function applyRule($item, $rule, $address, $couponCode)
     {
-        $discountData = $this->getDiscountData($item, $rule, $address);
-        $this->setDiscountData($discountData, $item);
+        if ($item->getChildren() && $item->isChildrenCalculated()) {
+            $cloneItem = clone $item;
+            /**
+             * validate without children
+             */
+            $applyAll = $rule->getActions()->validate($cloneItem);
+            foreach ($item->getChildren() as $childItem) {
+                if ($applyAll || $rule->getActions()->validate($childItem)) {
+                    $discountData = $this->getDiscountData($childItem, $rule, $address);
+                    $this->setDiscountData($discountData, $childItem);
+                }
+            }
+        } else {
+            $discountData = $this->getDiscountData($item, $rule, $address);
+            $this->setDiscountData($discountData, $item);
+        }
 
         $this->maintainAddressCouponCode($address, $rule, $couponCode);
         $this->addDiscountDescription($address, $rule);
diff --git a/app/code/Magento/SalesRule/Model/Validator.php b/app/code/Magento/SalesRule/Model/Validator.php
index cdaac97fe6fb5..93acf4e699394 100644
--- a/app/code/Magento/SalesRule/Model/Validator.php
+++ b/app/code/Magento/SalesRule/Model/Validator.php
@@ -265,6 +265,13 @@ public function process(AbstractItem $item)
         $item->setDiscountAmount(0);
         $item->setBaseDiscountAmount(0);
         $item->setDiscountPercent(0);
+        if ($item->getChildren() && $item->isChildrenCalculated()) {
+            foreach ($item->getChildren() as $child) {
+                $child->setDiscountAmount(0);
+                $child->setBaseDiscountAmount(0);
+                $child->setDiscountPercent(0);
+            }
+        }
 
         $itemPrice = $this->getItemPrice($item);
         if ($itemPrice < 0) {
diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php
index 72355625318c5..640c2145f7704 100644
--- a/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php
+++ b/app/code/Magento/SalesRule/Test/Unit/Model/Quote/DiscountTest.php
@@ -5,58 +5,77 @@
  */
 namespace Magento\SalesRule\Test\Unit\Model\Quote;
 
+use Magento\Framework\Api\ExtensionAttributesInterface;
+use Magento\Framework\Event\Manager;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Quote\Api\Data\ShippingAssignmentInterface;
+use Magento\Quote\Api\Data\ShippingInterface;
+use Magento\Quote\Model\Quote;
+use Magento\Quote\Model\Quote\Address;
+use Magento\Quote\Model\Quote\Address\Total;
+use Magento\Quote\Model\Quote\Item;
+use Magento\SalesRule\Model\Quote\Discount;
+use Magento\SalesRule\Model\Rule\Action\Discount\Data;
+use Magento\SalesRule\Model\Rule\Action\Discount\DataFactory;
+use Magento\SalesRule\Model\Validator;
+use Magento\Store\Model\Store;
+use Magento\Store\Model\StoreManager;
+use PHPUnit\Framework\MockObject\MockObject;
+use PHPUnit\Framework\TestCase;
+
 /**
- * Class DiscountTest
+ * Test discount totals calculation model
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-class DiscountTest extends \PHPUnit\Framework\TestCase
+class DiscountTest extends TestCase
 {
     /**
-     * @var \Magento\SalesRule\Model\Quote\Discount
+     * @var Discount
      */
     protected $discount;
 
     /**
-     * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager
+     * @var ObjectManager
      */
     protected $objectManager;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var MockObject
      */
     protected $storeManagerMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var MockObject
      */
     protected $validatorMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var MockObject
      */
     protected $eventManagerMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var MockObject
      */
     protected $shippingAssignmentMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var MockObject
      */
     protected $addressMock;
 
     /**
-     * @var \Magento\SalesRule\Model\Rule\Action\Discount\DataFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var DataFactory|MockObject
      */
     private $discountFactory;
 
     protected function setUp()
     {
-        $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
-        $this->storeManagerMock = $this->createMock(\Magento\Store\Model\StoreManager::class);
-        $this->validatorMock = $this->getMockBuilder(\Magento\SalesRule\Model\Validator::class)
+        $this->objectManager = new ObjectManager($this);
+        $this->storeManagerMock = $this->createMock(StoreManager::class);
+        $this->validatorMock = $this->getMockBuilder(Validator::class)
             ->disableOriginalConstructor()
             ->setMethods(
                 [
@@ -73,8 +92,8 @@ protected function setUp()
                 ]
             )
             ->getMock();
-        $this->eventManagerMock = $this->createMock(\Magento\Framework\Event\Manager::class);
-        $priceCurrencyMock = $this->createMock(\Magento\Framework\Pricing\PriceCurrencyInterface::class);
+        $this->eventManagerMock = $this->createMock(Manager::class);
+        $priceCurrencyMock = $this->createMock(PriceCurrencyInterface::class);
         $priceCurrencyMock->expects($this->any())
             ->method('round')
             ->will(
@@ -86,7 +105,7 @@ function ($argument) {
             );
 
         $this->addressMock = $this->createPartialMock(
-            \Magento\Quote\Model\Quote\Address::class,
+            Address::class,
             [
                 'getQuote',
                 'getAllItems',
@@ -97,7 +116,7 @@ function ($argument) {
             ]
         );
         $addressExtension = $this->getMockBuilder(
-            \Magento\Framework\Api\ExtensionAttributesInterface::class
+            ExtensionAttributesInterface::class
         )->setMethods(['setDiscounts', 'getDiscounts'])->getMock();
         $addressExtension->method('getDiscounts')->willReturn([]);
         $addressExtension->expects($this->any())
@@ -110,18 +129,18 @@ function ($argument) {
             ->method('getCustomAttributesCodes')
             ->willReturn([]);
 
-        $shipping = $this->createMock(\Magento\Quote\Api\Data\ShippingInterface::class);
+        $shipping = $this->createMock(ShippingInterface::class);
         $shipping->expects($this->any())->method('getAddress')->willReturn($this->addressMock);
-        $this->shippingAssignmentMock = $this->createMock(\Magento\Quote\Api\Data\ShippingAssignmentInterface::class);
+        $this->shippingAssignmentMock = $this->createMock(ShippingAssignmentInterface::class);
         $this->shippingAssignmentMock->expects($this->any())->method('getShipping')->willReturn($shipping);
         $this->discountFactory = $this->createPartialMock(
-            \Magento\SalesRule\Model\Rule\Action\Discount\DataFactory::class,
+            DataFactory::class,
             ['create']
         );
 
-        /** @var \Magento\SalesRule\Model\Quote\Discount $discount */
+        /** @var Discount $discount */
         $this->discount = $this->objectManager->getObject(
-            \Magento\SalesRule\Model\Quote\Discount::class,
+            Discount::class,
             [
                 'storeManager' => $this->storeManagerMock,
                 'validator' => $this->validatorMock,
@@ -129,7 +148,7 @@ function ($argument) {
                 'priceCurrency' => $priceCurrencyMock,
             ]
         );
-        $discountData = $this->getMockBuilder(\Magento\SalesRule\Model\Rule\Action\Discount\Data::class)
+        $discountData = $this->getMockBuilder(Data::class)
             ->setConstructorArgs(
                 [
                     'amount' => 0,
@@ -148,11 +167,11 @@ function ($argument) {
     public function testCollectItemNoDiscount()
     {
         $itemNoDiscount = $this->createPartialMock(
-            \Magento\Quote\Model\Quote\Item::class,
+            Item::class,
             ['getNoDiscount', '__wakeup', 'getExtensionAttributes']
         );
         $itemExtension = $this->getMockBuilder(
-            \Magento\Framework\Api\ExtensionAttributesInterface::class
+            ExtensionAttributesInterface::class
         )->setMethods(['setDiscounts', 'getDiscounts'])->getMock();
         $itemExtension->method('getDiscounts')->willReturn([]);
         $itemExtension->expects($this->any())
@@ -165,17 +184,17 @@ public function testCollectItemNoDiscount()
         $this->validatorMock->expects($this->once())->method('sortItemsByPriority')
             ->with([$itemNoDiscount], $this->addressMock)
             ->willReturnArgument(0);
-        $storeMock = $this->createPartialMock(\Magento\Store\Model\Store::class, ['getStore', '__wakeup']);
+        $storeMock = $this->createPartialMock(Store::class, ['getStore', '__wakeup']);
         $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock);
-        $quoteMock = $this->createMock(\Magento\Quote\Model\Quote::class);
+        $quoteMock = $this->createMock(Quote::class);
         $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock);
         $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemNoDiscount]);
         $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true);
 
-        $totalMock = $this->createMock(\Magento\Quote\Model\Quote\Address\Total::class);
+        $totalMock = $this->createMock(Total::class);
 
         $this->assertInstanceOf(
-            \Magento\SalesRule\Model\Quote\Discount::class,
+            Discount::class,
             $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock)
         );
     }
@@ -183,7 +202,7 @@ public function testCollectItemNoDiscount()
     public function testCollectItemHasParent()
     {
         $itemWithParentId = $this->createPartialMock(
-            \Magento\Quote\Model\Quote\Item::class,
+            Item::class,
             ['getNoDiscount', 'getParentItem', '__wakeup']
         );
         $itemWithParentId->expects($this->once())->method('getNoDiscount')->willReturn(false);
@@ -194,177 +213,25 @@ public function testCollectItemHasParent()
             ->with([$itemWithParentId], $this->addressMock)
             ->willReturnArgument(0);
 
-        $storeMock = $this->createPartialMock(\Magento\Store\Model\Store::class, ['getStore', '__wakeup']);
+        $storeMock = $this->createPartialMock(Store::class, ['getStore', '__wakeup']);
         $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock);
 
-        $quoteMock = $this->createMock(\Magento\Quote\Model\Quote::class);
+        $quoteMock = $this->createMock(Quote::class);
 
         $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock);
         $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true);
         $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithParentId]);
-        $totalMock = $this->createMock(\Magento\Quote\Model\Quote\Address\Total::class);
+        $totalMock = $this->createMock(Total::class);
 
         $this->assertInstanceOf(
-            \Magento\SalesRule\Model\Quote\Discount::class,
+            Discount::class,
             $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock)
         );
     }
 
-    /**
-     * @dataProvider collectItemHasChildrenDataProvider
-     */
-    public function testCollectItemHasChildren($childItemData, $parentData, $expectedChildData)
-    {
-        $childItems = [];
-        foreach ($childItemData as $itemId => $itemData) {
-            $item = $this->objectManager->getObject(\Magento\Quote\Model\Quote\Item::class)->setData($itemData);
-            $childItems[$itemId] = $item;
-        }
-
-        $itemWithChildren = $this->getMockBuilder(\Magento\Quote\Model\Quote\Item::class)
-            ->disableOriginalConstructor()
-            ->setMethods(
-                [
-                    'getNoDiscount',
-                    'getParentItem',
-                    'getHasChildren',
-                    'isChildrenCalculated',
-                    'getChildren',
-                    'getExtensionAttributes',
-                    '__wakeup',
-                ]
-            )
-            ->getMock();
-        $itemExtension = $this->getMockBuilder(
-            \Magento\Framework\Api\ExtensionAttributesInterface::class
-        )->setMethods(['setDiscounts', 'getDiscounts'])->getMock();
-        $itemExtension->method('getDiscounts')->willReturn([]);
-        $itemExtension->expects($this->any())
-            ->method('setDiscounts')
-            ->willReturn([]);
-        $itemWithChildren->expects(
-            $this->any()
-        )->method('getExtensionAttributes')->will($this->returnValue($itemExtension));
-        $itemWithChildren->expects($this->once())->method('getNoDiscount')->willReturn(false);
-        $itemWithChildren->expects($this->once())->method('getParentItem')->willReturn(false);
-        $itemWithChildren->expects($this->once())->method('getHasChildren')->willReturn(true);
-        $itemWithChildren->expects($this->once())->method('isChildrenCalculated')->willReturn(true);
-        $itemWithChildren->expects($this->any())->method('getChildren')->willReturn($childItems);
-        foreach ($parentData as $key => $value) {
-            $itemWithChildren->setData($key, $value);
-        }
-
-        $this->validatorMock->expects($this->any())->method('canApplyDiscount')->willReturn(true);
-        $this->validatorMock->expects($this->once())->method('sortItemsByPriority')
-            ->with([$itemWithChildren], $this->addressMock)
-            ->willReturnArgument(0);
-        $this->validatorMock->expects($this->any())->method('canApplyRules')->willReturn(true);
-
-        $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class)
-            ->disableOriginalConstructor()
-            ->setMethods(['getStore', '__wakeup'])
-            ->getMock();
-        $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock);
-
-        $quoteMock = $this->getMockBuilder(\Magento\Quote\Model\Quote::class)
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock);
-        $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true);
-
-        $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithChildren]);
-        $totalMock = $this->createMock(\Magento\Quote\Model\Quote\Address\Total::class);
-
-        $this->assertInstanceOf(
-            \Magento\SalesRule\Model\Quote\Discount::class,
-            $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock)
-        );
-
-        foreach ($expectedChildData as $itemId => $expectedItemData) {
-            $childItem = $childItems[$itemId];
-            foreach ($expectedItemData as $key => $value) {
-                $this->assertEquals($value, $childItem->getData($key), 'Incorrect value for ' . $key);
-            }
-        }
-    }
-
-    /**
-     * @return array
-     */
-    public function collectItemHasChildrenDataProvider()
-    {
-        $data = [
-            // 3 items, each $100, testing that discount are distributed to item correctly
-            [
-                    'child_item_data' => [
-                        'item1' => [
-                            'base_row_total' => 0,
-                        ]
-                    ],
-                    'parent_item_data' => [
-                        'discount_amount' => 20,
-                        'base_discount_amount' => 10,
-                        'original_discount_amount' => 40,
-                        'base_original_discount_amount' => 20,
-                        'base_row_total' => 0,
-                    ],
-                    'expected_child_item_data' => [
-                        'item1' => [
-                            'discount_amount' => 0,
-                            'base_discount_amount' => 0,
-                            'original_discount_amount' => 0,
-                            'base_original_discount_amount' => 0,
-                        ]
-                    ],
-                ],
-            [
-                // 3 items, each $100, testing that discount are distributed to item correctly
-                'child_item_data' => [
-                    'item1' => [
-                        'base_row_total' => 100,
-                    ],
-                    'item2' => [
-                        'base_row_total' => 100,
-                    ],
-                    'item3' => [
-                        'base_row_total' => 100,
-                    ],
-                ],
-                'parent_item_data' => [
-                    'discount_amount' => 20,
-                    'base_discount_amount' => 10,
-                    'original_discount_amount' => 40,
-                    'base_original_discount_amount' => 20,
-                    'base_row_total' => 300,
-                ],
-                'expected_child_item_data' => [
-                    'item1' => [
-                        'discount_amount' => 6.67,
-                        'base_discount_amount' => 3.33,
-                        'original_discount_amount' => 13.33,
-                        'base_original_discount_amount' => 6.67,
-                    ],
-                    'item2' => [
-                        'discount_amount' => 6.66,
-                        'base_discount_amount' => 3.34,
-                        'original_discount_amount' => 13.34,
-                        'base_original_discount_amount' => 6.66,
-                    ],
-                    'item3' => [
-                        'discount_amount' => 6.67,
-                        'base_discount_amount' => 3.33,
-                        'original_discount_amount' => 13.33,
-                        'base_original_discount_amount' => 6.67,
-                    ],
-                ],
-            ],
-        ];
-        return $data;
-    }
-
     public function testCollectItemHasNoChildren()
     {
-        $itemWithChildren = $this->getMockBuilder(\Magento\Quote\Model\Quote\Item::class)
+        $itemWithChildren = $this->getMockBuilder(Item::class)
             ->disableOriginalConstructor()
             ->setMethods(
                 [
@@ -379,7 +246,7 @@ public function testCollectItemHasNoChildren()
             )
             ->getMock();
         $itemExtension = $this->getMockBuilder(
-            \Magento\Framework\Api\ExtensionAttributesInterface::class
+            ExtensionAttributesInterface::class
         )->setMethods(['setDiscounts', 'getDiscounts'])->getMock();
         $itemExtension->method('getDiscounts')->willReturn([]);
         $itemExtension->expects($this->any())
@@ -397,20 +264,20 @@ public function testCollectItemHasNoChildren()
             ->with([$itemWithChildren], $this->addressMock)
             ->willReturnArgument(0);
 
-        $storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class)
+        $storeMock = $this->getMockBuilder(Store::class)
             ->disableOriginalConstructor()
             ->setMethods(['getStore', '__wakeup'])
             ->getMock();
         $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($storeMock);
 
-        $quoteMock = $this->getMockBuilder(\Magento\Quote\Model\Quote::class)->disableOriginalConstructor()->getMock();
+        $quoteMock = $this->getMockBuilder(Quote::class)->disableOriginalConstructor()->getMock();
         $this->addressMock->expects($this->any())->method('getQuote')->willReturn($quoteMock);
         $this->addressMock->expects($this->any())->method('getShippingAmount')->willReturn(true);
         $this->shippingAssignmentMock->expects($this->any())->method('getItems')->willReturn([$itemWithChildren]);
 
-        $totalMock = $this->createMock(\Magento\Quote\Model\Quote\Address\Total::class);
+        $totalMock = $this->createMock(Total::class);
         $this->assertInstanceOf(
-            \Magento\SalesRule\Model\Quote\Discount::class,
+            Discount::class,
             $this->discount->collect($quoteMock, $this->shippingAssignmentMock, $totalMock)
         );
     }
@@ -425,9 +292,9 @@ public function testFetch()
             'title' => __('Discount (%1)', $discountDescription)
         ];
 
-        $quoteMock = $this->createMock(\Magento\Quote\Model\Quote::class);
+        $quoteMock = $this->createMock(Quote::class);
         $totalMock = $this->createPartialMock(
-            \Magento\Quote\Model\Quote\Address\Total::class,
+            Total::class,
             ['getDiscountAmount', 'getDiscountDescription']
         );
 
diff --git a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php
index 4260e6b415091..dd1581d966e5a 100644
--- a/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php
+++ b/app/code/Magento/SalesRule/Test/Unit/Model/RulesApplierTest.php
@@ -6,6 +6,8 @@
 
 namespace Magento\SalesRule\Test\Unit\Model;
 
+use Magento\Catalog\Model\Product;
+use Magento\Framework\Api\ExtensionAttributesInterface;
 use Magento\Framework\Event\Manager;
 use Magento\Quote\Model\Quote;
 use Magento\Quote\Model\Quote\Address;
@@ -16,11 +18,12 @@
 use Magento\SalesRule\Model\Rule;
 use Magento\SalesRule\Model\Rule\Action\Discount\CalculatorFactory;
 use Magento\SalesRule\Model\Rule\Action\Discount\Data;
+use Magento\SalesRule\Model\Rule\Action\Discount\DataFactory;
 use Magento\SalesRule\Model\Rule\Action\Discount\DiscountInterface;
 use Magento\SalesRule\Model\RulesApplier;
 use Magento\SalesRule\Model\Utility;
+use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
-use PHPUnit_Framework_MockObject_MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -33,27 +36,27 @@ class RulesApplierTest extends TestCase
     protected $rulesApplier;
 
     /**
-     * @var CalculatorFactory|PHPUnit_Framework_MockObject_MockObject
+     * @var CalculatorFactory|MockObject
      */
     protected $calculatorFactory;
 
     /**
-     * @var \Magento\SalesRule\Model\Rule\Action\Discount\DataFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var DataFactory|MockObject
      */
     protected $discountFactory;
 
     /**
-     * @var Manager|PHPUnit_Framework_MockObject_MockObject
+     * @var Manager|MockObject
      */
     protected $eventManager;
 
     /**
-     * @var Utility|PHPUnit_Framework_MockObject_MockObject
+     * @var Utility|MockObject
      */
     protected $validatorUtility;
 
     /**
-     * @var ChildrenValidationLocator|PHPUnit_Framework_MockObject_MockObject
+     * @var ChildrenValidationLocator|MockObject
      */
     protected $childrenValidationLocator;
 
@@ -63,10 +66,10 @@ protected function setUp()
             CalculatorFactory::class
         );
         $this->discountFactory = $this->createPartialMock(
-            \Magento\SalesRule\Model\Rule\Action\Discount\DataFactory::class,
+            DataFactory::class,
             ['create']
         );
-        $this->eventManager = $this->createPartialMock(\Magento\Framework\Event\Manager::class, ['dispatch']);
+        $this->eventManager = $this->createPartialMock(Manager::class, ['dispatch']);
         $this->validatorUtility = $this->createPartialMock(
             Utility::class,
             ['canProcessRule', 'minFix', 'deltaRoundingFix', 'getItemQty']
@@ -99,7 +102,7 @@ public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed($isChildren,
 
         $ruleId = 1;
         $appliedRuleIds = [$ruleId => $ruleId];
-        $discountData = $this->getMockBuilder(\Magento\SalesRule\Model\Rule\Action\Discount\Data::class)
+        $discountData = $this->getMockBuilder(Data::class)
             ->setConstructorArgs(
                 [
                     'amount' => 0,
@@ -114,14 +117,14 @@ public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed($isChildren,
             ->with($this->anything())
             ->will($this->returnValue($discountData));
         /**
-         * @var Rule|PHPUnit_Framework_MockObject_MockObject $ruleWithStopFurtherProcessing
+         * @var Rule|MockObject $ruleWithStopFurtherProcessing
          */
         $ruleWithStopFurtherProcessing = $this->createPartialMock(
             Rule::class,
             ['getStoreLabel', 'getCouponType', 'getRuleId', '__wakeup', 'getActions']
         );
         /**
-         * @var Rule|PHPUnit_Framework_MockObject_MockObject $ruleThatShouldNotBeRun
+         * @var Rule|MockObject $ruleThatShouldNotBeRun
         */
         $ruleThatShouldNotBeRun = $this->createPartialMock(
             Rule::class,
@@ -162,6 +165,10 @@ public function testApplyRulesWhenRuleWithStopRulesProcessingIsUsed($isChildren,
                 ->method('validate')
                 ->with($item)
                 ->willReturn(!$isContinue);
+            $product = $this->createPartialMock(Product::class, []);
+            $item->expects($this->atLeastOnce())
+                ->method('getProduct')
+                ->willReturn($product);
         }
 
         //
@@ -187,7 +194,7 @@ public function testAddCouponDescriptionWithRuleDescriptionIsUsed()
         $ruleDescription = 'Rule description';
 
         /**
-         * @var Rule|PHPUnit_Framework_MockObject_MockObject $rule
+         * @var Rule|MockObject $rule
          */
         $rule = $this->createPartialMock(
             Rule::class,
@@ -197,7 +204,7 @@ public function testAddCouponDescriptionWithRuleDescriptionIsUsed()
         $rule->setDescription($ruleDescription);
 
         /**
-         * @var Address|PHPUnit_Framework_MockObject_MockObject $address
+         * @var Address|MockObject $address
         */
         $address = $this->createPartialMock(
             Address::class,
@@ -227,12 +234,12 @@ public function dataProviderChildren()
     }
 
     /**
-     * @return AbstractItem|PHPUnit_Framework_MockObject_MockObject
+     * @return AbstractItem|MockObject
      */
     protected function getPreparedItem()
     {
         /**
-         * @var Address|PHPUnit_Framework_MockObject_MockObject $address
+         * @var Address|MockObject $address
         */
         $address = $this->createPartialMock(
             Address::class,
@@ -244,7 +251,7 @@ protected function getPreparedItem()
             ]
         );
         /**
-         * @var AbstractItem|PHPUnit_Framework_MockObject_MockObject $item
+         * @var AbstractItem|MockObject $item
         */
         $item = $this->createPartialMock(
             Item::class,
@@ -256,17 +263,18 @@ protected function getPreparedItem()
                 'setAppliedRuleIds',
                 '__wakeup',
                 'getChildren',
-                'getExtensionAttributes'
+                'getExtensionAttributes',
+                'getProduct'
             ]
         );
         $itemExtension = $this->getMockBuilder(
-            \Magento\Framework\Api\ExtensionAttributesInterface::class
+            ExtensionAttributesInterface::class
         )->setMethods(['setDiscounts', 'getDiscounts'])->getMock();
         $itemExtension->method('getDiscounts')->willReturn([]);
         $itemExtension->expects($this->any())
             ->method('setDiscounts')
             ->willReturn([]);
-        $quote = $this->createPartialMock(\Magento\Quote\Model\Quote::class, ['getStore', '__wakeUp']);
+        $quote = $this->createPartialMock(Quote::class, ['getStore', '__wakeUp']);
         $item->expects($this->any())->method('getAddress')->will($this->returnValue($address));
         $item->expects($this->any())->method('getExtensionAttributes')->will($this->returnValue($itemExtension));
         $address->expects($this->any())
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price.php
new file mode 100644
index 0000000000000..d325e0918685d
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Bundle\Model\Product\Price;
+use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Catalog\Model\Product\Attribute\Source\Status;
+use Magento\Catalog\Model\Product\Type;
+use Magento\Catalog\Model\Product\Type\AbstractType;
+use Magento\Catalog\Model\Product\Visibility;
+use Magento\Store\Model\StoreManagerInterface;
+use Magento\TestFramework\Bundle\Model\PrepareBundleLinks;
+use Magento\Catalog\Api\Data\ProductInterfaceFactory;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require __DIR__ . '/../../../Magento/Catalog/_files/multiple_products.php';
+
+$objectManager = Bootstrap::getObjectManager();
+/** @var PrepareBundleLinks $prepareBundleLinks */
+$prepareBundleLinks = $objectManager->get(PrepareBundleLinks::class);
+/** @var StoreManagerInterface $storeManager */
+$storeManager = $objectManager->get(StoreManagerInterface::class);
+$defaultWebsiteId = $storeManager->getWebsite('base')->getId();
+/** @var ProductInterfaceFactory $productFactory */
+$productFactory = $objectManager->get(ProductInterfaceFactory::class);
+/** @var ProductRepositoryInterface $productRepository */
+$productRepository = $objectManager->get(ProductRepositoryInterface::class);
+/** @var Magento\Catalog\Api\Data\ProductInterface $bundleProduct */
+$bundleProduct = $productFactory->create();
+$bundleProduct->setTypeId(Type::TYPE_BUNDLE)
+    ->setAttributeSetId($bundleProduct->getDefaultAttributeSetId())
+    ->setWebsiteIds([$defaultWebsiteId])
+    ->setName('Bundle Product With Dynamic Price')
+    ->setSku('bundle_product_with_dynamic_price')
+    ->setVisibility(Visibility::VISIBILITY_BOTH)
+    ->setStatus(Status::STATUS_ENABLED)
+    ->setStockData(
+        [
+            'use_config_manage_stock' => 0,
+            'qty' => 100,
+            'is_qty_decimal' => 0,
+            'is_in_stock' => 1,
+        ]
+    )
+    ->setSkuType(0)
+    ->setPriceView(0)
+    ->setPriceType(Price::PRICE_TYPE_DYNAMIC)
+    ->setPrice(null)
+    ->setWeightType(0)
+    ->setShipmentType(AbstractType::SHIPMENT_TOGETHER);
+
+$bundleOptionsData = [
+    [
+        'title' => 'Option 1',
+        'default_title' => 'Option 1',
+        'type' => 'select',
+        'required' => 1,
+    ],
+    [
+        'title' => 'Option 2',
+        'default_title' => 'Option 2',
+        'type' => 'select',
+        'required' => 1,
+    ],
+];
+$bundleSelectionsData = [
+    [
+        [
+            'sku' => 'simple1',
+            'selection_qty' => 1,
+        ],
+    ],
+    [
+        [
+            'sku' => 'simple2',
+            'selection_qty' => 1,
+        ],
+    ]
+];
+$bundleProduct = $prepareBundleLinks->execute($bundleProduct, $bundleOptionsData, $bundleSelectionsData);
+$productRepository->save($bundleProduct);
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price_rollback.php b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price_rollback.php
new file mode 100644
index 0000000000000..e84dfc4c6799c
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Bundle/_files/bundle_product_with_dynamic_price_rollback.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Framework\Exception\NoSuchEntityException;
+use Magento\Framework\Registry;
+use Magento\TestFramework\Helper\Bootstrap;
+
+$objectManager = Bootstrap::getObjectManager();
+/** @var Registry $registry */
+$registry = $objectManager->get(Registry::class);
+/** @var ProductRepositoryInterface $productRepository */
+$productRepository = $objectManager->get(ProductRepositoryInterface::class);
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', true);
+
+try {
+    $product = $productRepository->get('bundle_product_with_dynamic_price', false, null, true);
+    $productRepository->delete($product);
+} catch (NoSuchEntityException $e) {
+    //product already deleted.
+}
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', false);
+
+require __DIR__ . '/../../../Magento/Catalog/_files/multiple_products_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price.php
new file mode 100644
index 0000000000000..dbe4c436b0f11
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Bundle\Model\Option;
+use Magento\Bundle\Model\Product\Type;
+use Magento\Bundle\Model\Selection;
+use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Catalog\Model\Product;
+use Magento\Checkout\Model\Cart;
+use Magento\Checkout\Model\Session;
+use Magento\Framework\DataObject;
+use Magento\TestFramework\Helper\Bootstrap;
+
+require __DIR__ . '/../../../Magento/Bundle/_files/bundle_product_with_dynamic_price.php';
+
+$objectManager = Bootstrap::getObjectManager();
+/** @var ProductRepositoryInterface $productRepository */
+$productRepository = $objectManager->create(ProductRepositoryInterface::class);
+/** @var Product $product */
+$product = $productRepository->get('bundle_product_with_dynamic_price');
+
+/** @var $typeInstance Type */
+//Load options
+$typeInstance = $product->getTypeInstance();
+$typeInstance->setStoreFilter($product->getStoreId(), $product);
+$optionCollection = $typeInstance->getOptionsCollection($product);
+
+$bundleOptions = [];
+$bundleOptionsQty = [];
+/** @var $option Option */
+foreach ($optionCollection as $option) {
+    $selectionCollection = $typeInstance->getSelectionsCollection([$option->getId()], $product);
+    /** @var $selection Selection */
+    $selection = $selectionCollection->getFirstItem();
+    $bundleOptions[$option->getId()] = $selection->getSelectionId();
+    $bundleOptionsQty[$option->getId()] = 1;
+}
+
+$requestInfo = new DataObject(
+    ['qty' => 1, 'bundle_option' => $bundleOptions, 'bundle_option_qty' => $bundleOptionsQty]
+);
+
+/** @var Cart $cart */
+$cart = $objectManager->create(Cart::class);
+$cart->addProduct($product, $requestInfo);
+$cart->getQuote()->setReservedOrderId('quote_with_bundle_product_with_dynamic_price');
+$cart->save();
+
+$objectManager->removeSharedInstance(Session::class);
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price_rollback.php b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price_rollback.php
new file mode 100644
index 0000000000000..1cc5f475c5267
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price_rollback.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Framework\Registry;
+use Magento\Quote\Model\Quote;
+use Magento\TestFramework\Helper\Bootstrap;
+
+$objectManager = Bootstrap::getObjectManager();
+/** @var Registry $registry */
+$registry = $objectManager->get(Registry::class);
+/** @var ProductRepositoryInterface $productRepository */
+$productRepository = $objectManager->get(ProductRepositoryInterface::class);
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', true);
+
+$quote = $objectManager->create(Quote::class);
+$quote->load('quote_with_bundle_product_with_dynamic_price', 'reserved_order_id')->delete();
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', false);
+
+require __DIR__ . '/../../Bundle/_files/bundle_product_with_dynamic_price_rollback.php';
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php
new file mode 100644
index 0000000000000..38e049e8818f4
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Quote/DiscountTest.php
@@ -0,0 +1,153 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\SalesRule\Model\Quote;
+
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\ObjectManagerInterface;
+use Magento\Quote\Api\CartRepositoryInterface;
+use Magento\Quote\Model\Quote;
+use Magento\Quote\Model\Quote\Item;
+use Magento\TestFramework\Helper\Bootstrap;
+use PHPUnit\Framework\TestCase;
+
+/**
+ * Test discount totals calculation model
+ */
+class DiscountTest extends TestCase
+{
+    /**
+     * @var ObjectManagerInterface
+     */
+    private $objectManager;
+    /**
+     * @var SearchCriteriaBuilder
+     */
+    private $criteriaBuilder;
+    /**
+     * @var CartRepositoryInterface
+     */
+    private $quoteRepository;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp()
+    {
+        parent::setUp();
+        $this->objectManager = Bootstrap::getObjectManager();
+        $this->criteriaBuilder = $this->objectManager->get(SearchCriteriaBuilder::class);
+        $this->quoteRepository = $this->objectManager->get(CartRepositoryInterface::class);
+    }
+
+    /**
+     * @magentoAppIsolation enabled
+     * @magentoDataFixture bundleProductWithDynamicPriceAndCartPriceRuleFixture
+     * @magentoDataFixture Magento/Checkout/_files/quote_with_bundle_product_with_dynamic_price.php
+     * @dataProvider bundleProductWithDynamicPriceAndCartPriceRuleDataProvider
+     * @param string $coupon
+     * @param array $discounts
+     * @param float $totalDiscount
+     * @return void
+     */
+    public function testBundleProductWithDynamicPriceAndCartPriceRule(
+        string $coupon,
+        array $discounts,
+        float $totalDiscount
+    ): void {
+        $quote = $this->getQuote('quote_with_bundle_product_with_dynamic_price');
+        $quote->setCouponCode($coupon);
+        $quote->collectTotals();
+        $this->quoteRepository->save($quote);
+        $this->assertEquals(21.98, $quote->getBaseSubtotal());
+        $this->assertEquals($totalDiscount, $quote->getShippingAddress()->getDiscountAmount());
+        $items = $quote->getAllItems();
+        $this->assertCount(3, $items);
+        /** @var Item $item*/
+        $item = array_shift($items);
+        $this->assertEquals('bundle_product_with_dynamic_price-simple1-simple2', $item->getSku());
+        $this->assertEquals($discounts[$item->getSku()], $item->getDiscountAmount());
+        $item = array_shift($items);
+        $this->assertEquals('simple1', $item->getSku());
+        $this->assertEquals(5.99, $item->getPrice());
+        $this->assertEquals($discounts[$item->getSku()], $item->getDiscountAmount());
+        $item = array_shift($items);
+        $this->assertEquals('simple2', $item->getSku());
+        $this->assertEquals(15.99, $item->getPrice());
+        $this->assertEquals($discounts[$item->getSku()], $item->getDiscountAmount());
+    }
+
+    public function bundleProductWithDynamicPriceAndCartPriceRuleDataProvider(): array
+    {
+        return [
+            [
+                'bundle_product_with_dynamic_price_coupon_code',
+                [
+                    'bundle_product_with_dynamic_price-simple1-simple2' => 0,
+                    'simple1' => 3,
+                    'simple2' => 7.99,
+                ],
+                -10.99
+            ],
+            [
+                'simple1_coupon_code',
+                [
+                    'bundle_product_with_dynamic_price-simple1-simple2' => 0,
+                    'simple1' => 3,
+                    'simple2' => 0,
+                ],
+                -3
+            ],
+            [
+                'simple2_coupon_code',
+                [
+                    'bundle_product_with_dynamic_price-simple1-simple2' => 0,
+                    'simple1' => 0,
+                    'simple2' => 8,
+                ],
+                -8
+            ]
+        ];
+    }
+
+    public static function bundleProductWithDynamicPriceAndCartPriceRuleFixture(): void
+    {
+        $skus = [
+            'bundle_product_with_dynamic_price',
+            'simple1',
+            'simple2',
+        ];
+        foreach ($skus as $sku) {
+            if ($sku) {
+                require __DIR__ . '/../../_files/cart_rule_product_sku.php';
+            }
+        }
+    }
+
+    public static function bundleProductWithDynamicPriceAndCartPriceRuleFixtureRollback(): void
+    {
+        $skus = [
+            'bundle_product_with_dynamic_price',
+            'simple1',
+            'simple2',
+        ];
+        foreach ($skus as $sku) {
+            if ($sku) {
+                require __DIR__ . '/../../_files/cart_rule_product_sku_rollback.php';
+            }
+        }
+    }
+
+    private function getQuote(string $reservedOrderId): Quote
+    {
+        $searchCriteria = $this->criteriaBuilder->addFilter('reserved_order_id', $reservedOrderId)
+            ->create();
+        $carts = $this->quoteRepository->getList($searchCriteria)
+            ->getItems();
+        return array_shift($carts);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku.php
new file mode 100644
index 0000000000000..8be1547062dc0
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Customer\Model\GroupManagement;
+use Magento\SalesRule\Api\CouponRepositoryInterface;
+use Magento\SalesRule\Model\Coupon;
+use Magento\SalesRule\Model\Rule;
+use Magento\SalesRule\Model\Rule\Condition\Combine;
+use Magento\Store\Model\StoreManagerInterface;
+use Magento\TestFramework\Helper\Bootstrap;
+
+if (!isset($sku)) {
+    $sku = 'simple1';
+}
+$objectManager = Bootstrap::getObjectManager();
+/** @var Rule $salesRule */
+$salesRule = $objectManager->create(Rule::class);
+$salesRule->loadPost(
+    [
+        'name' => '50% Off for ' . $sku,
+        'is_active' => 1,
+        'customer_group_ids' => [GroupManagement::NOT_LOGGED_IN_ID],
+        'coupon_type' => Rule::COUPON_TYPE_SPECIFIC,
+        'simple_action' => 'by_percent',
+        'discount_amount' => 50,
+        'discount_step' => 0,
+        'stop_rules_processing' => 0,
+        'website_ids' => [
+            $objectManager->get(StoreManagerInterface::class)->getWebsite()->getId()
+        ],
+        'conditions' => [
+            1 => [
+                    'type' => Combine::class,
+                    'attribute' => null,
+                    'operator' => null,
+                    'value' => '1',
+                    'is_value_processed' => null,
+                    'aggregator' => 'all',
+            ]
+        ],
+        'actions' => [
+            1 => [
+                'type' => Magento\SalesRule\Model\Rule\Condition\Product\Combine::class,
+                'attribute' => null,
+                'operator' => null,
+                'value' => '1',
+                'is_value_processed' => null,
+                'aggregator' => 'all',
+                'actions' => [
+                    1 => [
+                        'type' => Magento\SalesRule\Model\Rule\Condition\Product::class,
+                        'attribute' => 'sku',
+                        'operator' => '==',
+                        'value' => $sku,
+                        'is_value_processed' => false,
+                    ]
+                ]
+            ]
+        ],
+        'store_labels' => [
+
+                'store_id' => 0,
+                'store_label' => 'Promo code for ' . $sku,
+
+        ]
+    ]
+);
+$salesRule->save();
+$coupon = $objectManager->create(Coupon::class);
+$coupon->setRuleId($salesRule->getId())
+    ->setCode($sku . '_coupon_code')
+    ->setType(0);
+$objectManager->get(CouponRepositoryInterface::class)->save($coupon);
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku_rollback.php b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku_rollback.php
new file mode 100644
index 0000000000000..e4843c2d6bd84
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/_files/cart_rule_product_sku_rollback.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Framework\Api\SearchCriteriaBuilder;
+use Magento\Framework\Registry;
+use Magento\SalesRule\Api\RuleRepositoryInterface;
+use Magento\SalesRule\Model\Rule;
+use Magento\TestFramework\Helper\Bootstrap;
+
+if (!isset($sku)) {
+    $sku = 'simple1';
+}
+$objectManager = Bootstrap::getObjectManager();
+
+/** @var Registry $registry */
+$registry = $objectManager->get(Registry::class);
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', true);
+
+/** @var SearchCriteriaBuilder $searchCriteriaBuilder */
+$searchCriteriaBuilder = $objectManager->get(SearchCriteriaBuilder::class);
+$searchCriteria = $searchCriteriaBuilder->addFilter('name', '50% Off for ' . $sku)
+    ->create();
+/** @var RuleRepositoryInterface $ruleRepository */
+$ruleRepository = $objectManager->get(RuleRepositoryInterface::class);
+$items = $ruleRepository->getList($searchCriteria)
+    ->getItems();
+/** @var Rule $salesRule */
+$salesRule = array_pop($items);
+if ($salesRule !== null) {
+    $ruleRepository->deleteById($salesRule->getRuleId());
+}
+
+$registry->unregister('isSecureArea');
+$registry->register('isSecureArea', false);

From a3d9095b1352eb585399e7cce850112471955607 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Sun, 12 Apr 2020 19:02:34 +0300
Subject: [PATCH 095/307] MC-29420: Remove event handlers from CE

---
 .../Block/Widget/Grid/Column/Filter/Date.php  |  29 ++-
 .../Widget/Grid/Column/Filter/Datetime.php    |  10 +-
 .../adminhtml/templates/store/switcher.phtml  |  18 +-
 .../templates/system/cache/additional.phtml   |  31 ++-
 .../templates/system/cache/edit.phtml         |  27 ++-
 .../widget/form/element/gallery.phtml         |  41 ++--
 .../adminhtml/templates/widget/grid.phtml     |  34 ++-
 .../templates/widget/grid/extended.phtml      | 225 +++++++++++-------
 .../adminhtml/templates/widget/tabs.phtml     |  12 +-
 .../adminhtml/templates/backup/dialogs.phtml  | 125 +++++++---
 .../view/adminhtml/templates/form/cc.phtml    |  18 +-
 .../adminhtml/templates/payment/script.phtml  |  15 +-
 .../templates/multishipping/form.phtml        |   8 +-
 .../templates/multishipping/form_paypal.phtml |   9 +-
 .../templates/product/stock/disabler.phtml    |   9 +-
 .../view/adminhtml/templates/default.phtml    |  24 +-
 .../templates/catalog/category/edit.phtml     |   5 +-
 .../templates/catalog/category/tree.phtml     |  99 +++++---
 .../catalog/category/widget/tree.phtml        |  60 +++--
 .../attribute/set/main/tree/group.phtml       |   8 +-
 .../catalog/product/composite/configure.phtml |  60 ++++-
 .../product/edit/category/new/form.phtml      |   7 +-
 .../catalog/product/edit/options.phtml        |  21 +-
 .../product/image_with_borders.phtml          |  15 +-
 .../product/view/options/type/file.phtml      |  34 ++-
 .../affected-attribute-set-selector/js.phtml  |  78 +++---
 .../product/configurable/stock/disabler.phtml |   9 +-
 app/code/Magento/Csp/etc/config.xml           |   6 +-
 .../templates/product/stock/disabler.phtml    |   9 +-
 .../Test/Block/Adminhtml/Category/Tree.php    |   2 +-
 30 files changed, 701 insertions(+), 347 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php
index 632603d389d21..65c63c9689fc5 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php
@@ -7,6 +7,8 @@
 namespace Magento\Backend\Block\Widget\Grid\Column\Filter;
 
 use Magento\Framework\Stdlib\DateTime\DateTimeFormatterInterface;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Date grid column filter
@@ -30,6 +32,11 @@ class Date extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilt
      */
     protected $dateTimeFormatter;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureHtmlRenderer;
+
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Framework\DB\Helper $resourceHelper
@@ -37,6 +44,7 @@ class Date extends \Magento\Backend\Block\Widget\Grid\Column\Filter\AbstractFilt
      * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
      * @param DateTimeFormatterInterface $dateTimeFormatter
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureHtmlRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
@@ -44,16 +52,18 @@ public function __construct(
         \Magento\Framework\Math\Random $mathRandom,
         \Magento\Framework\Locale\ResolverInterface $localeResolver,
         DateTimeFormatterInterface $dateTimeFormatter,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureHtmlRenderer = null
     ) {
         $this->mathRandom = $mathRandom;
         $this->localeResolver = $localeResolver;
         parent::__construct($context, $resourceHelper, $data);
         $this->dateTimeFormatter = $dateTimeFormatter;
+        $this->secureHtmlRenderer = $secureHtmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
-     * @return string
+     * @inheritDoc
      */
     public function getHtml()
     {
@@ -99,7 +109,7 @@ public function getHtml()
             ' value="' .
             $this->localeResolver->getLocale() .
             '"/>';
-        $html .= '<script>
+        $scriptString = '
             require(["jquery", "mage/calendar"], function($){
                 $("#' .
             $htmlId .
@@ -120,12 +130,15 @@ public function getHtml()
             '_to"
                     }
                 })
-            });
-        </script>';
+            });';
+        $html .= $this->secureHtmlRenderer->renderTag('script', [], $scriptString, false);
+
         return $html;
     }
 
     /**
+     * Return escaped value.
+     *
      * @param string|null $index
      * @return array|string|int|float|null
      */
@@ -147,6 +160,8 @@ public function getEscapedValue($index = null)
     }
 
     /**
+     * Return value.
+     *
      * @param string|null $index
      * @return array|string|int|float|null
      */
@@ -166,6 +181,8 @@ public function getValue($index = null)
     }
 
     /**
+     * Return conditions.
+     *
      * @return array|string|int|float|null
      */
     public function getCondition()
@@ -176,6 +193,8 @@ public function getCondition()
     }
 
     /**
+     * Set value.
+     *
      * @param array|string|int|float $value
      * @return $this
      */
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
index 1d8d658267020..a139d20191b57 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php
@@ -20,7 +20,7 @@ class Datetime extends \Magento\Backend\Block\Widget\Grid\Column\Filter\Date
     const END_OF_DAY_IN_SECONDS = 86399;
 
     /**
-     * {@inheritdoc}
+     * @inheritdoc
      */
     public function getValue($index = null)
     {
@@ -117,8 +117,7 @@ public function getHtml()
             ) . '/>' . '</div></div>';
         $html .= '<input type="hidden" name="' . $this->_getHtmlName() . '[locale]"' . ' value="'
             . $this->localeResolver->getLocale() . '"/>';
-        $html .= '<script>
-            require(["jquery", "mage/calendar"],function($){
+        $scriptString = 'require(["jquery", "mage/calendar"],function($){
                     $("#' . $htmlId . '_range").dateRange({
                         dateFormat: "' . $format . '",
                         timeFormat: "' . $timeFormat . '",
@@ -131,8 +130,9 @@ public function getHtml()
                             id: "' . $htmlId . '_to"
                         }
                     })
-            });
-        </script>';
+            });';
+        $html .= $this->secureHtmlRenderer->renderTag('script', [], $scriptString, false);
+
         return $html;
     }
 
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
index 3251b367b6f56..2a6d7e39c5db2 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
@@ -14,18 +14,30 @@
         <input type="hidden" name="store_switcher" id="store_switcher"
                data-role="store-view-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreVarName()) ?>"
                value="<?= $block->escapeHtml($block->getStoreId()) ?>"
-               <?= /* @noEscape */ $secureRenderer->renderEventListener('onchange', 'switchScope(this);') ?>
                <?= /* @noEscape */ $block->getUiId() ?> />
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onchange',
+            'switchScope(this);',
+            '#store_switcher'
+        ) ?>
         <input type="hidden" name="store_group_switcher" id="store_group_switcher"
                data-role="store-group-id" data-param="<?= $block->escapeHtmlAttr($block->getStoreGroupVarName()) ?>"
                value="<?= $block->escapeHtml($block->getStoreGroupId()) ?>"
-                <?= /* @noEscape */ $secureRenderer->renderEventListener('onchange', 'switchScope(this);') ?>
                <?= /* @noEscape */ $block->getUiId() ?> />
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onchange',
+            'switchScope(this);',
+            '#store_group_switcher'
+        ) ?>
         <input type="hidden" name="website_switcher" id="website_switcher"
                data-role="website-id" data-param="<?= $block->escapeHtmlAttr($block->getWebsiteVarName()) ?>"
                value="<?= $block->escapeHtml($block->getWebsiteId()) ?>"
-               <?= /* @noEscape */ $secureRenderer->renderEventListener('onchange', 'switchScope(this);') ?>
                <?= /* @noEscape */ $block->getUiId() ?> />
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onchange',
+            'switchScope(this);',
+            '#website_switcher'
+        ) ?>
         <button
             type="button"
             class="admin__action-dropdown"
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml
index c392ebf3883d2..4b80d2863ad93 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml
@@ -5,34 +5,51 @@
  */
 
 /** @var \Magento\Backend\Block\Cache\Permissions|null $permissions */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $permissions = $block->getData('permissions');
 ?>
-<?php if ($permissions && $permissions->hasAccessToAdditionalActions()) : ?>
+<?php if ($permissions && $permissions->hasAccessToAdditionalActions()): ?>
     <div class="additional-cache-management">
         <h2>
             <span><?= $block->escapeHtml(__('Additional Cache Management')); ?></span>
         </h2>
-        <?php if ($permissions->hasAccessToFlushCatalogImages()) : ?>
+        <?php if ($permissions->hasAccessToFlushCatalogImages()): ?>
             <p>
-                <button onclick="setLocation('<?= $block->escapeJs($block->getCleanImagesUrl()); ?>')" type="button">
+                <button id="flushCatalogImages" type="button">
                     <?= $block->escapeHtml(__('Flush Catalog Images Cache')); ?>
                 </button>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    'setLocation(\'' . $block->escapeJs($block->getCleanImagesUrl()) . '\')',
+                    'button#flushCatalogImages'
+                ) ?>
                 <span><?= $block->escapeHtml(__('Pregenerated product images files')); ?></span>
             </p>
         <?php endif; ?>
-        <?php if ($permissions->hasAccessToFlushJsCss()) : ?>
+        <?php if ($permissions->hasAccessToFlushJsCss()): ?>
             <p>
-                <button onclick="setLocation('<?= $block->escapeJs($block->getCleanMediaUrl()); ?>')" type="button">
+                <button id="flushJsCss" type="button">
                     <?= $block->escapeHtml(__('Flush JavaScript/CSS Cache')); ?>
                 </button>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    'setLocation(\'' . $block->escapeJs($block->getCleanMediaUrl()) . '\')',
+                    'button#flushJsCss'
+                ) ?>
                 <span><?= $block->escapeHtml(__('Themes JavaScript and CSS files combined to one file')) ?></span>
             </p>
         <?php endif; ?>
-        <?php if (!$block->isInProductionMode() && $permissions->hasAccessToFlushStaticFiles()) : ?>
+        <?php if (!$block->isInProductionMode() && $permissions->hasAccessToFlushStaticFiles()): ?>
             <p>
-                <button onclick="setLocation('<?= $block->escapeJs($block->getCleanStaticFilesUrl()); ?>')" type="button">
+                <button id="flushStaticFiles" type="button">
                     <?= $block->escapeHtml(__('Flush Static Files Cache')); ?>
                 </button>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    'setLocation(\'' . $block->escapeJs($block->getCleanStaticFilesUrl()) . '\')',
+                    'button#flushStaticFiles'
+                ) ?>
                 <span><?= $block->escapeHtml(__('Preprocessed view files and static files')); ?></span>
             </p>
         <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
index 1361b46a3cec9..36184816dc172 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
@@ -59,17 +59,18 @@ script;
                                         "')) {{$clickAction}}"; ?>
                                     <?php //phpcs:enable ?>
                                 <?php endif; ?>
-                                <button <?php if (!isset($_button['disabled']) || !$_button['disabled']):?>
-                                    <?= /* @noEscape */ $secureRenderer->renderEventListener(
-                                        'onclick',
-                                        /* @noEscape */ $clickAction
-                                    ) ?>
-                                <?php endif; ?>
+                                <button
                                     id="<?= $block->escapeHtmlAttr($_button['name']) ?>"
                                     type="button"
                                     class="scalable
+                                <?php if (!isset($_button['disabled']) || !$_button['disabled']):?>
+                                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                        'onclick',
+                                        /* @noEscape */ $clickAction,
+                                        '#' . $block->escapeHtmlAttr($_button['name'])
+                                    ) ?>
+                                <?php endif; ?>
                                 <?php if (isset($_button['disabled']) && $_button['disabled']):?>disabled<?php endif;?>"
-                                        style=""
                                 ><span><span><span><?= $block->escapeHtml($_button['action']) ?></span></span></span>
                                 </button>
                                 <?php if (isset($_button['comment'])): ?> <br />
@@ -96,16 +97,16 @@ script;
                     <tr>
                         <td class="label"><label><?= $block->escapeHtml(__('JavaScript/CSS Cache')) ?></label></td>
                         <td class="value">
-                            <button
-                                <?= /* @noEscape */ $secureRenderer->renderEventListener(
-                                    'onclick',
-                                    "setCacheAction('jscss_action', this)"
-                                ) ?>
-                                    id='jscss_action'
+                            <button id='jscss_action'
                                     type="button"
                                     class="scalable">
                                 <span><span><span><?= $block->escapeHtml(__('Clear')) ?></span></span></span>
                             </button>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                "setCacheAction('jscss_action', this)",
+                                '#jscss_action'
+                            ) ?>
                         </td>
                     </tr>
                 </tbody>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
index b2f1530dd865b..4120348daec00 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
@@ -29,46 +29,53 @@
 
 <?php $i = 0; if ($block->getValues() !== null): ?>
     <?php foreach ($block->getValues() as $image): $i++; ?>
-        <tr id="<?= $block->getElement()->getHtmlId() ?>_tr_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"
-            class="gallery">
+        <?php $trId = $block->getElement()->getHtmlId() . '_tr_' . $block->escapeHtmlAttr($image->getValueId()); ?>
+        <tr id="<?= /* @noEscape */ $trId ?>" class="gallery">
         <?php foreach ($block->getValues()->getAttributeBackend()->getImageTypes() as $type): ?>
-            <td class="gallery" align="center" style="vertical-align:bottom;">
+            <?php $typeId = $block->getElement()->getHtmlId() . '_image_' . $block->escapeHtmlAttr($type);
+            $imgId =  $typeId . '_' . $block->escapeHtmlAttr($image->getValueId()); ?>
+            <td class="gallery" align="center" id="<?= /* @noEscape */ $typeId ?>">
             <a href="<?= $block->escapeUrl($image->setType($type)->getSourceUrl()) ?>"
+               id = <?= /* @noEscape */ 'a_' . $imgId ?>
                target="_blank"
-               <?= /* @noEscape */ $secureRenderer->renderEventListener(
-                   'onclick',
-                   "imagePreview('<?= $block->getElement()->getHtmlId() ?>_image_<?=
-                $block->escapeHtmlAttr($block->escapeJs($type)) ?>_<?=
-                 $block->escapeHtmlAttr($block->escapeJs($image->getValueId())) ?>');return false;"
-               ) ?>
-            <img id="<?= $block->getElement()->getHtmlId() ?>_image_<?= $block->escapeHtmlAttr($type)
-            ?>_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"
+            <img id="<?= /* @noEscape */ $imgId ?>"
                  src="<?= $block->escapeUrl($image->setType($type)->getSourceUrl()) ?>?<?= /* @noEscape */ time() ?>"
                  alt="<?= $block->escapeHtmlAttr($image->getValue()) ?>"
                  title="<?= $block->escapeHtmlAttr($image->getValue()) ?>"
                  height="25"
                  class="small-image-preview v-middle"/>
             </a><br/>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    "imagePreview('<?= $imgId ?>');return false;",
+                    '#a_' . $imgId
+                ) ?>
             <input type="file"
                    name="<?= $block->escapeHtmlAttr($block->getElement()->getName())
                     ?>_<?= $block->escapeHtmlAttr($type) ?>[<?= $block->escapeHtmlAttr($image->getValueId()) ?>]"
-                   size="1"></td>
+                   size="1">
+            </td>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('vertical-align:bottom;', 'td#' . $typeId) ?>
         <?php endforeach; ?>
-        <td class="gallery" align="center" style="vertical-align:bottom;">
+        <td class="gallery" align="center" id="<?= /* @noEscape */ $trId . '_td_input' ?>">
             <input type="input"
                    name="<?= $block->escapeHtmlAttr($block->getElement()->getParentName())
                     ?>[position][<?= $block->escapeHtmlAttr($image->getValueId()) ?>]"
                    value="<?= $block->escapeHtmlAttr($image->getPosition()) ?>"
                    id="<?= $block->getElement()->getHtmlId()
                     ?>_position_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"
-                   size="3"/></td>
-        <td class="gallery" align="center"
-            style="vertical-align:bottom;"><?= $block->getDeleteButtonHtml($image->getValueId()) ?>
+                   size="3"/>
+        </td>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('vertical-align:bottom;', $trId . '_td_input') ?>
+        <td class="gallery" align="center" id="<?= /* @noEscape */ $trId . '_td_delete' ?>">
+            <?= $block->getDeleteButtonHtml($image->getValueId()) ?>
             <input type="hidden"
                    name="<?= $block->escapeHtmlAttr($block->getElement()->getParentName())
                     ?>[delete][<?= $block->escapeHtmlAttr($image->getValueId()) ?>]"
                    id="<?= $block->getElement()->getHtmlId()
-                    ?>_delete_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"/></td>
+                    ?>_delete_<?= $block->escapeHtmlAttr($image->getValueId()) ?>"/>
+        </td>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('vertical-align:bottom;', $trId . '_td_delete') ?>
         </tr>
     <?php endforeach; ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index 80a5638555dc2..79c9ce1f4cefd 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -93,12 +93,15 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                             <?php $_lastPage = $block->getCollection()->getLastPageNumber() ?>
 
                             <?php if ($_curPage > 1): ?>
-                                <button class="action-previous"
-                                        type="button"
-                                        onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?=
-                                        /* @noEscape */ ($_curPage - 1) ?>');return false;">
-                                            <span><?= $block->escapeHtml(__('Previous page')) ?></span>
+                                <button class="action-previous" type="button">
+                                    <span><?= $block->escapeHtml(__('Previous page')) ?></span>
                                 </button>
+                                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                    'onclick',
+                                    /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
+                                        /* @noEscape */ ($_curPage - 1) . '\');return false;',
+                                    'button.action-previous'
+                                ) ?>
                             <?php else: ?>
                                 <button type="button" class="action-previous disabled">
                                     <span><?= $block->escapeHtml(__('Previous page')) ?></span>
@@ -110,9 +113,14 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                                    name="<?= $block->escapeHtmlAttr($block->getVarNamePage()) ?>"
                                    value="<?= $block->escapeHtmlAttr($_curPage) ?>"
                                    class="admin__control-text"
-                                   onkeypress="<?= /* @noEscape */ $block->getJsObjectName() ?>.inputPage(event, '<?=
-                                   /* @noEscape */ $_lastPage ?>')" <?=
-                            /* @noEscape */ $block->getUiId('current-page') ?> />
+                                   <?= /* @noEscape */ $block->getUiId('current-page') ?> />
+
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onkeypress',
+                                /* @noEscape */ $block->getJsObjectName() . '.inputPage(event, \'' .
+                                /* @noEscape */ $_lastPage . '\')',
+                                '#' . $block->escapeHtml($block->getHtmlId()) . '_page-current'
+                            ) ?>
 
                             <label class="admin__control-support-text" for="<?= $block->escapeHtml($block->getHtmlId())
                             ?>_page-current">
@@ -121,11 +129,15 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                             </label>
                             <?php if ($_curPage < $_lastPage): ?>
                                 <button type="button" title="<?= $block->escapeHtmlAttr(__('Next page')) ?>"
-                                        class="action-next"
-                                        onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?=
-                                        /* @noEscape */ ($_curPage + 1) ?>');return false;">
+                                        class="action-next">
                                     <span><?= $block->escapeHtml(__('Next page')) ?></span>
                                 </button>
+                                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                    'onclick',
+                                    /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
+                                    /* @noEscape */ ($_curPage + 1) . '\');return false;',
+                                    'button.action-next'
+                                ) ?>
                             <?php else: ?>
                                 <button type="button" class="action-next disabled">
                                     <span><?= $block->escapeHtml(__('Next page')) ?></span>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 527ddc436207f..3044985ef65f2 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -18,31 +18,39 @@ $numColumns = count($block->getColumns());
 
 /**
  * @var \Magento\Backend\Block\Widget\Grid\Extended $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<?php if ($block->getCollection()) : ?>
-    <?php if ($block->canDisplayContainer()) : ?>
+<?php if ($block->getCollection()): ?>
+    <?php if ($block->canDisplayContainer()): ?>
 
     <div id="<?= $block->escapeHtml($block->getId()) ?>" data-grid-id="<?= $block->escapeHtml($block->getId()) ?>">
-    <?php else : ?>
+    <?php else: ?>
         <?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
     <?php endif; ?>
     <?php $massActionAvailable = $block->getMassactionBlock() && $block->getMassactionBlock()->isAvailable() ?>
-    <?php if ($block->getPagerVisibility() || $block->getExportTypes() || $block->getFilterVisibility() || $massActionAvailable) : ?>
+    <?php if ($block->getPagerVisibility() || $block->getExportTypes() || $block->getFilterVisibility() ||
+        $massActionAvailable): ?>
         <div class="admin__data-grid-header admin__data-grid-toolbar">
             <div class="admin__data-grid-header-row">
-                <?php if ($massActionAvailable) : ?>
-                    <?= $block->getMainButtonsHtml() ? '<div class="admin__filter-actions">' . $block->getMainButtonsHtml() . '</div>' : '' ?>
+                <?php if ($massActionAvailable): ?>
+                    <?= $block->getMainButtonsHtml() ?
+                        '<div class="admin__filter-actions">' . $block->getMainButtonsHtml() . '</div>' : '' ?>
                 <?php endif; ?>
-            <?php if ($block->getExportTypes()) : ?>
+            <?php if ($block->getExportTypes()): ?>
                 <div class="admin__data-grid-export">
                     <label
                         class="admin__control-support-text"
-                        for="<?= $block->escapeHtml($block->getId()) ?>_export"><?= $block->escapeHtml(__('Export to:')) ?></label>
-                    <select name="<?= $block->escapeHtml($block->getId()) ?>_export" id="<?= $block->escapeHtml($block->getId()) ?>_export"
+                        for="<?= $block->escapeHtml($block->getId()) ?>_export">
+                        <?= $block->escapeHtml(__('Export to:')) ?>
+                    </label>
+                    <select name="<?= $block->escapeHtml($block->getId()) ?>_export"
+                            id="<?= $block->escapeHtml($block->getId()) ?>_export"
                             class="admin__control-select">
-                        <?php foreach ($block->getExportTypes() as $_type) : ?>
-                            <option value="<?= $block->escapeHtmlAttr($_type->getUrl()) ?>"><?= $block->escapeHtml($_type->getLabel()) ?></option>
+                        <?php foreach ($block->getExportTypes() as $_type): ?>
+                            <option value="<?= $block->escapeHtmlAttr($_type->getUrl()) ?>">
+                                <?= $block->escapeHtml($_type->getLabel()) ?>
+                            </option>
                         <?php endforeach; ?>
                     </select>
                     <?= $block->getExportButtonHtml() ?>
@@ -51,76 +59,103 @@ $numColumns = count($block->getColumns());
             </div>
 
             <div class="admin__data-grid-header-row <?= $massActionAvailable ? '_massaction' : '' ?>">
-                <?php if ($massActionAvailable) : ?>
+                <?php if ($massActionAvailable): ?>
                     <?= $block->getMassactionBlockHtml() ?>
-                <?php else : ?>
-                    <?= $block->getMainButtonsHtml() ? '<div class="admin__filter-actions">' . $block->getMainButtonsHtml() . '</div>' : '' ?>
+                <?php else: ?>
+                    <?= $block->getMainButtonsHtml() ?
+                        '<div class="admin__filter-actions">' . $block->getMainButtonsHtml() . '</div>' : '' ?>
                 <?php endif; ?>
                 <?php $countRecords = $block->getCollection()->getSize(); ?>
                 <div class="admin__control-support-text">
-                        <span id="<?= $block->escapeHtml($block->getHtmlId()) ?>-total-count" <?= /* @noEscape */ $block->getUiId('total-count') ?>>
+                        <span id="<?= $block->escapeHtml($block->getHtmlId()) ?>-total-count"
+                            <?= /* @noEscape */ $block->getUiId('total-count') ?>>
                             <?= /* @noEscape */ $countRecords ?>
                         </span>
                     <?= $block->escapeHtml(__('records found')) ?>
                     <span id="<?= $block->escapeHtml($block->getHtmlId()) ?>_massaction-count"
-                          class="mass-select-info _empty"><strong data-role="counter">0</strong> <span><?= $block->escapeHtml(__('selected')) ?></span></span>
+                          class="mass-select-info _empty">
+                        <strong data-role="counter">0</strong>
+                        <span><?= $block->escapeHtml(__('selected')) ?></span>
+                    </span>
                 </div>
 
-            <?php if ($block->getPagerVisibility()) : ?>
+            <?php if ($block->getPagerVisibility()): ?>
                 <div class="admin__data-grid-pager-wrap">
                     <select name="<?= $block->escapeHtmlAttr($block->getVarNameLimit()) ?>"
                             id="<?= $block->escapeHtml($block->getHtmlId()) ?>_page-limit"
                             onchange="<?= /* @noEscape */ $block->getJsObjectName() ?>.loadByElement(this)"
                             class="admin__control-select">
-                        <option value="20"<?php if ($block->getCollection()->getPageSize() == 20) : ?>
+                        <option value="20"<?php if ($block->getCollection()->getPageSize() == 20): ?>
                             selected="selected"<?php endif; ?>>20
                         </option>
-                        <option value="30"<?php if ($block->getCollection()->getPageSize() == 30) : ?>
+                        <option value="30"<?php if ($block->getCollection()->getPageSize() == 30): ?>
                             selected="selected"<?php endif; ?>>30
                         </option>
-                        <option value="50"<?php if ($block->getCollection()->getPageSize() == 50) : ?>
+                        <option value="50"<?php if ($block->getCollection()->getPageSize() == 50): ?>
                             selected="selected"<?php endif; ?>>50
                         </option>
-                        <option value="100"<?php if ($block->getCollection()->getPageSize() == 100) : ?>
+                        <option value="100"<?php if ($block->getCollection()->getPageSize() == 100): ?>
                             selected="selected"<?php endif; ?>>100
                         </option>
-                        <option value="200"<?php if ($block->getCollection()->getPageSize() == 200) : ?>
+                        <option value="200"<?php if ($block->getCollection()->getPageSize() == 200): ?>
                             selected="selected"<?php endif; ?>>200
                         </option>
                     </select>
-                    <label for="<?= $block->escapeHtml($block->getHtmlId()) ?><?= $block->escapeHtml($block->getHtmlId()) ?>_page-limit"
+                    <label for="<?= $block->escapeHtml($block->getHtmlId())
+                    ?><?= $block->escapeHtml($block->getHtmlId()) ?>_page-limit"
                         class="admin__control-support-text"><?= $block->escapeHtml(__('per page')) ?></label>
 
                     <div class="admin__data-grid-pager">
                         <?php $_curPage = $block->getCollection()->getCurPage() ?>
                         <?php $_lastPage = $block->getCollection()->getLastPageNumber() ?>
-                        <?php if ($_curPage > 1) : ?>
-                            <button class="action-previous"
-                                    type="button"
-                                    onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?= /* @noEscape */ ($_curPage - 1) ?>');return false;">
+                        <?php if ($_curPage > 1): ?>
+                            <button class="action-previous" type="button">
+                                <span><?= $block->escapeHtml(__('Previous page')) ?></span>
+                            </button>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
+                                /* @noEscape */ ($_curPage - 1) . '\');return false;',
+                                'button.action-previous'
+                            ) ?>
+                        <?php else: ?>
+                            <button type="button" class="action-previous disabled">
                                 <span><?= $block->escapeHtml(__('Previous page')) ?></span>
                             </button>
-                        <?php else : ?>
-                            <button type="button" class="action-previous disabled"><span><?= $block->escapeHtml(__('Previous page')) ?></span></button>
                         <?php endif; ?>
                         <input type="text"
                                id="<?= $block->escapeHtml($block->getHtmlId()) ?>_page-current"
                                name="<?= $block->escapeHtmlAttr($block->getVarNamePage()) ?>"
                                value="<?= $block->escapeHtmlAttr($_curPage) ?>"
                                class="admin__control-text"
-                               onkeypress="<?= /* @noEscape */ $block->getJsObjectName() ?>.inputPage(event, '<?= /* @noEscape */ $_lastPage ?>')" <?= /* @noEscape */ $block->getUiId('current-page') ?> />
-                        <label class="admin__control-support-text" for="<?= $block->escapeHtml($block->getHtmlId()) ?>_page-current">
-                            <?= /* @noEscape */ __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
+                               <?= /* @noEscape */ $block->getUiId('current-page') ?> />
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onkeypress',
+                            /* @noEscape */ $block->getJsObjectName() . '.inputPage(event, \'' .
+                            /* @noEscape */ $_lastPage . '\')',
+                            '#' . $block->escapeHtml($block->getHtmlId()) . '_page-current'
+                        ) ?>
+                        <label class="admin__control-support-text"
+                               for="<?= $block->escapeHtml($block->getHtmlId()) ?>_page-current">
+                            <?= /* @noEscape */ __('of %1', '<span>' .
+                                $block->getCollection()->getLastPageNumber() . '</span>') ?>
                         </label>
-                        <?php if ($_curPage < $_lastPage) : ?>
+                        <?php if ($_curPage < $_lastPage): ?>
                             <button type="button"
                                     title="<?= $block->escapeHtmlAttr(__('Next page')) ?>"
-                                    class="action-next"
-                                    onclick="<?= /* @noEscape */ $block->getJsObjectName() ?>.setPage('<?= /* @noEscape */ ($_curPage + 1) ?>');return false;">
+                                    class="action-next">
+                                <span><?= $block->escapeHtml(__('Next page')) ?></span>
+                            </button>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
+                                /* @noEscape */ ($_curPage + 1) . '\');return false;',
+                                'button.action-next'
+                            ) ?>
+                        <?php else: ?>
+                            <button type="button" class="action-next disabled">
                                 <span><?= $block->escapeHtml(__('Next page')) ?></span>
                             </button>
-                        <?php else : ?>
-                        <button type="button" class="action-next disabled"><span><?= $block->escapeHtml(__('Next page')) ?></span></button>
                         <?php endif; ?>
                     </div>
                 </div>
@@ -137,25 +172,26 @@ $numColumns = count($block->getColumns());
             <col <?= $_column->getHtmlProperty() ?> />
             <?php endforeach; */
             ?>
-            <?php if ($block->getHeadersVisibility() || $block->getFilterVisibility()) : ?>
+            <?php if ($block->getHeadersVisibility() || $block->getFilterVisibility()): ?>
                 <thead>
-                <?php if ($block->getHeadersVisibility()) : ?>
+                <?php if ($block->getHeadersVisibility()): ?>
                     <tr>
-                        <?php foreach ($block->getColumns() as $_column) : ?>
-                            <?php if ($_column->getHeaderHtml() == ' ') : ?>
+                        <?php foreach ($block->getColumns() as $_column): ?>
+                            <?php if ($_column->getHeaderHtml() == ' '): ?>
                                 <th class="data-grid-th" data-column="<?= $block->escapeHtmlAttr($_column->getId()) ?>"
                                     <?= $_column->getHeaderHtmlProperty() ?>> </th>
-                            <?php else : ?>
+                            <?php else: ?>
                                 <?= $_column->getHeaderHtml() ?>
                             <?php endif; ?>
                         <?php endforeach; ?>
                     </tr>
                 <?php endif; ?>
-                <?php if ($block->getFilterVisibility()) : ?>
+                <?php if ($block->getFilterVisibility()): ?>
                     <tr class="data-grid-filters" data-role="filter-form">
                         <?php $i = 0;
-                        foreach ($block->getColumns() as $_column) : ?>
-                            <td data-column="<?= $block->escapeHtmlAttr($_column->getId()) ?>" <?= $_column->getHeaderHtmlProperty() ?>>
+                        foreach ($block->getColumns() as $_column): ?>
+                            <td data-column="<?= $block->escapeHtmlAttr($_column->getId()) ?>"
+                                <?= $_column->getHeaderHtmlProperty() ?>>
                                 <?= $_column->getFilterHtml() ?>
                             </td>
                         <?php endforeach; ?>
@@ -163,12 +199,14 @@ $numColumns = count($block->getColumns());
                 <?php endif ?>
                 </thead>
             <?php endif; ?>
-            <?php if ($block->getCountTotals()) : ?>
+            <?php if ($block->getCountTotals()): ?>
                 <tfoot>
                 <tr class="totals">
-                    <?php foreach ($block->getColumns() as $_column) : ?>
+                    <?php foreach ($block->getColumns() as $_column): ?>
                         <th class="<?= $block->escapeHtmlAttr($_column->getCssProperty()) ?>">
-                            <?= /* @noEscape */ ($_column->hasTotalsLabel()) ? $block->escapeHtml($_column->getTotalsLabel()) : $_column->getRowField($_column->getGrid()->getTotals()) ?>
+                            <?= /* @noEscape */ ($_column->hasTotalsLabel()) ?
+                                $block->escapeHtml($_column->getTotalsLabel()) :
+                                $_column->getRowField($_column->getGrid()->getTotals()) ?>
                         </th>
                     <?php endforeach; ?>
                 </tr>
@@ -176,21 +214,26 @@ $numColumns = count($block->getColumns());
             <?php endif; ?>
 
             <tbody>
-            <?php if (($block->getCollection()->getSize() > 0) && (!$block->getIsCollapsed())) : ?>
-                <?php foreach ($block->getCollection() as $_index => $_item) : ?>
-                    <tr title="<?= $block->escapeHtmlAttr($block->getRowUrl($_item)) ?>"<?php if ($_class = $block->getRowClass($_item)) : ?>
-                        class="<?= $block->escapeHtmlAttr($_class) ?>"<?php endif; ?> ><?php
+            <?php if (($block->getCollection()->getSize() > 0) && (!$block->getIsCollapsed())): ?>
+                <?php foreach ($block->getCollection() as $_index => $_item): ?>
+                    <tr title="<?= $block->escapeHtmlAttr($block->getRowUrl($_item)) ?>"
+                        <?php if ($_class = $block->getRowClass($_item)): ?>
+                        class="<?= $block->escapeHtmlAttr($_class) ?>"
+                        <?php endif; ?>>
+                        <?php
                         $i = 0;
-                        foreach ($block->getColumns() as $_column) :
-                            if ($block->shouldRenderCell($_item, $_column)) :
+                        foreach ($block->getColumns() as $_column):
+                            if ($block->shouldRenderCell($_item, $_column)):
                                 $_rowspan = $block->getRowspan($_item, $_column);
                                 ?>
                             <td <?= /* @noEscape */ ($_rowspan ? 'rowspan="' . $_rowspan . '" ' : '') ?>
                                 class="<?= $block->escapeHtmlAttr($_column->getCssProperty()) ?>
-                                        <?= /* @noEscape */ $_column->getId() == 'massaction' ? 'data-grid-checkbox-cell': '' ?>">
-                                <?= /* @noEscape */ (($_html = $_column->getRowField($_item)) != '' ? $_html : ' ') ?>
+                                        <?= /* @noEscape */ $_column->getId() == 'massaction' ?
+                                        'data-grid-checkbox-cell': '' ?>">
+                                <?= /* @noEscape */ (($_html = $_column->getRowField($_item)) != '' ?
+                                $_html : ' ') ?>
                                 </td><?php
-                                if ($block->shouldRenderEmptyCell($_item, $_column)) :
+                                if ($block->shouldRenderEmptyCell($_item, $_column)):
                                     ?>
                                     <td colspan="<?= $block->escapeHtmlAttr($block->getEmptyCellColspan($_item)) ?>"
                                         class="last"><?= $block->escapeHtml($block->getEmptyCellLabel()) ?></td><?php
@@ -198,59 +241,66 @@ $numColumns = count($block->getColumns());
                             endif;
                         endforeach; ?>
                     </tr>
-                    <?php if ($_multipleRows = $block->getMultipleRows($_item)) : ?>
-                        <?php foreach ($_multipleRows as $_i) : ?>
+                    <?php if ($_multipleRows = $block->getMultipleRows($_item)): ?>
+                        <?php foreach ($_multipleRows as $_i): ?>
                             <tr>
                                 <?php $i = 0;
-                                foreach ($block->getMultipleRowColumns($_i) as $_column) : ?>
+                                foreach ($block->getMultipleRowColumns($_i) as $_column): ?>
                                     <td class="<?= $block->escapeHtmlAttr($_column->getCssProperty()) ?>
-                                        <?= /* @noEscape */ $_column->getId() == 'massaction' ? 'data-grid-checkbox-cell': '' ?>">
-                                        <?= /* @noEscape */ (($_html = $_column->getRowField($_i)) != '' ? $_html : ' ') ?>
+                                        <?= /* @noEscape */ $_column->getId() == 'massaction' ?
+                                        'data-grid-checkbox-cell': '' ?>">
+                                        <?= /* @noEscape */ (($_html = $_column->getRowField($_i)) != '' ?
+                                            $_html : ' ') ?>
                                     </td>
                                 <?php endforeach; ?>
                             </tr>
                         <?php endforeach; ?>
                     <?php endif; ?>
 
-                    <?php if ($block->shouldRenderSubTotal($_item)) : ?>
+                    <?php if ($block->shouldRenderSubTotal($_item)): ?>
                         <tr class="subtotals">
                             <?php $i = 0;
-                            foreach ($block->getSubTotalColumns() as $_column) : ?>
+                            foreach ($block->getSubTotalColumns() as $_column): ?>
                                 <td class="<?= $block->escapeHtmlAttr($_column->getCssProperty()) ?>
-                                           <?= /* @noEscape */ $_column->getId() == 'massaction' ? 'data-grid-checkbox-cell': '' ?>">
-                                    <?= /* @noEscape */ $_column->hasSubtotalsLabel() ? $block->escapeHtml($_column->getSubtotalsLabel()) : $_column->getRowField($block->getSubTotalItem($_item)) ?>
+                                <?= /* @noEscape */ $_column->getId() == 'massaction' ?
+                                    'data-grid-checkbox-cell': '' ?>">
+                                    <?= /* @noEscape */ $_column->hasSubtotalsLabel() ?
+                                        $block->escapeHtml($_column->getSubtotalsLabel()) :
+                                        $_column->getRowField($block->getSubTotalItem($_item)) ?>
                                 </td>
                             <?php endforeach; ?>
                         </tr>
                     <?php endif; ?>
                 <?php endforeach; ?>
-            <?php elseif ($block->getEmptyText()) : ?>
+            <?php elseif ($block->getEmptyText()): ?>
                 <tr class="data-grid-tr-no-data">
                     <td class="<?= $block->escapeHtmlAttr($block->getEmptyTextClass()) ?>"
-                        colspan="<?= $block->escapeHtmlAttr($numColumns) ?>"><?= $block->escapeHtml($block->getEmptyText()) ?></td>
+                        colspan="<?= $block->escapeHtmlAttr($numColumns) ?>">
+                        <?= $block->escapeHtml($block->getEmptyText()) ?>
+                    </td>
                 </tr>
             <?php endif; ?>
             </tbody>
         </table>
 
     </div>
-    <?php if ($block->canDisplayContainer()) : ?>
+    <?php if ($block->canDisplayContainer()): ?>
 </div>
 <script>
     var deps = [];
 
-        <?php if ($block->getDependencyJsObject()) : ?>
+        <?php if ($block->getDependencyJsObject()): ?>
     deps.push('uiRegistry');
         <?php endif; ?>
 
-        <?php if (strpos($block->getRowClickCallback(), 'order.') !== false) : ?>
+        <?php if (strpos($block->getRowClickCallback(), 'order.') !== false): ?>
     deps.push('Magento_Sales/order/create/form')
         <?php endif; ?>
 
     deps.push('mage/adminhtml/grid');
 
-        <?php if (is_array($block->getRequireJsDependencies())) : ?>
-            <?php foreach ($block->getRequireJsDependencies() as $dependency) : ?>
+        <?php if (is_array($block->getRequireJsDependencies())): ?>
+            <?php foreach ($block->getRequireJsDependencies() as $dependency): ?>
             deps.push('<?= $block->escapeJs($dependency) ?>');
             <?php endforeach; ?>
         <?php endif; ?>
@@ -259,32 +309,37 @@ $numColumns = count($block->getColumns());
         <?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
 
         //<![CDATA[
-        <?php if ($block->getDependencyJsObject()) : ?>
-        registry.get('<?= $block->escapeJs($block->getDependencyJsObject()) ?>', function (<?= $block->escapeJs($block->getDependencyJsObject()) ?>) {
+        <?php if ($block->getDependencyJsObject()): ?>
+        registry.get('<?= $block->escapeJs($block->getDependencyJsObject())
+        ?>', function (<?= $block->escapeJs($block->getDependencyJsObject()) ?>) {
         <?php endif; ?>
     <?php // phpcs:disable ?>
     <?= $block->escapeJs($block->getJsObjectName()) ?> = new varienGrid(<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getId()) ?>, '<?= $block->escapeJs($block->getGridUrl()) ?>', '<?= $block->escapeJs($block->getVarNamePage()) ?>', '<?= $block->escapeJs($block->getVarNameSort()) ?>', '<?= $block->escapeJs($block->getVarNameDir()) ?>', '<?= $block->escapeJs($block->getVarNameFilter()) ?>');
     <?php //phpcs:enable ?>
         <?= $block->escapeJs($block->getJsObjectName()) ?>.useAjax = '<?= $block->escapeJs($block->getUseAjax()) ?>';
-        <?php if ($block->getRowClickCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.rowClickCallback = <?= /* @noEscape */ $block->getRowClickCallback() ?>;
+        <?php if ($block->getRowClickCallback()): ?>
+            <?= $block->escapeJs($block->getJsObjectName())
+            ?>.rowClickCallback = <?= /* @noEscape */ $block->getRowClickCallback() ?>;
         <?php endif; ?>
-        <?php if ($block->getCheckboxCheckCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.checkboxCheckCallback = <?= /* @noEscape */ $block->getCheckboxCheckCallback() ?>;
+        <?php if ($block->getCheckboxCheckCallback()): ?>
+            <?= $block->escapeJs($block->getJsObjectName())
+            ?>.checkboxCheckCallback = <?= /* @noEscape */ $block->getCheckboxCheckCallback() ?>;
         <?php endif; ?>
-        <?php if ($block->getFilterKeyPressCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.filterKeyPressCallback = <?= /* @noEscape */ $block->getFilterKeyPressCallback() ?>;
+        <?php if ($block->getFilterKeyPressCallback()): ?>
+            <?= $block->escapeJs($block->getJsObjectName())
+            ?>.filterKeyPressCallback = <?= /* @noEscape */ $block->getFilterKeyPressCallback() ?>;
         <?php endif; ?>
-        <?php if ($block->getRowInitCallback()) : ?>
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;
+        <?php if ($block->getRowInitCallback()): ?>
+            <?= $block->escapeJs($block->getJsObjectName())
+            ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;
             <?= $block->escapeJs($block->getJsObjectName()) ?>.initGridRows();
         <?php endif; ?>
-        <?php if ($block->getMassactionBlock() && $block->getMassactionBlock()->isAvailable()) : ?>
+        <?php if ($block->getMassactionBlock() && $block->getMassactionBlock()->isAvailable()): ?>
             <?= /* @noEscape */ $block->getMassactionBlock()->getJavaScript() ?>
         <?php endif ?>
         <?= /* @noEscape */ $block->getAdditionalJavaScript() ?>
 
-        <?php if ($block->getDependencyJsObject()) : ?>
+        <?php if ($block->getDependencyJsObject()): ?>
         });
         <?php endif; ?>
     //]]>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
index f48af7d066df3..498b403508f2c 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
@@ -31,8 +31,8 @@
             <?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' :
                 $block->getTabUrl($_tab) ?>
 
-            <li class="admin__page-nav-item" <?php if ($block->getTabIsHidden($_tab)): ?> style="display:none"<?php
-            endif; ?><?= /* @noEscape */ $block->getUiId('tab', 'item', $_tab->getId()) ?>>
+            <li class="admin__page-nav-item" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
+                <?= /* @noEscape */ $block->getUiId('tab', 'item', $_tab->getId()) ?>>
                 <a href="<?=  $block->escapeUrl($_tabHref) ?>"
                    id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
                    name="<?=  $block->escapeHtmlAttr($block->getTabId($_tab, false)) ?>"
@@ -72,9 +72,15 @@
                     <?= /* @noEscape */ $block->getUiId('tab', 'content', $_tab->getId()) ?>>
                     <?= /* @noEscape */ $block->getTabContent($_tab) ?>
                 </div>
+                <?php if ($block->getTabIsHidden($_tab)): ?>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                        'display:none',
+                        'li.admin__page-nav-item#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+                    ); ?>
+                <?php endif; ?>
                 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                     'display:none',
-                    '#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+                    'div#' . $block->escapeHtmlAttr($block->getTabId($_tab))
                 ); ?>
             </li>
         <?php endforeach; ?>
diff --git a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml
index 81aa49efd11e8..5251feb8c6710 100644
--- a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml
+++ b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml
@@ -3,16 +3,21 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <!-- TODO: refactor form styles and js -->
 <script type="text/x-magento-template" id="rollback-warning-template">
-<p><?= $block->escapeHtml(__('You will lose any data created since the backup was made, including admin users, customers and orders.')) ?></p>
+<p><?= $block->escapeHtml(__(
+    'You will lose any data created since the backup was made, including admin users, customers and orders.'
+)) ?></p>
 <p><?= $block->escapeHtml(__('Are you sure you want to continue?')) ?></p>
 </script>
 <script type="text/x-magento-template" id="backup-options-template">
-    <div class="backup-messages" style="display: none;">
+    <div class="backup-messages">
         <div class="messages"></div>
     </div>
+    <?=/* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'div.backup-messages') ?>
     <div class="messages">
         <div class="message message-warning">
             <?= $block->escapeHtml(__('This may take a few moments.')) ?>
@@ -21,44 +26,68 @@
     <form action="" method="post" id="backup-form" class="form-inline">
         <fieldset class="admin__fieldset form-list question">
             <div class="admin__field field _required">
-                <label for="backup_name" class="admin__field-label"><span><?= $block->escapeHtml(__('Backup Name')) ?></span></label>
+                <label for="backup_name" class="admin__field-label">
+                    <span><?= $block->escapeHtml(__('Backup Name')) ?></span>
+                </label>
                 <div class="admin__field-control">
                     <input type="text" name="backup_name" id="backup_name"
-                           class="admin__control-text required-entry validate-alphanum-with-spaces validate-length maximum-length-50"
+                           class="admin__control-text required-entry validate-alphanum-with-spaces validate-length
+                            maximum-length-50"
                            maxlength="50" />
                     <div class="admin__field-note">
-                        <?= $block->escapeHtml(__('Please use only letters (a-z or A-Z), numbers (0-9) or spaces in this field.')) ?>
+                        <?= $block->escapeHtml(__(
+                            'Please use only letters (a-z or A-Z), numbers (0-9) or spaces in this field.'
+                        )) ?>
                     </div>
                 </div>
             </div>
 
             <div class="admin__field field maintenance-checkbox-container">
-                <label for="backup_maintenance_mode" class="admin__field-label"><span><?= $block->escapeHtml(__('Maintenance mode')) ?></span></label>
+                <label for="backup_maintenance_mode" class="admin__field-label">
+                    <span><?= $block->escapeHtml(__('Maintenance mode')) ?></span>
+                </label>
                 <div class="admin__field-control">
                     <div class="admin__field-option">
-                        <input class="admin__control-checkbox" type="checkbox" name="maintenance_mode" value="1" id="backup_maintenance_mode"/>
-                        <label class="admin__field-label" for="backup_maintenance_mode"><?= $block->escapeHtml(__('Please put your store into maintenance mode during backup.')) ?></label>
+                        <input class="admin__control-checkbox"
+                               type="checkbox"
+                               name="maintenance_mode"
+                               value="1"
+                               id="backup_maintenance_mode"/>
+                        <label class="admin__field-label"
+                               for="backup_maintenance_mode"><?= $block->escapeHtml(__(
+                                   'Please put your store into maintenance mode during backup.'
+                               )) ?></label>
                     </div>
                 </div>
             </div>
 
-            <div class="admin__field field maintenance-checkbox-container" id="exclude-media-checkbox-container" style="display: none;">
-                <label for="exclude_media" class="admin__field-label"><span><?= $block->escapeHtml(__('Exclude')) ?></span></label>
+            <div class="admin__field field maintenance-checkbox-container" id="exclude-media-checkbox-container">
+                <label for="exclude_media" class="admin__field-label">
+                    <span><?= $block->escapeHtml(__('Exclude')) ?></span>
+                </label>
                 <div class="admin__field-control">
                     <div class="admin__field-option">
-                        <input class="admin__control-checkbox" type="checkbox" name="exclude_media" value="1" id="exclude_media"/>
-                        <label class="admin__field-label" for="exclude_media"><?= $block->escapeHtml(__('Exclude media folder from backup')) ?></label>
+                        <input class="admin__control-checkbox"
+                               type="checkbox"
+                               name="exclude_media"
+                               value="1"
+                               id="exclude_media"/>
+                        <label class="admin__field-label"
+                               for="exclude_media"><?= $block->escapeHtml(__('Exclude media folder from backup')) ?>
+                        </label>
                     </div>
                 </div>
             </div>
+            <?=/* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#exclude-media-checkbox-container') ?>
         </fieldset>
     </form>
 </script>
 
 <script type="text/x-magento-template" id="rollback-request-password-template">
-    <div class="backup-messages" style="display: none;">
+    <div class="backup-messages">
         <div class="messages"></div>
     </div>
+    <?=/* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'div.backup-messages') ?>
     <div class="messages">
         <div class="message message-warning">
             <?= $block->escapeHtml(__('Please enter the password to confirm rollback.')) ?><br>
@@ -69,44 +98,63 @@
     <form action="" method="post" id="rollback-form" class="form-inline">
         <fieldset class="admin__fieldset password-box-container">
             <div class="admin__field field _required">
-                <label for="password" class="admin__field-label"><span><?= $block->escapeHtml(__('User Password')) ?></span></label>
-                <div class="admin__field-control"><input type="password" name="password" id="password" class="admin__control-text required-entry" autocomplete="new-password"></div>
+                <label for="password" class="admin__field-label">
+                    <span><?= $block->escapeHtml(__('User Password')) ?></span>
+                </label>
+                <div class="admin__field-control">
+                    <input type="password" name="password" id="password" class="admin__control-text required-entry"
+                           autocomplete="new-password">
+                </div>
             </div>
 
             <div class="admin__field field maintenance-checkbox-container">
-                <label for="rollback_maintenance_mode" class="admin__field-label"><span><?= $block->escapeHtml(__('Maintenance mode')) ?></span></label>
+                <label for="rollback_maintenance_mode" class="admin__field-label">
+                    <span><?= $block->escapeHtml(__('Maintenance mode')) ?></span>
+                </label>
                 <div class="admin__field-control">
                     <div class="admin__field-option">
-                        <input class="admin__control-checkbox" type="checkbox" name="maintenance_mode" value="1" id="rollback_maintenance_mode"/>
-                        <label class="admin__field-label" for="rollback_maintenance_mode"><?= $block->escapeHtml(__('Please put your store into maintenance mode during rollback processing.')) ?></label>
-                    </div>  
+                        <input class="admin__control-checkbox" type="checkbox" name="maintenance_mode" value="1"
+                               id="rollback_maintenance_mode"/>
+                        <label class="admin__field-label" for="rollback_maintenance_mode">
+                            <?= $block->escapeHtml(__(
+                                'Please put your store into maintenance mode during rollback processing.'
+                            )) ?></label>
+                    </div>
                 </div>
             </div>
 
-            <div class="admin__field field maintenance-checkbox-container" id="use-ftp-checkbox-row" style="display: none;">
+            <div class="admin__field field maintenance-checkbox-container" id="use-ftp-checkbox-row">
                 <label for="use_ftp" class="admin__field-label">
                     <span><?= $block->escapeHtml(__('FTP')) ?></span>
                 </label>
                 <div class="admin__field-control">
                     <div class="admin__field-option">
-                        <input class="admin__control-checkbox" type="checkbox" name="use_ftp" value="1" id="use_ftp" onclick="backup.toggleFtpCredentialsForm(event)"/>
-                        <label class="admin__field-label" for="use_ftp"><?= $block->escapeHtml(__('Use FTP Connection')) ?></label>
+                        <input class="admin__control-checkbox" type="checkbox" name="use_ftp" value="1" id="use_ftp"/>
+                        <label class="admin__field-label" for="use_ftp">
+                            <?= $block->escapeHtml(__('Use FTP Connection')) ?>
+                        </label>
                     </div>
                 </div>
             </div>
         </fieldset>
-        <div class="entry-edit" id="ftp-credentials-container" style="display: none;">
+        <div class="entry-edit" id="ftp-credentials-container">
             <fieldset class="admin__fieldset">
-                <legend class="admin__legend legend"><span><?= $block->escapeHtml(__('FTP credentials')) ?></span></legend><br />
+                <legend class="admin__legend legend">
+                    <span><?= $block->escapeHtml(__('FTP credentials')) ?></span>
+                </legend><br />
                 <div class="admin__field field _required">
-                    <label class="admin__field-label" for="ftp_host"><span><?= $block->escapeHtml(__('FTP Host')) ?></span></label>
+                    <label class="admin__field-label" for="ftp_host">
+                        <span><?= $block->escapeHtml(__('FTP Host')) ?></span>
+                    </label>
                     <div class="admin__field-control">
                         <input type="text" class="admin__control-text" name="ftp_host" id="ftp_host">
                     </div>
                 </div>
 
                 <div class="admin__field field _required">
-                    <label class="admin__field-label" for="ftp_user"><span><?= $block->escapeHtml(__('FTP Login')) ?></span></label>
+                    <label class="admin__field-label" for="ftp_user">
+                        <span><?= $block->escapeHtml(__('FTP Login')) ?></span>
+                    </label>
                     <div class="admin__field-control">
                         <input type="text" class="admin__control-text" name="ftp_user" id="ftp_user">
                     </div>
@@ -116,7 +164,8 @@
                         <span><?= $block->escapeHtml(__('FTP Password')) ?></span>
                     </label>
                     <div class="admin__field-control">
-                        <input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass" autocomplete="new-password">
+                        <input type="password" class="admin__control-text" name="ftp_pass" id="ftp_pass"
+                               autocomplete="new-password">
                     </div>
                 </div>
                 <div class="admin__field field">
@@ -136,17 +185,27 @@
     $backupUrl = $block->getUrl('*/*/create');
 ?>
 
-<script>
+<?php $scriptString = <<<script
+
 require([
-    "prototype",
-    "mage/adminhtml/backup"
+    'prototype',
+    'mage/adminhtml/backup'
 ], function(){
 
 //<![CDATA[
     backup = new AdminBackup();
-    backup.rollbackUrl = '<?= $block->escapeUrl($rollbackUrl) ?>';
-    backup.backupUrl = '<?= $block->escapeUrl($backupUrl) ?>';
+    backup.rollbackUrl = '{$block->escapeJs($rollbackUrl)}';
+    backup.backupUrl = '{$block->escapeJs($backupUrl)}';
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#use-ftp-checkbox-row') ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#ftp-credentials-container') ?>
+<?=/* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    'backup.toggleFtpCredentialsForm(event)',
+    '#use_ftp'
+) ?>
diff --git a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
index 0d2599ff45f25..995db82618106 100644
--- a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
+++ b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
@@ -5,14 +5,12 @@
  */
 
 /** @var Magento\Braintree\Block\Form $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $code = $block->escapeHtml($block->getMethodCode());
 $ccType = $block->getInfoData('cc_type');
 ?>
-<fieldset class="admin__fieldset payment-method"
-          id="payment_form_<?= /* @noEscape */ $code ?>"
-          style="display:none"
-    >
+<fieldset class="admin__fieldset payment-method" id="payment_form_<?= /* @noEscape */ $code ?>">
     <div class="admin__field _required">
         <label class="label admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_type" >
             <span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
@@ -20,9 +18,9 @@ $ccType = $block->getInfoData('cc_type');
         <div class="admin__field-control control">
             <select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
                     class="required-entry select admin__control-select validate-cc-type-select">
-                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
+                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
                     <option value="<?= $block->escapeHtml($typeCode) ?>"
-                        <?php if ($typeCode == $ccType) : ?> selected="selected"<?php endif; ?>>
+                        <?php if ($typeCode == $ccType): ?> selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($typeName) ?>
                     </option>
                 <?php endforeach; ?>
@@ -59,7 +57,7 @@ $ccType = $block->getInfoData('cc_type');
             </div>
         </div>
     </div>
-    <?php if ($block->hasVerification()) : ?>
+    <?php if ($block->hasVerification()): ?>
         <div class="admin__field _required">
             <label class="label admin__field-label">
                 <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
@@ -75,7 +73,7 @@ $ccType = $block->getInfoData('cc_type');
         </div>
     <?php endif; ?>
 
-    <?php if ($block->isVaultEnabled()) : ?>
+    <?php if ($block->isVaultEnabled()): ?>
         <div class="field-tooltip-content">
             <input type="checkbox"
                    id="<?= /* @noEscape */ $code ?>_vault"
@@ -89,5 +87,7 @@ $ccType = $block->getInfoData('cc_type');
 
     <input type="hidden" id="<?= /* @noEscape */ $code ?>_payment_method_nonce"
            name="payment[payment_method_nonce]"/>
-    <input type="submit" name="Submit" style="display: none;">
+    <input type="submit" name="Submit">
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display;none', 'input[name=\'Submit\']') ?>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display;none', 'payment_form_' . /* @noEscape */ $code) ?>
diff --git a/app/code/Magento/Braintree/view/adminhtml/templates/payment/script.phtml b/app/code/Magento/Braintree/view/adminhtml/templates/payment/script.phtml
index 1b188b68948bf..ec345f6af2233 100644
--- a/app/code/Magento/Braintree/view/adminhtml/templates/payment/script.phtml
+++ b/app/code/Magento/Braintree/view/adminhtml/templates/payment/script.phtml
@@ -5,11 +5,14 @@
  */
 
 /** @var Magento\Braintree\Block\Payment $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $code = $block->escapeHtml($block->getCode());
-
 ?>
-<script>
+<?php
+$paymentConfig = /* @noEscape */ $block->getPaymentConfig();
+$payment_code = /* @noEscape */ $code;
+$scriptString = <<<script
     //<![CDATA[
     require(
         [
@@ -17,12 +20,14 @@ $code = $block->escapeHtml($block->getCode());
             'jquery',
             'domReady!'
         ], function(Braintree, $) {
-            var config = <?= /* @noEscape */ $block->getPaymentConfig() ?>,
+            var config = {$paymentConfig},
                 payment,
-                form = $('#payment_form_<?= /* @noEscape */ $code ?>');
+                form = $('#payment_form_{$payment_code}');
 
             config.active = form.length > 0 && !form.is(':hidden');
             payment = new Braintree(config);
         });
     //]]>
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml
index fc3030b6a4b36..3c0828cb3677d 100644
--- a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml
+++ b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
 ?>
-<script>
+<?php $scriptString = <<<script
     require([
         'uiLayout',
         'jquery'
@@ -25,5 +27,7 @@
             $('body').trigger('contentUpdated');
         })
     })
-</script>
+script;
+?>
+<?= /* @noEscape */ $csp->renderTag('script', [], $scriptString) ?>
 <!-- ko template: getTemplate() --><!-- /ko -->
diff --git a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml
index ea3eb2214c2d8..abb99e5290442 100644
--- a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml
+++ b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
 ?>
-<script>
+<?php $scriptString = <<<script
+
     require([
         'uiLayout',
         'jquery'
@@ -25,5 +28,7 @@
             $('body').trigger('contentUpdated');
         })
     })
-</script>
+script;
+?>
+<?= /* @noEscape */ $csp->renderTag('script', [], $scriptString) ?>
 <!-- ko template: getTemplate() --><!-- /ko -->
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/stock/disabler.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/stock/disabler.phtml
index b540b59ada343..14cb5f29be69a 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/product/stock/disabler.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/stock/disabler.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require(['jquery'], function($){
     $('[data-tab-panel=product-details]').on('stockbeforedisable', function(e) {
         if (e.productType === 'bundle') {
@@ -13,4 +15,7 @@ require(['jquery'], function($){
         }
     });
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+
diff --git a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
index 88e0d5edc2a7d..490bd159f28bd 100644
--- a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
+++ b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
@@ -5,8 +5,9 @@
  */
 
 /** @var \Magento\Captcha\Block\Captcha\DefaultCaptcha $block */
-
 /** @var \Magento\Captcha\Model\DefaultModel $captcha */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $captcha = $block->getCaptchaModel();
 ?>
 <div class="admin__field _required">
@@ -18,11 +19,13 @@ $captcha = $block->getCaptchaModel();
             id="captcha"
             class="admin__control-text"
             type="text"
-            name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtml($block->getFormId()) ?>]"
+            name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE)
+            ?>[<?= $block->escapeHtml($block->getFormId()) ?>]"
             data-validate="{required:true}"/>
-        <?php if ($captcha->isCaseSensitive()) :?>
+        <?php if ($captcha->isCaseSensitive()):?>
             <div class="admin__field-note">
-                <span><?= $block->escapeHtml(__('<strong>Attention</strong>: Captcha is case sensitive.'), ['strong']) ?></span>
+                <span><?= $block->escapeHtml(__('<strong>Attention</strong>: Captcha is case sensitive.'), ['strong'])
+                ?></span>
             </div>
         <?php endif; ?>
     </div>
@@ -39,11 +42,16 @@ $captcha = $block->getCaptchaModel();
         height="<?= /* @noEscape */ (float) $block->getImgHeight() ?>"
         src="<?= $block->escapeUrl($captcha->getImgSrc()) ?>" />
 </div>
-<script>
+
+<?php
+$url = $block->escapeJs($block->escapeUrl($block->getRefreshUrl()));
+$formId = $block->escapeJs($block->escapeHtml($block->getFormId()));
+$scriptString = <<<script
+
     require(["prototype", "mage/captcha"], function(){
 
 //<![CDATA[
-        var captcha = new Captcha('<?= $block->escapeJs($block->escapeUrl($block->getRefreshUrl())) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getFormId())) ?>');
+        var captcha = new Captcha('{$url}', '{$formId}');
 
         $('captcha-reload').observe('click', function () {
             captcha.refresh(this);
@@ -52,4 +60,6 @@ $captcha = $block->getCaptchaModel();
 //]]>
 
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml
index c77b66733afc4..c19f140687bbc 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit.phtml
@@ -6,13 +6,16 @@
 
 /**
  * @var $block \Magento\Catalog\Block\Adminhtml\Category\Edit
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<div data-id="information-dialog-category" class="messages" style="display: none;">
+<div data-id="information-dialog-category" class="messages">
     <div class="message message-notice">
         <div><?= $block->escapeHtml(__('This operation can take a long time')) ?></div>
     </div>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'div[data-id="information-dialog-category"]') ?>
+
 <script type="text/x-magento-init">
     {
         "*": {
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
index d6340330df8ea..ff5d203076987 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
@@ -5,36 +5,48 @@
  */
 
 /** @var $block \Magento\Catalog\Block\Adminhtml\Category\Tree */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="categories-side-col">
     <div class="sidebar-actions">
-        <?php if ($block->getRoot()) :?>
+        <?php if ($block->getRoot()):?>
             <?= $block->getAddRootButtonHtml() ?><br/>
             <?= $block->getAddSubButtonHtml() ?>
         <?php endif; ?>
     </div>
     <div class="tree-actions">
-        <?php if ($block->getRoot()) :?>
-            <?php //echo $block->getCollapseButtonHtml() ?>
-            <?php //echo $block->getExpandButtonHtml() ?>
-            <a href="#"
-               onclick="tree.collapseTree(); return false;"><?= $block->escapeHtml(__('Collapse All')) ?></a>
-            <span class="separator">|</span> <a href="#"
-                                                onclick="tree.expandTree(); return false;"><?= $block->escapeHtml(__('Expand All')) ?></a>
+        <?php if ($block->getRoot()):?>
+            <a id="colapseAll" href="#"><?= $block->escapeHtml(__('Collapse All')) ?></a>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                'tree.collapseTree(); return false;',
+                '#colapseAll'
+            ) ?>
+            <span class="separator">|</span>
+            <a id="expandAll" href="#"><?= $block->escapeHtml(__('Expand All')) ?></a>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                'tree.expandTree(); return false;',
+                '#expandAll'
+            ) ?>
         <?php endif; ?>
     </div>
-    <?php if ($block->getRoot()) :?>
+    <?php if ($block->getRoot()):?>
     <div class="tree-holder">
         <div id="tree-div" class="tree-wrapper"></div>
     </div>
 </div>
 
-    <div data-id="information-dialog-tree" class="messages" style="display: none;">
+    <div data-id="information-dialog-tree" class="messages">
         <div class="message message-notice">
             <div><?= $block->escapeHtml(__('This operation can take a long time')) ?></div>
         </div>
     </div>
-    <script>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display: none;',
+            'div[data-id="information-dialog-tree"]'
+        ) ?>
+        <?php $scriptString = <<<script
         var tree;
         require([
             "jquery",
@@ -171,7 +183,7 @@
 
                     if (!this.collapsed) {
                         this.collapsed = true;
-                        this.loader.dataUrl = '<?= $block->escapeJs($block->escapeUrl($block->getLoadTreeUrl(false))) ?>';
+                        this.loader.dataUrl = '{$block->escapeJs($block->getLoadTreeUrl(false))}';
                         this.request(this.loader.dataUrl, false);
                     }
                 },
@@ -180,7 +192,7 @@
                     this.expandAll();
                     if (this.collapsed) {
                         this.collapsed = false;
-                        this.loader.dataUrl = '<?= $block->escapeJs($block->escapeUrl($block->getLoadTreeUrl(true))) ?>';
+                        this.loader.dataUrl = '{$block->escapeJs($block->getLoadTreeUrl(true))}';
                         this.request(this.loader.dataUrl, false);
                     }
                 },
@@ -215,7 +227,9 @@
                 if (tree && switcherParams) {
                     var url;
                     if (switcherParams.useConfirm) {
-                        if (!confirm("<?= $block->escapeJs(__('Please confirm site switching. All data that hasn\'t been saved will be lost.')) ?>")) {
+                        if (!confirm("{$block->escapeJs(__(
+    'Please confirm site switching. All data that hasn\'t been saved will be lost.'
+))}")) {
                             return false;
                         }
                     }
@@ -258,7 +272,7 @@
                             }
                         });
                     } else {
-                        var baseUrl = '<?= $block->escapeJs($block->escapeUrl($block->getEditUrl())) ?>';
+                        var baseUrl = '{$block->escapeJs($block->getEditUrl())}';
                         var urlExt = switcherParams.scopeParams + 'id/' + tree.currentNodeId + '/';
                         url = parseSidUrl(baseUrl, urlExt);
                         setLocation(url);
@@ -295,18 +309,22 @@
                 if (scopeParams) {
                     url = url + scopeParams;
                 }
-                <?php if ($block->isClearEdit()) :?>
+script;
+        if ($block->isClearEdit()):
+            $scriptString .= <<<script
                 if (selectedNode) {
                     url = url + 'id/' + config.parameters.category_id;
                 }
-                <?php endif;?>
+script;
+endif;
+        $scriptString .= <<<script
                 //updateContent(url); //commented since ajax requests replaced with http ones to load a category
                 jQuery('#tree-div').find('.x-tree-node-el').first().remove();
             }
 
             jQuery(function () {
                 categoryLoader = new Ext.tree.TreeLoader({
-                    dataUrl: '<?= $block->escapeJs($block->escapeUrl($block->getLoadTreeUrl())) ?>'
+                    dataUrl: '{$block->escapeJs($block->getLoadTreeUrl())}'
                 });
 
                 categoryLoader.processResponse = function (response, parent, callback) {
@@ -388,31 +406,32 @@
                     enableDD: true,
                     containerScroll: true,
                     selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
-                    rootVisible: '<?= (bool)$block->getRoot()->getIsVisible() ?>',
-                    useAjax: <?= $block->escapeJs($block->getUseAjax()) ?>,
-                    switchTreeUrl: '<?= $block->escapeJs($block->escapeUrl($block->getSwitchTreeUrl())) ?>',
-                    editUrl: '<?= $block->escapeJs($block->escapeUrl($block->getEditUrl())) ?>',
-                    currentNodeId: <?= (int)$block->getCategoryId() ?>,
-                    baseUrl: '<?= $block->escapeJs($block->escapeUrl($block->getEditUrl())) ?>'
+script;
+        $scriptString .= '
+                    rootVisible: \'' . ($block->getRoot()->getIsVisible() ? 'true' : 'false') . '\',
+                    useAjax: ' . $block->escapeJs($block->getUseAjax()) . ',
+                    switchTreeUrl: \'' . $block->escapeJs($block->escapeUrl($block->getSwitchTreeUrl())) .'\',
+                    editUrl: \'' . $block->escapeJs($block->escapeUrl($block->getEditUrl())) .'\',
+                    currentNodeId: ' . (int)$block->getCategoryId() . ',
+                    baseUrl: \'' . $block->escapeJs($block->escapeUrl($block->getEditUrl())) . '\'
                 };
 
                 defaultLoadTreeParams = {
                     parameters: {
-                        text: <?= /* @noEscape */ json_encode(htmlentities($block->getRoot()->getName())) ?>,
+                        text: ' . /* @noEscape */ json_encode(htmlentities($block->getRoot()->getName())) . ',
                         draggable: false,
-                        allowDrop: <?php if ($block->getRoot()->getIsVisible()) :?>true<?php else :?>false<?php endif; ?>,
-                        id: <?= (int)$block->getRoot()->getId() ?>,
-                        expanded: <?= (int)$block->getIsWasExpanded() ?>,
-                        store_id: <?= (int)$block->getStore()->getId() ?>,
-                        category_id: <?= (int)$block->getCategoryId() ?>,
-                        parent: <?= (int)$block->getRequest()->getParam('parent') ?>
+                        allowDrop: ' . ($block->getRoot()->getIsVisible() ? 'true' : 'false') . ',
+                        id: ' . (int)$block->getRoot()->getId() . ',
+                        expanded: ' . (int)$block->getIsWasExpanded() . ',
+                        store_id: ' . (int)$block->getStore()->getId() . ',
+                        category_id: ' . (int)$block->getCategoryId() . ',
+                        parent: ' . (int)$block->getRequest()->getParam('parent') . '
                     },
-                    data: <?= /* @noEscape */ $block->getTreeJson() ?>
-                };
-
-                reRenderTree();
-            });
-
+                    data: ' . /* @noEscape */ $block->getTreeJson() . '
+                    };
+                    reRenderTree();
+                });' . PHP_EOL;
+        $scriptString .= <<<script
             function addNew(url, isRoot) {
                 if (isRoot) {
                     tree.currentNodeId = tree.root.id;
@@ -485,7 +504,7 @@
                         click: function () {
                             (function ($) {
                                 $.ajax({
-                                    url: '<?= $block->escapeJs($block->escapeUrl($block->getMoveUrl())) ?>',
+                                    url: '{$block->escapeJs($block->getMoveUrl())}',
                                     method: 'POST',
                                     data: registry.get('pd'),
                                     showLoader: true
@@ -521,5 +540,7 @@
             window.addNew = addNew;
 
         });
-    </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml
index e24d676974b01..3efdf1a82b40a 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
 ?>
 
 <?php $_divId = 'tree' . $block->getId() ?>
@@ -10,14 +12,20 @@
 <!--[if IE]>
 <script id="ie-deferred-loader" defer="defer" src="//:"></script>
 <![endif]-->
-<script>
-require(['jquery', "prototype", "extjs/ext-tree-checkbox"], function(jQuery){
+<?php
+$isUseMassaction = $block->getUseMassaction() ? 1 : 0;
+$isAnchorOnly = $block->getIsAnchorOnly() ? 1 : 0;
+$intCategoryId = (int)$block->getCategoryId();
+$intRootId = (int) $block->getRoot()->getId();
+$scriptString = <<<script
 
-var tree<?= $block->escapeJs($block->getId()) ?>;
+require(['jquery', 'prototype', 'extjs/ext-tree-checkbox'], function(jQuery){
 
-var useMassaction = <?= $block->getUseMassaction() ? 1 : 0 ?>;
+var tree{$block->escapeJs($block->getId())};
 
-var isAnchorOnly = <?= $block->getIsAnchorOnly() ? 1 : 0 ?>;
+var useMassaction = {$isUseMassaction};
+
+var isAnchorOnly = {$isAnchorOnly};
 
 Ext.tree.TreePanel.Enhanced = function(el, config)
 {
@@ -41,9 +49,13 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
         this.setRootNode(root);
 
         if (firstLoad) {
-            <?php if ($block->getNodeClickListener()) :?>
-                this.addListener('click', <?= /* @noEscape */ $block->getNodeClickListener() ?>.createDelegate(this));
-            <?php endif; ?>
+
+script;
+if ($block->getNodeClickListener()):
+    $scriptString .= 'this.addListener(\'click\', ' . /* @noEscape */ $block->getNodeClickListener() .
+    '.createDelegate(this));' . PHP_EOL;
+endif;
+$scriptString .= <<<script
         }
 
         this.loader.buildCategoryTree(root, data);
@@ -55,10 +67,14 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
 
 jQuery(function()
 {
-    var emptyNodeAdded = <?= ($block->getWithEmptyNode() ? 'false' : 'true') ?>;
+
+script;
+    $scriptString .= 'var emptyNodeAdded = ' . ($block->getWithEmptyNode() ? 'false' : 'true') . ';' . PHP_EOL;
+
+$scriptString .= <<<script
 
     var categoryLoader = new Ext.tree.TreeLoader({
-       dataUrl: '<?= $block->escapeJs($block->escapeUrl($block->getLoadTreeUrl())) ?>'
+       dataUrl: '{$block->escapeJs($block->escapeUrl($block->getLoadTreeUrl()))}'
     });
 
     categoryLoader.buildCategoryTree = function(parent, config)
@@ -77,7 +93,7 @@ jQuery(function()
                 // Add empty node to reset category filter
                 if(!emptyNodeAdded) {
                     var empty = Object.clone(_node);
-                    empty.text = '<?= $block->escapeJs(__('None')) ?>';
+                    empty.text = '{$block->escapeJs(__('None'))}';
                     empty.children = [];
                     empty.id = 'none';
                     empty.path = '1/none';
@@ -148,39 +164,41 @@ jQuery(function()
     };
 
     categoryLoader.on("beforeload", function(treeLoader, node) {
-        $('<?= $block->escapeJs($_divId) ?>').fire('category:beforeLoad', {treeLoader:treeLoader});
+        $('{$block->escapeJs($_divId)}').fire('category:beforeLoad', {treeLoader:treeLoader});
         treeLoader.baseParams.id = node.attributes.id;
     });
 
-    tree<?= $block->escapeJs($block->getId()) ?> = new Ext.tree.TreePanel.Enhanced('<?= $block->escapeJs($_divId) ?>', {
+    tree{$block->escapeJs($block->getId())} = new Ext.tree.TreePanel.Enhanced('{$block->escapeJs($_divId)}', {
         animate:          false,
         loader:           categoryLoader,
         enableDD:         false,
         containerScroll:  true,
         rootVisible:      false,
         useAjax:          true,
-        currentNodeId:    <?= (int) $block->getCategoryId() ?>,
+        currentNodeId:    {$intCategoryId},
         addNodeTo:        false
     });
 
     if (useMassaction) {
-        tree<?= $block->escapeJs($block->getId()) ?>.on('check', function(node) {
-            $('<?= $block->escapeJs($_divId) ?>').fire('node:changed', {node:node});
-        }, tree<?= $block->escapeJs($block->getId()) ?>);
+        tree{$block->escapeJs($block->getId())}.on('check', function(node) {
+            $('{$block->escapeJs($_divId)}').fire('node:changed', {node:node});
+        }, tree{$block->escapeJs($block->getId())});
     }
 
     // set the root node
     var parameters = {
         text:        'Psw',
         draggable:   false,
-        id:          <?= (int) $block->getRoot()->getId() ?>,
+        id:          {$intRootId},
         expanded:    true,
-        category_id: <?= (int) $block->getCategoryId() ?>
+        category_id: {$intCategoryId}
     };
 
-    tree<?= $block->escapeJs($block->getId()) ?>.loadTree({parameters:parameters, data:<?= /* @noEscape */ $block->getTreeJson() ?>},true);
+    tree{$block->escapeJs($block->getId())}.loadTree({parameters:parameters, data:{$block->getTreeJson()}},true);
 
 });
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $csp->renderTag('script', [], $scriptString); ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml
index 5717e9f0a0f0b..4ecfdd16a882d 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml
@@ -3,5 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div id="tree-div1" style="height:400px;margin-top:5px;overflow:auto"></div>
+<div id="tree-div1"/>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "height:400px;margin-top:5px;overflow:auto",
+    '#tree-div1'
+) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index 32466a1dfa965..cad35ece5603e 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -3,24 +3,59 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div id="product_composite_configure" class="product-configure-popup" style="display:none;">
-    <iframe name="product_composite_configure_iframe" id="product_composite_configure_iframe" style="width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px" onload="window.productConfigure && productConfigure.onLoadIFrame()"></iframe>
-    <form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data" onsubmit="productConfigure.onConfirmBtn(); return false;" target="product_composite_configure_iframe">
+<div id="product_composite_configure" class="product-configure-popup">
+    <iframe name="product_composite_configure_iframe" id="product_composite_configure_iframe"></iframe>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onload',
+        "window.productConfigure && productConfigure.onLoadIFrame()",
+        '#product_composite_configure_form'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px",
+        '#product_composite_configure_confirmed'
+    ) ?>
+
+    <form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data"
+          target="product_composite_configure_iframe">
         <div class="entry-edit">
-            <div id="product_composite_configure_messages" style="display: none;" >
+            <div id="product_composite_configure_messages">
                 <div class="messages"><div class="message message-error error"><div></div></div></div>
             </div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display:none;',
+                '#product_composite_configure_messages'
+            ) ?>
             <div id="product_composite_configure_form_fields" class="content product-composite-configure-inner"></div>
-            <div id="product_composite_configure_form_additional" style="display:none;"></div>
-            <div id="product_composite_configure_form_confirmed" style="display:none;"></div>
+            <div id="product_composite_configure_form_additional"></div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display:none;',
+                '#product_composite_configure_form_additional'
+            ) ?>
+            <div id="product_composite_configure_form_confirmed"></div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display:none;',
+                '#product_composite_configure_form_confirmed'
+            ) ?>
         </div>
         <input type="hidden" name="as_js_varname" value="iFrameResponse" />
         <input type="hidden" name="form_key" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" />
     </form>
-    <div id="product_composite_configure_confirmed" style="display:none;"></div>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onsubmit',
+        "productConfigure.onConfirmBtn(); return false;",
+        '#product_composite_configure_form'
+    ) ?>
 
-    <script>
+    <div id="product_composite_configure_confirmed"></div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display:none;',
+        '#product_composite_configure_confirmed'
+    ) ?>
+
+    <?php $scriptString = <<<script
         require([
             "jquery",
             "mage/mage"
@@ -29,5 +64,12 @@
             jQuery('#product_composite_configure_form').mage('form').mage('validation');
 
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    '#product_composite_configure'
+) ?>
+
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml
index f12a99e6c7843..85876946fda02 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml
@@ -4,8 +4,13 @@
  * See COPYING.txt for license details.
  */
 /* @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\NewCategory */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>" style="display:none">
+<div id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>">
     <?= $block->getFormHtml() ?>
     <?= $block->getAfterElementHtml() ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    $block->escapeHtmlAttr($block->getNameInLayout())
+) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml
index ad38d250a3345..7129190d47fb5 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options */ ?>
 
 <div class="fieldset-wrapper" id="product-custom-options-wrapper" data-block="product-custom-options">
     <div class="fieldset-wrapper-title">
@@ -12,14 +14,19 @@
             <span><?= $block->escapeHtml(__('Custom Options')) ?></span>
         </strong>
     </div>
-    <div class="fieldset-wrapper-content" id="product-custom-options-content" data-role="product-custom-options-content">
+    <div class="fieldset-wrapper-content" id="product-custom-options-content"
+         data-role="product-custom-options-content">
         <fieldset class="fieldset">
             <div class="messages">
-                <div class="message message-error" id="dynamic-price-warning" style="display: none;">
+                <div class="message message-error" id="dynamic-price-warning">
                     <div class="message-inner">
-                        <div class="message-content"><?= $block->escapeHtml(__('We can\'t save custom-defined options for bundles with dynamic pricing.')) ?></div>
+                        <div class="message-content">
+                            <?= $block->escapeHtml(__(
+                                'We can\'t save custom-defined options for bundles with dynamic pricing.'
+                            )) ?></div>
                     </div>
                 </div>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", '#dynamic-price-warning') ?>
             </div>
 
             <div id="product_options_container" class="sortable-wrapper">
@@ -35,7 +42,7 @@
     </div>
 </div>
 
-<script>
+<?php $scriptString = <<<script
 require(['jquery'], function($){
     var priceType = $('#price_type');
     var priceWarning = $('#dynamic-price-warning');
@@ -43,4 +50,6 @@ require(['jquery'], function($){
         priceWarning.show();
     }
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index 2f352438297d4..bfc8adcc70107 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -7,12 +7,11 @@
 <?php
 /** @var $block \Magento\Catalog\Block\Product\Image */
 /** @var $escaper \Magento\Framework\Escaper */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<span class="product-image-container"
-      style="width:<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>px;">
-    <span class="product-image-wrapper"
-          style="padding-bottom: <?= ($block->getRatio() * 100) ?>%;">
+<span class="product-image-container">
+    <span class="product-image-wrapper">
         <img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>"
             <?php foreach ($block->getCustomAttributes() as $name => $value): ?>
                 <?= $escaper->escapeHtmlAttr($name) ?>="<?= $escaper->escapeHtmlAttr($value) ?>"
@@ -23,3 +22,11 @@
             height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
             alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
 </span>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'width:' . $escaper->escapeHtmlAttr($block->getWidth()) . 'px;',
+    'span.product-image-container'
+) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'padding-bottom: '. ($block->getRatio() * 100) . '%;',
+    'span.product-image-wrapper'
+) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
index e83e55ad2a03c..0dce2d978eb38 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Catalog\Block\Product\View\Options\Type\File */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\File */ ?>
 <?php $_option = $block->getOption(); ?>
 <?php $_fileInfo = $block->getFileInfo(); ?>
 <?php $_fileExists = $_fileInfo->hasData(); ?>
@@ -19,13 +21,13 @@
         <span><?= $block->escapeHtml($_option->getTitle()) ?></span>
         <?= /* @noEscape */ $block->getFormattedPrice() ?>
     </label>
-    <?php if ($_fileExists) :?>
+    <?php if ($_fileExists):?>
     <div class="control">
         <span class="<?= /* @noEscape */ $_fileNamed ?>"><?= $block->escapeHtml($_fileInfo->getTitle()) ?></span>
         <a href="javascript:void(0)" class="label" id="change-<?= /* @noEscape */ $_fileName ?>" >
             <?= $block->escapeHtml(__('Change')) ?>
         </a>
-        <?php if (!$_option->getIsRequire()) :?>
+        <?php if (!$_option->getIsRequire()):?>
             <input type="checkbox" id="delete-<?= /* @noEscape */ $_fileName ?>" />
             <span class="label"><?= $block->escapeHtml(__('Delete')) ?></span>
         <?php endif; ?>
@@ -38,28 +40,36 @@
                 "fieldNameAction":"<?= /* @noEscape */ $_fieldNameAction ?>",
                 "changeFileSelector":"#change-<?= /* @noEscape */ $_fileName ?>",
                 "deleteFileSelector":"#delete-<?= /* @noEscape */ $_fileName ?>"}
-             }'
-            <?= $_fileExists ? 'style="display:none"' : '' ?>>
+             }'>
         <input type="file"
                name="<?= /* @noEscape */ $_fileName ?>"
                id="<?= /* @noEscape */ $_fileName ?>"
                class="product-custom-option<?= $_option->getIsRequire() ? ' required' : '' ?>"
             <?= $_fileExists ? 'disabled="disabled"' : '' ?> />
-        <input type="hidden" name="<?= /* @noEscape */ $_fieldNameAction ?>" value="<?= /* @noEscape */ $_fieldValueAction ?>" />
-        <?php if ($_option->getFileExtension()) :?>
+        <input type="hidden" name="<?= /* @noEscape */ $_fieldNameAction ?>"
+               value="<?= /* @noEscape */ $_fieldValueAction ?>" />
+        <?php if ($_option->getFileExtension()):?>
             <p class="note">
-                <?= $block->escapeHtml(__('Compatible file extensions to upload')) ?>: <strong><?= $block->escapeHtml($_option->getFileExtension()) ?></strong>
+                <?= $block->escapeHtml(__('Compatible file extensions to upload')) ?>:
+                <strong><?= $block->escapeHtml($_option->getFileExtension()) ?></strong>
             </p>
         <?php endif; ?>
-        <?php if ($_option->getImageSizeX() > 0) :?>
+        <?php if ($_option->getImageSizeX() > 0):?>
             <p class="note">
-                <?= $block->escapeHtml(__('Maximum image width')) ?>: <strong><?= (int)$_option->getImageSizeX() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
+                <?= $block->escapeHtml(__('Maximum image width')) ?>:
+                <strong><?= (int)$_option->getImageSizeX() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
             </p>
         <?php endif; ?>
-        <?php if ($_option->getImageSizeY() > 0) :?>
+        <?php if ($_option->getImageSizeY() > 0):?>
             <p class="note">
-                <?= $block->escapeHtml(__('Maximum image height')) ?>: <strong><?= (int)$_option->getImageSizeY() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
+                <?= $block->escapeHtml(__('Maximum image height')) ?>:
+                <strong><?= (int)$_option->getImageSizeY() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
             </p>
         <?php endif; ?>
     </div>
+    <?= $_fileExists ?
+        /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display:none',
+            'input-box-' . /* @noEscape */ $_fileName
+        ) : '' ?>
 </div>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml
index cdb12b54e5e67..d5c946621e90d 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/affected-attribute-set-selector/js.phtml
@@ -5,22 +5,24 @@
  */
 
 /* @var $block \Magento\ConfigurableProduct\Block\Product\Configurable\AttributeSelector */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 (function(){
     'use strict';
-    
-    var $form;
+
+    var _form;
 
     require([
         'jquery',
         'jquery/ui',
         'Magento_Ui/js/modal/modal'
     ], function($){
-        $form = $('[data-role=affected-attribute-set-selector]');
+        _form = $('[data-role=affected-attribute-set-selector]');
         var resetValidation = function() {
-                $form.find('.messages .message.error').hide();
-                $form.find('form').validation().data('validator').resetForm();
+                _form.find('.messages .message.error').hide();
+                _form.find('form').validation().data('validator').resetForm();
             },
             setAttributeSetId = function (id) {
                 $('[data-role=new-variations-attribute-set-id]').val(id);
@@ -31,10 +33,10 @@
             newAttributeSetContainer = $('[data-role=affected-attribute-set-new-name-container]'),
             existingAttributeSetContainer = $('[data-role=affected-attribute-set-existing-name-container]');
 
-        $form.find('input[type=text]').on('keypress',function(e){
+        _form.find('input[type=text]').on('keypress',function(e){
             if(e.keyCode === 13){
                 e.preventDefault();
-                $form.closest('[data-role=modal]').find('button[data-action=confirm]').click();
+                _form.closest('[data-role=modal]').find('button[data-action=confirm]').click();
             }
         });
 
@@ -44,66 +46,67 @@
             'data-role': 'new-variations-attribute-set-id'
         }));
 
-        $form
+        _form
             .modal({
-                title: '<?= $block->escapeJs(__('Choose Affected Attribute Set')) ?>',
+                title: '{$block->escapeJs(__('Choose Affected Attribute Set'))}',
                 closed: function () {
                     resetValidation();
                 },
                 buttons: [{
-                    text: '<?= $block->escapeJs(__('Confirm')) ?>',
+                    text: '{$block->escapeJs(__('Confirm'))}',
                     attr: {
                         'data-action': 'confirm'
                     },
                     'class': 'action-primary',
                     click: function() {
-                        var affectedAttributeSetId = $form.find('input[name=affected-attribute-set]:checked').val();
+                        var affectedAttributeSetId = _form.find('input[name=affected-attribute-set]:checked').val();
                         if (affectedAttributeSetId == 'current') {
                             setAttributeSetId($('#attribute_set_id').val());
-                            closeDialogAndProcessForm($form);
+                            closeDialogAndProcessForm(_form);
                             return;
                         } else if (affectedAttributeSetId == 'existing') {
                             setAttributeSetId($('select', existingAttributeSetContainer).val());
-                            closeDialogAndProcessForm($form);
+                            closeDialogAndProcessForm(form);
                         }
 
-                        $form.find('.messages .message.error').hide();
-                        if (!$form.find('form').validation().valid()) {
-                            $form.find('input[name=new-attribute-set-name]').focus();
+                        _form.find('.messages .message.error').hide();
+                        if (!_form.find('form').validation().valid()) {
+                            _form.find('input[name=new-attribute-set-name]').focus();
                             return false;
                         }
 
                         $.ajax({
                             type: 'POST',
-                            url: '<?= $block->escapeUrl($block->getAttributeSetCreationUrl()) ?>',
+                            url: '{$block->escapeUrl($block->getAttributeSetCreationUrl())}',
                             data: {
                                 gotoEdit: 1,
-                                attribute_set_name: $form.find('input[name=new-attribute-set-name]').val(),
+                                attribute_set_name: _form.find('input[name=new-attribute-set-name]').val(),
                                 skeleton_set: $('#attribute_set_id').val(),
-                                form_key: '<?= $block->escapeJs($block->getFormKey()) ?>',
+                                form_key: '{$block->escapeJs($block->getFormKey())}',
                                 return_session_messages_only: 1
                             },
                             dataType: 'json',
                             showLoader: true,
-                            context: $form
+                            context: _form
                         })
                             .done(function (data) {
                                 if (!data.error) {
                                     setAttributeSetId(data.id);
-                                    closeDialogAndProcessForm($form);
+                                    closeDialogAndProcessForm(_form);
                                 } else {
-                                    $form.find('.messages .message.error').replaceWith($(data.messages).find('.message.error'));
+                                    _form.find('.messages .message.error').replaceWith($(data.messages)
+                                    .find('.message.error'));
                                 }
                             });
 
                         return false;
                     }
                 },{
-                    text: '<?= $block->escapeJs(__('Cancel')) ?>',
-                    id: '<?= $block->escapeJs($block->getJsId('close-button')) ?>',
+                    text: '{$block->escapeJs(__('Cancel'))}',
+                    id: '{$block->escapeJs($block->getJsId('close-button'))}',
                     'class': 'action-close',
                     click: function() {
-                        $form.modal('closeModal');
+                        _form.modal('closeModal');
                     }
                 }]
             })
@@ -117,7 +120,7 @@
                 }
             });
     });
-    
+
     require([
         'jquery'
     ], function ($) {
@@ -127,17 +130,17 @@
          *
          * @return {Array}
          */
-        var getAttributes = function ($node) {
+        var getAttributes = function (_node) {
             return $.map(
-                $node.find('[data-role=configurable-attributes-container] [data-role=attribute-info]') || [],
+                _node.find('[data-role=configurable-attributes-container] [data-role=attribute-info]') || [],
                 function (attribute) {
-                    var $attribute = $(attribute);
+                    var _attribute = $(attribute);
 
                     return {
-                        id: $attribute.find('[name$="[attribute_id]"]').val(),
-                        code: $attribute.find('[name$="[code]"]').val(),
-                        label: $attribute.find('[name$="[label]"]').val(),
-                        position: $attribute.find('[name$="[position]"]').val()
+                        id: _attribute.find('[name$="[attribute_id]"]').val(),
+                        code: _attribute.find('[name$="[code]"]').val(),
+                        label: _attribute.find('[name$="[label]"]').val(),
+                        position: _attribute.find('[name$="[position]"]').val()
                     };
                 }
             );
@@ -170,10 +173,13 @@
 
             event.stopImmediatePropagation();
 
-            $form.data('target', event.target).modal('openModal');
+            _form.data('target', event.target).modal('openModal');
         });
 
     });
 
 })();
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/stock/disabler.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/stock/disabler.phtml
index fe41f07a4434d..c0f3f8617bd16 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/stock/disabler.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/stock/disabler.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require(['jquery'], function($){
     $('[data-tab-panel=product-details]').on('stockbeforedisable', function(e) {
         var variations = $('[data-panel=product-variations]');
@@ -14,4 +17,6 @@ require(['jquery'], function($){
         }
     });
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Csp/etc/config.xml b/app/code/Magento/Csp/etc/config.xml
index c13cd37ca0340..68328ac7bc540 100644
--- a/app/code/Magento/Csp/etc/config.xml
+++ b/app/code/Magento/Csp/etc/config.xml
@@ -70,7 +70,7 @@
                     <styles>
                         <policy_id>style-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>0</eval>
                         <dynamic>0</dynamic>
                     </styles>
@@ -170,14 +170,14 @@
                     <styles>
                         <policy_id>style-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>0</eval>
                         <dynamic>0</dynamic>
                     </styles>
                     <scripts>
                         <policy_id>script-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>1</eval>
                         <dynamic>0</dynamic>
                     </scripts>
diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/stock/disabler.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/stock/disabler.phtml
index 991ef2b5f4c7c..4e62b5539549f 100644
--- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/stock/disabler.phtml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/stock/disabler.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require(['jquery'], function($){
     $('[data-tab-panel=product-details]').on('stockbeforedisable', function(e) {
         if (e.productType === 'grouped') {
@@ -13,4 +16,6 @@ require(['jquery'], function($){
         }
     });
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php
index 30a323eebb736..71fe62c98b9b6 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Tree.php
@@ -36,7 +36,7 @@ class Tree extends Block
      *
      * @var string
      */
-    protected $expandAll = 'a[onclick*=expandTree]';
+    protected $expandAll = 'a#expandAll';
 
     /**
      * Backend abstract block.

From d5f73d25565aed193d69987e5fe2cb8982dbfd74 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Tue, 14 Apr 2020 00:05:20 +0300
Subject: [PATCH 096/307] MC-29420: Remove event handlers from CE

---
 .../Block/Widget/Form/Element/Gallery.php     |   5 +-
 .../Fieldset/Options/Type/Checkbox.php        |  59 +++++++++-
 .../Composite/Fieldset/Options/Type/Multi.php |  59 +++++++++-
 .../Composite/Fieldset/Options/Type/Radio.php |  63 ++++++++--
 .../Fieldset/Options/Type/Select.php          |  62 ++++++++--
 .../Catalog/Product/Edit/Tab/Attributes.php   |  41 ++++++-
 .../Product/Edit/Tab/Bundle/Option.php        |   3 +
 .../Adminhtml/Sales/Order/Items/Renderer.php  |   9 +-
 .../product/edit/tab/attributes/extend.phtml  |  60 ++++++----
 .../composite/fieldset/options/bundle.phtml   |  24 ++--
 .../templates/product/edit/bundle.phtml       |  28 +++--
 .../product/edit/bundle/option.phtml          |  84 ++++++++-----
 .../edit/bundle/option/selection.phtml        |  75 +++++++-----
 .../creditmemo/create/items/renderer.phtml    | 111 ++++++++++--------
 .../creditmemo/view/items/renderer.phtml      |  75 ++++++------
 .../sales/invoice/create/items/renderer.phtml |  99 ++++++++--------
 .../sales/invoice/view/items/renderer.phtml   |  75 ++++++------
 .../sales/order/view/items/renderer.phtml     | 101 ++++++++--------
 .../shipment/create/items/renderer.phtml      |  66 ++++++-----
 .../sales/shipment/view/items/renderer.phtml  |  66 ++++++-----
 .../Catalog/Block/Product/ListProduct.php     |   3 +
 .../frontend/templates/product/gallery.phtml  |  42 ++++---
 .../frontend/templates/product/list.phtml     |  82 ++++++++-----
 .../templates/product/list/items.phtml        |  51 ++++----
 .../templates/helper/summary_short.phtml      |  24 +++-
 .../templates/product/view/list.phtml         |  33 ++++--
 .../Magento/Framework/View/Helper/Js.php      |  17 ++-
 27 files changed, 937 insertions(+), 480 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php
index 95d3d17f9f342..25ea5b6100e28 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Gallery.php
@@ -9,6 +9,7 @@
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\AbstractElement;
 use Magento\Framework\Json\Helper\Data as JsonHelper;
+use Magento\Backend\Block\Template\Context;
 
 /**
  * Backend image gallery item renderer
@@ -29,10 +30,10 @@ class Gallery extends \Magento\Backend\Block\Template implements
     protected $_template = 'Magento_Backend::widget/form/element/gallery.phtml';
 
     /**
-     * @param Template\Context $context
+     * @param Context $context
      * @param array $data
      */
-    public function __construct(Template\Context $context, array $data = [])
+    public function __construct(Context $context, array $data = [])
     {
         $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php
index 46db8a9907341..85ddc9c207e8d 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Bundle option checkbox type renderer
  *
@@ -19,18 +22,66 @@ class Checkbox extends \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Op
      */
     protected $_template = 'Magento_Bundle::product/composite/fieldset/options/type/checkbox.phtml';
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param \Magento\Framework\View\Element\Template\Context $context
+     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
+     * @param \Magento\Catalog\Helper\Data $catalogData
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Framework\Stdlib\StringUtils $string
+     * @param \Magento\Framework\Math\Random $mathRandom
+     * @param \Magento\Checkout\Helper\Cart $cartHelper
+     * @param \Magento\Tax\Helper\Data $taxData
+     * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function __construct(
+        \Magento\Framework\View\Element\Template\Context $context,
+        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
+        \Magento\Catalog\Helper\Data $catalogData,
+        \Magento\Framework\Registry $registry,
+        \Magento\Framework\Stdlib\StringUtils $string,
+        \Magento\Framework\Math\Random $mathRandom,
+        \Magento\Checkout\Helper\Cart $cartHelper,
+        \Magento\Tax\Helper\Data $taxData,
+        \Magento\Framework\Pricing\Helper\Data $pricingHelper,
+        array $data = [],
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct(
+            $context,
+            $jsonEncoder,
+            $catalogData,
+            $registry,
+            $string,
+            $mathRandom,
+            $cartHelper,
+            $taxData,
+            $pricingHelper,
+            $data
+        );
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * @inheritdoc
      */
     public function setValidationContainer($elementId, $containerId)
     {
-        return '<script>
-            document.getElementById(\'' .
+        $scriptString = 'document.getElementById(\'' .
             $elementId .
             '\').advaiceContainer = \'' .
             $containerId .
-            '\';
-            </script>';
+            '\';';
+
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 
     /**
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php
index 629f08dc75106..0b33ad546c5d0 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Bundle option multi select type renderer
  *
@@ -19,18 +22,66 @@ class Multi extends \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Optio
      */
     protected $_template = 'Magento_Bundle::product/composite/fieldset/options/type/multi.phtml';
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param \Magento\Framework\View\Element\Template\Context $context
+     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
+     * @param \Magento\Catalog\Helper\Data $catalogData
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Framework\Stdlib\StringUtils $string
+     * @param \Magento\Framework\Math\Random $mathRandom
+     * @param \Magento\Checkout\Helper\Cart $cartHelper
+     * @param \Magento\Tax\Helper\Data $taxData
+     * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function __construct(
+        \Magento\Framework\View\Element\Template\Context $context,
+        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
+        \Magento\Catalog\Helper\Data $catalogData,
+        \Magento\Framework\Registry $registry,
+        \Magento\Framework\Stdlib\StringUtils $string,
+        \Magento\Framework\Math\Random $mathRandom,
+        \Magento\Checkout\Helper\Cart $cartHelper,
+        \Magento\Tax\Helper\Data $taxData,
+        \Magento\Framework\Pricing\Helper\Data $pricingHelper,
+        array $data = [],
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct(
+            $context,
+            $jsonEncoder,
+            $catalogData,
+            $registry,
+            $string,
+            $mathRandom,
+            $cartHelper,
+            $taxData,
+            $pricingHelper,
+            $data
+        );
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * @inheritdoc
      */
     public function setValidationContainer($elementId, $containerId)
     {
-        return '<script>
-            document.getElementById(\'' .
+        $scriptString = 'document.getElementById(\'' .
             $elementId .
             '\').advaiceContainer = \'' .
             $containerId .
-            '\';
-            </script>';
+            '\';';
+
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 
     /**
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php
index 1519b3a67ac97..e5d2e3e830379 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Bundle option radiobox type renderer
  *
@@ -20,18 +23,64 @@ class Radio extends \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Optio
     protected $_template = 'Magento_Bundle::product/composite/fieldset/options/type/radio.phtml';
 
     /**
-     * @param  string $elementId
-     * @param  string $containerId
-     * @return string
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param \Magento\Framework\View\Element\Template\Context $context
+     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
+     * @param \Magento\Catalog\Helper\Data $catalogData
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Framework\Stdlib\StringUtils $string
+     * @param \Magento\Framework\Math\Random $mathRandom
+     * @param \Magento\Checkout\Helper\Cart $cartHelper
+     * @param \Magento\Tax\Helper\Data $taxData
+     * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function __construct(
+        \Magento\Framework\View\Element\Template\Context $context,
+        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
+        \Magento\Catalog\Helper\Data $catalogData,
+        \Magento\Framework\Registry $registry,
+        \Magento\Framework\Stdlib\StringUtils $string,
+        \Magento\Framework\Math\Random $mathRandom,
+        \Magento\Checkout\Helper\Cart $cartHelper,
+        \Magento\Tax\Helper\Data $taxData,
+        \Magento\Framework\Pricing\Helper\Data $pricingHelper,
+        array $data = [],
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct(
+            $context,
+            $jsonEncoder,
+            $catalogData,
+            $registry,
+            $string,
+            $mathRandom,
+            $cartHelper,
+            $taxData,
+            $pricingHelper,
+            $data
+        );
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
+    /**
+     * @inheritdoc
      */
     public function setValidationContainer($elementId, $containerId)
     {
-        return '<script>
-            document.getElementById(\'' .
+        $scriptString = 'document.getElementById(\'' .
             $elementId .
             '\').advaiceContainer = \'' .
             $containerId .
-            '\';
-            </script>';
+            '\';';
+
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 }
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php
index 502dfa32044a3..0f0f4a62eb7fc 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Bundle option dropdown type renderer
  *
@@ -20,18 +23,63 @@ class Select extends \Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Opti
     protected $_template = 'Magento_Bundle::product/composite/fieldset/options/type/select.phtml';
 
     /**
-     * @param  string $elementId
-     * @param  string $containerId
-     * @return string
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param \Magento\Framework\View\Element\Template\Context $context
+     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
+     * @param \Magento\Catalog\Helper\Data $catalogData
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Framework\Stdlib\StringUtils $string
+     * @param \Magento\Framework\Math\Random $mathRandom
+     * @param \Magento\Checkout\Helper\Cart $cartHelper
+     * @param \Magento\Tax\Helper\Data $taxData
+     * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function __construct(
+        \Magento\Framework\View\Element\Template\Context $context,
+        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
+        \Magento\Catalog\Helper\Data $catalogData,
+        \Magento\Framework\Registry $registry,
+        \Magento\Framework\Stdlib\StringUtils $string,
+        \Magento\Framework\Math\Random $mathRandom,
+        \Magento\Checkout\Helper\Cart $cartHelper,
+        \Magento\Tax\Helper\Data $taxData,
+        \Magento\Framework\Pricing\Helper\Data $pricingHelper,
+        array $data = [],
+        ?SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct(
+            $context,
+            $jsonEncoder,
+            $catalogData,
+            $registry,
+            $string,
+            $mathRandom,
+            $cartHelper,
+            $taxData,
+            $pricingHelper,
+            $data
+        );
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
+    /**
+     * @inheritdoc
      */
     public function setValidationContainer($elementId, $containerId)
     {
-        return '<script>
-            document.getElementById(\'' .
+        $scriptString = 'document.getElementById(\'' .
             $elementId .
             '\').advaiceContainer = \'' .
             $containerId .
-            '\';
-            </script>';
+            '\';';
+
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 }
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php
index 0fe8c38cc4992..f2f62c0914b4a 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php
@@ -6,12 +6,43 @@
 
 namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Bundle product attributes tab
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  */
 class Attributes extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Framework\Data\FormFactory $formFactory
+     * @param array $data
+     * @param SecureHtmlRenderer|null $htmlRenderer
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Framework\Registry $registry,
+        \Magento\Framework\Data\FormFactory $formFactory,
+        array $data = [],
+        SecureHtmlRenderer $htmlRenderer = null
+    ) {
+        parent::__construct(
+            $context,
+            $registry,
+            $formFactory,
+            $data
+        );
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * Prepare attributes form of bundle product
      *
@@ -69,9 +100,7 @@ protected function _prepareForm()
 
         $tax = $this->getForm()->getElement('tax_class_id');
         if ($tax) {
-            $tax->setAfterElementHtml(
-                '<script>' .
-                "
+            $scriptString = "
                 require(['prototype'], function(){
                 function changeTaxClassId() {
                     if ($('price_type').value == '" .
@@ -96,8 +125,10 @@ function changeTaxClassId() {
                     changeTaxClassId();
                 }
                 });
-                " .
-                '</script>'
+                ";
+
+            $tax->setAfterElementHtml(
+                /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false)
             );
         }
 
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
index 491f6c3fb1096..63542b381d34b 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
@@ -9,6 +9,8 @@
 
 use Magento\Framework\Data\Form\Element\AbstractElement;
 use Magento\Store\Model\Store;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Block for rendering option of bundle product
@@ -70,6 +72,7 @@ public function __construct(
         $this->_coreRegistry = $registry;
         $this->_optionTypes = $optionTypes;
         $this->_yesno = $yesno;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
index 82a0086ad67ec..de1caac75e143 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
@@ -7,6 +7,8 @@
 
 use Magento\Catalog\Model\Product\Type\AbstractType;
 use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Adminhtml sales order item renderer
@@ -39,9 +41,8 @@ public function __construct(
         array $data = [],
         Json $serializer = null
     ) {
-        $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
-            ->get(Json::class);
-
+        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $stockRegistry, $stockConfiguration, $registry, $data);
     }
 
@@ -51,7 +52,7 @@ public function __construct(
      * @param string $value
      * @param int $length
      * @param string $etc
-     * @param string &$remainder
+     * @param string $remainder
      * @param bool $breakWords
      * @return string
      */
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/catalog/product/edit/tab/attributes/extend.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/catalog/product/edit/tab/attributes/extend.phtml
index f028c7013df90..81a6034b9218d 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/catalog/product/edit/tab/attributes/extend.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/catalog/product/edit/tab/attributes/extend.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Attributes\Extend */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 $elementHtml = $block->getParentElementHtml();
 
 $attributeCode = $block->getAttribute()
@@ -18,18 +19,19 @@ $isElementReadonly = $block->getElement()
     ->getReadonly();
 ?>
 
-<?php if (!($attributeCode === 'price' && $block->getCanReadPrice() === false)) : ?>
+<?php if (!($attributeCode === 'price' && $block->getCanReadPrice() === false)): ?>
     <div class="<?= $block->escapeHtmlAttr($attributeCode) ?> "><?= /* @noEscape */ $elementHtml ?></div>
 <?php endif; ?>
 
 <?= $block->getExtendedElement($switchAttributeCode)->toHtml() ?>
 
-<?php if (!$isElementReadonly && $block->getDisableChild()) { ?>
-    <script>
+<?php if (!$isElementReadonly && $block->getDisableChild()) {
+    $switchAttributeCode = /* @noEscape */ $switchAttributeCode;
+    $scriptString = <<<script
         require(['prototype'], function () {
-            function <?= /* @noEscape */ $switchAttributeCode ?>_change() {
-                var $attribute = $('<?= $block->escapeJs($attributeCode) ?>');
-                if ($('<?= /* @noEscape */ $switchAttributeCode ?>').value == '<?= $block->escapeJs($block::DYNAMIC) ?>') {
+            function {$switchAttributeCode}_change() {
+                var $attribute = $('{$block->escapeJs($attributeCode)}');
+                if ($('{$switchAttributeCode}').value == '{$block->escapeJs($block::DYNAMIC)}') {
                     if ($attribute) {
                         $attribute.disabled = true;
                         $attribute.value = '';
@@ -40,28 +42,36 @@ $isElementReadonly = $block->getElement()
                     }
                 } else {
                     if ($attribute) {
-                        <?php if ($attributeCode === 'price' && !$block->getCanEditPrice() && $block->getCanReadPrice()
-                                && $block->getProduct()->isObjectNew()) : ?>
-                                        <?php $defaultProductPrice = $block->getDefaultProductPrice() ?: "''"; ?>
-                            $attribute.value = <?= /* @noEscape */ (string)$defaultProductPrice ?>;
-                        <?php else : ?>
-                            $attribute.disabled = false;
-                            $attribute.addClassName('required-entry');
-                        <?php endif; ?>
-                    }
-                    if ($('dynamic-price-warning')) {
-                        $('dynamic-price-warning').hide();
-                    }
+script;
+    if ($attributeCode === 'price' && !$block->getCanEditPrice() &&
+        $block->getCanReadPrice() && $block->getProduct()->isObjectNew()):
+        $defaultProductPrice = $block->getDefaultProductPrice() ?: "''";
+        $scriptString .= '$attribute.value = ' . /* @noEscape */ (string)$defaultProductPrice . ';';
+    else:
+        $scriptString = <<<script
+            $attribute.disabled = false;
+            $attribute.addClassName('required-entry');
+script;
+    endif;
+    $scriptString .= <<<script
+            }
+                if ($('dynamic-price-warning')) {
+                    $('dynamic-price-warning').hide();
                 }
             }
-
-            <?php if (!($attributeCode === 'price' && !$block->getCanEditPrice()
-                    && !$block->getProduct()->isObjectNew())) : ?>
-                $('<?= /* @noEscape */ $switchAttributeCode ?>').observe('change', <?= /* @noEscape */ $switchAttributeCode ?>_change);
-            <?php endif; ?>
+        }
+script;
+    if (!($attributeCode === 'price' && !$block->getCanEditPrice() && !$block->getProduct()->isObjectNew())):
+        $scriptString .= <<<script
+            $('{$switchAttributeCode}').observe('change', {$switchAttributeCode}_change);
+script;
+    endif;
+    $scriptString .= <<<script
             Event.observe(window, 'load', function(){
-                <?= /* @noEscape */ $switchAttributeCode ?>_change();
+                {$switchAttributeCode}_change();
             });
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php } ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml
index 53ad0a963244d..91517cf8284dd 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/composite/fieldset/options/bundle.phtml
@@ -5,22 +5,26 @@
  */
 ?>
 
-<?php /* @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Bundle */ ?>
+<?php
+/* @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Bundle */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
+
 <?php $options = $block->decorateArray($block->getOptions(true)); ?>
-<?php if (count($options)) : ?>
+<?php if (count($options)): ?>
 <fieldset id="catalog_product_composite_configure_fields_bundle"
           class="fieldset admin__fieldset composite-bundle<?= $block->getIsLastFieldset() ? ' last-fieldset' : '' ?>">
     <legend class="legend admin__legend">
         <span><?= $block->escapeHtml(__('Bundle Items')) ?></span>
     </legend><br />
-    <?php foreach ($options as $option) : ?>
-        <?php if ($option->getSelections()) : ?>
+    <?php foreach ($options as $option): ?>
+        <?php if ($option->getSelections()): ?>
             <?= $block->getOptionHtml($option) ?>
         <?php endif; ?>
     <?php endforeach; ?>
 </fieldset>
 
-<script>
+    <?php $scriptString = <<<script
 require([
     "Magento_Catalog/catalog/product/composite/configure"
 ], function(){
@@ -70,8 +74,12 @@ require([
             }
         }
     };
-    ProductConfigure.bundleControl = new BundleControl(<?= /* @noEscape */ $block->getJsonConfig() ?>);
+script;
+    $scriptString .= 'ProductConfigure.bundleControl = new BundleControl(' . /* @noEscape */ $block->getJsonConfig() .
+     ');';
+    $scriptString .= <<<script
 });
-</script>
-
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml
index c8ab6cc5b98d2..89c0f930e21c2 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle.phtml
@@ -5,27 +5,29 @@
  */
 
 /** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
 
+<?php $scriptString = <<<script
 if(typeof Bundle=='undefined') {
     Bundle = {};
 }
-
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <div id="bundle_product_container" class="entry-edit form-inline">
     <fieldset class="fieldset">
         <div class="field field-ship-bundle-items">
             <label for="shipment_type" class="label"><?= $block->escapeHtml(__('Ship Bundle Items')) ?></label>
             <div class="control">
-                <select <?php if ($block->isReadonly()) : ?>disabled="disabled" <?php endif;?>
+                <select <?php if ($block->isReadonly()): ?>disabled="disabled" <?php endif;?>
                         id="shipment_type"
                         name="<?= $block->escapeHtmlAttr($block->getFieldSuffix()) ?>[shipment_type]"
                         class="select">
                     <option value="1"><?= $block->escapeHtml(__('Separately')) ?></option>
                     <option value="0"
-                        <?php if ($block->getProduct()->getShipmentType() == 0) : ?>
+                        <?php if ($block->getProduct()->getShipmentType() == 0): ?>
                             selected="selected"
                         <?php endif; ?>
                     >
@@ -47,18 +49,24 @@ if(typeof Bundle=='undefined') {
 
 <input type="hidden" name="affect_bundle_product_selections" value="1" />
 
-<script>
+<?php $scriptString = <<<script
+
 require(["prototype", "mage/adminhtml/form"], function(){
     // re-bind form elements onchange
     varienWindowOnload(true);
-
-    <?php if ($block->isReadonly()) :?>
+script;
+if ($block->isReadonly()):
+    $scriptString .= <<<script
     $('product_bundle_container').select('input', 'select', 'textarea', 'button').each(function(input){
         input.disabled = true;
         if (input.tagName.toLowerCase() == 'button') {
             input.addClassName('disabled');
         }
     });
-    <?php endif; ?>
+script;
+endif;
+$scriptString .= <<<script
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml
index 4d68d363b7484..4582de57a8b4a 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml
@@ -5,12 +5,15 @@
  */
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 /** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <script id="bundle-option-template" type="text/x-magento-template">
     <div id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>" class="option-box">
-        <div class="fieldset-wrapper admin__collapsible-block-wrapper opened" id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>-wrapper">
+        <div class="fieldset-wrapper admin__collapsible-block-wrapper opened"
+             id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>-wrapper">
             <div class="fieldset-wrapper-title">
-                <strong class="admin__collapsible-title" data-toggle="collapse" data-target="#<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>-content">
+                <strong class="admin__collapsible-title" data-toggle="collapse"
+                        data-target="#<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>-content">
                     <span><%- data.default_title %></span>
                 </strong>
                 <div class="actions">
@@ -18,55 +21,67 @@
                 </div>
                 <div data-role="draggable-handle" class="draggable-handle"></div>
             </div>
-            <div class="fieldset-wrapper-content in collapse" id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>-content">
+            <div class="fieldset-wrapper-content in collapse"
+                 id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>-content">
                 <fieldset class="fieldset">
                     <fieldset class="fieldset-alt">
                         <div class="field field-option-title required">
-                            <label class="label" for="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_title">
+                            <label class="label" for="id_<?= $block->escapeHtmlAttr($block->getFieldName())
+                            ?>_<%- data.index %>_title">
                                 <?= $block->escapeHtml(__('Option Title')) ?>
                             </label>
                             <div class="control">
-                                <?php if ($block->isDefaultStore()) : ?>
+                                <?php if ($block->isDefaultStore()): ?>
                                 <input class="input-text required-entry"
                                        type="text"
-                                       name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.index %>][title]"
-                                       id="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_title"
+                                       name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>[<%- data.index %>][title]"
+                                       id="id_<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>_<%- data.index %>_title"
                                        value="<%- data.title %>"
                                        data-original-value="<%- data.title %>" />
-                                <?php else : ?>
+                                <?php else: ?>
                                 <input class="input-text required-entry"
                                        type="text"
-                                       name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.index %>][default_title]"
-                                       id="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_default_title"
+                                       name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>[<%- data.index %>][default_title]"
+                                       id="id_<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>_<%- data.index %>_default_title"
                                        value="<%- data.default_title %>"
                                        data-original-value="<%- data.default_title %>" />
                                 <?php endif; ?>
                                 <input type="hidden"
                                        id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_id_<%- data.index %>"
-                                       name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.index %>][option_id]"
+                                       name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>[<%- data.index %>][option_id]"
                                        value="<%- data.option_id %>" />
                                 <input type="hidden"
-                                       name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.index %>][delete]"
+                                       name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>[<%- data.index %>][delete]"
                                        value=""
                                        data-state="deleted" />
                             </div>
                         </div>
-                        <?php if (!$block->isDefaultStore()) : ?>
+                        <?php if (!$block->isDefaultStore()): ?>
                         <div class="field field-option-store-view required">
-                            <label class="label" for="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_title_store">
+                            <label class="label" for="id_<?= $block->escapeHtmlAttr($block->getFieldName())
+                            ?>_<%- data.index %>_title_store">
                                 <?= $block->escapeHtml(__('Store View Title')) ?>
                             </label>
                             <div class="control">
                                 <input class="input-text required-entry"
                                        type="text"
-                                       name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.index %>][title]"
-                                       id="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_title_store"
+                                       name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>[<%- data.index %>][title]"
+                                       id="id_<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>_<%- data.index %>_title_store"
                                        value="<%- data.title %>" />
                             </div>
                         </div>
                         <?php endif; ?>
                         <div class="field field-option-input-type required">
-                            <label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId() . '_<%- data.index %>_type') ?>">
+                            <label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId() .
+                                '_<%- data.index %>_type') ?>">
                                 <?= $block->escapeHtml(__('Input Type')) ?>
                             </label>
                             <div class="control">
@@ -82,9 +97,13 @@
                                 <label for="field-option-req">
                                     <?= $block->escapeHtml(__('Required')) ?>
                                 </label>
-                                <span style="display:none"><?= $block->getRequireSelectHtml() ?></span>
+                                <span><?= $block->getRequireSelectHtml() ?></span>
                             </div>
                         </div>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                            'display:none',
+                            'div.field.field-option-req span'
+                        ) ?>
                         <div class="field field-option-position no-display">
                             <label class="label" for="field-option-position">
                                 <?= $block->escapeHtml(__('Position')) ?>
@@ -92,7 +111,8 @@
                             <div class="control">
                                 <input class="input-text validate-zero-or-greater"
                                        type="text"
-                                       name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.index %>][position]"
+                                       name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                                        ?>[<%- data.index %>][position]"
                                        value="<%- data.position %>"
                                        id="field-option-position" />
                             </div>
@@ -106,13 +126,16 @@
                 </fieldset>
             </div>
         </div>
-        <div id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_search_<%- data.index %>" class="selection-search"></div>
+        <div id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_search_<%- data.index %>"
+             class="selection-search">
+        </div>
     </div>
 </script>
 
 <?= $block->getSelectionHtml() ?>
 
-<script>
+<?php $helper = $block->getData('jsonHelper');
+$scriptString = <<<script
 require([
     'jquery',
     'mage/template',
@@ -140,7 +163,7 @@ function changeInputType(oldObject, oType) {
 
 Bundle.Option = Class.create();
 Bundle.Option.prototype = {
-    idLabel : '<?= $block->escapeJs($block->getFieldId()) ?>',
+    idLabel : '{$block->escapeJs($block->getFieldId())}',
     templateText : '',
     itemsCount : 0,
     initialize : function(template) {
@@ -149,7 +172,9 @@ Bundle.Option.prototype = {
 
     add : function(data) {
         if (!data) {
-            data = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode(['default_title' => __('New Option')]) ?>;
+script;
+$scriptString .= 'data = ' . $helper->jsonEncode(['default_title' => __('New Option')]) . ';';
+$scriptString .= <<<script
         } else {
             data.title = data.title.replace(/</g, "<");
             data.title = data.title.replace(/"/g, """);
@@ -278,19 +303,21 @@ Bundle.Option.prototype = {
 
 var optionIndex = 0;
 bOption = new Bundle.Option(optionTemplate);
-<?php
+script;
+
 foreach ($block->getOptions() as $_option) {
     /** @var $_option \Magento\Bundle\Model\Option */
-    /* @noEscape */ echo 'optionIndex = bOption.add(', $_option->toJson(), ');', PHP_EOL;
+    $scriptString .= /* @noEscape */ 'optionIndex = bOption.add('. $_option->toJson() . ');' . PHP_EOL;
     if ($_option->getSelections()) {
         foreach ($_option->getSelections() as $_selection) {
             /** @var $_selection \Magento\Catalog\Model\Product */
             $_selection->setName($block->escapeHtml($_selection->getName()));
-            /* @noEscape */ echo 'bSelection.addRow(optionIndex,', $_selection->toJson(), ');', PHP_EOL;
+            $scriptString .= /* @noEscape */ 'bSelection.addRow(optionIndex,' . $_selection->toJson() . ');' . PHP_EOL;
         }
     }
 }
 ?>
+$scriptString .= <<<script
 function togglePriceType() {
     bOption['priceType' + ($('price_type').value == '1' ? 'Fixed' : 'Dynamic')]();
 }
@@ -304,7 +331,10 @@ jQuery(window).on('load', function() {
 });
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+
 <script type="text/x-magento-init">
     {
         "*": {
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml
index 0f1167f3d3eaa..4ada5496ab5a7 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Selection */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <script id="bundle-option-selection-box-template" type="text/x-magento-template">
     <table class="admin__control-table">
@@ -14,15 +15,16 @@
                 <th class="col-default"><?= $block->escapeHtml(__('Default')) ?></th>
                 <th class="col-name"><?= $block->escapeHtml(__('Name')) ?></th>
                 <th class="col-sku"><?= $block->escapeHtml(__('SKU')) ?></th>
-            <?php if ($block->getCanReadPrice() !== false) : ?>
+            <?php if ($block->getCanReadPrice() !== false): ?>
                 <th class="col-price price-type-box"><?= $block->escapeHtml(__('Price')) ?></th>
                 <th class="col-price price-type-box"><?= $block->escapeHtml(__('Price Type')) ?></th>
             <?php endif; ?>
                 <th class="col-qty"><?= $block->escapeHtml(__('Default Quantity')) ?></th>
                 <th class="col-uqty qty-box"><?= $block->escapeHtml(__('User Defined')) ?></th>
-                <th class="col-order type-order" style="display:none"><?= $block->escapeHtml(__('Position')) ?></th>
+                <th class="col-order type-order"><?= $block->escapeHtml(__('Position')) ?></th>
                 <th class="col-actions"></th>
             </tr>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'th.col-order.type-order') ?>
         </thead>
         <tbody>
         </tbody>
@@ -33,16 +35,20 @@
         <span data-role="draggable-handle" class="draggable-handle"></span>
         <input type="hidden"
                id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_id<%- data.index %>"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][selection_id]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][selection_id]"
                value="<%- data.selection_id %>"/>
         <input type="hidden"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][option_id]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][option_id]"
                value="<%- data.option_id %>"/>
         <input type="hidden"
                class="product"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][product_id]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][product_id]"
                value="<%- data.product_id %>"/>
-        <input type="hidden" name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][delete]"
+        <input type="hidden" name="<?= $block->escapeHtmlAttr($block->getFieldName())
+        ?>[<%- data.parentIndex %>][<%- data.index %>][delete]"
                value=""
                class="delete"/>
     </td>
@@ -50,19 +56,21 @@
         <input onclick="bSelection.checkGroup(event)"
                type="<%- data.option_type %>"
                class="default"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][is_default]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][is_default]"
                value="1" <%- data.checked %> />
     </td>
     <td class="col-name"><%- data.name %></td>
     <td class="col-sku"><%- data.sku %></td>
-<?php if ($block->getCanReadPrice() !== false) : ?>
+<?php if ($block->getCanReadPrice() !== false): ?>
     <td class="col-price price-type-box">
         <input id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>_price_value"
                class="input-text required-entry validate-zero-or-greater"
                type="text"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_value]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_value]"
                value="<%- data.selection_price_value %>"
-            <?php if ($block->getCanEditPrice() === false) : ?>
+            <?php if ($block->getCanEditPrice() === false): ?>
                disabled="disabled"
             <?php endif; ?>/>
     </td>
@@ -70,42 +78,51 @@
         <?= $block->getPriceTypeSelectHtml() ?>
         <div><?= $block->getCheckboxScopeHtml() ?></div>
     </td>
-<?php else : ?>
+<?php else: ?>
     <input type="hidden"
            id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>_price_value"
-           name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_value]" value="0" />
+           name="<?= $block->escapeHtmlAttr($block->getFieldName())
+            ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_value]" value="0" />
     <input type="hidden"
            id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>_price_type"
-           name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_type]" value="0" />
-    <?php if ($block->isUsedWebsitePrice()) : ?>
+           name="<?= $block->escapeHtmlAttr($block->getFieldName())
+            ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_type]" value="0" />
+    <?php if ($block->isUsedWebsitePrice()): ?>
     <input type="hidden"
            id="<?= $block->escapeHtmlAttr($block->getFieldId()) ?>_<%- data.index %>_price_scope"
-           name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][default_price_scope]" value="1" />
+           name="<?= $block->escapeHtmlAttr($block->getFieldName())
+            ?>[<%- data.parentIndex %>][<%- data.index %>][default_price_scope]" value="1" />
     <?php endif; ?>
 <?php endif; ?>
     <td class="col-qty">
         <input class="input-text required-entry validate-greater-zero-based-on-option validate-zero-or-greater"
                type="text"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][selection_qty]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][selection_qty]"
                value="<%- data.selection_qty %>" />
     </td>
     <td class="col-uqty qty-box">
         <input type="checkbox" class="is-user-defined-qty" checked="checked" />
-        <span style="display:none"><?= $block->getQtyTypeSelectHtml() ?></span>
+        <span><?= $block->getQtyTypeSelectHtml() ?></span>
     </td>
-    <td class="col-order type-order" style="display:none">
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'td.col-uqty.qty-box span') ?>
+    <td class="col-order type-order"">
         <input class="input-text required-entry validate-zero-or-greater"
                type="text"
-               name="<?= $block->escapeHtmlAttr($block->getFieldName()) ?>[<%- data.parentIndex %>][<%- data.index %>][position]"
+               name="<?= $block->escapeHtmlAttr($block->getFieldName())
+                ?>[<%- data.parentIndex %>][<%- data.index %>][position]"
                value="<%- data.position %>" />
     </td>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'td.col-order.type-order') ?>
     <td class="col-actions">
         <span title="Delete Row">
             <?= $block->getSelectionDeleteButtonHtml() ?>
         </span>
     </td>
 </script>
-<script>
+
+<?php $isUsedWebsitePrice = (int)$block->isUsedWebsitePrice();
+$scriptString = <<<script
 require([
     'jquery',
     'mage/template',
@@ -116,8 +133,8 @@ var bundleTemplateBox = jQuery('#bundle-option-selection-box-template').html(),
 
 Bundle.Selection = Class.create();
 Bundle.Selection.prototype = {
-    idLabel : '<?= $block->escapeJs($block->getFieldId()) ?>',
-    scopePrice : <?= (int)$block->isUsedWebsitePrice() ?>,
+    idLabel : '{$block->escapeJs($block->getFieldId())}',
+    scopePrice : {$isUsedWebsitePrice},
     templateBox : '',
     templateRow : '',
     itemsCount : 0,
@@ -125,12 +142,14 @@ Bundle.Selection.prototype = {
     gridSelection: new Hash(),
     gridRemoval: new Hash(),
     gridSelectedProductSkus: [],
-    selectionSearchUrl: '<?= $block->escapeUrl($block->getSelectionSearchUrl()) ?>',
+    selectionSearchUrl: '{$block->escapeJs($block->getSelectionSearchUrl())}',
 
     initialize : function() {
-        this.templateBox = '<div class="tier form-list" id="' + this.idLabel + '_box_<%- data.parentIndex %>">' + bundleTemplateBox + '</div>';
+        this.templateBox = '<div class="tier form-list"
+         id="' + this.idLabel + '_box_<%- data.parentIndex %>">' + bundleTemplateBox + '</div>';
 
-        this.templateRow = '<tr class="selection" id="' + this.idLabel + '_row_<%- data.index %>">' + bundleTemplateRow + '</tr>';
+        this.templateRow = '<tr class="selection"
+         id="' + this.idLabel + '_row_<%- data.index %>">' + bundleTemplateRow + '</tr>';
     },
 
     gridUpdateCallback: function () {
@@ -197,7 +216,7 @@ Bundle.Selection.prototype = {
         var escapedHTML = this.template({
             data: data
         }).replace(/<(\/?)script/g, '<$1script');
-        
+
         Element.insert(tbody[0], {bottom: escapedHTML});
 
         if (data.selection_price_type) {
@@ -366,4 +385,6 @@ Bundle.Selection.prototype = {
 bSelection = new Bundle.Selection();
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
index c480d9b126da6..f42e1eb070479 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
@@ -10,28 +10,32 @@
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
+<?php $helper = $block->getData('jsonHelper') ?>
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php $block->setPriceDataObject($_item) ?>
     <?php $attributes = $block->getSelectionAttributes($_item) ?>
-    <?php if ($_item->getOrderItem()->getParentItem()) : ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+    <?php if ($_item->getOrderItem()->getParentItem()): ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td> </td>
             <td> </td>
             <td> </td>
@@ -45,160 +49,165 @@
         <?php endif; ?>
     <?php endif; ?>
     <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
-        <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
+        <?php if (!$_item->getOrderItem()->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
         </td>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product"><div class="option-value"><?= $block->getValueHtml($_item) ?></div></td>
         <?php endif; ?>
         <td class="col-price">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'price') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-ordered-qty">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <table class="qty-table">
                     <tr>
                         <th><?= $block->escapeHtml(__('Ordered')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyOrdered() * 1 ?></td>
                     </tr>
-                    <?php if ((float) $_item->getOrderItem()->getQtyInvoiced()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyInvoiced()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Invoiced')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyInvoiced() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getOrderItem()->getQtyShipped() && $block->isShipmentSeparately($_item)) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyShipped() &&
+                        $block->isShipmentSeparately($_item)): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Shipped')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyShipped() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getOrderItem()->getQtyRefunded()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyRefunded()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Refunded')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyRefunded() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getOrderItem()->getQtyCanceled()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyCanceled()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Canceled')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyCanceled() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
                 </table>
-            <?php elseif ($block->isShipmentSeparately($_item)) : ?>
+            <?php elseif ($block->isShipmentSeparately($_item)): ?>
                 <table class="qty-table">
                     <tr>
                         <th><?= $block->escapeHtml(__('Ordered')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyOrdered() * 1 ?></td>
                     </tr>
-                    <?php if ((float) $_item->getOrderItem()->getQtyShipped()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyShipped()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Shipped')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyShipped() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
                 </table>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
-        <?php if ($block->canParentReturnToStock($_item)) : ?>
+        <?php if ($block->canParentReturnToStock($_item)): ?>
         <td class="col-return-to-stock">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
-                <?php if ($block->canReturnItemToStock($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
+                <?php if ($block->canReturnItemToStock($_item)): ?>
                     <input type="checkbox"
                            class="admin__control-checkbox"
-                           name="creditmemo[items][<?= $block->escapeHtmlAttr($_item->getOrderItemId()) ?>][back_to_stock]"
-                           value="1"<?php if ($_item->getBackToStock()) :?> checked="checked"<?php endif;?> />
+                           name="creditmemo[items][<?= $block->escapeHtmlAttr($_item->getOrderItemId())
+                            ?>][back_to_stock]"
+                           value="1"<?php if ($_item->getBackToStock()):?> checked="checked"<?php endif;?> />
                     <label class="admin__field-label"></label>
                 <?php endif; ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <?php endif; ?>
         <td class="col-refund col-qty">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
-                <?php if ($block->canEditQty()) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
+                <?php if ($block->canEditQty()): ?>
                     <input type="text"
                            class="input-text admin__control-text qty-input"
                            name="creditmemo[items][<?= $block->escapeHtmlAttr($_item->getOrderItemId()) ?>][qty]"
                            value="<?= (float)$_item->getQty() * 1 ?>" />
-                <?php else : ?>
+                <?php else: ?>
                     <?= (float)$_item->getQty() * 1 ?>
                 <?php endif; ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-subtotal">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'subtotal') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-tax-amount">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('tax_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-discont">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-total last">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'total') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr class="border">
         <td class="col-product">
-            <?php if ($block->getOrderOptions($_item->getOrderItem())) : ?>
+            <?php if ($block->getOrderOptions($_item->getOrderItem())): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option) : ?>
+                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?></dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid())
+                            ?>"><?= $block->escapeHtml($_remainder) ?></span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
                 <?php endforeach; ?>
                 </dl>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
             <?= $block->escapeHtml($_item->getDescription()) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
index 0d54e1528dfe9..49df0468ec992 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
@@ -10,28 +10,32 @@
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
+<?php $helper = $block->getData('jsonHelper') ?>
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php $block->setPriceDataObject($_item) ?>
     <?php $attributes = $block->getSelectionAttributes($_item) ?>
-    <?php if ($_item->getOrderItem()->getParentItem()) : ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+    <?php if ($_item->getOrderItem()->getParentItem()): ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td> </td>
             <td> </td>
             <td> </td>
@@ -43,83 +47,86 @@
         <?php endif; ?>
     <?php endif; ?>
     <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
-        <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
+        <?php if (!$_item->getOrderItem()->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
         </td>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product"><div class="option-value"><?= $block->getValueHtml($_item) ?></div></td>
         <?php endif; ?>
         <td class="col-price">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'price') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-qty">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= (float)$_item->getQty() * 1 ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-subtotal">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'subtotal') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-tax">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('tax_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-discount">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-total last">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'total') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr class="border">
         <td class="col-product">
-            <?php if ($block->getOrderOptions()) : ?>
+            <?php if ($block->getOrderOptions()): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions() as $option) : ?>
+                <?php foreach ($block->getOrderOptions() as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?></dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid())
+                            ?>"><?= $block->escapeHtml($_remainder) ?></span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
index a7d49b4b3530a..2bcede5899e56 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
@@ -10,37 +10,41 @@
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
+<?php $helper = $block->getData('jsonHelper') ?>
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php
     $shipTogether = ($_item->getOrderItem()->getProductType() == \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) ?
         !$_item->getOrderItem()->isShipSeparately() : !$_item->getOrderItem()->getParentItem()->isShipSeparately()
     ?>
     <?php $block->setPriceDataObject($_item) ?>
-    <?php if ($_item->getOrderItem()->getParentItem()) : ?>
+    <?php if ($_item->getOrderItem()->getParentItem()): ?>
         <?php
         if ($shipTogether) {
             continue;
         }
         ?>
         <?php $attributes = $block->getSelectionAttributes($_item) ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td> </td>
             <td> </td>
             <td> </td>
@@ -53,148 +57,151 @@
         <?php endif; ?>
     <?php endif; ?>
     <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
-        <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
+        <?php if (!$_item->getOrderItem()->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
         </td>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product">
             <div class="option-value"><?= $block->getValueHtml($_item) ?></div>
         </td>
         <?php endif; ?>
         <td class="col-price">
-            <?php if ($block->canShowPriceInfo($_item) || $shipTogether) : ?>
+            <?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
                 <?= $block->getColumnHtml($_item, 'price') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-qty">
-            <?php if ($block->canShowPriceInfo($_item) || $shipTogether) : ?>
+            <?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
                 <table class="qty-table">
                     <tr>
                         <th><?= $block->escapeHtml(__('Ordered')) ?></th>
                         <td><span><?= (float)$_item->getOrderItem()->getQtyOrdered() * 1 ?></span></td>
                     </tr>
-                    <?php if ((float) $_item->getOrderItem()->getQtyInvoiced()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyInvoiced()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Invoiced')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyInvoiced() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getOrderItem()->getQtyShipped() && $block->isShipmentSeparately($_item)) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyShipped() &&
+                        $block->isShipmentSeparately($_item)): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Shipped')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyShipped() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getOrderItem()->getQtyRefunded()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyRefunded()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Refunded')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyRefunded() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getOrderItem()->getQtyCanceled()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyCanceled()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Canceled')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyCanceled() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
                 </table>
-            <?php elseif ($block->isShipmentSeparately($_item)) : ?>
+            <?php elseif ($block->isShipmentSeparately($_item)): ?>
                 <table class="qty-table">
                     <tr>
                         <th><?= $block->escapeHtml(__('Ordered')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyOrdered() * 1 ?></td>
                     </tr>
-                    <?php if ((float) $_item->getOrderItem()->getQtyShipped()) : ?>
+                    <?php if ((float) $_item->getOrderItem()->getQtyShipped()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Shipped')) ?></th>
                         <td><?= (float)$_item->getOrderItem()->getQtyShipped() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
                 </table>
-            <?php else : ?>
+            <?php else: ?>
                  
                         <?php endif; ?>
         </td>
         <td class="col-qty-invoice">
-            <?php if ($block->canShowPriceInfo($_item) || $shipTogether) : ?>
-                <?php if ($block->canEditQty()) : ?>
+            <?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
+                <?php if ($block->canEditQty()): ?>
                     <input type="text"
                            class="input-text admin__control-text qty-input"
                            name="invoice[items][<?= $block->escapeHtmlAttr($_item->getOrderItemId()) ?>]"
                            value="<?= (float)$_item->getQty() * 1 ?>" />
-                <?php else : ?>
+                <?php else: ?>
                     <?= (float)$_item->getQty() * 1 ?>
                 <?php endif; ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-subtotal">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'subtotal') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-tax">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('tax_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-discount">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-total last">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'total') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr class="border">
         <td class="col-product">
-            <?php if ($block->getOrderOptions($_item->getOrderItem())) : ?>
+            <?php if ($block->getOrderOptions($_item->getOrderItem())): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option) : ?>
+                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?></dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid())
+                            ?>"><?= $block->escapeHtml($_remainder) ?></span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
-
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
                 <?php endforeach; ?>
                 </dl>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
             <?= $block->escapeHtml($_item->getDescription()) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
index e29bb5dbc9479..b783003958b59 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
@@ -10,28 +10,32 @@
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
+<?php $helper = $block->getData('jsonHelper') ?>
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php $block->setPriceDataObject($_item) ?>
-    <?php if ($_item->getOrderItem()->getParentItem()) : ?>
+    <?php if ($_item->getOrderItem()->getParentItem()): ?>
         <?php $attributes = $block->getSelectionAttributes($_item) ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td> </td>
             <td> </td>
             <td> </td>
@@ -43,84 +47,87 @@
         <?php endif; ?>
     <?php endif; ?>
     <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
-        <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
+        <?php if (!$_item->getOrderItem()->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product">
             <div class="option-value"><?= $block->getValueHtml($_item) ?></div>
         </td>
         <?php endif; ?>
         <td class="col-price">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'price') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-qty">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= (float)$_item->getQty() * 1 ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-subtotal">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'subtotal') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-tax">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('tax_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-discount">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-total last">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'total') ?>
-                <?php else : ?>
+                <?php else: ?>
                   
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr class="border">
         <td class="col-product">
-            <?php if ($block->getOrderOptions()) : ?>
+            <?php if ($block->getOrderOptions()): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions() as $option) : ?>
+                <?php foreach ($block->getOrderOptions() as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?></dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid())
+                            ?>"><?= $block->escapeHtml($_remainder) ?></span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
index 233e57a003397..3f0987f129f21 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
@@ -10,28 +10,32 @@
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items\Renderer
  */
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_item = $block->getItem() ?>
 <?php $items = array_merge([$_item], $_item->getChildrenItems()); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
+<?php $helper = $block->getData('jsonHelper') ?>
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription() || $block->canDisplayGiftmessage()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription() || $block->canDisplayGiftmessage()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php $block->setPriceDataObject($_item) ?>
     <?php $attributes = $block->getSelectionAttributes($_item) ?>
-    <?php if ($_item->getParentItem()) : ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+    <?php if ($_item->getParentItem()): ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td> </td>
             <td> </td>
             <td> </td>
@@ -46,156 +50,159 @@
         <?php endif; ?>
     <?php endif; ?>
     <tr<?= (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
-        <?php if (!$_item->getParentItem()) : ?>
+        <?php if (!$_item->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title" id="order_item_<?= $block->escapeHtmlAttr($_item->getId()) ?>_title">
                 <?= $block->escapeHtml($_item->getName()) ?>
             </div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
         </td>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product">
             <div class="option-value"><?= $block->getValueHtml($_item) ?></div>
         </td>
         <?php endif; ?>
         <td class="col-status">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->escapeHtml($_item->getStatus()) ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-price-original">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('original_price') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-price">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'price') ?>
-            <?php else : ?>
+            <?php else: ?>
                      
             <?php endif; ?>
         </td>
         <td class="col-ordered-qty">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <table class="qty-table">
                     <tr>
                         <th><?= $block->escapeHtml(__('Ordered')) ?></th>
                         <td><?= (float)$_item->getQtyOrdered() * 1 ?></td>
                     </tr>
-                    <?php if ((float) $_item->getQtyInvoiced()) : ?>
+                    <?php if ((float) $_item->getQtyInvoiced()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Invoiced')) ?></th>
                         <td><?= (float)$_item->getQtyInvoiced() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getQtyShipped() && $block->isShipmentSeparately($_item)) : ?>
+                    <?php if ((float) $_item->getQtyShipped() && $block->isShipmentSeparately($_item)): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Shipped')) ?></th>
                         <td><?= (float)$_item->getQtyShipped() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getQtyRefunded()) : ?>
+                    <?php if ((float) $_item->getQtyRefunded()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Refunded')) ?></th>
                         <td><?= (float)$_item->getQtyRefunded() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
-                    <?php if ((float) $_item->getQtyCanceled()) : ?>
+                    <?php if ((float) $_item->getQtyCanceled()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Canceled')) ?></th>
                         <td><?= (float)$_item->getQtyCanceled() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
                 </table>
-            <?php elseif ($block->isShipmentSeparately($_item)) : ?>
+            <?php elseif ($block->isShipmentSeparately($_item)): ?>
                 <table class="qty-table">
                     <tr>
                         <th><?= $block->escapeHtml(__('Ordered')) ?></th>
                         <td><?= (float)$_item->getQtyOrdered() * 1 ?></td>
                     </tr>
-                    <?php if ((float) $_item->getQtyShipped()) : ?>
+                    <?php if ((float) $_item->getQtyShipped()): ?>
                     <tr>
                         <th><?= $block->escapeHtml(__('Shipped')) ?></th>
                         <td><?= (float)$_item->getQtyShipped() * 1 ?></td>
                     </tr>
                     <?php endif; ?>
                 </table>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-subtotal">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'subtotal') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-tax-amount">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('tax_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-tax-percent">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayTaxPercent($_item) ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-discont">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= /* @noEscape */ $block->displayPriceAttribute('discount_amount') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-total last">
-            <?php if ($block->canShowPriceInfo($_item)) : ?>
+            <?php if ($block->canShowPriceInfo($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'total') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr<?php if (!$block->canDisplayGiftmessage()) { echo ' class="border"'; } ?>>
         <td class="col-product">
-            <?php if ($block->getOrderOptions()) : ?>
+            <?php if ($block->getOrderOptions()): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions() as $option) : ?>
+                <?php foreach ($block->getOrderOptions() as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?>:</dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid())
+                            ?>"><?= $block->escapeHtml($_remainder) ?></span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
                 <?php endforeach; ?>
                 </dl>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
             <?= $block->escapeHtml($_item->getDescription()) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
index 2e52ed906626b..d40eaa83e76ba 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
@@ -6,8 +6,12 @@
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 ?>
 
-<?php /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */ ?>
+<?php
+/** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
 
+<?php $helper = $block->getData('jsonHelper'); ?>
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
@@ -15,19 +19,21 @@
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php $block->setPriceDataObject($_item) ?>
-    <?php if ($_item->getOrderItem()->getParentItem()) : ?>
+    <?php if ($_item->getOrderItem()->getParentItem()): ?>
         <?php $attributes = $block->getSelectionAttributes($_item) ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td class="col-product"> </td>
             <td class="col-qty last"> </td>
         </tr>
@@ -35,64 +41,68 @@
         <?php endif; ?>
     <?php endif; ?>
     <tr class="<?= (++$_index == $_count && !$_showlastRow) ? 'border' : '' ?>">
-        <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
+        <?php if (!$_item->getOrderItem()->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
         </td>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product"><div class="option-value"><?= $block->getValueHtml($_item) ?></div></td>
         <?php endif; ?>
         <td class="col-ordered-qty">
-            <?php if ($block->isShipmentSeparately($_item)) : ?>
+            <?php if ($block->isShipmentSeparately($_item)): ?>
                 <?= $block->getColumnHtml($_item, 'qty') ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
         <td class="col-qty last">
-            <?php if ($block->isShipmentSeparately($_item)) : ?>
+            <?php if ($block->isShipmentSeparately($_item)): ?>
                 <input type="text"
                        class="input-text admin__control-text"
                        name="shipment[items][<?= $block->escapeHtmlAttr($_item->getOrderItemId()) ?>]"
                        value="<?= (float)$_item->getQty() * 1 ?>" />
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr class="border">
         <td class="col-product">
-            <?php if ($block->getOrderOptions($_item->getOrderItem())) : ?>
+            <?php if ($block->getOrderOptions($_item->getOrderItem())): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option) : ?>
+                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?></dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>">
+                                <?= $block->escapeHtml($_remainder) ?>
+                            </span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
                 <?php endforeach; ?>
                 </dl>
-                        <?php else : ?>
+                        <?php else: ?>
                  
                         <?php endif; ?>
             <?= $block->escapeHtml($_item->getDescription()) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
index 521669700e10a..6f4a2888b13f7 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
@@ -5,83 +5,93 @@
  */
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 ?>
-<?php /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */ ?>
+<?php
+/** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
 
 <?php $_item = $block->getItem() ?>
 <?php $items = array_merge([$_item->getOrderItem()], $_item->getOrderItem()->getChildrenItems()) ?>
 <?php $shipItems = $block->getChildren($_item) ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
+<?php $helper = $block->getData('jsonHelper') ?>
 
 <?php $_prevOptionId = '' ?>
 
-<?php if ($block->getOrderOptions() || $_item->getDescription()) : ?>
+<?php if ($block->getOrderOptions() || $_item->getDescription()): ?>
     <?php $_showlastRow = true ?>
-<?php else : ?>
+<?php else: ?>
     <?php $_showlastRow = false ?>
 <?php endif; ?>
 
-<?php foreach ($items as $_item) : ?>
+<?php foreach ($items as $_item): ?>
     <?php $block->setPriceDataObject($_item) ?>
-    <?php if ($_item->getParentItem()) : ?>
+    <?php if ($_item->getParentItem()): ?>
         <?php $attributes = $block->getSelectionAttributes($_item) ?>
-        <?php if ($_prevOptionId != $attributes['option_id']) : ?>
+        <?php if ($_prevOptionId != $attributes['option_id']): ?>
         <tr>
-            <td class="col-product"><div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div></td>
+            <td class="col-product">
+                <div class="option-label"><?= $block->escapeHtml($attributes['option_label']) ?></div>
+            </td>
             <td class="col-qty last"> </td>
         </tr>
             <?php $_prevOptionId = $attributes['option_id'] ?>
         <?php endif; ?>
     <?php endif; ?>
     <tr<?= (++$_index == $_count && !$_showlastRow) ? ' class="border"' : '' ?>>
-        <?php if (!$_item->getParentItem()) : ?>
+        <?php if (!$_item->getParentItem()): ?>
         <td class="col-product">
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
             </div>
         </td>
-        <?php else : ?>
+        <?php else: ?>
         <td class="col-product"><div class="option-value"><?= $block->getValueHtml($_item) ?></div></td>
         <?php endif; ?>
         <td class="col-qty last">
-            <?php if (($block->isShipmentSeparately() && $_item->getParentItem()) || (!$block->isShipmentSeparately() && !$_item->getParentItem())) : ?>
-                <?php if (isset($shipItems[$_item->getId()])) : ?>
+            <?php if (($block->isShipmentSeparately() && $_item->getParentItem()) ||
+                (!$block->isShipmentSeparately() && !$_item->getParentItem())): ?>
+                <?php if (isset($shipItems[$_item->getId()])): ?>
                     <?= (float)$shipItems[$_item->getId()]->getQty() * 1 ?>
-                <?php elseif ($_item->getIsVirtual()) : ?>
+                <?php elseif ($_item->getIsVirtual()): ?>
                     <?= $block->escapeHtml(__('N/A')) ?>
-                <?php else : ?>
+                <?php else: ?>
                     0
                 <?php endif; ?>
-            <?php else : ?>
+            <?php else: ?>
                  
             <?php endif; ?>
         </td>
     </tr>
 <?php endforeach; ?>
-<?php if ($_showlastRow) : ?>
+<?php if ($_showlastRow): ?>
     <tr class="border">
         <td class="col-product">
-            <?php if ($block->getOrderOptions($_item->getOrderItem())) : ?>
+            <?php if ($block->getOrderOptions($_item->getOrderItem())): ?>
                 <dl class="item-options">
-                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option) : ?>
+                <?php foreach ($block->getOrderOptions($_item->getOrderItem()) as $option): ?>
                     <dt><?= $block->escapeHtml($option['label']) ?></dt>
                     <dd>
-                    <?php if (isset($option['custom_view']) && $option['custom_view']) : ?>
+                    <?php if (isset($option['custom_view']) && $option['custom_view']): ?>
                         <?= $block->escapeHtml($option['value']) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?= $block->escapeHtml($block->truncateString($option['value'], 55, '', $_remainder)) ?>
-                        <?php if ($_remainder) :?>
-                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                            <script>
+                        <?php if ($_remainder):?>
+                            ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid())
+                            ?>"><?= $block->escapeHtml($_remainder) ?></span>
+                            <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                            $scriptString = <<<script
                                 require(['prototype'], function(){
-                                    <?php $escapedId = $block->escapeJs($_id) ?>
-                                    $('<?= /* @noEscape */ $escapedId ?>').hide();
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                                    $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                                    $('{$escapedId}').hide();
+                                    $('{$escapedId}').up().observe('mouseover', function(){\$('{$escapedId}').show();});
+                                    $('{$escapedId}').up().observe('mouseout',  function(){\$('{$escapedId}').hide();});
                                 });
-                            </script>
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif;?>
                     <?php endif;?>
                     </dd>
diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php
index 59f5cc1b53b26..e0bfdb18cfe2c 100644
--- a/app/code/Magento/Catalog/Block/Product/ListProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php
@@ -23,6 +23,8 @@
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Pricing\Render;
 use Magento\Framework\Url\Helper\Data;
+use Magento\Framework\App\ObjectManager;
+use Magento\Catalog\Helper\Output;
 
 /**
  * Product list
@@ -88,6 +90,7 @@ public function __construct(
         $this->_postDataHelper = $postDataHelper;
         $this->categoryRepository = $categoryRepository;
         $this->urlHelper = $urlHelper;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Output::class);
         parent::__construct(
             $context,
             $data
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml
index e0443d5a55d97..aab181a8f7321 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/gallery.phtml
@@ -5,28 +5,32 @@
  */
 
 /** @var \Magento\Catalog\Block\Product\Gallery $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $_width = $block->getImageWidth(); ?>
-<div class="product-image-popup" style="width:<?= /* @noEscape */ $_width ?>px;">
-    <div class="buttons-set"><a href="#" class="button" role="close-window"><span><?= $block->escapeHtml(__('Close Window')) ?></span></a></div>
-    <?php if ($block->getPreviousImageUrl() || $block->getNextImageUrl()) :?>
+<div class="product-image-popup">
+    <div class="buttons-set"><a href="#" class="button" role="close-window">
+            <span><?= $block->escapeHtml(__('Close Window')) ?></span></a></div>
+    <?php if ($block->getPreviousImageUrl() || $block->getNextImageUrl()):?>
         <div class="nav">
-            <?php if ($_prevUrl = $block->getPreviousImageUrl()) :?>
-                <a href="<?= $block->escapeUrl($_prevUrl) ?>" class="prev">« <?= $block->escapeHtml(__('Prev')) ?></a>
+            <?php if ($_prevUrl = $block->getPreviousImageUrl()):?>
+                <a href="<?= $block->escapeUrl($_prevUrl) ?>"
+                   class="prev">« <?= $block->escapeHtml(__('Prev')) ?></a>
             <?php endif; ?>
-            <?php if ($_nextUrl = $block->getNextImageUrl()) :?>
-                <a href="<?= $block->escapeUrl($_nextUrl) ?>" class="next"><?= $block->escapeHtml(__('Next')) ?> »</a>
+            <?php if ($_nextUrl = $block->getNextImageUrl()):?>
+                <a href="<?= $block->escapeUrl($_nextUrl) ?>"
+                   class="next"><?= $block->escapeHtml(__('Next')) ?> »</a>
             <?php endif; ?>
         </div>
     <?php endif; ?>
-    <?php if ($_imageTitle = $block->escapeHtml($block->getCurrentImage()->getLabel())) :?>
+    <?php if ($_imageTitle = $block->escapeHtml($block->getCurrentImage()->getLabel())):?>
         <h1 class="image-label"><?= /* @noEscape */ $_imageTitle ?></h1>
     <?php endif; ?>
     <?php
     $imageUrl = $block->getImageUrl();
     ?>
     <img src="<?= $block->escapeUrl($imageUrl) ?>"
-        <?php if ($_width) :?>
+        <?php if ($_width):?>
             width="<?= /* @noEscape */ $_width ?>"
         <?php endif; ?>
          alt="<?= $block->escapeHtmlAttr($block->getCurrentImage()->getLabel()) ?>"
@@ -34,15 +38,23 @@
          id="product-gallery-image"
          class="image"
          data-mage-init='{"catalogGallery":{}}'/>
-    <div class="buttons-set"><a href="#" class="button" role="close-window"><span><?= $block->escapeHtml(__('Close Window')) ?></span></a></div>
-    <?php if ($block->getPreviousImageUrl() || $block->getNextImageUrl()) :?>
+    <div class="buttons-set"><
+        a href="#" class="button" role="close-window"><span><?= $block->escapeHtml(__('Close Window')) ?></span></a>
+    </div>
+    <?php if ($block->getPreviousImageUrl() || $block->getNextImageUrl()):?>
         <div class="nav">
-            <?php if ($_prevUrl = $block->getPreviousImageUrl()) :?>
-                <a href="<?= $block->escapeUrl($_prevUrl) ?>" class="prev">« <?= $block->escapeHtml(__('Prev')) ?></a>
+            <?php if ($_prevUrl = $block->getPreviousImageUrl()):?>
+                <a href="<?= $block->escapeUrl($_prevUrl) ?>"
+                   class="prev">« <?= $block->escapeHtml(__('Prev')) ?></a>
             <?php endif; ?>
-            <?php if ($_nextUrl = $block->getNextImageUrl()) :?>
-                <a href="<?= $block->escapeUrl($_nextUrl) ?>" class="next"><?= $block->escapeHtml(__('Next')) ?> »</a>
+            <?php if ($_nextUrl = $block->getNextImageUrl()):?>
+                <a href="<?= $block->escapeUrl($_nextUrl) ?>"
+                   class="next"><?= $block->escapeHtml(__('Next')) ?> »</a>
             <?php endif; ?>
         </div>
     <?php endif; ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'width:' . /* @noEscape */ $_width . 'px;',
+    'div.product-image-popup'
+) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
index 554caf6026001..f088be85262e3 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
@@ -7,23 +7,23 @@ use Magento\Framework\App\Action\Action;
 
 ?>
 <?php
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-
 /**
  * Product list template
  *
  * @var $block \Magento\Catalog\Block\Product\ListProduct
  * @var \Magento\Framework\Escaper $escaper
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php
 $_productCollection = $block->getLoadedProductCollection();
-/** @var \Magento\Catalog\Helper\Output $_helper */
-$_helper = $this->helper(Magento\Catalog\Helper\Output::class);
+$_helper = $block->getData('jsonHelper');
 ?>
-<?php if (!$_productCollection->count()) :?>
-    <div class="message info empty"><div><?= $escaper->escapeHtml(__('We can\'t find products matching the selection.')) ?></div></div>
-<?php else :?>
+<?php if (!$_productCollection->count()):?>
+    <div class="message info empty">
+        <div><?= $escaper->escapeHtml(__('We can\'t find products matching the selection.')) ?></div>
+    </div>
+<?php else:?>
     <?= $block->getToolbarHtml() ?>
     <?= $block->getAdditionalHtml() ?>
     <?php
@@ -46,14 +46,16 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
     <div class="products wrapper <?= /* @noEscape */ $viewMode ?> products-<?= /* @noEscape */ $viewMode ?>">
         <ol class="products list items product-items">
             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
-            <?php foreach ($_productCollection as $_product) :?>
+            <?php foreach ($_productCollection as $_product):?>
             <li class="item product product-item">
-                <div class="product-item-info" data-container="product-<?= /* @noEscape */ $viewMode ?>">
+                <div class="product-item-info"
+                     id="product-item-info_<?= /* @noEscape */ $_product->getId() ?>"
+                     data-container="product-<?= /* @noEscape */ $viewMode ?>">
                     <?php
                     $productImage = $block->getImage($_product, $imageDisplayArea);
                     if ($pos != null) {
-                        $position = ' style="left:' . $productImage->getWidth() . 'px;'
-                            . 'top:' . $productImage->getHeight() . 'px;"';
+                        $position = 'left:' . $productImage->getWidth() . 'px;'
+                            . 'top:' . $productImage->getHeight() . 'px;';
                     }
                     ?>
                     <?php // Product Image ?>
@@ -69,19 +71,19 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
                         <strong class="product name product-item-name">
                             <a class="product-item-link"
                                href="<?= $escaper->escapeUrl($_product->getProductUrl()) ?>">
-                                <?= /* @noEscape */ $_helper->productAttribute($_product, $_product->getName(), 'name') ?>
+                                <?=/* @noEscape */ $_helper->productAttribute($_product, $_product->getName(), 'name')?>
                             </a>
                         </strong>
                         <?= $block->getReviewsSummaryHtml($_product, $templateType) ?>
                         <?= /* @noEscape */ $block->getProductPrice($_product) ?>
-                        <?php if ($_product->isAvailable()) :?>
+                        <?php if ($_product->isAvailable()):?>
                             <?= $block->getProductDetailsHtml($_product) ?>
                         <?php endif; ?>
 
                         <div class="product-item-inner">
-                            <div class="product actions product-item-actions"<?= strpos($pos, $viewMode . '-actions') ? $escaper->escapeHtmlAttr($position) : '' ?>>
-                                <div class="actions-primary"<?= strpos($pos, $viewMode . '-primary') ? $escaper->escapeHtmlAttr($position) : '' ?>>
-                                    <?php if ($_product->isSaleable()) :?>
+                            <div class="product actions product-item-actions">
+                                <div class="actions-primary">
+                                    <?php if ($_product->isSaleable()):?>
                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
                                         <form data-role="tocart-form"
                                               data-product-sku="<?= $escaper->escapeHtml($_product->getSku()) ?>"
@@ -90,8 +92,11 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
                                             <input type="hidden"
                                                    name="product"
                                                    value="<?= /* @noEscape */ $postParams['data']['product'] ?>">
-                                            <input type="hidden" name="<?= /* @noEscape */ Action::PARAM_NAME_URL_ENCODED ?>"
-                                                   value="<?= /* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED] ?>">
+                                            <input type="hidden"
+                                                   name="<?= /* @noEscape */ Action::PARAM_NAME_URL_ENCODED ?>"
+                                                   value="<?=
+                                                   /* @noEscape */ $postParams['data'][Action::PARAM_NAME_URL_ENCODED]
+                                                    ?>">
                                             <?= $block->getBlockHtml('formkey') ?>
                                             <button type="submit"
                                                     title="<?= $escaper->escapeHtmlAttr(__('Add to Cart')) ?>"
@@ -99,23 +104,39 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
                                                 <span><?= $escaper->escapeHtml(__('Add to Cart')) ?></span>
                                             </button>
                                         </form>
-                                    <?php else :?>
-                                        <?php if ($_product->isAvailable()) :?>
-                                            <div class="stock available"><span><?= $escaper->escapeHtml(__('In stock')) ?></span></div>
-                                        <?php else :?>
-                                            <div class="stock unavailable"><span><?= $escaper->escapeHtml(__('Out of stock')) ?></span></div>
+                                    <?php else:?>
+                                        <?php if ($_product->isAvailable()):?>
+                                            <div class="stock available">
+                                                <span><?= $escaper->escapeHtml(__('In stock')) ?></span></div>
+                                        <?php else:?>
+                                            <div class="stock unavailable">
+                                                <span><?= $escaper->escapeHtml(__('Out of stock')) ?></span></div>
                                         <?php endif; ?>
                                     <?php endif; ?>
                                 </div>
-                                <div data-role="add-to-links" class="actions-secondary"<?= strpos($pos, $viewMode . '-secondary') ? $escaper->escapeHtmlAttr($position) : '' ?>>
-                                    <?php if ($addToBlock = $block->getChildBlock('addto')) :?>
+                                <?= strpos($pos, $viewMode . '-primary') ?
+                                    /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                        $position,
+                                        'product-item-info_' . $_product->getId() . ' div.actions-primary'
+                                    ) : '' ?>
+                                <div data-role="add-to-links" class="actions-secondary">
+                                    <?php if ($addToBlock = $block->getChildBlock('addto')):?>
                                         <?= $addToBlock->setProduct($_product)->getChildHtml() ?>
                                     <?php endif; ?>
                                 </div>
+                                <?= strpos($pos, $viewMode . '-secondary') ?
+                                    /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                        $position,
+                                        'product-item-info_' . $_product->getId() . ' div.actions-secondary'
+                                    ) : '' ?>
                             </div>
-                            <?php if ($showDescription) :?>
+                            <?php if ($showDescription):?>
                                 <div class="product description product-item-description">
-                                    <?= /* @noEscape */ $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
+                                    <?= /* @noEscape */ $_helper->productAttribute(
+                                        $_product,
+                                        $_product->getShortDescription(),
+                                        'short_description'
+                                    ) ?>
                                     <a href="<?= $escaper->escapeUrl($_product->getProductUrl()) ?>"
                                        title="<?= /* @noEscape */ $_productNameStripped ?>"
                                        class="action more"><?= $escaper->escapeHtml(__('Learn More')) ?></a>
@@ -124,12 +145,17 @@ $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
                         </div>
                     </div>
                 </div>
+                <?= strpos($pos, $viewMode . '-actions') ?
+                /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                    $position,
+                    'product-item-info_' . $_product->getId() . ' div.product-item-actions'
+                ) : '' ?>
             </li>
             <?php endforeach; ?>
         </ol>
     </div>
     <?= $block->getToolbarHtml() ?>
-    <?php if (!$block->isRedirectToCartEnabled()) :?>
+    <?php if (!$block->isRedirectToCartEnabled()):?>
         <script type="text/x-magento-init">
         {
             "[data-role=tocart-form], .form.map.checkout": {
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml
index 89dcef49d2bac..91774600618f0 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/list/items.phtml
@@ -7,12 +7,8 @@
 use Magento\Catalog\ViewModel\Product\Listing\PreparePostData;
 use Magento\Framework\App\ActionInterface;
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-// phpcs:disable Generic.WhiteSpace.ScopeIndent.Incorrect
-// phpcs:disable Generic.Files.LineLength
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
-
 /* @var $block \Magento\Catalog\Block\Product\AbstractProduct */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php
@@ -164,11 +160,19 @@ $_item = null;
 
 <?php if ($exist):?>
 
-<?php if ($type == 'related' || $type == 'upsell'):?>
-<?php if ($type == 'related'):?>
-<div class="block <?= $block->escapeHtmlAttr($class) ?>" data-mage-init='{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}' data-limit="<?= $block->escapeHtmlAttr($limit) ?>" data-shuffle="<?= /* @noEscape */ $shuffle ?>" data-shuffle-weighted="<?= /* @noEscape */ $isWeightedRandom ?>">
+    <?php if ($type == 'related' || $type == 'upsell'):?>
+        <?php if ($type == 'related'):?>
+<div class="block <?= $block->escapeHtmlAttr($class) ?>"
+     data-mage-init='{"relatedProducts":{"relatedCheckbox":".related.checkbox"}}'
+     data-limit="<?= $block->escapeHtmlAttr($limit) ?>"
+     data-shuffle="<?= /* @noEscape */ $shuffle ?>"
+     data-shuffle-weighted="<?= /* @noEscape */ $isWeightedRandom ?>">
     <?php else:?>
-    <div class="block <?= $block->escapeHtmlAttr($class) ?>" data-mage-init='{"upsellProducts":{}}' data-limit="<?= $block->escapeHtmlAttr($limit) ?>" data-shuffle="<?= /* @noEscape */ $shuffle ?>" data-shuffle-weighted="<?= /* @noEscape */ $isWeightedRandom ?>">
+    <div class="block <?= $block->escapeHtmlAttr($class) ?>"
+         data-mage-init='{"upsellProducts":{}}'
+         data-limit="<?= $block->escapeHtmlAttr($limit) ?>"
+         data-shuffle="<?= /* @noEscape */ $shuffle ?>"
+         data-shuffle-weighted="<?= /* @noEscape */ $isWeightedRandom ?>">
         <?php endif; ?>
         <?php else:?>
         <div class="block <?= $block->escapeHtmlAttr($class) ?>">
@@ -195,7 +199,13 @@ $_item = null;
                                 <?php endif; ?>
                             <?php endif; ?>
                             <?php if ($type == 'related' || $type == 'upsell'):?>
-                                <li class="item product product-item" style="display: none;"  data-shuffle-group="<?= $block->escapeHtmlAttr($_item->getPriority()) ?>" >
+                                <li class="item product product-item"
+                                id="product-item_<?= /* @noEscape */ $_item->getId() ?>"
+                                data-shuffle-group="<?= $block->escapeHtmlAttr($_item->getPriority()) ?>" >
+                                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                    'display:none;',
+                                    'li#product-item_' . $_item->getId()
+                                ) ?>
                             <?php else:?>
                                 <li class="item product product-item">
                             <?php endif; ?>
@@ -222,17 +232,16 @@ $_item = null;
                                     <?php if ($canItemsAddToCart && !$_item->isComposite() && $_item->isSaleable()
                                         && $type == 'related'):?>
                                         <?php if (!$_item->getRequiredOptions()):?>
-                                            <div class="field choice related"><input
-                                                        type="checkbox"
-                                                        class="checkbox related"
-                                                        id="related-checkbox<?= $block->escapeHtmlAttr($_item->getId()) ?>"
-                                                        name="related_products[]"
-                                                        value="<?= $block->escapeHtmlAttr($_item->getId()) ?>" />
-                                                <label
-                                                        class="label"
-                                                        for="related-checkbox<?= $block->escapeHtmlAttr(
-                                                            $_item->getId()
-                                                        ) ?>"><span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
+                                            <div class="field choice related">
+                                                <input
+                                                    type="checkbox"
+                                                    class="checkbox related"
+                                                    id="related-checkbox<?= $block->escapeHtmlAttr($_item->getId()) ?>"
+                                                    name="related_products[]"
+                                                    value="<?= $block->escapeHtmlAttr($_item->getId()) ?>" />
+                                                <label class="label"
+                                                       for="related-checkbox<?= $block->escapeHtmlAttr($_item->getId())
+                                                        ?>"><span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
                                                 </label>
                                             </div>
                                         <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml
index 7ea84c952eaaa..20d695195c920 100644
--- a/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/helper/summary_short.phtml
@@ -5,26 +5,38 @@
  */
 
 /** @var \Magento\Review\Block\Product\ReviewRenderer $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $url = $block->getReviewsUrl() . '#reviews';
 $urlForm = $block->getReviewsUrl() . '#review-form';
 ?>
-<?php if ($block->isReviewEnabled() && $block->getReviewsCount()) : ?>
+<?php if ($block->isReviewEnabled() && $block->getReviewsCount()): ?>
     <?php $rating = $block->getRatingSummary(); ?>
     <div class="product-reviews-summary short<?= !$rating ? ' no-rating' : '' ?>">
-        <?php if ($rating) :?>
+        <?php if ($rating):?>
         <div class="rating-summary">
             <span class="label"><span><?= $block->escapeHtml(__('Rating')) ?>:</span></span>
-            <div class="rating-result" title="<?= $block->escapeHtmlAttr($rating) ?>%">
-                <span style="width:<?= $block->escapeHtmlAttr($rating) ?>%"><span><?= $block->escapeHtml($rating) ?>%</span></span>
+            <div class="rating-result"
+                 id="rating-result_<?= /* @noEscape */ $block->getProduct()->getId() ?>"
+                 title="<?= $block->escapeHtmlAttr($rating) ?>%">
+                <span><span><?= $block->escapeHtml($rating) ?>%</span></span>
             </div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'width:' . $block->escapeHtmlAttr($rating) . '%',
+                '#rating-result_' . $block->getProduct()->getId() . ' span'
+            ) ?>
         </div>
         <?php endif;?>
         <div class="reviews-actions">
-            <a class="action view" href="<?= $block->escapeUrl($url) ?>"><?= $block->escapeHtml($block->getReviewsCount()) ?> <span><?= ($block->getReviewsCount() == 1) ? $block->escapeHtml(__('Review')) : $block->escapeHtml(__('Reviews')) ?></span></a>
+            <a class="action view"
+               href="<?= $block->escapeUrl($url) ?>"><?= $block->escapeHtml($block->getReviewsCount()) ?>
+                 <span><?= ($block->getReviewsCount() == 1) ?
+                        $block->escapeHtml(__('Review')) : $block->escapeHtml(__('Reviews')) ?>
+                </span>
+            </a>
         </div>
     </div>
-<?php elseif ($block->isReviewEnabled() && $block->getDisplayIfEmpty()) : ?>
+<?php elseif ($block->isReviewEnabled() && $block->getDisplayIfEmpty()): ?>
     <div class="product-reviews-summary short empty">
         <div class="reviews-actions">
             <a class="action add" href="<?= $block->escapeUrl($urlForm) ?>">
diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
index d00c310069573..93fb7b250c777 100644
--- a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
@@ -5,13 +5,14 @@
  */
 
 /** @var Magento\Review\Block\Product\View\ListView $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $_items = $block->getReviewsCollection()->getItems();
 $format = $block->getDateFormat() ?: \IntlDateFormatter::SHORT;
 ?>
-<?php if (count($_items)) : ?>
+<?php if (count($_items)): ?>
 <div class="block review-list" id="customer-reviews">
-    <?php if (!$block->getHideTitle()) : ?>
+    <?php if (!$block->getHideTitle()): ?>
         <div class="block-title">
             <strong><?= $block->escapeHtml(__('Customer Reviews')) ?></strong>
         </div>
@@ -21,15 +22,20 @@ $format = $block->getDateFormat() ?: \IntlDateFormatter::SHORT;
             <?= $block->getChildHtml('toolbar') ?>
         </div>
         <ol class="items review-items">
-        <?php foreach ($_items as $_review) : ?>
+        <?php foreach ($_items as $_review): ?>
             <li class="item review-item" itemscope itemprop="review" itemtype="http://schema.org/Review">
                 <div class="review-title" itemprop="name"><?= $block->escapeHtml($_review->getTitle()) ?></div>
-                <?php if (count($_review->getRatingVotes())) : ?>
+                <?php if (count($_review->getRatingVotes())): ?>
                     <div class="review-ratings">
-                    <?php foreach ($_review->getRatingVotes() as $_vote) : ?>
-                    <div class="rating-summary item" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
-                        <span class="label rating-label"><span><?= $block->escapeHtml($_vote->getRatingCode()) ?></span></span>
-                        <div class="rating-result" title="<?= $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
+                    <?php foreach ($_review->getRatingVotes() as $_vote): ?>
+                    <div class="rating-summary item"
+                         itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
+                        <span class="label rating-label">
+                            <span><?= $block->escapeHtml($_vote->getRatingCode()) ?></span>
+                        </span>
+                        <div class="rating-result"
+                             id="rating-result_<?= 'a'?>"
+                             title="<?= $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
                             <meta itemprop="worstRating" content = "1"/>
                             <meta itemprop="bestRating" content = "100"/>
                             <span style="width:<?= $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
@@ -46,11 +52,18 @@ $format = $block->getDateFormat() ?: \IntlDateFormatter::SHORT;
                 <div class="review-details">
                     <p class="review-author">
                         <span class="review-details-label"><?= $block->escapeHtml(__('Review by')) ?></span>
-                        <strong class="review-details-value" itemprop="author"><?= $block->escapeHtml($_review->getNickname()) ?></strong>
+                        <strong class="review-details-value"
+                                itemprop="author"><?= $block->escapeHtml($_review->getNickname()) ?></strong>
                     </p>
                     <p class="review-date">
                         <span class="review-details-label"><?= $block->escapeHtml(__('Posted on')) ?></span>
-                        <time class="review-details-value" itemprop="datePublished" datetime="<?= $block->escapeHtmlAttr($block->formatDate($_review->getCreatedAt(), $format)) ?>"><?= $block->escapeHtml($block->formatDate($_review->getCreatedAt(), $format)) ?></time>
+                        <time class="review-details-value"
+                              itemprop="datePublished"
+                              datetime="<?= $block->escapeHtmlAttr($block->formatDate(
+                                  $_review->getCreatedAt(),
+                                  $format
+                              )) ?>"><?= $block->escapeHtml($block->formatDate($_review->getCreatedAt(), $format)) ?>
+                        </time>
                     </p>
                 </div>
             </li>
diff --git a/lib/internal/Magento/Framework/View/Helper/Js.php b/lib/internal/Magento/Framework/View/Helper/Js.php
index fe120562cb79e..c4b14ad88d45a 100644
--- a/lib/internal/Magento/Framework/View/Helper/Js.php
+++ b/lib/internal/Magento/Framework/View/Helper/Js.php
@@ -16,6 +16,20 @@
  */
 class Js
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param SecureHtmlRenderer $htmlRenderer
+     */
+    public function __construct(
+        SecureHtmlRenderer $htmlRenderer
+    ) {
+        $this->secureRenderer = $htmlRenderer;
+    }
+
     /**
      * Retrieve framed javascript
      *
@@ -24,9 +38,8 @@ class Js
      */
     public function getScript($script)
     {
-        $secureHtmlRenderer = ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
         $scriptString = '//<![CDATA[' . "\n{$script}\n" . '//]]>';
 
-        return /* @noEscape */ $secureHtmlRenderer->renderTag('script', [], $scriptString, false);
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 }

From a3c8b9727aa29a8ed98985ecc2684064abb80835 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Tue, 14 Apr 2020 12:10:41 +0300
Subject: [PATCH 097/307] MC-33346: [2.4.0][Unit]
 Magento.Checkout.Test.Unit.Controller.Sidebar.RemoveItemTest.testExecuteWithDbException
 fails because of changes from 2.4

---
 .../Controller/Sidebar/RemoveItemTest.php     | 25 +++++++++----------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php
index c3b57664b3aea..94a8660619d80 100644
--- a/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php
+++ b/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php
@@ -231,12 +231,12 @@ public function testExecuteWithDbException(): void
         $itemId = 1;
         $dbError = 'Error';
         $message = __('An unspecified error occurred. Please contact us for assistance.');
-        $response = [
+        $responseData = [
             'success' => false,
             'error_message' => $message,
         ];
 
-        $this->getPropertyValue($this->removeItem, 'formKeyValidator')
+        $this->formKeyValidatorMock
             ->expects($this->once())
             ->method('validate')
             ->with($this->requestMock)
@@ -252,19 +252,18 @@ public function testExecuteWithDbException(): void
 
         $this->loggerMock->expects($this->once())->method('critical')->with($exception);
 
-        $this->sidebarMock->expects($this->once())->method('getResponseData')->with($message)->willReturn($response);
-        $encodedResponse = json_encode($response);
-        $this->jsonHelperMock->expects($this->once())
-            ->method('jsonEncode')
-            ->with($response)
-            ->willReturn($encodedResponse);
+        $this->sidebarMock->expects($this->once())->method('getResponseData')->with($message)->willReturn($responseData);
 
-        $this->responseMock->expects($this->once())
-            ->method('representJson')
-            ->with($encodedResponse)
-            ->willReturn($this->responseMock);
+        $resultJson = $this->createMock(ResultJson::class);
+        $resultJson->expects($this->once())
+            ->method('setData')
+            ->with($responseData)
+            ->willReturnSelf();
+        $this->resultJsonFactoryMock->expects($this->once())
+            ->method('create')
+            ->willReturn($resultJson);
 
-        $this->removeItem->execute();
+        $this->action->execute();
     }
 
     public function testExecuteWhenFormKeyValidationFailed()

From 75039dadeba22933be1eda6aa27dfb6320e7e480 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Tue, 14 Apr 2020 23:37:47 +0300
Subject: [PATCH 098/307] MC-33346: [2.4.0][Unit]
 Magento.Checkout.Test.Unit.Controller.Sidebar.RemoveItemTest.testExecuteWithDbException
 fails because of changes from 2.4

---
 .../Test/Unit/Controller/Sidebar/RemoveItemTest.php    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php
index 94a8660619d80..a915078424424 100644
--- a/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php
+++ b/app/code/Magento/Checkout/Test/Unit/Controller/Sidebar/RemoveItemTest.php
@@ -241,7 +241,10 @@ public function testExecuteWithDbException(): void
             ->method('validate')
             ->with($this->requestMock)
             ->willReturn(true);
-        $this->requestMock->expects($this->once())->method('getParam')->with('item_id')->willReturn($itemId);
+        $this->requestMock->expects($this->once())
+            ->method('getParam')
+            ->with('item_id')
+            ->willReturn($itemId);
 
         $exception = new \Zend_Db_Exception($dbError);
 
@@ -252,7 +255,10 @@ public function testExecuteWithDbException(): void
 
         $this->loggerMock->expects($this->once())->method('critical')->with($exception);
 
-        $this->sidebarMock->expects($this->once())->method('getResponseData')->with($message)->willReturn($responseData);
+        $this->sidebarMock->expects($this->once())
+            ->method('getResponseData')
+            ->with($message)
+            ->willReturn($responseData);
 
         $resultJson = $this->createMock(ResultJson::class);
         $resultJson->expects($this->once())

From 9855f2c31695d4ea59fa9cafc606d88ca0fca794 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Tue, 14 Apr 2020 23:42:28 +0300
Subject: [PATCH 099/307] MC-31149: Improve customer custom attribute value
 validation

---
 .../Eav/Test/Unit/Model/Attribute/Data/FileTest.php       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php b/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php
index 3060aaa60ec3f..efc2c904c3549 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/Attribute/Data/FileTest.php
@@ -17,6 +17,7 @@
 use Magento\Framework\Url\EncoderInterface;
 use Magento\MediaStorage\Model\File\Validator\NotProtectedExtension;
 use Psr\Log\LoggerInterface;
+use PHPUnit\Framework\MockObject\MockObject;
 
 /**
  * Test for Magento\Eav\Model\Attribute\Data\File class.
@@ -31,15 +32,18 @@ class FileTest extends \PHPUnit\Framework\TestCase
     protected $model;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|EncoderInterface
+     * @var MockObject|EncoderInterface
      */
     protected $urlEncoder;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var MockObject
      */
     protected $fileValidatorMock;
 
+    /**
+     * @inheritDoc
+     */
     protected function setUp()
     {
         $timezoneMock = $this->createMock(TimezoneInterface::class);

From 4aa10676c0b54be6a2063bf11b93524802f99e3b Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Wed, 15 Apr 2020 19:09:40 +0300
Subject: [PATCH 100/307] MC-29420: Remove event handlers from CE

---
 app/code/Magento/Backend/Block/Template.php   |   4 +
 .../Adminhtml/Category/Helper/Pricestep.php   |  47 ++-
 .../Category/Helper/Sortby/Available.php      |  19 +-
 .../Category/Helper/Sortby/DefaultSortby.php  |  19 +-
 .../Catalog/Block/Adminhtml/Category/Tree.php |  33 +-
 .../Block/Adminhtml/Helper/Form/Wysiwyg.php   |  44 ++-
 .../Catalog/Block/Adminhtml/Product/Edit.php  |   5 +-
 .../Edit/Action/Attribute/Tab/Attributes.php  |  21 +-
 .../Adminhtml/Product/Edit/AttributeSet.php   |   4 +
 .../Block/Adminhtml/Product/Edit/Js.php       |   3 +
 .../Adminhtml/Product/Edit/NewCategory.php    |  22 +-
 .../Product/Edit/Tab/Attributes/Search.php    |   4 +
 .../Product/Edit/Tab/Options/Option.php       |   5 +
 .../Adminhtml/Product/Edit/Tab/Price/Tier.php |  42 +++
 .../Adminhtml/Product/Helper/Form/Apply.php   |  18 +-
 .../Product/Helper/Form/Category.php          |  30 +-
 .../Adminhtml/Product/Helper/Form/Config.php  |  23 +-
 .../Product/Helper/Form/Gallery/Content.php   |   4 +
 .../Adminhtml/Product/Helper/Form/Image.php   |  19 +-
 .../Adminhtml/Product/Helper/Form/Weight.php  |  21 +-
 .../category/edit/assign_products.phtml       |   7 +-
 .../form/renderer/fieldset/element.phtml      |  34 +-
 .../catalog/product/attribute/js.phtml        |  48 ++-
 .../catalog/product/attribute/set/main.phtml  |  81 +++--
 .../attribute/set/main/tree/group.phtml       |   7 +-
 .../product/attribute/set/toolbar/add.phtml   |  11 +-
 .../composite/fieldset/options/js.phtml       |   8 +-
 .../fieldset/options/type/date.phtml          |  52 ++-
 .../fieldset/options/type/file.phtml          |  70 ++--
 .../templates/catalog/product/edit.phtml      |  38 +-
 .../product/edit/action/inventory.phtml       |  49 ++-
 .../product/edit/action/websites.phtml        |  39 +-
 .../catalog/product/edit/attribute_set.phtml  |  11 +-
 .../catalog/product/edit/options/option.phtml |  60 ++--
 .../catalog/product/edit/price/tier.phtml     | 164 ++++++---
 .../catalog/product/edit/websites.phtml       |  37 +-
 .../catalog/product/helper/gallery.phtml      |  21 +-
 .../templates/catalog/product/js.phtml        |  30 +-
 .../catalog/product/tab/inventory.phtml       | 334 ++++++++++++------
 .../product/edit/attribute/search.phtml       |  26 +-
 .../product/grid/massaction_extended.phtml    |  52 +--
 .../fieldset/options/view/checkable.phtml     |  13 +-
 .../catalog/product/attribute/set/js.phtml    |  22 +-
 app/code/Magento/Csp/etc/config.xml           |  12 +-
 44 files changed, 1161 insertions(+), 452 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php
index 3ae4451a2592f..46777427ec70b 100644
--- a/app/code/Magento/Backend/Block/Template.php
+++ b/app/code/Magento/Backend/Block/Template.php
@@ -8,6 +8,9 @@
 
 namespace Magento\Backend\Block;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data;
+
 /**
  * Standard admin block. Adds admin-specific behavior and event.
  * Should be used when you declare a block in admin layout handle.
@@ -69,6 +72,7 @@ public function __construct(\Magento\Backend\Block\Template\Context $context, ar
         $this->_backendSession = $context->getBackendSession();
         $this->formKey = $context->getFormKey();
         $this->nameBuilder = $context->getNameBuilder();
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Pricestep.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Pricestep.php
index 3266922d116ec..acffce3ca0b8c 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Pricestep.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Pricestep.php
@@ -11,11 +11,45 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Category\Helper;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Data\Form\Element\Factory;
+use Magento\Framework\Escaper;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Pricestep Helper
  */
 class Pricestep extends \Magento\Framework\Data\Form\Element\Text
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
+     * @param Escaper $escaper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
+        Escaper $escaper,
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
+    ) {
+        parent::__construct(
+            $factoryElement,
+            $factoryCollection,
+            $escaper,
+            $data
+        );
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * Returns js code that is used instead of default toggle code for "Use default config" checkbox
      *
@@ -53,18 +87,23 @@ public function getElementHtml()
             $html .= ' disabled="disabled"';
         }
 
-        $html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
+        $html .= ' class="checkbox" type="checkbox" />';
 
         $html .= ' <label for="' . $htmlId . '" class="normal">' . __('Use Config Settings') . '</label>';
-        $html .= '<script>' .
+        $scriptString =
             'require(["prototype"], function(){'.
             'toggleValueElements($(\'' .
             $htmlId .
             '\'), $(\'' .
             $htmlId .
             '\').parentNode);' .
-            '});'.
-            '</script>';
+            '});';
+        $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toggleValueElements(this, this.parentNode);",
+            '#' . $htmlId
+        );
 
         return $html;
     }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php
index 2a88d0f4d4f15..dbd4385059c73 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php
@@ -11,8 +11,15 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class Available extends \Magento\Framework\Data\Form\Element\Multiselect
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * Returns js code that is used instead of default toggle code for "Use default config" checkbox
      *
@@ -49,13 +56,19 @@ public function getElementHtml()
             $html .= ' disabled="disabled"';
         }
 
-        $html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
+        $html .= ' class="checkbox" type="checkbox" />';
         $html .= ' <label for="' . $htmlId . '" class="normal">' . __('Use All Available Attributes') . '</label>';
-        $html .= '<script>require(["prototype"], function(){toggleValueElements($(\'' .
+        $scriptString = 'require(["prototype"], function(){toggleValueElements($(\'' .
             $htmlId .
             '\'), $(\'' .
             $htmlId .
-            '\').parentNode);});</script>';
+            '\').parentNode);});';
+        $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toggleValueElements(this, this.parentNode);",
+            '#' . $htmlId
+        );
 
         return $html;
     }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php
index 2d887d05f62ad..bac0e8465411d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php
@@ -11,8 +11,15 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class DefaultSortby extends \Magento\Framework\Data\Form\Element\Select
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * Returns js code that is used instead of default toggle code for "Use default config" checkbox
      *
@@ -49,13 +56,19 @@ public function getElementHtml()
             $html .= ' disabled="disabled"';
         }
 
-        $html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
+        $html .= ' class="checkbox" type="checkbox" />';
         $html .= ' <label for="' . $htmlId . '" class="normal">' . __('Use Config Settings') . '</label>';
-        $html .= '<script>require(["prototype"], function(){toggleValueElements($(\'' .
+        $scriptString = 'require(["prototype"], function(){toggleValueElements($(\'' .
             $htmlId .
             '\'), $(\'' .
             $htmlId .
-            '\').parentNode);});</script>';
+            '\').parentNode);});';
+        $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toggleValueElements(this, this.parentNode);",
+            '#' . $htmlId
+        );
 
         return $html;
     }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
index 929c181bf820c..7d6db21fd4cef 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
@@ -10,16 +10,19 @@
 namespace Magento\Catalog\Block\Adminhtml\Category;
 
 use Magento\Catalog\Model\ResourceModel\Category\Collection;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Tree\Node;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Store\Model\Store;
 
 /**
- * Class Tree
+ * Class Category Tree
  *
  * @api
- * @package Magento\Catalog\Block\Adminhtml\Category
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  * @since 100.0.2
  */
 class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
@@ -44,6 +47,16 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
      */
     protected $_jsonEncoder;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Catalog\Model\ResourceModel\Category\Tree $categoryTree
@@ -53,6 +66,8 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
      * @param \Magento\Framework\DB\Helper $resourceHelper
      * @param \Magento\Backend\Model\Auth\Session $backendSession
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -62,12 +77,18 @@ public function __construct(
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
         \Magento\Framework\DB\Helper $resourceHelper,
         \Magento\Backend\Model\Auth\Session $backendSession,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_resourceHelper = $resourceHelper;
         $this->_backendSession = $backendSession;
         parent::__construct($context, $categoryTree, $registry, $categoryFactory, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
@@ -336,12 +357,14 @@ public function getBreadcrumbsJavascript($path, $javascriptVarName)
         foreach ($categories as $key => $category) {
             $categories[$key] = $this->_getNodeJson($category);
         }
-        return '<script>require(["prototype"], function(){' . $javascriptVarName . ' = ' . $this->_jsonEncoder->encode(
+        $scriptString = 'require(["prototype"], function(){' . $javascriptVarName . ' = ' . $this->_jsonEncoder->encode(
             $categories
         ) .
             ';' .
             ($this->canAddSubCategory() ? '$("add_subcategory_button").show();' : '$("add_subcategory_button").hide();')
-            . '});</script>';
+            . '});';
+
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
index c58ed58370e3a..95b7397e385a6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
@@ -11,8 +11,14 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Helper\Form;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Wysiwyg helper.
+ *
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 class Wysiwyg extends \Magento\Framework\Data\Form\Element\Textarea
 {
@@ -40,6 +46,16 @@ class Wysiwyg extends \Magento\Framework\Data\Form\Element\Textarea
      */
     protected $_layout;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
@@ -49,6 +65,8 @@ class Wysiwyg extends \Magento\Framework\Data\Form\Element\Textarea
      * @param \Magento\Framework\Module\Manager $moduleManager
      * @param \Magento\Backend\Helper\Data $backendData
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
     public function __construct(
         \Magento\Framework\Data\Form\Element\Factory $factoryElement,
@@ -58,13 +76,19 @@ public function __construct(
         \Magento\Framework\View\LayoutInterface $layout,
         \Magento\Framework\Module\Manager $moduleManager,
         \Magento\Backend\Helper\Data $backendData,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
     ) {
         $this->_wysiwygConfig = $wysiwygConfig;
         $this->_layout = $layout;
         $this->_moduleManager = $moduleManager;
         $this->_backendData = $backendData;
         parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $this->secureRenderer = $secureRenderer;
+        $this->random = $random;
     }
 
     /**
@@ -79,24 +103,22 @@ public function getAfterElementHtml()
 
         $html = parent::getAfterElementHtml();
         if ($this->getIsWysiwygEnabled()) {
+            $buttonId = 'wysiwyg_action_button_' . $this->random->getRandomString(32);
             $disabled = $this->getDisabled() || $this->getReadonly();
             $html .= $this->_layout->createBlock(
                 \Magento\Backend\Block\Widget\Button::class,
                 '',
                 [
                     'data' => [
+                        'id' => $buttonId,
                         'label' => __('WYSIWYG Editor'),
                         'type' => 'button',
                         'disabled' => $disabled,
                         'class' => 'action-wysiwyg',
-                        'onclick' => 'catalogWysiwygEditor.open(\'' . $this->_backendData->getUrl(
-                            'catalog/product/wysiwyg'
-                        ) . '\', \'' . $this->getHtmlId() . '\')',
                     ]
                 ]
             )->toHtml();
-            $html .= <<<HTML
-<script>
+            $scriptString = <<<HTML
 require([
     'jquery',
     'mage/adminhtml/wysiwyg/tiny_mce/setup'
@@ -119,9 +141,17 @@ public function getAfterElementHtml()
         editor
     );
 });
-</script>
 HTML;
+            $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+            $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                'catalogWysiwygEditor.open(\'' . $this->_backendData->getUrl(
+                    'catalog/product/wysiwyg'
+                ) . '\', \'' . $this->getHtmlId() . '\')',
+                $buttonId
+            );
         }
+
         return $html;
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
index e6afc41ebebac..5be85db894c40 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
@@ -12,10 +12,12 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
+use Magento\Framework\Json\Helper\Data;
 
 /**
- * Class Edit
+ * Class for Product Edit.
  */
 class Edit extends \Magento\Backend\Block\Widget
 {
@@ -74,6 +76,7 @@ public function __construct(
         $this->_coreRegistry = $registry;
         $this->jsonEncoder = $jsonEncoder;
         $this->escaper = $escaper;
+        $data['helper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php
index 1ebfa14200364..287a24e0aaca0 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Attributes.php
@@ -22,9 +22,11 @@
 use Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Weight;
 use Magento\Catalog\Helper\Product\Edit\Action\Attribute;
 use Magento\Catalog\Model\ProductFactory;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\AbstractElement;
 use Magento\Framework\Data\FormFactory;
 use Magento\Framework\Registry;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Attributes tab block
@@ -51,6 +53,11 @@ class Attributes extends Form implements TabInterface
      */
     private $excludeFields;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param Context $context
      * @param Registry $registry
@@ -59,6 +66,7 @@ class Attributes extends Form implements TabInterface
      * @param Attribute $attributeAction
      * @param array $data
      * @param array|null $excludeFields
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         Context $context,
@@ -67,13 +75,15 @@ public function __construct(
         ProductFactory $productFactory,
         Attribute $attributeAction,
         array $data = [],
-        array $excludeFields = null
+        array $excludeFields = null,
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_attributeAction = $attributeAction;
         $this->_productFactory = $productFactory;
         $this->excludeFields = $excludeFields ?: [];
 
         parent::__construct($context, $registry, $formFactory, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -146,13 +156,20 @@ protected function _getAdditionalElementHtml($element)
         // @codingStandardsIgnoreStart
         $html = <<<HTML
 <span class="attribute-change-checkbox">
-    <input type="checkbox" id="$dataCheckboxName" name="$dataCheckboxName" class="checkbox" $nameAttributeHtml onclick="toogleFieldEditMode(this, '{$elementId}')" $dataAttribute />
+    <input type="checkbox" id="$dataCheckboxName" name="$dataCheckboxName"
+           class="checkbox" $nameAttributeHtml $dataAttribute />
     <label class="label" for="$dataCheckboxName">
         {$checkboxLabel}
     </label>
 </span>
 HTML;
 
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toogleFieldEditMode(this, '{$elementId}')",
+            "#". $dataCheckboxName
+        );
+
         // @codingStandardsIgnoreEnd
         return $html;
     }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php
index d95ee7f8f2cf9..01c82df6b2293 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php
@@ -11,6 +11,9 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data;
+
 /**
  * Admin AttributeSet block
  */
@@ -34,6 +37,7 @@ public function __construct(
         array $data = []
     ) {
         $this->_coreRegistry = $registry;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php
index 9712c0e03d609..4436099c215d9 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php
@@ -9,6 +9,8 @@
 use Magento\Customer\Helper\Session\CurrentCustomer;
 use Magento\Tax\Api\TaxCalculationInterface;
 use Magento\Tax\Model\TaxClass\Source\Product as ProductTaxClassSource;
+use Magento\Framework\App\ObjectManager;
+use Magento\Tax\Helper\Data;
 
 class Js extends \Magento\Backend\Block\Template
 {
@@ -66,6 +68,7 @@ public function __construct(
         $this->jsonHelper = $jsonHelper;
         $this->calculationService = $calculationService;
         $this->productTaxClassSource = $productTaxClassSource;
+        $data['helper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
index 0a766bc4c0cb3..ebc269f85d054 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/NewCategory.php
@@ -11,6 +11,9 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  */
@@ -26,13 +29,19 @@ class NewCategory extends \Magento\Backend\Block\Widget\Form\Generic
      */
     protected $_categoryFactory;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Framework\Data\FormFactory $formFactory
+     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param array $data
+     * @param SecureHtmlRenderer|null $htmlRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -40,12 +49,14 @@ public function __construct(
         \Magento\Framework\Data\FormFactory $formFactory,
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
-        array $data = []
+        array $data = [],
+        SecureHtmlRenderer $htmlRenderer = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_categoryFactory = $categoryFactory;
         parent::__construct($context, $registry, $formFactory, $data);
         $this->setUseContainer(true);
+        $this->secureRenderer = $htmlRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -153,14 +164,13 @@ public function getAfterElementHtml()
             ]
         );
         //TODO: JavaScript logic should be moved to separate file or reviewed
-        return <<<HTML
-<script>
+        $scriptString =  <<<HTML
 require(["jquery","mage/mage"],function($) {  // waiting for dependencies at first
     $(function(){ // waiting for page to load to have '#category_ids-template' available
-        $('#new-category').mage('newCategoryDialog', $widgetOptions);
+        $('#new-category').mage('newCategoryDialog', {$widgetOptions});
     });
 });
-</script>
 HTML;
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
index 42463354926dd..7bef31e0839a3 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
@@ -11,6 +11,9 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data;
+
 /**
  * Admin product attribute search block
  */
@@ -50,6 +53,7 @@ public function __construct(
         $this->_resourceHelper = $resourceHelper;
         $this->_collectionFactory = $collectionFactory;
         $this->_coreRegistry = $registry;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
index ccf207938ab06..642f383d4134f 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
@@ -14,6 +14,8 @@
 use Magento\Backend\Block\Widget;
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data;
 use Magento\Store\Model\Store;
 
 /**
@@ -95,6 +97,7 @@ public function __construct(
         $this->_product = $product;
         $this->_productOptionConfig = $productOptionConfig;
         $this->_coreRegistry = $registry;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
@@ -482,6 +485,8 @@ public function getPriceValue($value, $type)
         } elseif ($type == 'fixed') {
             return number_format((float)$value, 2, null, '');
         }
+
+        return '';
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
index 7cb1c2c9e4263..993b256fb7317 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
@@ -5,6 +5,11 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Price;
 
+use Magento\Customer\Api\GroupManagementInterface;
+use Magento\Customer\Api\GroupRepositoryInterface;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data;
+
 /**
  * Adminhtml tier price item renderer
  */
@@ -15,6 +20,42 @@ class Tier extends Group\AbstractGroup
      */
     protected $_template = 'Magento_Catalog::catalog/product/edit/price/tier.phtml';
 
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param GroupRepositoryInterface $groupRepository
+     * @param \Magento\Directory\Helper\Data $directoryHelper
+     * @param \Magento\Framework\Module\Manager $moduleManager
+     * @param \Magento\Framework\Registry $registry
+     * @param GroupManagementInterface $groupManagement
+     * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
+     * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        GroupRepositoryInterface $groupRepository,
+        \Magento\Directory\Helper\Data $directoryHelper,
+        \Magento\Framework\Module\Manager $moduleManager,
+        \Magento\Framework\Registry $registry,
+        GroupManagementInterface $groupManagement,
+        \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
+        \Magento\Framework\Locale\CurrencyInterface $localeCurrency,
+        array $data = []
+    ) {
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        parent::__construct(
+            $context,
+            $groupRepository,
+            $directoryHelper,
+            $moduleManager,
+            $registry,
+            $groupManagement,
+            $searchCriteriaBuilder,
+            $localeCurrency,
+            $data
+        );
+    }
+
     /**
      * Retrieve list of initial customer groups
      *
@@ -62,6 +103,7 @@ protected function _sortTierPrices($a, $b)
 
     /**
      * Prepare global layout
+     *
      * Add "Add tier" button to layout
      *
      * @return $this
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Apply.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Apply.php
index 86ed3d09d5728..101daec2b4906 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Apply.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Apply.php
@@ -11,9 +11,18 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class Apply extends \Magento\Framework\Data\Form\Element\Multiselect
 {
     /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * Return html of the element.
+     *
      * @return string
      */
     public function getElementHtml()
@@ -28,12 +37,19 @@ public function getElementHtml()
             $elementAttributeHtml = $elementAttributeHtml . ' disabled="disabled"';
         }
 
-        $html = '<select onchange="toggleApplyVisibility(this)"' . $elementAttributeHtml . '>'
+        $html = '<select id="' . $this->getHtmlId() . '"' . $elementAttributeHtml . '>'
             . '<option value="0">' . $this->getModeLabels('all') . '</option>'
             . '<option value="1" ' . ($this->getValue() == null ? '' : 'selected') . '>'
             . $this->getModeLabels('custom') . '</option>' . '</select><br /><br />';
 
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onchange',
+            "toggleApplyVisibility(this)",
+            'select#' . $this->getHtmlId()
+        );
+
         $html .= parent::getElementHtml();
+
         return $html;
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
index df372312613f4..f1d3483e9dbd0 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
@@ -7,7 +7,9 @@
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
 use Magento\Catalog\Model\ResourceModel\Category\Collection;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\AuthorizationInterface;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Product form category field helper
@@ -41,6 +43,11 @@ class Category extends \Magento\Framework\Data\Form\Element\Multiselect
      */
     protected $authorization;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
@@ -51,6 +58,8 @@ class Category extends \Magento\Framework\Data\Form\Element\Multiselect
      * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param AuthorizationInterface $authorization
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Framework\Data\Form\Element\Factory $factoryElement,
@@ -61,7 +70,8 @@ public function __construct(
         \Magento\Framework\View\LayoutInterface $layout,
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
         AuthorizationInterface $authorization,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_collectionFactory = $collectionFactory;
@@ -69,6 +79,7 @@ public function __construct(
         $this->authorization = $authorization;
         parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
         $this->_layout = $layout;
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
         if (!$this->isAllowed()) {
             $this->setType('hidden');
             $this->addClass('hidden');
@@ -130,19 +141,26 @@ public function getAfterElementHtml()
                 'id' => 'add_category_button',
                 'label' => $newCategoryCaption,
                 'title' => $newCategoryCaption,
-                'onclick' => 'jQuery("#new-category").modal("openModal")',
                 'disabled' => $this->getDisabled(),
             ]
         );
         $return = <<<HTML
     <input id="{$htmlId}-suggest" placeholder="$suggestPlaceholder" />
-    <script>
+HTML;
+        $scriptString = <<<script
         require(["jquery", "mage/mage"], function($){
             $('#{$htmlId}-suggest').mage('treeSuggest', {$selectorOptions});
         });
-    </script>
-HTML;
-        return $return . $button->toHtml();
+script;
+
+        return $return .
+            /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false) .
+            $button->toHtml() .
+            /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                'jQuery("#new-category").modal("openModal")',
+                '#add_category_button'
+            );
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
index 0c82ac537689f..bec1a57320aa0 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
@@ -11,8 +11,19 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Data\Form\Element\Factory;
+use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class Config extends \Magento\Framework\Data\Form\Element\Select
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * Retrieve element html
      *
@@ -31,13 +42,19 @@ public function getElementHtml()
         $disabled = $this->getReadonly() ? ' disabled="disabled"' : '';
 
         $html .= '<input id="' . $htmlId . '" name="product[' . $htmlId . ']" ' . $disabled . ' value="1" ' . $checked;
-        $html .= ' onclick="toggleValueElements(this, this.parentNode);" class="checkbox" type="checkbox" />';
+        $html .= ' class="checkbox" type="checkbox" />';
         $html .= ' <label for="' . $htmlId . '">' . __('Use Config Settings') . '</label>';
-        $html .= '<script>require(["prototype"], function(){toggleValueElements($(\'' .
+        $scriptString = 'require(["prototype"], function(){toggleValueElements($(\'' .
             $htmlId .
             '\'), $(\'' .
             $htmlId .
-            '\').parentNode);});</script>';
+            '\').parentNode);});';
+        $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toggleValueElements(this, this.parentNode);",
+            '#' . $htmlId
+        );
 
         return $html;
     }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
index 8e6011c09a27f..c5a7bf3ae5fd6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
@@ -15,6 +15,7 @@
 
 use Magento\Framework\App\ObjectManager;
 use Magento\Backend\Block\Media\Uploader;
+use Magento\Framework\Json\Helper\Data;
 use Magento\Framework\View\Element\AbstractBlock;
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Exception\FileSystemException;
@@ -23,6 +24,8 @@
 
 /**
  * Block for gallery content.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Content extends \Magento\Backend\Block\Widget
 {
@@ -74,6 +77,7 @@ public function __construct(
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_mediaConfig = $mediaConfig;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
         $this->imageUploadConfigDataProvider = $imageUploadConfigDataProvider
             ?: ObjectManager::getInstance()->get(ImageUploadConfigDataProvider::class);
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
index 1cc6a5b56bf2c..5fa07b2077053 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
@@ -11,9 +11,18 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class Image extends \Magento\Framework\Data\Form\Element\Image
 {
     /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * Return generated url.
+     *
      * @return bool|string
      */
     protected function _getUrl()
@@ -24,10 +33,13 @@ protected function _getUrl()
                 ['_type' => \Magento\Framework\UrlInterface::URL_TYPE_MEDIA]
             ) . 'catalog/product/' . $this->getValue();
         }
+
         return $url;
     }
 
     /**
+     * Return generated delete checkbox.
+     *
      * @return string
      */
     protected function _getDeleteCheckbox()
@@ -39,18 +51,19 @@ protected function _getDeleteCheckbox()
             } else {
                 $inputField = '<input value="%s" id="%s_hidden" type="hidden" class="required-entry" />';
                 $html .= sprintf($inputField, $this->getValue(), $this->getHtmlId());
-                $html .= '<script>require(["prototype"], function(){
+                $scriptString = 'require(["prototype"], function(){
                     syncOnchangeValue(\'' .
                     $this->getHtmlId() .
                     '\', \'' .
                     $this->getHtmlId() .
                     '_hidden\');
-                });
-                </script>';
+                });';
+                $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
             }
         } else {
             $html .= parent::_getDeleteCheckbox();
         }
+
         return $html;
     }
 }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
index 70b2948501d2d..7fe51a7327d64 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
@@ -9,6 +9,7 @@
 
 use Magento\Catalog\Api\Data\ProductAttributeInterface;
 use Magento\Directory\Helper\Data;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form;
 use Magento\Catalog\Model\Product\Edit\WeightResolver;
 use Magento\Framework\Data\Form\Element\CollectionFactory;
@@ -17,6 +18,7 @@
 use Magento\Framework\Data\Form\Element\Text;
 use Magento\Framework\Escaper;
 use Magento\Framework\Locale\Format;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * Product form weight field helper
@@ -40,6 +42,11 @@ class Weight extends Text
      */
     protected $directoryHelper;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param Factory $factoryElement
      * @param CollectionFactory $factoryCollection
@@ -47,6 +54,7 @@ class Weight extends Text
      * @param Format $localeFormat
      * @param Data $directoryHelper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         Factory $factoryElement,
@@ -54,7 +62,8 @@ public function __construct(
         Escaper $escaper,
         Format $localeFormat,
         Data $directoryHelper,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->directoryHelper = $directoryHelper;
         $this->localeFormat = $localeFormat;
@@ -75,6 +84,7 @@ public function __construct(
         );
         parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
         $this->addClass('validate-zero-or-greater');
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -199,8 +209,7 @@ private function getHtmlForWeightSwitcher()
         $checkboxLabel = __('Change');
         $html .= <<<HTML
 <span class="attribute-change-checkbox">
-    <input type="checkbox" id="$dataCheckboxName" name="$dataCheckboxName" class="checkbox" $nameAttributeHtml
-        onclick="toogleFieldEditMode(this, 'weight-switcher1'); toogleFieldEditMode(this, 'weight-switcher0');" />
+    <input type="checkbox" id="$dataCheckboxName" name="$dataCheckboxName" class="checkbox" $nameAttributeHtml/>
     <label class="label" for="$dataCheckboxName">
         {$checkboxLabel}
     </label>
@@ -209,6 +218,12 @@ private function getHtmlForWeightSwitcher()
 
         $html .= '</label></div></div>';
 
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toogleFieldEditMode(this, 'weight-switcher1'); toogleFieldEditMode(this, 'weight-switcher0');",
+            "#". $dataCheckboxName
+        );
+
         return $html;
     }
 }
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/assign_products.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/assign_products.phtml
index af7aec12a57ed..e52b43b1c3d24 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/assign_products.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/edit/assign_products.phtml
@@ -5,8 +5,9 @@
  */
 
 /** @var \Magento\Catalog\Block\Adminhtml\Category\AssignProducts $block */
-
 /** @var \Magento\Catalog\Block\Adminhtml\Category\Tab\Product $blockGrid */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $blockGrid = $block->getBlockGrid();
 $gridJsObjectName = $blockGrid->getJsObjectName();
 ?>
@@ -23,6 +24,4 @@ $gridJsObjectName = $blockGrid->getJsObjectName();
     }
 </script>
 <!-- @todo remove when "UI components" will support such initialization -->
-<script>
-    require('mage/apply/main').apply();
-</script>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], "require('mage/apply/main').apply();", false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml
index cbda491a64740..e340e83e1f520 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml
@@ -5,14 +5,14 @@
  */
 ?>
 <?php
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-
 /** @var $block \Magento\Catalog\Block\Adminhtml\Form\Renderer\Fieldset\Element */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 /* @var $block \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element */
 $element = $block->getElement();
-$note = $element->getNote() ? '<div class="note admin__field-note">' . $block->escapeHtml($element->getNote()) . '</div>' : '';
+$note = $element->getNote() ?
+    '<div class="note admin__field-note">' . $block->escapeHtml($element->getNote()) . '</div>' : '';
 $elementBeforeLabel = $element->getExtType() == 'checkbox' || $element->getExtType() == 'radio';
 $addOn = $element->getBeforeElementHtml() || $element->getAfterElementHtml();
 $fieldId = ($element->getHtmlId()) ? ' id="attribute-' . $element->getHtmlId() . '-container"' : '';
@@ -26,6 +26,7 @@ $fieldClass .= ($entity && $entity->getIsUserDefined()) ? ' user-defined type-'
 
 $fieldAttributes = $fieldId . ' class="' . $block->escapeHtmlAttr($fieldClass) . '" '
     . $block->getUiId('form-field', $block->escapeHtmlAttr($element->getId()));
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 
 <?php $block->checkFieldDisable() ?>
@@ -33,20 +34,19 @@ $fieldAttributes = $fieldId . ' class="' . $block->escapeHtmlAttr($fieldClass) .
     $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode()
         : 'toggleValueElements(this, this.parentNode.parentNode.parentNode)';
 ?>
-<?php if (!$element->getNoDisplay()) :?>
-    <?php if ($element->getType() == 'hidden') :?>
+<?php if (!$element->getNoDisplay()):?>
+    <?php if ($element->getType() == 'hidden'):?>
         <?= $element->getElementHtml() ?>
-    <?php else :?>
+    <?php else:?>
     <div<?= /* @noEscape */ $fieldAttributes ?> data-attribute-code="<?= $element->getHtmlId() ?>"
-        data-apply-to="<?= $block->escapeHtmlAttr($this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode(
-            $element->hasEntityAttribute() ? $element->getEntityAttribute()->getApplyTo() : []
-        ))?>"
+        data-apply-to="<?= /* @noEscape */ $jsonHelper->jsonEncode($element->hasEntityAttribute() ?
+            $element->getEntityAttribute()->getApplyTo() : []) ?>"
         >
-        <?php if ($elementBeforeLabel) :?>
+        <?php if ($elementBeforeLabel):?>
             <?= $block->getElementHtml() ?>
             <?= $element->getLabelHtml('', $block->getScopeLabel()) ?>
             <?= /* @noEscape */ $note ?>
-        <?php else :?>
+        <?php else:?>
             <?= $element->getLabelHtml('', $block->getScopeLabel()) ?>
             <div class="admin__field-control control">
                 <?= ($addOn) ? '<div class="addon">' . $block->getElementHtml() . '</div>' : $block->getElementHtml() ?>
@@ -54,16 +54,20 @@ $fieldAttributes = $fieldId . ' class="' . $block->escapeHtmlAttr($fieldClass) .
             </div>
         <?php endif; ?>
         <div class="field-service">
-            <?php if ($block->canDisplayUseDefault()) :?>
+            <?php if ($block->canDisplayUseDefault()):?>
                 <label for="<?= $element->getHtmlId() ?>_default" class="choice use-default">
-                    <input <?php if ($element->getReadonly()) :?> disabled="disabled"<?php endif; ?>
+                    <input <?php if ($element->getReadonly()):?> disabled="disabled"<?php endif; ?>
                             type="checkbox"
                             name="use_default[]"
                             class="use-default-control"
                             id="<?= $element->getHtmlId() ?>_default"
-                            <?php if ($block->usedDefault()) :?> checked="checked"<?php endif; ?>
-                            onclick="<?= $block->escapeHtmlAttr($elementToggleCode) ?>"
+                            <?php if ($block->usedDefault()):?> checked="checked"<?php endif; ?>
                             value="<?= $block->escapeHtmlAttr($block->getAttributeCode()) ?>"/>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        "toggleValueElements(this, this.parentNode);",
+                        "#" . $element->getHtmlId() . "_default"
+                    ) ?>
                     <span class="use-default-label"><?= $block->escapeHtml(__('Use Default Value')) ?></span>
                 </label>
             <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml
index 64384ac391a8d..1290df418e5a6 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml
@@ -5,9 +5,12 @@
  */
 use Magento\Catalog\Helper\Data;
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+/** @var \Magento\Backend\Block\Template $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $jsonHelper = $block->getData('jsonHelper');
+$scriptString = <<<script
 require([
     "jquery",
     'Magento_Ui/js/modal/alert',
@@ -207,32 +210,39 @@ function switchDefaultValueField()
             setRowVisibility('is_unique', false);
             setRowVisibility('frontend_class', false);
         break;
-
-        <?php // phpcs:ignore Magento2.Templates.ThisInTemplate ?>
-        <?php foreach ($this->helper(Data::class)->getAttributeHiddenFields() as $type => $fields): ?>
-            case '<?= $block->escapeJs($type) ?>':
+script;
+foreach ($jsonHelper->getAttributeHiddenFields() as $type => $fields):
+            $scriptString .= <<<script
+            case '{$block->escapeJs($type)}':
                 var isFrontTabHidden = false;
-                <?php foreach ($fields as $one): ?>
-                    <?php if ($one == '_front_fieldset'): ?>
+script;
+    foreach ($fields as $one):
+        if ($one == '_front_fieldset'):
+            $scriptString .= <<<script
                         getFrontTab().hide();
                         isFrontTabHidden = true;
-                    <?php elseif ($one == '_default_value'): ?>
+script;
+        elseif ($one == '_default_value'):
+            $scriptString .= <<<script
                         defaultValueTextVisibility =
                         defaultValueTextareaVisibility =
                         defaultValueDateVisibility =
                         defaultValueYesnoVisibility = false;
-                    <?php elseif ($one == '_scope'): ?>
-                        scopeVisibility = false;
-                    <?php else: ?>
-                        setRowVisibility('<?= $block->escapeJs($one) ?>', false);
-                    <?php endif; ?>
-                <?php endforeach; ?>
-
+script;
+        elseif ($one == '_scope'):
+            $scriptString .= 'scopeVisibility = false;';
+        else:
+            $scriptString .= "setRowVisibility('" . $block->escapeJs($one) . "', false);";
+        endif;
+    endforeach;
+    $scriptString .= <<<script
                 if (!isFrontTabHidden){
                   getFrontTab().show();
                 }
             break;
-        <?php endforeach; ?>
+script;
+        endforeach;
+        $scriptString .= <<<script
 
         default:
             getFrontTab().show();
@@ -364,4 +374,6 @@ window.getFrontTab = getFrontTab;
 window.toggleApplyVisibility = toggleApplyVisibility;
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml
index dd1009cc5e033..447a9c4149bfa 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="attribute-set">
 
@@ -17,7 +18,7 @@
     </div>
     <div class="edit-attribute-set attribute-set-col">
         <?= $block->getSetFormHtml() ?>
-        <script>
+        <?php $scriptString = <<<script
             require([
                 "jquery",
                 "mage/mage"
@@ -26,14 +27,17 @@
                 jQuery('#set-prop-form').mage('validation', {errorClass: 'mage-error'});
 
             });
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
     <div class="attribute-set-col fieldset-wrapper">
         <div class="fieldset-wrapper-title">
             <span class="title"><?= $block->escapeHtml(__('Groups')) ?></span>
         </div>
-        <?php if (!$block->getIsReadOnly()) :?>
-            <?= /* @noEscape */ $block->getAddGroupButton() ?> <?= /* @noEscape */ $block->getDeleteGroupButton() ?>
+        <?php if (!$block->getIsReadOnly()):?>
+            <?= /* @noEscape */ $block->getAddGroupButton() ?> 
+            <?= /* @noEscape */ $block->getDeleteGroupButton() ?>
             <p class="note-block"><?= $block->escapeHtml(__('Double click on a group to rename it.')) ?></p>
         <?php endif; ?>
 
@@ -45,8 +49,19 @@
             <span class="title"><?= $block->escapeHtml(__('Unassigned Attributes')) ?></span>
         </div>
         <div id="tree-div2" class="attribute-set-tree"></div>
-        <script id="ie-deferred-loader" defer="defer" src="//:"></script>
-        <script>
+        <?= /* @noEscape */ $secureRenderer->renderTag(
+            'script',
+            ['id' => "ie-deferred-loader",  'defer' => "defer", 'src' => "//:"],
+            ' ',
+            false
+        ) ?>
+        <?php $readOnly = ($block->getIsReadOnly() ? 'false' : 'true');
+        $groupTree = /* @noEscape */ $block->getGroupTreeJson();
+        $attributeTreeJson = /* @noEscape */ $block->getAttributeTreeJson();
+        $systemAttributeWarning = $block->escapeJs(
+            __('This group contains system attributes. Please move system attributes to another group and try again.')
+        );
+        $scriptString = <<<script
             define("tree-panel",
                 [
                     "jquery",
@@ -57,8 +72,8 @@
                 ], function(jQuery, prompt, alert){
 
                 //<![CDATA[
-                var allowDragAndDrop = <?= ($block->getIsReadOnly() ? 'false' : 'true') ?>;
-                var canEditGroups = <?=  ($block->getIsReadOnly() ? 'false' : 'true') ?>;
+                var allowDragAndDrop = {$readOnly};
+                var canEditGroups = {$readOnly};
 
                 var TreePanels = function() {
                     // shorthand
@@ -85,7 +100,7 @@
                             });
 
                             tree.setRootNode(this.root);
-                            buildCategoryTree(this.root, <?= /* @noEscape */ $block->getGroupTreeJson() ?>);
+                            buildCategoryTree(this.root, {$groupTree});
                             // render the tree
                             tree.render();
                             this.root.expand(false, false);
@@ -93,7 +108,7 @@
 
                             this.ge = new Ext.tree.TreeEditor(tree, {
                                 allowBlank:false,
-                                blankText:'<?= $block->escapeJs(__('A name is required.')) ?>',
+                                blankText:'{$block->escapeJs(__('A name is required.'))}',
                                 selectOnFocus:true,
                                 cls:'folder'
                             });
@@ -124,7 +139,7 @@
                                 id:'free'
                             });
                             tree2.setRootNode(this.root2);
-                            buildCategoryTree(this.root2, <?= /* @noEscape */ $block->getAttributeTreeJson() ?>);
+                            buildCategoryTree(this.root2, {$attributeTreeJson});
 
                             this.root2.addListener('beforeinsert', editSet.rightBeforeInsert);
                             this.root2.addListener('beforeappend', editSet.rightBeforeAppend);
@@ -144,12 +159,15 @@
                             for( i in rootNode.childNodes ) {
                                 if(rootNode.childNodes[i].id) {
                                     var group = rootNode.childNodes[i];
-                                    editSet.req.groups[gIterator] = new Array(group.id, group.attributes.text.strip(), (gIterator+1));
+                                    editSet.req.groups[gIterator] = new Array(group.id, group.attributes.text.strip(),
+                                     (gIterator+1));
                                     var iterator = 0
                                     for( j in group.childNodes ) {
                                         iterator ++;
                                         if( group.childNodes[j].id > 0 ) {
-                                            editSet.req.attributes[group.childNodes[j].id] = new Array(group.childNodes[j].id, group.id, iterator, group.childNodes[j].attributes.entity_id);
+                                            editSet.req.attributes[group.childNodes[j].id] =
+                                             new Array(group.childNodes[j].id, group.id, iterator,
+                                              group.childNodes[j].attributes.entity_id);
                                         }
                                     }
                                     iterator = 0;
@@ -164,7 +182,8 @@
                             for( i in rootNode.childNodes ) {
                                 if(rootNode.childNodes[i].id) {
                                     if( rootNode.childNodes[i].id > 0 ) {
-                                        editSet.req.not_attributes[iterator] = rootNode.childNodes[i].attributes.entity_id;
+                                        editSet.req.not_attributes[iterator] =
+                                         rootNode.childNodes[i].attributes.entity_id;
                                     }
                                     iterator ++;
                                 }
@@ -231,7 +250,7 @@
 
                             if( editSet.SystemNodesExists(editSet.currentNode) ) {
                                 alert({
-                                    content: '<?= $block->escapeJs(__('This group contains system attributes. Please move system attributes to another group and try again.')) ?>'
+                                    content: '{$systemAttributeWarning}'
                                 });
                                 return;
                             }
@@ -258,7 +277,7 @@
                         SystemNodesExists : function(currentNode) {
                             if (!currentNode) {
                                 alert({
-                                    content: '<?= $block->escapeJs(__('Please select a node.')) ?>'
+                                    content: '{$block->escapeJs(__('Please select a node.'))}'
                                 });
                                 return;
                             }
@@ -279,8 +298,8 @@
 
                         addGroup : function() {
                             prompt({
-                                title: "<?= $block->escapeJs($block->escapeHtml(__('Add New Group'))) ?>",
-                                content: "<?= $block->escapeJs($block->escapeHtml(__('Please enter a new group name.'))) ?>",
+                                title: "{$block->escapeJs($block->escapeHtml(__('Add New Group')))}",
+                                content: "{$block->escapeJs($block->escapeHtml(__('Please enter a new group name.')))}",
                                 value: "",
                                 validation: true,
                                 validationRules: ['required-entry'],
@@ -344,8 +363,11 @@
                                 result = false;
                             }
                             for (var i=0; i < TreePanels.root.childNodes.length; i++) {
-                                if (TreePanels.root.childNodes[i].text.toLowerCase() == name.toLowerCase() && TreePanels.root.childNodes[i].id != exceptNodeId) {
-                                    errorText = '<?= $block->escapeJs(__('An attribute group named "/name/" already exists.')) ?>';
+                                if (TreePanels.root.childNodes[i].text.toLowerCase() == name.toLowerCase() &&
+                                    TreePanels.root.childNodes[i].id != exceptNodeId) {
+                                    errorText = '{$block->escapeJs(
+                                        __('An attribute group named "/name/" already exists.')
+                                    )}';
                                     alert({
                                         content: errorText.replace("/name/",name)
                                     });
@@ -373,7 +395,8 @@
                                 editSet.req.form_key = FORM_KEY;
                             }
                             var req = {data : Ext.util.JSON.encode(editSet.req)};
-                            var con = new Ext.lib.Ajax.request('POST', '<?= $block->escapeJs($block->escapeUrl($block->getMoveUrl())) ?>', {success:editSet.success,failure:editSet.failure}, req);
+                            var con = new Ext.lib.Ajax.request('POST', '{$block->escapeJs($block->getMoveUrl())}',
+                             {success:editSet.success,failure:editSet.failure}, req);
                         },
 
                         success : function(o) {
@@ -391,7 +414,7 @@
 
                         failure : function(o) {
                             alert({
-                                content: '<?= $block->escapeJs(__('Sorry, we\'re unable to complete this request.')) ?>'
+                                content: '{$block->escapeJs(__('Sorry, we\'re unable to complete this request.'))}'
                             });
                         },
 
@@ -408,7 +431,9 @@
                         rightBeforeAppend : function(tree, nodeThis, node, newParent) {
                             if (node.attributes.is_user_defined == 0) {
                                 alert({
-                                    content: '<?= $block->escapeJs(__('You can\'t remove attributes from this attribute set.')) ?>'
+                                    content: '{$block->escapeJs(
+                                        __('You can\'t remove attributes from this attribute set.')
+                                    )}'
                                 });
                                 return false;
                             } else {
@@ -424,7 +449,9 @@
 
                             if (node.attributes.is_unassignable == 0) {
                                 alert({
-                                    content: '<?= $block->escapeJs(__('You can\'t remove attributes from this attribute set.')) ?>'
+                                    content: '{$block->escapeJs(
+                                        __('You can\'t remove attributes from this attribute set.')
+                                    )}'
                                 });
                                 return false;
                             } else {
@@ -448,7 +475,7 @@
                         rightRemove : function(tree, nodeThis, node) {
                             if( nodeThis.firstChild == null && node.id != 'empty' ) {
                                 var newNode = new Ext.tree.TreeNode({
-                                    text : '<?= $block->escapeJs(__('Empty')) ?>',
+                                    text : '{$block->escapeJs(__('Empty'))}',
                                     id : 'empty',
                                     cls : 'folder',
                                     is_user_defined : 1,
@@ -485,6 +512,8 @@
 
             });
             require(["tree-panel"]);
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
 </div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml
index 4ecfdd16a882d..c3d8d5bc0f44e 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main/tree/group.phtml
@@ -6,8 +6,5 @@
 
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div id="tree-div1"/>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    "height:400px;margin-top:5px;overflow:auto",
-    '#tree-div1'
-) ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('div', ['id' => "tree-div1"], ' ', false) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("height:400px;margin-top:5px;overflow:auto", '#tree-div1') ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/add.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/add.phtml
index 227ed4be81fae..8f58d357f83e4 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/add.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/toolbar/add.phtml
@@ -3,12 +3,17 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?= $block->getFormHtml() ?>
-<script>
+
+<?php $scriptString = <<<script
 require(['jquery', "mage/mage"], function(jQuery){
 
-    jQuery('#<?= $block->escapeJs($block->getFormId()) ?>').mage('form').mage('validation');
+    jQuery('#{$block->escapeJs($block->getFormId())}').mage('form').mage('validation');
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/js.phtml
index 722e4ae7ef1f0..f5dfc3ae79fbe 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/js.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/js.phtml
@@ -3,9 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<script>
+<?php $scriptString = <<<script
 require([
     "prototype",
     "Magento_Catalog/catalog/product/composite/configure"
@@ -89,4 +91,6 @@ var DateOption = Class.create({
 productConfigure.opConfig.dateOption = new DateOption();
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml
index 68a7a3a69cfd3..fde7a9351756c 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/date.phtml
@@ -3,10 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Catalog\Block\Product\View\Options\Type\Date */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\Date */ ?>
+
 <?php $_option = $block->getOption(); ?>
 <?php $_optionId = (int)$_option->getId(); ?>
+<?php $optionId = /* @noEscape */ $_optionId ?>
 <div class="admin__field field<?= $_option->getIsRequire() ? ' required' : '' ?>">
     <label class="label admin__field-label">
         <?= $block->escapeHtml($_option->getTitle()) ?>
@@ -15,28 +19,30 @@
     <div class="admin__field-control control">
 
         <?php if ($_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_DATE_TIME
-            || $_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_DATE) :?>
+            || $_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_DATE):?>
 
             <?= $block->getDateHtml() ?>
 
-            <?php if (!$block->useCalendar()) :?>
-                <script>
+            <?php if (!$block->useCalendar()):?>
+                <?php $scriptString = <<<script
                     require([
                         "prototype",
                         "Magento_Catalog/catalog/product/composite/configure"
                     ], function(){
 
                         window.dateOption = productConfigure.opConfig.dateOption;
-                        Event.observe('options_<?= /* @noEscape */ $_optionId ?>_month', 'change', dateOption.reloadMonth.bind(dateOption));
-                        Event.observe('options_<?= /* @noEscape */ $_optionId ?>_year', 'change', dateOption.reloadMonth.bind(dateOption));
+                        Event.observe('options_{$optionId}_month', 'change', dateOption.reloadMonth.bind(dateOption));
+                        Event.observe('options_{$optionId}_year', 'change', dateOption.reloadMonth.bind(dateOption));
                     });
-                </script>
+script;
+                ?>
+                <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
             <?php endif; ?>
 
         <?php endif; ?>
 
         <?php if ($_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_DATE_TIME
-            || $_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_TIME) :?>
+            || $_option->getType() == \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_TIME):?>
             <span class="time-picker"><?= $block->getTimeHtml() ?></span>
         <?php endif; ?>
 
@@ -44,24 +50,28 @@
                name="validate_datetime_<?= /* @noEscape */ $_optionId ?>"
                class="validate-datetime-<?= /* @noEscape */ $_optionId ?>"
                value="" />
-        <script>
+        <?php $scriptString = <<<script
             require([
                 "jquery",
                 "mage/backend/validation"
             ], function(jQuery){
 
                 //<![CDATA[
-                <?php if ($_option->getIsRequire()) :?>
-                jQuery.validator.addMethod('validate-datetime-<?= /* @noEscape */ $_optionId ?>', function(v) {
-                    var dateTimeParts = jQuery('.datetime-picker[id^="options_<?= /* @noEscape */ $_optionId ?>"]');
+script;
+        if ($_option->getIsRequire()):
+            $scriptString .= <<<script
+                jQuery.validator.addMethod('validate-datetime-{$optionId}', function(v) {
+                    var dateTimeParts = jQuery('.datetime-picker[id^="options_{$optionId}"]');
                     for (var i=0; i < dateTimeParts.length; i++) {
                         if (dateTimeParts[i].value == "") return false;
                     }
                     return true;
-                }, '<?= $block->escapeJs(__('This is a required option.')) ?>');
-                <?php else :?>
-                jQuery.validator.addMethod('validate-datetime-<?= /* @noEscape */ $_optionId ?>', function(v) {
-                    var dateTimeParts = jQuery('.datetime-picker[id^="options_<?= /* @noEscape */ $_optionId ?>"]');
+                }, '{$block->escapeJs(__('This is a required option.'))}');
+script;
+        else:
+            $scriptString .= <<<script
+                jQuery.validator.addMethod('validate-datetime-{$optionId}', function(v) {
+                    var dateTimeParts = jQuery('.datetime-picker[id^="options_{$optionId}"]');
                     var hasWithValue = false, hasWithNoValue = false;
                     var pattern = /day_part$/i;
                     for (var i=0; i < dateTimeParts.length; i++) {
@@ -74,11 +84,15 @@
                         }
                     }
                     return hasWithValue ^ hasWithNoValue;
-                }, '<?= $block->escapeJs(__('The field isn\'t complete.')) ?>');
-                <?php endif; ?>
+                }, '{$block->escapeJs(__('The field isn\'t complete.'))}');
+script;
+        endif;
+        $scriptString .= <<<script
                 //]]>
 
             });
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
 </div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml
index 89d005a178fac..cda4e363d3f1e 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Catalog\Block\Product\View\Options\Type\File */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /* @var $block \Magento\Catalog\Block\Product\View\Options\Type\File */ ?>
 <?php $_option = $block->getOption(); ?>
 <?php $_fileInfo = $block->getFileInfo(); ?>
 <?php $_fileExists = $_fileInfo->hasData() ? true : false; ?>
@@ -14,15 +16,20 @@
 <?php $_fileNamed = $_fileName . '_name'; ?>
 <?php $_rand = rand(); ?>
 
-<script>
+<?php
+$rand = /* @noEscape */ $_rand;
+$fileName = /* @noEscape */ $_fileName;
+$fieldNameAction = /* @noEscape */ $_fieldNameAction;
+$fileNamed = /* @noEscape */ $_fileNamed;
+$scriptString = <<<script
 require(['prototype'], function(){
 
 //<![CDATA[
-    opFile<?= /* @noEscape */ $_rand ?> = {
+    opFile{$rand} = {
         initializeFile: function(inputBox) {
-            this.inputFile = inputBox.select('input[name="<?= /* @noEscape */ $_fileName ?>"]')[0];
-            this.inputFileAction = inputBox.select('input[name="<?= /* @noEscape */ $_fieldNameAction ?>"]')[0];
-            this.fileNameBox = inputBox.up('div').select('.<?= /* @noEscape */ $_fileNamed ?>')[0];
+            this.inputFile = inputBox.select('input[name="{$fileName}"]')[0];
+            this.inputFileAction = inputBox.select('input[name="{$fieldNameAction}"]')[0];
+            this.fileNameBox = inputBox.up('div').select('.{$fileNamed}')[0];
         },
 
         toggleFileChange: function(inputBox) {
@@ -57,44 +64,67 @@ require(['prototype'], function(){
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <div class="admin__field <?= $_option->getIsRequire() ? ' required _required' : '' ?>">
     <label class="admin__field-label label">
         <?= $block->escapeHtml($_option->getTitle()) ?>
         <?= /* @noEscape */ $block->getFormattedPrice() ?>
     </label>
-    <div class="admin__field-control control">
-        <?php if ($_fileExists) :?>
+    <div class="admin__field-control control" id="<?= /* @noEscape */ $_fileName ?>">
+        <?php if ($_fileExists):?>
             <span class="<?= /* @noEscape */ $_fileNamed ?>"><?= $block->escapeHtml($_fileInfo->getTitle()) ?></span>
-            <a href="javascript:void(0)" class="label" onclick="opFile<?= /* @noEscape */ $_rand ?>.toggleFileChange($(this).next('.input-box'))">
+            <a href="javascript:void(0)" class="label">
                 <?= $block->escapeHtml(__('Change')) ?>
             </a> 
-            <?php if (!$_option->getIsRequire()) :?>
-                <input type="checkbox" onclick="opFile<?= /* @noEscape */ $_rand ?>.toggleFileDelete($(this), $(this).next('.input-box'))" price="<?= $block->escapeHtmlAttr($block->getCurrencyPrice($_option->getPrice(true))) ?>"/>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "opFile" . /* @noEscape */ $_rand . ".toggleFileChange($(this).next('.input-box'))",
+                '#' . /* @noEscape */ $_fileName . ' a'
+            ); ?>
+            <?php if (!$_option->getIsRequire()):?>
+                <input type="checkbox"
+                       price="<?= $block->escapeHtmlAttr($block->getCurrencyPrice($_option->getPrice(true))) ?>"/>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    "opFile" . /* @noEscape */ $_rand . ".toggleFileDelete($(this), $(this).next('.input-box'))",
+                    '#' . /* @noEscape */ $_fileName . ' input[type="checkbox"]'
+                ) ?>
                 <span class="label"><?= $block->escapeHtml(__('Delete')) ?></span>
             <?php endif; ?>
         <?php endif; ?>
         <div class="input-box" <?= $_fileExists ? 'style="display:none"' : '' ?>>
             <!-- ToDo UI: add appropriate file class when z-index issue in ui dialog will be resolved  -->
-            <input type="file" name="<?= /* @noEscape */ $_fileName ?>" class="product-custom-option<?= $_option->getIsRequire() ? ' required-entry' : '' ?>" price="<?= $block->escapeHtmlAttr($block->getCurrencyPrice($_option->getPrice(true))) ?>" <?= $_fileExists ? 'disabled="disabled"' : '' ?>/>
-            <input type="hidden" name="<?= /* @noEscape */ $_fieldNameAction ?>" value="<?= /* @noEscape */ $_fieldValueAction ?>" />
+            <input type="file" name="<?= /* @noEscape */ $_fileName ?>"
+                   class="product-custom-option<?= $_option->getIsRequire() ? ' required-entry' : '' ?>"
+                   price="<?= $block->escapeHtmlAttr($block->getCurrencyPrice($_option->getPrice(true))) ?>"
+                <?= $_fileExists ? 'disabled="disabled"' : '' ?>/>
+            <input type="hidden" name="<?= /* @noEscape */ $_fieldNameAction ?>"
+                   value="<?= /* @noEscape */ $_fieldValueAction ?>" />
 
-            <?php if ($_option->getFileExtension()) :?>
+            <?php if ($_option->getFileExtension()):?>
                 <div class="admin__field-note">
-                    <span><?= $block->escapeHtml(__('Compatible file extensions to upload')) ?>: <strong><?= $block->escapeHtml($_option->getFileExtension()) ?></strong></span>
+                    <span><?= $block->escapeHtml(__('Compatible file extensions to upload')) ?>:
+                        <strong><?= $block->escapeHtml($_option->getFileExtension()) ?></strong>
+                    </span>
                 </div>
             <?php endif; ?>
 
-            <?php if ($_option->getImageSizeX() > 0) :?>
+            <?php if ($_option->getImageSizeX() > 0):?>
                 <div class="admin__field-note">
-                    <span><?= $block->escapeHtml(__('Maximum image width')) ?>: <strong><?= (int)$_option->getImageSizeX() ?> <?= $block->escapeHtml(__('px.')) ?></strong></span>
+                    <span><?= $block->escapeHtml(__('Maximum image width')) ?>:
+                        <strong><?= (int)$_option->getImageSizeX() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
+                    </span>
                 </div>
             <?php endif; ?>
 
-            <?php if ($_option->getImageSizeY() > 0) :?>
+            <?php if ($_option->getImageSizeY() > 0):?>
                 <div class="admin__field-note">
-                    <span><?= $block->escapeHtml(__('Maximum image height')) ?>: <strong><?= (int)$_option->getImageSizeY() ?> <?= $block->escapeHtml(__('px.')) ?></strong></span>
+                    <span><?= $block->escapeHtml(__('Maximum image height')) ?>:
+                        <strong><?= (int)$_option->getImageSizeY() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
+                    </span>
                 </div>
             <?php endif; ?>
         </div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
index 66df098a194ae..624e006bab9a1 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
@@ -9,6 +9,7 @@
 
 /**
  * @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <div class="admin__scope-old">
@@ -34,30 +35,38 @@
                    title="<?= $block->escapeHtmlAttr(__('Product online status')) ?>"></label>
         </div>
 
-        <?php if ($block->getProductId()) :?>
+        <?php if ($block->getProductId()):?>
             <?= $block->getDeleteButtonHtml() ?>
         <?php endif; ?>
-        <?php if ($block->getProductSetId()) :?>
+        <?php if ($block->getProductSetId()):?>
             <?= $block->getChangeAttributeSetButtonHtml() ?>
             <?= $block->getSaveSplitButtonHtml() ?>
         <?php endif; ?>
         <?= $block->getBackButtonHtml() ?>
     </div>
 </div>
-<?php if ($block->getUseContainer()) :?>
+<?php if ($block->getUseContainer()): ?>
 <form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" enctype="multipart/form-data"
       data-form="edit-product" data-product-id="<?= $block->escapeHtmlAttr($block->getProduct()->getId()) ?>">
 <?php endif; ?>
     <?= $block->getBlockHtml('formkey') ?>
-    <div data-role="tabs" id="product-edit-form-tabs"></div> <?php /* @TODO: remove id after elimination of setDestElementId('product-edit-form-tabs') */?>
+    <div data-role="tabs" id="product-edit-form-tabs"></div>
+    <?php /* @TODO: remove id after elimination of setDestElementId('product-edit-form-tabs') */?>
     <?= $block->getChildHtml('product-type-tabs') ?>
-    <input type="hidden" id="product_type_id" value="<?= $block->escapeHtmlAttr($block->getProduct()->getTypeId()) ?>"/>
-    <input type="hidden" id="attribute_set_id" value="<?= $block->escapeHtmlAttr($block->getProduct()->getAttributeSetId()) ?>"/>
+    <input type="hidden" id="product_type_id"
+           value="<?= $block->escapeHtmlAttr($block->getProduct()->getTypeId()) ?>"/>
+    <input type="hidden" id="attribute_set_id"
+           value="<?= $block->escapeHtmlAttr($block->getProduct()->getAttributeSetId()) ?>"/>
     <button type="submit" class="hidden"></button>
-<?php if ($block->getUseContainer()) :?>
+<?php if ($block->getUseContainer()):?>
 </form>
 <?php endif; ?>
-<script>
+<?php $helper = $block->getData('helper');
+$jsonFieldsAutogenerationMasks  = /* @noEscape */ $helper->jsonEncode($block->getFieldsAutogenerationMasks());
+$jsonAttributesAllowedForAutogeneration = /* @noEscape */ $helper->jsonEncode(
+    $block->getAttributesAllowedForAutogeneration()
+);
+$scriptString = <<<scriptStr
 require([
     "jquery",
     "Magento_Catalog/catalog/type-events",
@@ -129,10 +138,10 @@ require([
             }
         }
     });
-    $form.mage('validation', {validationUrl: '<?= $block->escapeJs($block->escapeUrl($block->getValidationUrl())) ?>'});
+    $form.mage('validation', {validationUrl: '{$block->escapeJs($block->getValidationUrl())}'});
 
-    var masks = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getFieldsAutogenerationMasks()) ?>;
-    var availablePlaceholders = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getAttributesAllowedForAutogeneration()) ?>;
+    var masks = {$jsonFieldsAutogenerationMasks};
+    var availablePlaceholders = {$jsonAttributesAllowedForAutogeneration};
     var Autogenerator = function(masks) {
         this._masks = masks || {};
         this._fieldReverseIndex = this._buildReverseIndex(this._masks);
@@ -306,7 +315,8 @@ require([
                             $tabToMove.insertAfter($tabs.eq(index - 1).closest('li'));
                         }
                         $tabToMove.removeClass(removedElementClass).removeClass('ignore-validate');
-                        $tabs = $tabContainer.find('li:not(.' + removedElementClass + ')  .tab-item-link.user-defined:not(.ajax)');
+                        $tabs = $tabContainer
+                        .find('li:not(.' + removedElementClass + ')  .tab-item-link.user-defined:not(.ajax)');
                     });
                 });
             });
@@ -405,7 +415,9 @@ require([
 
     });
 });
-</script>
+scriptStr;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <script type="text/x-magento-init">
     {
         "*": {
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml
index 792af12494af6..129b4d9177dc1 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/inventory.phtml
@@ -5,8 +5,10 @@
  */
 
 /** @var Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Inventory $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
     require(['jquery'], function($){
         $('[data-role=toggle-editability-all]').change(function(e) {
             var toggler = $(this);
@@ -27,7 +29,9 @@
             someEditable.prop('disabled', useConfigSettings.prop('checked'));
         });
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <?php
 $defaultMinSaleQty = $block->getDefaultConfigValue('min_sale_qty');
@@ -52,17 +56,19 @@ if (!is_numeric($defaultMinSaleQty)) {
             <div class="control">
                 <div class="fields-group-2">
                     <div class="field">
-                        <select id="inventory_manage_stock" name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[manage_stock]"
+                        <select id="inventory_manage_stock"
+                                name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[manage_stock]"
                                 class="select" disabled="disabled">
                             <option value="1"><?= $block->escapeHtml(__('Yes')) ?></option>
                             <option value="0"
-                                <?php if ($block->getFieldValue('manage_stock') == 0) :?>
+                                <?php if ($block->getFieldValue('manage_stock') == 0):?>
                                     selected="selected"
                                 <?php endif; ?>><?= $block->escapeHtml(__('No')) ?></option>
                         </select>
                     </div>
                     <div class="field choice">
-                        <input name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[use_config_manage_stock]" type="checkbox"
+                        <input name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[use_config_manage_stock]"
+                               type="checkbox"
                                id="inventory_use_config_manage_stock" data-role="toggle-editability" value="1"
                                checked="checked" disabled="disabled"/>
                         <label for="inventory_use_config_manage_stock"
@@ -211,13 +217,14 @@ if (!is_numeric($defaultMinSaleQty)) {
                                 disabled="disabled">
                             <option value="0"><?= $block->escapeHtml(__('No')) ?></option>
                             <option value="1"
-                                <?php if ($block->getDefaultConfigValue('is_qty_decimal') == 1) :?>
+                                <?php if ($block->getDefaultConfigValue('is_qty_decimal') == 1):?>
                                     selected="selected"
                                 <?php endif; ?>><?= $block->escapeHtml(__('Yes')) ?></option>
                         </select>
                     </div>
                     <div class="field choice">
-                        <input type="checkbox" id="inventory_is_qty_decimal_checkbox" data-role="toggle-editability-all"/>
+                        <input type="checkbox" id="inventory_is_qty_decimal_checkbox"
+                               data-role="toggle-editability-all"/>
                         <label for="inventory_is_qty_decimal_checkbox"
                                class="label"><span><?= $block->escapeHtml(__('Change')) ?></span></label>
                     </div>
@@ -238,10 +245,13 @@ if (!is_numeric($defaultMinSaleQty)) {
                                 name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[backorders]"
                                 class="select"
                                 disabled="disabled">
-                            <?php foreach ($block->getBackordersOption() as $option) :?>
-                                <?php $_selected = ($option['value'] == $block->getDefaultConfigValue('backorders')) ? ' selected="selected"' : '' ?>
+                            <?php foreach ($block->getBackordersOption() as $option):?>
+                                <?php $_selected = ($option['value'] == $block->getDefaultConfigValue('backorders')) ?
+                                    ' selected="selected"' : '' ?>
                                 <option
-                                    value="<?= $block->escapeHtmlAttr($option['value']) ?>"<?= /* @noEscape */ $_selected ?>><?= $block->escapeHtml($option['label']) ?></option>
+                                    value="<?= $block->escapeHtmlAttr($option['value']) ?>"
+                                    <?= /* @noEscape */ $_selected ?>><?= $block->escapeHtml($option['label']) ?>
+                                </option>
                             <?php endforeach; ?>
                         </select>
                     </div>
@@ -291,7 +301,8 @@ if (!is_numeric($defaultMinSaleQty)) {
                                class="label"><span><?= $block->escapeHtml(__('Use Config Settings')) ?></span></label>
                     </div>
                     <div class="field choice">
-                        <input type="checkbox" id="inventory_notify_stock_qty_checkbox" data-role="toggle-editability-all"/>
+                        <input type="checkbox" id="inventory_notify_stock_qty_checkbox"
+                               data-role="toggle-editability-all"/>
                         <label for="inventory_notify_stock_qty_checkbox"
                                class="label"><span><?= $block->escapeHtml(__('Change')) ?></span></label>
                     </div>
@@ -314,7 +325,7 @@ if (!is_numeric($defaultMinSaleQty)) {
                                 disabled="disabled">
                             <option value="1"><?= $block->escapeHtml(__('Yes')) ?></option>
                             <option value="0"
-                                <?php if ($block->getDefaultConfigValue('enable_qty_increments') == 0) :?>
+                                <?php if ($block->getDefaultConfigValue('enable_qty_increments') == 0):?>
                                     selected="selected"
                                 <?php endif; ?>><?= $block->escapeHtml(__('No')) ?></option>
                         </select>
@@ -330,7 +341,8 @@ if (!is_numeric($defaultMinSaleQty)) {
                                class="label"><span><?= $block->escapeHtml(__('Use Config Settings')) ?></span></label>
                     </div>
                     <div class="field choice">
-                        <input type="checkbox" id="inventory_enable_qty_increments_checkbox" data-role="toggle-editability-all"/>
+                        <input type="checkbox" id="inventory_enable_qty_increments_checkbox"
+                               data-role="toggle-editability-all"/>
                         <label for="inventory_enable_qty_increments_checkbox"
                                class="label"><span><?= $block->escapeHtml(__('Change')) ?></span></label>
                     </div>
@@ -364,7 +376,8 @@ if (!is_numeric($defaultMinSaleQty)) {
                                class="label"><span><?= $block->escapeHtml(__('Use Config Settings')) ?></span></label>
                     </div>
                     <div class="field choice">
-                        <input type="checkbox" id="inventory_qty_increments_checkbox" data-role="toggle-editability-all"/>
+                        <input type="checkbox" id="inventory_qty_increments_checkbox"
+                               data-role="toggle-editability-all"/>
                         <label for="inventory_qty_increments_checkbox"
                                class="label"><span><?= $block->escapeHtml(__('Change')) ?></span></label>
                     </div>
@@ -385,11 +398,15 @@ if (!is_numeric($defaultMinSaleQty)) {
                                 name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[is_in_stock]" class="select"
                                 disabled="disabled">
                             <option value="1"><?= $block->escapeHtml(__('In Stock')) ?></option>
-                            <option value="0"<?php if ($block->getDefaultConfigValue('is_in_stock') == 0) :?> selected<?php endif; ?>><?= $block->escapeHtml(__('Out of Stock')) ?></option>
+                            <option value="0"
+                                <?php if ($block->getDefaultConfigValue('is_in_stock') == 0):?> selected<?php endif; ?>>
+                                <?= $block->escapeHtml(__('Out of Stock')) ?>
+                            </option>
                         </select>
                     </div>
                     <div class="field choice">
-                        <input type="checkbox" id="inventory_stock_availability_checkbox" data-role="toggle-editability-all"/>
+                        <input type="checkbox" id="inventory_stock_availability_checkbox"
+                               data-role="toggle-editability-all"/>
                         <label for="inventory_stock_availability_checkbox"
                                class="label"><span><?= $block->escapeHtml(__('Change')) ?></span></label>
                     </div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml
index 98b06050e0d1d..d5859240875cd 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/action/websites.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block Magento\Catalog\Block\Adminhtml\Product\Edit\Action\Attribute\Tab\Websites */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div class="fieldset-wrapper" id="add-products-to-website-wrapper">
@@ -15,24 +16,27 @@
         <br>
         <div class="store-scope">
             <div class="store-tree" id="add-products-to-website-content">
-                <?php foreach ($block->getWebsiteCollection() as $_website) :?>
+                <?php foreach ($block->getWebsiteCollection() as $_website):?>
                     <div class="website-name">
                         <input name="add_website_ids[]"
                                value="<?= $block->escapeHtmlAttr($_website->getId()) ?>"
-                            <?php if ($block->getWebsitesReadonly()) :?>
+                            <?php if ($block->getWebsitesReadonly()):?>
                                 disabled="disabled"
                             <?php endif;?>
                                class="checkbox website-checkbox"
                                id="add_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>"
                                type="checkbox" />
-                        <label for="add_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>"><?= $block->escapeHtml($_website->getName()) ?></label>
+                        <label for="add_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>">
+                            <?= $block->escapeHtml($_website->getName()) ?>
+                        </label>
                     </div>
-                    <dl class="webiste-groups" id="add_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>_data">
-                        <?php foreach ($block->getGroupCollection($_website) as $_group) :?>
+                    <dl class="webiste-groups"
+                        id="add_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>_data">
+                        <?php foreach ($block->getGroupCollection($_website) as $_group):?>
                             <dt><?= $block->escapeHtml($_group->getName()) ?></dt>
                             <dd class="group-stores">
                                 <ul>
-                                <?php foreach ($block->getStoreCollection($_group) as $_store) :?>
+                                <?php foreach ($block->getStoreCollection($_group) as $_store):?>
                                     <li>
                                         <?= $block->escapeHtml($_store->getName()) ?>
                                     </li>
@@ -55,30 +59,35 @@
         <br>
         <div class="messages">
             <div class="message message-notice">
-                <div><?= $block->escapeHtml(__('To hide an item in catalog or search results, set the status to "Disabled".')) ?></div>
+                <div><?= $block->escapeHtml(
+                    __('To hide an item in catalog or search results, set the status to "Disabled".')
+                ) ?>
+                </div>
             </div>
         </div>
         <div class="store-scope">
             <div class="store-tree" id="remove-products-to-website-content">
-                <?php foreach ($block->getWebsiteCollection() as $_website) :?>
+                <?php foreach ($block->getWebsiteCollection() as $_website):?>
                     <div class="website-name">
                         <input name="remove_website_ids[]"
                                value="<?= $block->escapeHtmlAttr($_website->getId()) ?>"
-                            <?php if ($block->getWebsitesReadonly()) :?>
+                            <?php if ($block->getWebsitesReadonly()):?>
                                 disabled="disabled"
                             <?php endif;?>
                                class="checkbox website-checkbox"
                                id="remove_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>"
                                type="checkbox" />
-                        <label for="remove_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>"><?= $block->escapeHtml($_website->getName()) ?></label>
+                        <label for="remove_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>">
+                            <?= $block->escapeHtml($_website->getName()) ?>
+                        </label>
                     </div>
                     <dl class="webiste-groups"
                         id="remove_product_website_<?= $block->escapeHtmlAttr($_website->getId()) ?>_data">
-                        <?php foreach ($block->getGroupCollection($_website) as $_group) :?>
+                        <?php foreach ($block->getGroupCollection($_website) as $_group):?>
                             <dt><?= $block->escapeHtml($_group->getName()) ?></dt>
                             <dd class="group-stores">
                                 <ul>
-                                <?php foreach ($block->getStoreCollection($_group) as $_store) :?>
+                                <?php foreach ($block->getStoreCollection($_group) as $_store):?>
                                     <li>
                                         <?= $block->escapeHtml($_store->getName()) ?>
                                     </li>
@@ -93,7 +102,7 @@
     </fieldset>
 </div>
 
-<script>
+<?php $scriptString = <<<script
 require([
     'prototype'
 ], function () {
@@ -120,4 +129,6 @@ require([
         }
     }
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml
index d073053e2f854..3a25ed1e135bd 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml
@@ -7,6 +7,7 @@
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 
 /* @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\AttributeSet */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <script id="product-template-selector-template" type="text/x-magento-template">
 <% if (!data.term && data.items.length && !data.allShown()) { %>
@@ -23,7 +24,9 @@
 </button>
 <% } %>
 </script>
-<script>
+<?php $jsonHelper = $block->getData('jsonHelper');
+$selectorOptions = /* @noEscape */ $jsonHelper->jsonEncode($block->getSelectorOptions());
+$scriptString = <<<script
     require(["jquery","mage/mage","mage/backend/suggest"],function ($) {
         var $suggest = $('#product-template-suggest');
         $suggest.closest('.dropdown-menu').siblings('[data-toggle=dropdown]').on('click.toggleDropdown', function () {
@@ -32,7 +35,7 @@
             }
         });
         $suggest
-            .mage('suggest',<?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getSelectorOptions()) ?>)
+            .mage('suggest', {$selectorOptions})
             .on('suggestselect', function (e, ui) {
                 if (ui.item.id) {
                     $('[data-form=edit-product]').trigger('changeAttributeSet', ui.item);
@@ -40,4 +43,6 @@
                 }
             });
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml
index 713366e73aba5..1811217eeac11 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml
@@ -5,8 +5,10 @@
  */
 
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
+/** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Option */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Option */ ?>
 <?= $block->getTemplatesHtml() ?>
 <script id="custom-option-base-template" type="text/x-magento-template">
     <div class="fieldset-wrapper admin__collapsible-block-wrapper opened" id="option_<%- data.id %>">
@@ -68,7 +70,8 @@
                                    type="text"
                                    value="<%- data.title %>"
                                    data-store-label="<%- data.title %>"
-                                   <% if (typeof data.scopeTitleDisabled != 'undefined' && data.scopeTitleDisabled != null) { %> disabled="disabled" <% } %>
+                                   <% if (typeof data.scopeTitleDisabled != 'undefined' &&
+                                          data.scopeTitleDisabled != null) { %> disabled="disabled" <% } %>
                                    >
                             <%- data.checkboxScopeTitle %>
                         </div>
@@ -92,20 +95,39 @@
                             <label for="field-option-req">
                                 <?= $block->escapeHtml(__('Required')) ?>
                             </label>
-                            <span style="display:none"><?= $block->getRequireSelectHtml() ?></span>
+                            <span><?= $block->getRequireSelectHtml() ?></span>
                         </div>
                     </div>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                        "display:none",
+                        "input#" . /* @noEscape */ $block->getFieldId() ."_<%- data.id %>_required"
+                    ) ?>
                 </fieldset>
             </fieldset>
         </div>
     </div>
 </script>
 
-<div id="import-container" style="display: none;"></div>
-<?php if (!$block->isReadonly()) :?>
+<div id="import-container"></div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#import-container') ?>
+<?php if (!$block->isReadonly()):?>
 <div><input type="hidden" name="affect_product_custom_options" value="1"/></div>
 <?php endif; ?>
-<script>
+<?php $jsonHelper = $block->getData('jsonHelper');
+
+$customOptions = /* @noEscape */ $jsonHelper->jsonEncode(
+    [
+        'fieldId' => $block->getFieldId(),
+        'productGridUrl' => $block->escapeJs($block->getProductGridUrl()),
+        'formKey' => $block->getFormKey(),
+        'customOptionsUrl' => $block->escapeJs($block->getCustomOptionsUrl()),
+        'isReadonly' => (bool) $block->isReadonly(),
+        'itemCount' => (int) $block->getItemCount(),
+        'currentProductId' => (int) $block->getCurrentProductId(),
+    ]
+);
+
+$scriptString = <<<script
 require([
     "jquery",
     "Magento_Catalog/js/custom-options"
@@ -113,23 +135,17 @@ require([
 
 jQuery(function ($) {
     var fieldSet = $('[data-block=product-custom-options]');
-    fieldSet.customOptions(<?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode(
-        [
-            'fieldId' => $block->getFieldId(),
-            'productGridUrl' => $block->escapeUrl($block->getProductGridUrl()),
-            'formKey' => $block->getFormKey(),
-            'customOptionsUrl' => $block->escapeUrl($block->getCustomOptionsUrl()),
-            'isReadonly' => (bool) $block->isReadonly(),
-            'itemCount' => (int) $block->getItemCount(),
-            'currentProductId' => (int) $block->getCurrentProductId(),
-        ]
-    )?>);
+    fieldSet.customOptions({$customOptions});
     //adding data to templates
-    <?php /** @var $_value \Magento\Framework\DataObject */ ?>
-    <?php foreach ($block->getOptionValues() as $_value) :?>
-        fieldSet.customOptions('addOption', <?= /* @noEscape */ $_value->toJson() ?>);
-    <?php endforeach; ?>
+script;
+/** @var $_value \Magento\Framework\DataObject */
+foreach ($block->getOptionValues() as $_value):
+    $scriptString .= " fieldSet.customOptions('addOption', " . /* @noEscape */ $_value->toJson() . ');' . PHP_EOL;
+endforeach;
+$scriptString .= <<<script
 });
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml
index e66a18c677cc3..34fcebba8854c 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml
@@ -7,6 +7,7 @@
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 
 /* @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Price\Tier */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 $element = $block->getElement();
 ?>
 <?php $_htmlId      = $block->getElement()->getHtmlId() ?>
@@ -20,33 +21,41 @@ $element = $block->getElement();
 
 <?php $_showWebsite = $block->isShowWebsiteColumn(); ?>
 <?php $_showWebsite = $block->isMultiWebsites(); ?>
-<div class="field" id="attribute-<?= /* @noEscape */ $_htmlId ?>-container" data-attribute-code="<?= /* @noEscape */ $_htmlId ?>"
+<?php $jsonHelper = $block->getData('jsonHelper'); ?>
+<div class="field" id="attribute-<?= /* @noEscape */ $_htmlId ?>-container"
+     data-attribute-code="<?= /* @noEscape */ $_htmlId ?>"
      data-apply-to="<?= $block->escapeHtml(
-         $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode(
-             $element->hasEntityAttribute() ? $element->getEntityAttribute()->getApplyTo() : []
-         )
+         $jsonHelper->jsonEncode($element->hasEntityAttribute() ? $element->getEntityAttribute()->getApplyTo() : [])
      )?>">
     <label class="label"><span><?= $block->escapeHtml($block->getElement()->getLabel()) ?></span></label>
     <div class="control">
         <table class="admin__control-table tiers_table" id="tiers_table">
             <thead>
                 <tr>
-                    <th class="col-websites" <?php if (!$_showWebsite) :?>style="display:none"<?php endif; ?>><?= $block->escapeHtml(__('Web Site')) ?></th>
+                    <th class="col-websites"><?= $block->escapeHtml(__('Web Site')) ?></th>
                     <th class="col-customer-group"><?= $block->escapeHtml(__('Customer Group')) ?></th>
                     <th class="col-qty required"><?= $block->escapeHtml(__('Quantity')) ?></th>
-                    <th class="col-price required"><?= $block->escapeHtml($block->getPriceColumnHeader(__('Item Price'))) ?></th>
+                    <th class="col-price required">
+                        <?= $block->escapeHtml($block->getPriceColumnHeader(__('Item Price'))) ?>
+                    </th>
                     <th class="col-delete"><?= $block->escapeHtml(__('Action')) ?></th>
                 </tr>
+                <?php if (!$_showWebsite): ?>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'th.col-websites'); ?>
+                <?php endif; ?>
             </thead>
             <tbody id="<?= /* @noEscape */ $_htmlId ?>_container"></tbody>
             <tfoot>
                 <tr>
-                    <td colspan="<?php if (!$_showWebsite) :?>4<?php else :?>5<?php endif; ?>" class="col-actions-add"><?= $block->getAddButtonHtml() ?></td>
+                    <td colspan="<?php if (!$_showWebsite):?>4<?php else:?>5<?php endif; ?>"
+                        class="col-actions-add"><?= $block->getAddButtonHtml() ?>
+                    </td>
                 </tr>
             </tfoot>
         </table>
 
-<script>
+<?php $htmlName = /* @noEscape */ $_htmlName;
+$scriptString = <<<script
 require([
     'mage/template',
     "prototype",
@@ -55,39 +64,81 @@ require([
 
 //<![CDATA[
 var tierPriceRowTemplate = '<tr>'
-    + '<td class="col-websites"<?php if (!$_showWebsite) :?> style="display:none"<?php endif; ?>>'
-    + '<select class="<?= $block->escapeHtmlAttr($_htmlClass) ?> required-entry" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][website_id]" id="tier_price_row_<%- data.index %>_website">'
-    <?php foreach ($block->getWebsites() as $_websiteId => $_info) :?>
-    + '<option value="<?= $block->escapeHtmlAttr($_websiteId) ?>"><?= $block->escapeHtml($_info['name']) ?><?php if (!empty($_info['currency'])) :?> [<?= $block->escapeHtml($_info['currency']) ?>]<?php endif; ?></option>'
-    <?php endforeach ?>
+    + '<td class="col-websites">'
+    + '<select class="{$block->escapeHtmlAttr($_htmlClass)} required-entry"
+     name="{$htmlName}[<%- data.index %>][website_id]" id="tier_price_row_<%- data.index %>_website">'
+script;
+foreach ($block->getWebsites() as $_websiteId => $_info):
+    $scriptString .= <<<script
+    + '<option value="{$block->escapeHtmlAttr($_websiteId)}">{$block->escapeHtml($_info['name'])}
+script;
+    if (!empty($_info['currency'])):
+        $scriptString .= <<<script
+            [{$block->escapeHtml($_info['currency'])}]
+script;
+    endif;
+    $scriptString .= <<<script
+    </option>'
+script;
+    endforeach;
+    $scriptString .= <<<script
     + '</select></td>'
-    + '<td class="col-customer-group"><select class="<?= $block->escapeHtmlAttr($_htmlClass) ?> custgroup required-entry" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][cust_group]" id="tier_price_row_<%- data.index %>_cust_group">'
-    <?php foreach ($block->getCustomerGroups() as $_groupId => $_groupName) :?>
-    + '<option value="<?= $block->escapeHtmlAttr($_groupId) ?>"><?= $block->escapeHtml($_groupName) ?></option>'
-    <?php endforeach ?>
+    + '<td class="col-customer-group"><select class="{$block->escapeJs($_htmlClass)} custgroup required-entry"
+     name="{$htmlName}[<%- data.index %>][cust_group]" id="tier_price_row_<%- data.index %>_cust_group">'
+script;
+foreach ($block->getCustomerGroups() as $_groupId => $_groupName):
+    $scriptString .= <<<script
+    + '<option value="{$block->escapeJs($_groupId)}">{$block->escapeJs($_groupName)}</option>'
+script;
+    endforeach;
+    $scriptString .= <<<script
     + '</select></td>'
     + '<td class="col-qty">'
-        + '<input class="<?= $block->escapeHtmlAttr($_htmlClass) ?> qty required-entry validate-greater-than-zero" type="text" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][price_qty]" value="<%- data.qty %>" id="tier_price_row_<%- data.index %>_qty" />'
-        + '<span><?= $block->escapeHtml(__("and above")) ?></span>'
+        + '<input class="{$block->escapeJs($_htmlClass)} qty required-entry validate-greater-than-zero"
+         type="text" name="{$htmlName}[<%- data.index %>][price_qty]" value="<%- data.qty %>"
+          id="tier_price_row_<%- data.index %>_qty" />'
+        + '<span>{$block->escapeHtml(__("and above"))}</span>'
     + '</td>'
-    + '<td class="col-price"><input class="<?= $block->escapeHtmlAttr($_htmlClass) ?> required-entry <?= $block->escapeHtmlAttr($_priceValueValidation) ?>" type="text" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][price]" value="<%- data.price %>" id="tier_price_row_<%- data.index %>_price" /></td>'
-    + '<td class="col-delete"><input type="hidden" name="<?= /* @noEscape */ $_htmlName ?>[<%- data.index %>][delete]" class="delete" value="" id="tier_price_row_<%- data.index %>_delete" />'
-    + '<button title="<?= $block->escapeHtml(__('Delete Tier')) ?>" type="button" class="action- scalable delete icon-btn delete-product-option" id="tier_price_row_<%- data.index %>_delete_button" onclick="return tierPriceControl.deleteItem(event);">'
-    + '<span><?= $block->escapeHtml(__("Delete")) ?></span></button></td>'
+    + '<td class="col-price"><input class="{$block->escapeJs($_htmlClass)} required-entry
+     {$block->escapeJs($_priceValueValidation)}" type="text" name="{$htmlName}[<%- data.index %>][price]"
+      value="<%- data.price %>" id="tier_price_row_<%- data.index %>_price" /></td>'
+    + '<td class="col-delete"><input type="hidden" name="{$htmlName}[<%- data.index %>][delete]" class="delete"
+     value="" id="tier_price_row_<%- data.index %>_delete" />'
+    + '<button title="{$block->escapeJs(__('Delete Tier'))}" type="button"
+     class="action- scalable delete icon-btn delete-product-option"
+      id="tier_price_row_<%- data.index %>_delete_button">'
+    + '<span>{$block->escapeJs(__("Delete"))}</span></button></td>'
     + '</tr>';
-
+script;
+
+if (!$_showWebsite):
+    $scriptString .= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'td.col-websites');
+endif;
+    $scriptString .= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        'return tierPriceControl.deleteItem(event);',
+        "'td#tier_price_row_<%- data.index %>_delete_button"
+    );
+
+    $defaultWesite = (int) $block->getDefaultWebsite();
+    $defaultCustomerGroup = (int) $block->getDefaultCustomerGroup();
+    $scriptString .= <<<script
 var tierPriceControl = {
     template: mageTemplate(tierPriceRowTemplate),
     itemsCount: 0,
     addItem : function () {
-        <?php if ($_readonly) :?>
+script;
+    if ($_readonly):
+        $scriptString .= <<<script
         if (arguments.length < 4) {
             return;
         }
-        <?php endif; ?>
+script;
+    endif;
+    $scriptString .= <<<script
         var data = {
-            website_id: '<?= (int) $block->getDefaultWebsite() ?>',
-            group: '<?= (int) $block->getDefaultCustomerGroup() ?>',
+            website_id: '{$defaultWesite}',
+            group: '{$defaultCustomerGroup}',
             qty: '',
             price: '',
             readOnly: false,
@@ -104,7 +155,7 @@ var tierPriceControl = {
             data.readOnly = arguments[4];
         }
 
-        Element.insert($('<?= $block->escapeJs($_htmlId) ?>_container'), {
+        Element.insert($('{$block->escapeJs($_htmlId)}_container'), {
             bottom : this.template({
                 data: data
             })
@@ -113,14 +164,17 @@ var tierPriceControl = {
         $('tier_price_row_' + data.index + '_cust_group').value = data.group;
         $('tier_price_row_' + data.index + '_website').value    = data.website_id;
 
-        <?php if ($block->isShowWebsiteColumn() && !$block->isAllowChangeWebsite()) :?>
+script;
+    if ($block->isShowWebsiteColumn() && !$block->isAllowChangeWebsite()):
+        $scriptString .= <<<script
         var wss = $('tier_price_row_' + data.index + '_website');
         var txt = wss.options[wss.selectedIndex].text;
 
         wss.insert({after:'<span class="website-name">' + txt + '</span>'});
         wss.hide();
-        <?php endif;?>
-
+script;
+    endif;
+    $scriptString .= <<<script
         if (data.readOnly == '1') {
             ['website', 'cust_group', 'qty', 'price', 'delete'].each(function(idx){
                 $('tier_price_row_'+data.index+'_'+idx).disabled = true;
@@ -128,12 +182,20 @@ var tierPriceControl = {
             $('tier_price_row_'+data.index+'_delete_button').hide();
         }
 
-        <?php if ($_readonly) :?>
-        $('<?= $block->escapeJs($_htmlId) ?>_container').select('input', 'select').each(this.disableElement);
-        $('<?= $block->escapeJs($_htmlId) ?>_container').up('table').select('button').each(this.disableElement);
-        <?php else :?>
-        $('<?= $block->escapeJs($_htmlId) ?>_container').select('input', 'select').each(function(el){ Event.observe(el, 'change', el.setHasChanges.bind(el)); });
-        <?php endif; ?>
+script;
+    if ($_readonly):
+        $scriptString .= <<<script
+        $('{$block->escapeJs($_htmlId)}_container').select('input', 'select').each(this.disableElement);
+        $('{$block->escapeJs($_htmlId)}_container').up('table').select('button').each(this.disableElement);
+script;
+    else:
+        $scriptString .= <<<script
+        $('{$block->escapeJs($_htmlId)}_container').select('input', 'select').each(function(el) {
+            Event.observe(el, 'change', el.setHasChanges.bind(el));
+        });
+script;
+        endif;
+        $scriptString .= <<<script
     },
     disableElement: function(el) {
         el.disabled = true;
@@ -150,18 +212,30 @@ var tierPriceControl = {
         return false;
     }
 };
-<?php foreach ($block->getValues() as $_item) :?>
-tierPriceControl.addItem('<?= $block->escapeJs($_item['website_id']) ?>', '<?= $block->escapeJs($_item['cust_group']) ?>', '<?= $_item['price_qty']*1 ?>', '<?= $block->escapeJs($_item['price']) ?>', <?= (int)!empty($_item['readonly']) ?>);
+script;
+    ?>
+<?php foreach ($block->getValues() as $_item):?>
+    <?php $readonly = (int)!empty($_item['readonly']);
+    $price_qty = $_item['price_qty']*1;
+     $scriptString .= <<<script
+tierPriceControl.addItem('{$block->escapeJs($_item['website_id'])}', '{$block->escapeJs($_item['cust_group'])}',
+ '{$price_qty}', '{$block->escapeJs($_item['price'])}', {$readonly});
+script;
+    ?>
 <?php endforeach; ?>
-<?php if ($_readonly) :?>
-$('<?= $block->escapeJs($_htmlId) ?>_container').up('table').select('button')
-    .each(tierPriceControl.disableElement);
+<?php if ($_readonly):?>
+    <?php $scriptString .= <<<script
+$('{$block->escapeJs($_htmlId)}_container').up('table').select('button').each(tierPriceControl.disableElement);
+script;
+    ?>
 <?php endif; ?>
-
+<?php $scriptString .= <<<script
 window.tierPriceControl = tierPriceControl;
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
 </div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml
index 0193d7764cbb5..f24293971ee07 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml
@@ -5,11 +5,12 @@
  */
 
 /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Websites */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <fieldset id="grop_fields" class="fieldset">
     <legend class="legend"><span><?= $block->escapeHtml(__('Product In Websites')) ?></span></legend>
     <br>
-    <?php if ($block->getProductId()) :?>
+    <?php if ($block->getProductId()):?>
     <div class="messages">
         <div class="message message-notice">
             <?= $block->escapeHtml(__('To hide an item in catalog or search results, set the status to "Disabled".')) ?>
@@ -20,37 +21,44 @@
         <?= $block->getHintHtml() ?>
         <div class="store-tree">
             <?php $_websites = $block->getWebsiteCollection() ?>
-            <?php foreach ($_websites as $_website) :?>
+            <?php foreach ($_websites as $_website):?>
             <div class="website-name">
                 <input name="product[website_ids][]"
                        value="<?= (int) $_website->getId() ?>"
-                    <?php if ($block->isReadonly()) :?>
+                    <?php if ($block->isReadonly()):?>
                         disabled="disabled"
                     <?php endif;?>
                        class="checkbox website-checkbox"
                        id="product_website_<?= (int) $_website->getId() ?>"
                        type="checkbox"
-                    <?php if ($block->hasWebsite($_website->getId()) || !$block->getProductId() && count($_websites) === 1) :?>
+                    <?php if ($block->hasWebsite($_website->getId()) ||
+                        !$block->getProductId() && count($_websites) === 1):?>
                         checked="checked"
                     <?php endif; ?>
                 />
-                <label for="product_website_<?= (int) $_website->getId() ?>"><?= $block->escapeHtml($_website->getName()) ?></label>
+                <label for="product_website_<?= (int) $_website->getId() ?>">
+                    <?= $block->escapeHtml($_website->getName()) ?>
+                </label>
             </div>
             <dl class="webiste-groups" id="product_website_<?= (int) $_website->getId() ?>_data">
-                <?php foreach ($block->getGroupCollection($_website) as $_group) :?>
+                <?php foreach ($block->getGroupCollection($_website) as $_group):?>
                 <dt><?= $block->escapeHtml($_group->getName()) ?></dt>
                 <dd>
                     <ul>
-                        <?php foreach ($block->getStoreCollection($_group) as $_store) :?>
+                        <?php foreach ($block->getStoreCollection($_group) as $_store):?>
                         <li>
                             <?= $block->escapeHtml($_store->getName()) ?>
-                            <?php if ($block->getWebsites() && !$block->hasWebsite($_website->getId())) :?>
-                                <span class="website-<?= (int) $_website->getId() ?>-select" style="display:none">
+                            <?php if ($block->getWebsites() && !$block->hasWebsite($_website->getId())):?>
+                                <span class="website-<?= (int) $_website->getId() ?>-select">
                                 <?= $block->escapeHtml(
                                     __('(Copy data from: %1)', $block->getChooseFromStoreHtml($_store)),
                                     ['select', 'option', 'optgroup']
                                 ) ?>
-                            </span>
+                                </span>
+                                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                    'display:none',
+                                    'span.website-' . (int)$_website->getId() . '-select'
+                                ) ?>
                             <?php endif; ?>
                         </li>
                         <?php endforeach; ?>
@@ -63,7 +71,7 @@
     </div>
 </fieldset>
 
-<script>
+<?php $scriptString = <<<script
 require(["prototype"], function(){
 
     //<![CDATA[
@@ -76,7 +84,8 @@ require(["prototype"], function(){
     function toggleStoreFromChoosers(event) {
         var element = Event.element(event);
         var selects = $('product_website_' + element.value + '_data').getElementsBySelector('select');
-        var selectBlocks = $('product_website_' + element.value + '_data').getElementsByClassName('website-' + element.value + '-select');
+        var selectBlocks = $('product_website_' + element.value + '_data')
+        .getElementsByClassName('website-' + element.value + '-select');
         for (var i = 0; i < selects.length; i++) {
             selects[i].disabled = !element.checked;
         }
@@ -93,4 +102,6 @@ require(["prototype"], function(){
     //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml
index d5db46f706ce3..7bbba8b752ced 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml
@@ -4,20 +4,18 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-
 /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 $elementName = $block->getElement()->getName() . '[images]';
 $formName = $block->getFormName();
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 <div id="<?= $block->getHtmlId() ?>"
      class="gallery"
      data-mage-init='{"productGallery":{"template":"#<?= $block->getHtmlId() ?>-template"}}'
      data-parent-component="<?= $block->escapeHtml($block->getData('config/parentComponent')) ?>"
      data-images="<?= $block->escapeHtml($block->getImagesJson()) ?>"
-     data-types="<?= $block->escapeHtml(
-         $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getImageTypes())
-     ) ?>"
+     data-types="<?= $block->escapeHtml($jsonHelper->jsonEncode($block->getImageTypes())) ?>"
 >
     <?php if (!$block->getElement()->getReadonly()) {?>
         <div class="image image-placeholder">
@@ -138,7 +136,9 @@ $formName = $block->getFormName();
                             <textarea data-role="image-description"
                                       rows="3"
                                       class="admin__control-textarea"
-                                      name="<?= $block->escapeHtmlAttr($elementName) ?>[<%- data.file_id %>][label]"><%- data.label %></textarea>
+                                      name="<?= $block->escapeHtmlAttr($elementName)
+                                        ?>[<%- data.file_id %>][label]"><%- data.label %>
+                            </textarea>
                       </div>
                 </div>
 
@@ -149,7 +149,7 @@ $formName = $block->getFormName();
                     <div class="admin__field-control">
                         <ul class="multiselect-alt">
                             <?php
-                            foreach ($block->getMediaAttributes() as $attribute) :
+                            foreach ($block->getMediaAttributes() as $attribute):
                                 ?>
                                 <li class="item">
                                     <label>
@@ -182,7 +182,8 @@ $formName = $block->getFormName();
                     <label class="admin__field-label">
                         <span><?= $block->escapeHtml(__('Image Resolution')) ?></span>
                     </label>
-                    <div class="admin__field-value" data-message="<?= $block->escapeHtmlAttr(__('{width}^{height} px')) ?>"></div>
+                    <div class="admin__field-value"
+                         data-message="<?= $block->escapeHtmlAttr(__('{width}^{height} px')) ?>"></div>
                 </div>
 
                 <div class="admin__field field-image-hide">
@@ -208,6 +209,4 @@ $formName = $block->getFormName();
     </script>
     <?= $block->getChildHtml('new-video') ?>
 </div>
-<script>
-    jQuery('body').trigger('contentUpdated');
-</script>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], "jQuery('body').trigger('contentUpdated');", false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml
index 0a13aee5930ad..bdf985d0a3436 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml
@@ -7,8 +7,14 @@
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 
 /** @var \Magento\Catalog\Block\Adminhtml\Product\Edit\Js $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php
+$helper = $block->getData('helper');
+$priceFormat = /* @noEscape */ $helper->getPriceFormat($block->getStore());
+$allRatesByProductClassJson = /* @noEscape */ $block->getAllRatesByProductClassJson();
+$scriptString = <<<script
 require([
     "jquery",
     "prototype",
@@ -30,8 +36,8 @@ function registerTaxRecalcs() {
     Event.observe($('tax_class_id'), 'change', recalculateTax);
 }
 
-var priceFormat = <?= /* @noEscape */ $this->helper(Magento\Tax\Helper\Data::class)->getPriceFormat($block->getStore()) ?>;
-var taxRates = <?= /* @noEscape */ $block->getAllRatesByProductClassJson() ?>;
+var priceFormat = {$priceFormat};
+var taxRates = {$allRatesByProductClassJson};
 
 function recalculateTax() {
     if (typeof dynamicTaxes == 'undefined') {
@@ -75,16 +81,22 @@ function bindActiveProductTab(event, ui) {
 jQuery(document).on('tabsactivate', bindActiveProductTab);
 
 // bind active tab
-<?php if ($tabsBlock = $block->getLayout()->getBlock('product_tabs')) :?>
+script;
+if ($tabsBlock = $block->getLayout()->getBlock('product_tabs')):
+    $scriptString .= <<<script
 jQuery(function () {
-    if (jQuery('#<?= $block->escapeJs($tabsBlock->getId()) ?>').length && jQuery('#<?= $block->escapeJs($tabsBlock->getId()) ?>').is(':mage-tabs')) {
-        var activeAnchor = jQuery('#<?= $block->escapeJs($tabsBlock->getId()) ?>').tabs('activeAnchor');
+    if (jQuery('#{$block->escapeJs($tabsBlock->getId())}').length &&
+        jQuery('#{$block->escapeJs($tabsBlock->getId())}').is(':mage-tabs')) {
+        var activeAnchor = jQuery('#{$block->escapeJs($tabsBlock->getId())}').tabs('activeAnchor');
         if (activeAnchor && $('store_switcher')) {
             $('store_switcher').switchParams = 'active_tab/' + activeAnchor.prop('name') + '/';
         }
     }
 });
-<?php endif; ?>
+script;
+endif;
+
+$scriptString .= <<<script
 
 window.recalculateTax = recalculateTax;
 window.bindActiveProductTab = bindActiveProductTab;
@@ -92,4 +104,6 @@ window.registerTaxRecalcs = registerTaxRecalcs;
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml
index 5028d3c1e83d0..4311e52c7c122 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml
@@ -5,10 +5,11 @@
  */
 
 /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Inventory */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($block->isReadonly()) :?>
+<?php if ($block->isReadonly()):?>
     <?php $_readonly = ' disabled="disabled" '; ?>
-<?php else :?>
+<?php else: ?>
     <?php $_readonly = ''; ?>
 <?php endif; ?>
 <fieldset class="fieldset form-inline">
@@ -21,43 +22,56 @@
             </label>
             <div class="control">
                 <select id="inventory_manage_stock"
-                        name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][manage_stock]" <?= /* @noEscape */ $_readonly ?>>
+                        name="<?= /* @noEscape */ $block->getFieldSuffix()
+                        ?>[stock_data][manage_stock]" <?= /* @noEscape */ $_readonly ?>>
                     <option value="1"><?= $block->escapeHtml(__('Yes')) ?></option>
-                    <option value="0"<?php if ($block->getFieldValue('manage_stock') == 0) :?> selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('No')) ?></option>
+                    <option value="0"<?php if ($block->getFieldValue('manage_stock') == 0):?>
+                        selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('No')) ?>
+                    </option>
                 </select>
                 <input type="hidden"
                        id="inventory_manage_stock_default"
                        value="<?= $block->escapeHtmlAttr($block->getDefaultConfigValue('manage_stock')) ?>">
-                <?php $_checked = ($block->getFieldValue('use_config_manage_stock') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                <?php $_checked = ($block->getFieldValue('use_config_manage_stock') || $block->isNew()) ?
+                    'checked="checked"' : '' ?>
                 <input type="checkbox"
                        id="inventory_use_config_manage_stock"
                        name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_manage_stock]"
-                       value="1" <?= /* @noEscape */ $_checked ?>
-                       onclick="toggleValueElements(this, this.parentNode);" <?= /* @noEscape */ $_readonly ?>>
-                <label for="inventory_use_config_manage_stock"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
-                <?php if (!$block->isReadonly()) :?>
-                    <script>
+                       value="1" <?= /* @noEscape */ $_checked ?> <?= /* @noEscape */ $_readonly ?>>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    "toggleValueElements(this, this.parentNode);",
+                    "#inventory_use_config_manage_stock"
+                ) ?>
+                <label for="inventory_use_config_manage_stock"><?= $block->escapeHtml(__('Use Config Settings')) ?>
+                </label>
+                <?php if (!$block->isReadonly()):?>
+                    <?php $scriptString = <<<script
                         require(['prototype'], function(){
-                            toggleValueElements($('inventory_use_config_manage_stock'), $('inventory_use_config_manage_stock').parentNode);
+                            toggleValueElements($('inventory_use_config_manage_stock'),
+                             $('inventory_use_config_manage_stock').parentNode);
                         });
-                    </script>
+script;
+                    ?>
+                    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <?php endif; ?>
             </div>
-            <?php if (!$block->isSingleStoreMode()) :?>
+            <?php if (!$block->isSingleStoreMode()): ?>
                 <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
             <?php endif; ?>
         </div>
 
-        <?php if (!$block->getProduct()->isComposite()) :?>
+        <?php if (!$block->getProduct()->isComposite()): ?>
             <div class="field">
                 <label class="label" for="inventory_qty">
                     <span><?= $block->escapeHtml(__('Qty')) ?></span>
                 </label>
                 <div class="control">
-                    <?php if (!$_readonly) :?>
+                    <?php if (!$_readonly): ?>
                         <input type="hidden"
                                id="original_inventory_qty"
-                               name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][original_inventory_qty]"
+                               name="<?= /* @noEscape */ $block->getFieldSuffix()
+                                ?>[stock_data][original_inventory_qty]"
                                value="<?= $block->getFieldValue('qty') * 1 ?>">
                     <?php endif;?>
                     <input type="text"
@@ -66,7 +80,7 @@
                            name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][qty]"
                            value="<?= $block->getFieldValue('qty') * 1 ?>" <?= /* @noEscape */ $_readonly ?>>
                 </div>
-                <?php if (!$block->isSingleStoreMode()) :?>
+                <?php if (!$block->isSingleStoreMode()): ?>
                     <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                 <?php endif; ?>
             </div>
@@ -83,24 +97,34 @@
                            value="<?= $block->getFieldValue('min_qty') * 1 ?>" <?= /* @noEscape */ $_readonly ?>>
 
                     <div class="control-inner-wrap">
-                        <?php $_checked = ($block->getFieldValue('use_config_min_qty') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                        <?php $_checked = ($block->getFieldValue('use_config_min_qty') || $block->isNew()) ?
+                            'checked="checked"' : '' ?>
                         <input type="checkbox"
                                id="inventory_use_config_min_qty"
                                name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_min_qty]"
-                               value="1" <?= /* @noEscape */ $_checked ?>
-                               onclick="toggleValueElements(this, this.parentNode);" <?= /* @noEscape */ $_readonly ?>>
-                        <label for="inventory_use_config_min_qty"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                               value="1" <?= /* @noEscape */ $_checked ?> <?= /* @noEscape */ $_readonly ?>>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onclick',
+                            "toggleValueElements(this, this.parentNode);",
+                            "#inventory_use_config_min_qty"
+                        ) ?>
+
+                        <label for="inventory_use_config_min_qty"><?= $block->escapeHtml(__('Use Config Settings')) ?>
+                        </label>
                     </div>
 
-                    <?php if (!$block->isReadonly()) :?>
-                        <script>
+                    <?php if (!$block->isReadonly()): ?>
+                        <?php $scriptString = <<<script
                             require(["prototype"], function(){
-                                toggleValueElements($('inventory_use_config_min_qty'), $('inventory_use_config_min_qty').parentNode);
+                                toggleValueElements($('inventory_use_config_min_qty'),
+                                 $('inventory_use_config_min_qty').parentNode);
                             });
-                        </script>
+script;
+                        ?>
+                        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                     <?php endif; ?>
                 </div>
-                <?php if (!$block->isSingleStoreMode()) :?>
+                <?php if (!$block->isSingleStoreMode()):?>
                     <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                 <?php endif; ?>
             </div>
@@ -114,24 +138,35 @@
                            name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][min_sale_qty]"
                            value="<?= $block->getFieldValue('min_sale_qty') * 1 ?>" <?= /* @noEscape */ $_readonly ?>>
                     <div class="control-inner-wrap">
-                        <?php $_checked = ($block->getFieldValue('use_config_min_sale_qty') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                        <?php $_checked = ($block->getFieldValue('use_config_min_sale_qty') || $block->isNew()) ?
+                            'checked="checked"' : '' ?>
                         <input type="checkbox"
                                id="inventory_use_config_min_sale_qty"
-                               name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_min_sale_qty]"
+                               name="<?= /* @noEscape */ $block->getFieldSuffix()
+                                ?>[stock_data][use_config_min_sale_qty]"
                                value="1" <?= /* @noEscape */ $_checked ?>
-                               onclick="toggleValueElements(this, this.parentNode);"
                                class="checkbox" <?= /* @noEscape */ $_readonly ?>>
-                        <label for="inventory_use_config_min_sale_qty"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onclick',
+                            "toggleValueElements(this, this.parentNode);",
+                            "#inventory_use_config_min_sale_qty"
+                        ) ?>
+                        <label for="inventory_use_config_min_sale_qty">
+                            <?= $block->escapeHtml(__('Use Config Settings')) ?>
+                        </label>
                     </div>
-                    <?php if (!$block->isReadonly()) :?>
-                        <script>
+                    <?php if (!$block->isReadonly()):?>
+                        <?php $scriptString = <<<script
                             require(['prototype'], function(){
-                                toggleValueElements($('inventory_use_config_min_sale_qty'), $('inventory_use_config_min_sale_qty').parentNode);
+                                toggleValueElements($('inventory_use_config_min_sale_qty'),
+                                 $('inventory_use_config_min_sale_qty').parentNode);
                             });
-                        </script>
+script;
+                        ?>
+                        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                     <?php endif; ?>
                 </div>
-                <?php if (!$block->isSingleStoreMode()) :?>
+                <?php if (!$block->isSingleStoreMode()): ?>
                     <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                 <?php endif; ?>
             </div>
@@ -146,60 +181,75 @@
                            id="inventory_max_sale_qty"
                            name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][max_sale_qty]"
                            value="<?= $block->getFieldValue('max_sale_qty') * 1 ?>" <?= /* @noEscape */ $_readonly ?>>
-                    <?php $_checked = ($block->getFieldValue('use_config_max_sale_qty') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                    <?php $_checked = ($block->getFieldValue('use_config_max_sale_qty') || $block->isNew()) ?
+                        'checked="checked"' : '' ?>
                     <div class="control-inner-wrap">
                         <input type="checkbox"
                                id="inventory_use_config_max_sale_qty"
-                               name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_max_sale_qty]"
+                               name="<?= /* @noEscape */ $block->getFieldSuffix()
+                                ?>[stock_data][use_config_max_sale_qty]"
                                value="1" <?= /* @noEscape */ $_checked ?>
-                               onclick="toggleValueElements(this, this.parentNode);"
                                class="checkbox" <?= /* @noEscape */ $_readonly ?>>
-                        <label for="inventory_use_config_max_sale_qty"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onclick',
+                            "toggleValueElements(this, this.parentNode);",
+                            "#inventory_use_config_max_sale_qty"
+                        ) ?>
+                        <label for="inventory_use_config_max_sale_qty">
+                            <?= $block->escapeHtml(__('Use Config Settings')) ?>
+                        </label>
                     </div>
-                    <?php if (!$block->isReadonly()) :?>
-                        <script>
+                    <?php if (!$block->isReadonly()):?>
+                        <?php $scriptString = <<<script
                             require(['prototype'], function(){
-                                toggleValueElements($('inventory_use_config_max_sale_qty'), $('inventory_use_config_max_sale_qty').parentNode);
+                                toggleValueElements($('inventory_use_config_max_sale_qty'),
+                                 $('inventory_use_config_max_sale_qty').parentNode);
                             });
-                        </script>
+script;
+                        ?>
+                        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                     <?php endif; ?>
                 </div>
-                <?php if (!$block->isSingleStoreMode()) :?>
+                <?php if (!$block->isSingleStoreMode()):?>
                     <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                 <?php endif; ?>
             </div>
 
-            <?php if ($block->canUseQtyDecimals()) :?>
+            <?php if ($block->canUseQtyDecimals()): ?>
                 <div class="field">
                     <label class="label" for="inventory_is_qty_decimal">
                         <span><?= $block->escapeHtml(__('Qty Uses Decimals')) ?></span>
                     </label>
                     <div class="control">
                         <select id="inventory_is_qty_decimal"
-                                name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][is_qty_decimal]" <?= /* @noEscape */ $_readonly ?>>
+                                name="<?= /* @noEscape */ $block->getFieldSuffix()
+                                ?>[stock_data][is_qty_decimal]" <?= /* @noEscape */ $_readonly ?>>
                             <option value="0"><?= $block->escapeHtml(__('No')) ?></option>
-                            <option value="1"<?php if ($block->getFieldValue('is_qty_decimal') == 1) :?> selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('Yes')) ?></option>
+                            <option value="1"<?php if ($block->getFieldValue('is_qty_decimal') == 1):?>
+                                selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('Yes')) ?>
+                            </option>
                         </select>
                     </div>
-                    <?php if (!$block->isSingleStoreMode()) :?>
+                    <?php if (!$block->isSingleStoreMode()): ?>
                         <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                     <?php endif; ?>
                 </div>
 
-                <?php if (!$block->isVirtual()) :?>
+                <?php if (!$block->isVirtual()): ?>
                     <div class="field">
                         <label class="label" for="inventory_is_decimal_divided">
                             <span><?= $block->escapeHtml(__('Allow Multiple Boxes for Shipping')) ?></span>
                         </label>
                         <div class="control">
                             <select id="inventory_is_decimal_divided"
-                                    name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][is_decimal_divided]" <?= /* @noEscape */ $_readonly ?>>
+                                    name="<?= /* @noEscape */ $block->getFieldSuffix()
+                                    ?>[stock_data][is_decimal_divided]" <?= /* @noEscape */ $_readonly ?>>
                                 <option value="0"><?= $block->escapeHtml(__('No')) ?></option>
-                                <option value="1"<?php if ($block->getFieldValue('is_decimal_divided') == 1) :?>
+                                <option value="1"<?php if ($block->getFieldValue('is_decimal_divided') == 1): ?>
                                     selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('Yes')) ?></option>
                             </select>
                         </div>
-                        <?php if (!$block->isSingleStoreMode()) :?>
+                        <?php if (!$block->isSingleStoreMode()):?>
                             <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                         <?php endif; ?>
                     </div>
@@ -212,31 +262,45 @@
                 </label>
                 <div class="control">
                     <select id="inventory_backorders"
-                            name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][backorders]" <?= /* @noEscape */ $_readonly ?>>
-                        <?php foreach ($block->getBackordersOption() as $option) :?>
-                            <?php $_selected = ($option['value'] == $block->getFieldValue('backorders')) ? 'selected="selected"' : '' ?>
-                            <option value="<?= $block->escapeHtmlAttr($option['value']) ?>" <?= /* @noEscape */ $_selected ?>><?= $block->escapeHtml($option['label']) ?></option>
+                            name="<?= /* @noEscape */ $block->getFieldSuffix()
+                            ?>[stock_data][backorders]" <?= /* @noEscape */ $_readonly ?>>
+                        <?php foreach ($block->getBackordersOption() as $option):?>
+                            <?php $_selected = ($option['value'] == $block->getFieldValue('backorders')) ?
+                                'selected="selected"' : '' ?>
+                            <option value="<?= $block->escapeHtmlAttr($option['value']) ?>"
+                                <?= /* @noEscape */ $_selected ?>><?= $block->escapeHtml($option['label']) ?>
+                            </option>
                         <?php endforeach; ?>
                     </select>
 
                     <div class="control-inner-wrap">
-                        <?php $_checked = ($block->getFieldValue('use_config_backorders') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                        <?php $_checked = ($block->getFieldValue('use_config_backorders') || $block->isNew()) ?
+                            'checked="checked"' : '' ?>
                         <input type="checkbox"
                                id="inventory_use_config_backorders"
                                name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_backorders]"
-                               value="1" <?= /* @noEscape */ $_checked ?>
-                               onclick="toggleValueElements(this, this.parentNode);" <?= /* @noEscape */ $_readonly ?>>
-                        <label for="inventory_use_config_backorders"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                               value="1" <?= /* @noEscape */ $_checked ?> <?= /* @noEscape */ $_readonly ?>>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onclick',
+                            "toggleValueElements(this, this.parentNode);",
+                            "#inventory_use_config_backorders"
+                        ) ?>
+                        <label for="inventory_use_config_backorders">
+                            <?= $block->escapeHtml(__('Use Config Settings')) ?>
+                        </label>
                     </div>
-                    <?php if (!$block->isReadonly()) :?>
-                        <script>
+                    <?php if (!$block->isReadonly()): ?>
+                        <?php $scriptString = <<<script
                             require(['prototype'], function(){
-                                toggleValueElements($('inventory_use_config_backorders'), $('inventory_use_config_backorders').parentNode);
+                                toggleValueElements($('inventory_use_config_backorders'),
+                                 $('inventory_use_config_backorders').parentNode);
                             });
-                        </script>
+script;
+                        ?>
+                        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                     <?php endif; ?>
                 </div>
-                <?php if (!$block->isSingleStoreMode()) :?>
+                <?php if (!$block->isSingleStoreMode()): ?>
                     <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                 <?php endif; ?>
             </div>
@@ -250,26 +314,38 @@
                            class="input-text validate-number"
                            id="inventory_notify_stock_qty"
                            name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][notify_stock_qty]"
-                           value="<?= $block->getFieldValue('notify_stock_qty') * 1 ?>" <?= /* @noEscape */ $_readonly ?>>
+                           value="<?= $block->getFieldValue('notify_stock_qty') * 1 ?>"
+                        <?= /* @noEscape */ $_readonly ?>>
 
                     <div class="control-inner-wrap">
-                        <?php $_checked = ($block->getFieldValue('use_config_notify_stock_qty') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                        <?php $_checked = ($block->getFieldValue('use_config_notify_stock_qty') || $block->isNew()) ?
+                            'checked="checked"' : '' ?>
                         <input type="checkbox"
                                id="inventory_use_config_notify_stock_qty"
-                               name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_notify_stock_qty]"
-                               value="1" <?= /* @noEscape */ $_checked ?>
-                               onclick="toggleValueElements(this, this.parentNode);" <?= /* @noEscape */ $_readonly ?>>
-                        <label for="inventory_use_config_notify_stock_qty"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                               name="<?= /* @noEscape */ $block->getFieldSuffix()
+                                ?>[stock_data][use_config_notify_stock_qty]"
+                               value="1" <?= /* @noEscape */ $_checked ?> <?= /* @noEscape */ $_readonly ?>>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onclick',
+                            "toggleValueElements(this, this.parentNode);",
+                            "#inventory_use_config_notify_stock_qty"
+                        ) ?>
+                        <label for="inventory_use_config_notify_stock_qty">
+                            <?= $block->escapeHtml(__('Use Config Settings')) ?>
+                        </label>
                     </div>
-                    <?php if (!$block->isReadonly()) :?>
-                        <script>
+                    <?php if (!$block->isReadonly()): ?>
+                        <?php $scriptString = <<<script
                             require(['prototype'], function(){
-                                toggleValueElements($('inventory_use_config_notify_stock_qty'), $('inventory_use_config_notify_stock_qty').parentNode);
+                                toggleValueElements($('inventory_use_config_notify_stock_qty'),
+                                 $('inventory_use_config_notify_stock_qty').parentNode);
                             });
-                        </script>
+script;
+                        ?>
+                        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                     <?php endif; ?>
                 </div>
-                <?php if (!$block->isSingleStoreMode()) :?>
+                <?php if (!$block->isSingleStoreMode()):?>
                     <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
                 <?php endif; ?>
             </div>
@@ -282,32 +358,48 @@
             <div class="control">
                 <?php $qtyIncrementsEnabled = $block->getFieldValue('enable_qty_increments'); ?>
                 <select id="inventory_enable_qty_increments"
-                        name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][enable_qty_increments]" <?= /* @noEscape */ $_readonly ?>>
-                    <option value="1"<?php if ($qtyIncrementsEnabled) :?> selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('Yes')) ?></option>
-                    <option value="0"<?php if (!$qtyIncrementsEnabled) :?> selected="selected"<?php endif; ?>><?= $block->escapeHtml(__('No')) ?></option>
+                        name="<?= /* @noEscape */ $block->getFieldSuffix()
+                        ?>[stock_data][enable_qty_increments]" <?= /* @noEscape */ $_readonly ?>>
+                    <option value="1"<?php if ($qtyIncrementsEnabled):?> selected="selected"<?php endif; ?>>
+                        <?= $block->escapeHtml(__('Yes')) ?>
+                    </option>
+                    <option value="0"<?php if (!$qtyIncrementsEnabled):?> selected="selected"<?php endif; ?>>
+                        <?= $block->escapeHtml(__('No')) ?>
+                    </option>
                 </select>
                 <input type="hidden"
                        id="inventory_enable_qty_increments_default"
                        value="<?= $block->escapeHtmlAttr($block->getDefaultConfigValue('enable_qty_increments')) ?>">
 
                 <div class="control-inner-wrap">
-                    <?php $_checked = ($block->getFieldValue('use_config_enable_qty_inc') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                    <?php $_checked = ($block->getFieldValue('use_config_enable_qty_inc') || $block->isNew()) ?
+                        'checked="checked"' : '' ?>
                     <input type="checkbox"
                            id="inventory_use_config_enable_qty_increments"
-                           name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_enable_qty_increments]"
-                           value="1" <?= /* @noEscape */ $_checked ?>
-                           onclick="toggleValueElements(this, this.parentNode);" <?= /* @noEscape */ $_readonly ?>>
-                    <label for="inventory_use_config_enable_qty_increments"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                           name="<?= /* @noEscape */ $block->getFieldSuffix()
+                            ?>[stock_data][use_config_enable_qty_increments]"
+                           value="1" <?= /* @noEscape */ $_checked ?> <?= /* @noEscape */ $_readonly ?>>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        "toggleValueElements(this, this.parentNode);",
+                        "#inventory_use_config_enable_qty_increments"
+                    ) ?>
+                    <label for="inventory_use_config_enable_qty_increments">
+                        <?= $block->escapeHtml(__('Use Config Settings')) ?>
+                    </label>
                 </div>
-                <?php if (!$block->isReadonly()) :?>
-                    <script>
+                <?php if (!$block->isReadonly()): ?>
+                    <?php $scriptString = <<<script
                         require(['prototype'], function(){
-                            toggleValueElements($('inventory_use_config_enable_qty_increments'), $('inventory_use_config_enable_qty_increments').parentNode);
+                            toggleValueElements($('inventory_use_config_enable_qty_increments'),
+                             $('inventory_use_config_enable_qty_increments').parentNode);
                         });
-                    </script>
+script;
+                    ?>
+                    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <?php endif; ?>
             </div>
-            <?php if (!$block->isSingleStoreMode()) :?>
+            <?php if (!$block->isSingleStoreMode()): ?>
                 <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
             <?php endif; ?>
         </div>
@@ -323,23 +415,33 @@
                        name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][qty_increments]"
                        value="<?= $block->getFieldValue('qty_increments') * 1 ?>" <?= /* @noEscape */ $_readonly ?>>
                 <div class="control-inner-wrap">
-                    <?php $_checked = ($block->getFieldValue('use_config_qty_increments') || $block->isNew()) ? 'checked="checked"' : '' ?>
+                    <?php $_checked = ($block->getFieldValue('use_config_qty_increments') || $block->isNew()) ?
+                        'checked="checked"' : '' ?>
                     <input type="checkbox"
                            id="inventory_use_config_qty_increments"
                            name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][use_config_qty_increments]"
-                           value="1" <?= /* @noEscape */ $_checked ?>
-                           onclick="toggleValueElements(this, this.parentNode);" <?= /* @noEscape */ $_readonly ?>>
-                    <label for="inventory_use_config_qty_increments"><?= $block->escapeHtml(__('Use Config Settings')) ?></label>
+                           value="1" <?= /* @noEscape */ $_checked ?> <?= /* @noEscape */ $_readonly ?>>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        "toggleValueElements(this, this.parentNode);",
+                        "#inventory_use_config_qty_increments"
+                    ) ?>
+                    <label for="inventory_use_config_qty_increments">
+                        <?= $block->escapeHtml(__('Use Config Settings')) ?>
+                    </label>
                 </div>
-                <?php if (!$block->isReadonly()) :?>
-                    <script>
+                <?php if (!$block->isReadonly()): ?>
+                    <?php $scriptString = <<<script
                         require(['prototype'], function(){
-                            toggleValueElements($('inventory_use_config_qty_increments'), $('inventory_use_config_qty_increments').parentNode);
+                            toggleValueElements($('inventory_use_config_qty_increments'),
+                             $('inventory_use_config_qty_increments').parentNode);
                         });
-                    </script>
+script;
+                    ?>
+                    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <?php endif; ?>
             </div>
-            <?php if (!$block->isSingleStoreMode()) :?>
+            <?php if (!$block->isSingleStoreMode()): ?>
                 <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
             <?php endif; ?>
         </div>
@@ -350,21 +452,25 @@
             </label>
             <div class="control">
                 <select id="inventory_stock_availability"
-                        name="<?= /* @noEscape */ $block->getFieldSuffix() ?>[stock_data][is_in_stock]" <?= /* @noEscape */ $_readonly ?>>
-                    <?php foreach ($block->getStockOption() as $option) :?>
-                        <?php $_selected = ($block->getFieldValue('is_in_stock') !== null && $option['value'] == $block->getFieldValue('is_in_stock')) ? 'selected="selected"' : '' ?>
-                        <option value="<?= $block->escapeHtmlAttr($option['value']) ?>" <?= /* @noEscape */ $_selected ?>><?= $block->escapeHtml($option['label']) ?></option>
+                        name="<?= /* @noEscape */ $block->getFieldSuffix()
+                        ?>[stock_data][is_in_stock]" <?= /* @noEscape */ $_readonly ?>>
+                    <?php foreach ($block->getStockOption() as $option):?>
+                        <?php $_selected = ($block->getFieldValue('is_in_stock') !== null &&
+                            $option['value'] == $block->getFieldValue('is_in_stock')) ? 'selected="selected"' : '' ?>
+                        <option value="<?= $block->escapeHtmlAttr($option['value']) ?>"
+                            <?= /* @noEscape */ $_selected ?>><?= $block->escapeHtml($option['label']) ?>
+                        </option>
                     <?php endforeach; ?>
                 </select>
             </div>
-            <?php if (!$block->isSingleStoreMode()) :?>
+            <?php if (!$block->isSingleStoreMode()):?>
                 <div class="field-service"><?= $block->escapeHtml(__('[GLOBAL]')) ?></div>
             <?php endif; ?>
         </div>
     </div>
 </fieldset>
 
-<script>
+<?php $scriptString = <<<script
     require(["jquery","prototype"], function(jQuery){
 
         //<![CDATA[
@@ -406,15 +512,23 @@
         }
 
         function applyEnableDecimalDivided() {
-            <?php if (!$block->isVirtual()) :?>
+script;
+if (!$block->isVirtual()):
+    $scriptString .= <<<script
             $('inventory_is_decimal_divided').up('.field').hide();
-            <?php endif; ?>
+script;
+            endif;
+            $scriptString .= <<<script
             $('inventory_qty_increments').removeClassName('validate-digits').removeClassName('validate-number');
             $('inventory_min_sale_qty').removeClassName('validate-digits').removeClassName('validate-number');
             if ($('inventory_is_qty_decimal').value == 1) {
-                <?php if (!$block->isVirtual()) :?>
+script;
+if (!$block->isVirtual()):
+    $scriptString .= <<<script
                 $('inventory_is_decimal_divided').up('.field').show();
-                <?php endif; ?>
+script;
+                endif;
+                $scriptString .= <<<script
                 $('inventory_qty_increments').addClassName('validate-number');
                 $('inventory_min_sale_qty').addClassName('validate-number');
             } else {
@@ -448,4 +562,6 @@
         //]]>
 
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml
index 17fb517b32547..77f64930071e7 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml
@@ -4,13 +4,13 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-
 /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes\Search */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="product-attribute-search-container" class="suggest-expandable attribute-selector">
     <div class="action-dropdown">
-        <button type="button" class="action-toggle action-choose" data-mage-init='{"dropdown":{}}' data-toggle="dropdown">
+        <button type="button" class="action-toggle action-choose" data-mage-init='{"dropdown":{}}'
+                data-toggle="dropdown">
             <span><?= $block->escapeHtml(__('Add Attribute')) ?></span>
         </button>
         <div class="dropdown-menu">
@@ -21,7 +21,8 @@
         </div>
     </div>
 
-<script data-template-for="product-attribute-search-<?= $block->escapeHtmlAttr($block->getGroupId()) ?>" type="text/x-magento-template">
+<script data-template-for="product-attribute-search-<?= $block->escapeHtmlAttr($block->getGroupId()) ?>"
+        type="text/x-magento-template">
     <ul data-mage-init='{"menu":[]}'>
         <% if (data.items.length) { %>
         <% _.each(data.items, function(value){ %>
@@ -32,9 +33,14 @@
     <div class="actions"><?= $block->escapeHtml($block->getAttributeCreate()) ?></div>
 </script>
 
-<script>
+<?php
+$jsonHelper = $block->getData('jsonHelper');
+$selectorOptions = /* @noEscape */ $jsonHelper->jsonEncode($block->getSelectorOptions());
+$scriptString = <<<script
     require(["jquery","mage/mage","mage/backend/suggest"], function($) {
-        var $suggest = $('[data-role="product-attribute-search"][data-group="<?= $block->escapeHtml($block->getGroupCode()) ?>"]');
+        var $suggest = $('[data-role="product-attribute-search"][data-group="{$block->escapeHtml(
+            $block->getGroupCode()
+        )}"]');
 
         $suggest.on('suggestclose', function(e) {
             $suggest.closest('.dropdown-menu').siblings('[data-toggle=dropdown]').trigger('close.dropdown');
@@ -51,13 +57,13 @@
             });
         });
 
-        $suggest.mage('suggest', <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getSelectorOptions()) ?>)
+        $suggest.mage('suggest', {$selectorOptions})
             .on('suggestselect', function (e, ui) {
                 $(this).val('');
                 var templateId = $('#attribute_set_id').val();
                 if (ui.item.id) {
                     $.ajax({
-                        url: '<?= $block->escapeJs($block->escapeUrl($block->getAddAttributeUrl())) ?>',
+                        url: '{$block->escapeJs($block->getAddAttributeUrl())}',
                         type: 'POST',
                         dataType: 'json',
                         data: {attribute_id: ui.item.id, template_id: templateId, group: $(this).data('group')},
@@ -70,5 +76,7 @@
                 }
         });
     });
-</script>
+script;
+?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml
index c814298d1dbc5..3ba507d2b3ebb 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/grid/massaction_extended.phtml
@@ -5,9 +5,10 @@
  */
 
 /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Grid */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="<?= $block->getHtmlId() ?>" class="admin__grid-massaction">
-    <?php if ($block->getHideFormElement() !== true) :?>
+    <?php if ($block->getHideFormElement() !== true):?>
     <form action="" id="<?= $block->getHtmlId() ?>-form" method="post">
     <?php endif ?>
         <div class="admin__grid-massaction-form">
@@ -15,20 +16,25 @@
             <select
                 id="<?= $block->getHtmlId() ?>-select"
                 class="local-validation admin__control-select">
-                <option class="admin__control-select-placeholder" value="" selected><?= $block->escapeHtml(__('Actions')) ?></option>
-                <?php foreach ($block->getItems() as $_item) :?>
-                    <option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"<?= ($_item->getSelected() ? ' selected="selected"' : '') ?>><?= $block->escapeHtml($_item->getLabel()) ?></option>
+                <option class="admin__control-select-placeholder" value=""
+                        selected><?= $block->escapeHtml(__('Actions')) ?>
+                </option>
+                <?php foreach ($block->getItems() as $_item):?>
+                    <option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"
+                        <?= ($_item->getSelected() ? ' selected="selected"' : '') ?>>
+                        <?= $block->escapeHtml($_item->getLabel()) ?>
+                    </option>
                 <?php endforeach; ?>
             </select>
             <span class="outer-span" id="<?= $block->getHtmlId() ?>-form-hiddens"></span>
             <span class="outer-span" id="<?= $block->getHtmlId() ?>-form-additional"></span>
             <?= $block->getApplyButtonHtml() ?>
         </div>
-    <?php if ($block->getHideFormElement() !== true) :?>
+    <?php if ($block->getHideFormElement() !== true):?>
     </form>
     <?php endif ?>
     <div class="no-display">
-    <?php foreach ($block->getItems() as $_item) :?>
+    <?php foreach ($block->getItems() as $_item):?>
         <div id="<?= $block->getHtmlId() ?>-item-<?= $block->escapeHtmlAttr($_item->getId()) ?>-block">
             <?= $_item->getAdditionalActionBlockHtml() ?>
         </div>
@@ -39,7 +45,7 @@
         <select id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>-mass-select" data-menu="grid-mass-select">
             <optgroup label="<?= $block->escapeHtmlAttr(__('Mass Actions')) ?>">
                 <option disabled selected></option>
-                <?php if ($block->getUseSelectAll()) :?>
+                <?php if ($block->getUseSelectAll()):?>
                     <option value="selectAll">
                         <?= $block->escapeHtml(__('Select All')) ?>
                     </option>
@@ -58,34 +64,40 @@
         <label for="<?= $block->getHtmlId() ?>-mass-select"></label>
     </div>
 
-<script>
+    <?php $scriptString = <<<script
     require(['jquery'], function($){
         'use strict';
-        $('#<?= $block->getHtmlId() ?>-mass-select').change(function () {
+        $('#{$block->getHtmlId()}-mass-select').change(function () {
             var massAction = $('option:selected', this).val();
             switch (massAction) {
-                <?php if ($block->getUseSelectAll()) :?>
+script;
+    if ($block->getUseSelectAll()):
+        $scriptString .= <<<script
                 case 'selectAll':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.selectAll();
+                    return {$block->escapeJs($block->getJsObjectName())}.selectAll();
                     break
                 case 'unselectAll':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.unselectAll();
+                    return {$block->escapeJs($block->getJsObjectName())}.unselectAll();
                     break
-                <?php endif; ?>
+script;
+    endif;
+    $scriptString .= <<<script
                 case 'selectVisible':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.selectVisible();
+                    return {$block->escapeJs($block->getJsObjectName())}.selectVisible();
                     break
                 case 'unselectVisible':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.unselectVisible();
+                    return {$block->escapeJs($block->getJsObjectName())}.unselectVisible();
                     break
             }
             this.blur();
         });
 
     });
-
-    <?php if (!$block->getParentBlock()->canDisplayContainer()) :?>
-        <?= $block->escapeJs($block->getJsObjectName())  ?>.setGridIds('<?= /* @noEscape */ $block->getGridIdsJson() ?>');
-    <?php endif; ?>
-</script>
+script;
+    if (!$block->getParentBlock()->canDisplayContainer()):
+        $scriptString .= $block->escapeJs($block->getJsObjectName()) . ".setGridIds('" .
+            /* @noEscape */ $block->getGridIdsJson() . "');";
+    endif;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml b/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
index 78d2883d7401a..79e1ce352a4c1 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
@@ -8,9 +8,10 @@ use Magento\Catalog\Model\Product\Option;
 
 /**
  * @var $block \Magento\Catalog\Block\Product\View\Options\Type\Select\Checkable
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $option = $block->getOption();
-if ($option) : ?>
+if ($option): ?>
     <?php
     $configValue = $block->getPreconfiguredValue($option);
     $optionType = $option->getType();
@@ -19,17 +20,21 @@ if ($option) : ?>
     ?>
 
 <div class="options-list nested" id="options-<?= $block->escapeHtmlAttr($option->getId()) ?>-list">
-    <?php if ($optionType === Option::OPTION_TYPE_RADIO && !$option->getIsRequire()) :?>
+    <?php if ($optionType === Option::OPTION_TYPE_RADIO && !$option->getIsRequire()):?>
     <div class="field choice admin__field admin__field-option">
         <input type="radio"
                id="options_<?= $block->escapeHtmlAttr($option->getId()) ?>"
                class="radio admin__control-radio product-custom-option"
                name="options[<?= $block->escapeHtmlAttr($option->getId()) ?>]"
                data-selector="options[<?= $block->escapeHtmlAttr($option->getId()) ?>]"
-               onclick="<?= $block->getSkipJsReloadPrice() ? '' : 'opConfig.reloadPrice()' ?>"
                value=""
                checked="checked"
         />
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            $block->getSkipJsReloadPrice() ? '' : 'opConfig.reloadPrice()',
+            "options_" . $block->escapeHtmlAttr($option->getId())
+        ) ?>
         <label class="label admin__field-label" for="options_<?= $block->escapeHtmlAttr($option->getId()) ?>">
                         <span>
                             <?= $block->escapeHtml(__('None'))  ?>
@@ -38,7 +43,7 @@ if ($option) : ?>
     </div>
 <?php endif; ?>
 
-    <?php foreach ($option->getValues() as $value) : ?>
+    <?php foreach ($option->getValues() as $value): ?>
         <?php
         $checked = '';
         $count++;
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml
index 5f49d5eb47442..272234a0ee074 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/set/js.phtml
@@ -5,8 +5,11 @@
  * See COPYING.txt for license details.
  */
 
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
+
 require([
     "Magento_Ui/js/modal/alert",
     "tree-panel"
@@ -27,7 +30,10 @@ editSet.submit = editSet.submit.wrap(function(original) {
     if (editSet.currentNode){
         if (ConfigurableNodeExists(editSet.currentNode)) {
             alert({
-                content: '<?= $block->escapeJs(__('This group contains attributes used in configurable products. Please move these attributes to another group and try again.')) ?>'
+                content: '{$block->escapeJs(
+                    __('This group contains attributes used in configurable products. ' .
+                        'Please move these attributes to another group and try again.')
+                )}'
             });
             return;
         }
@@ -38,7 +44,9 @@ editSet.submit = editSet.submit.wrap(function(original) {
 editSet.rightBeforeAppend = editSet.rightBeforeAppend.wrap(function(original, tree, nodeThis, node, newParent) {
     if (node.attributes.is_configurable == 1) {
         alert({
-            content: '<?= $block->escapeJs(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>'
+            content: '{$block->escapeJs(
+                __('This attribute is used in configurable products. You cannot remove it from the attribute set.')
+            )}'
         });
         return false;
     }
@@ -48,7 +56,9 @@ editSet.rightBeforeAppend = editSet.rightBeforeAppend.wrap(function(original, tr
 editSet.rightBeforeInsert = editSet.rightBeforeInsert.wrap(function(original, tree, nodeThis, node, newParent) {
     if (node.attributes.is_configurable == 1) {
         alert({
-            content: '<?= $block->escapeJs(__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>'
+            content: '{$block->escapeJs(
+                __('This attribute is used in configurable products. You cannot remove it from the attribute set.')
+            )}'
         });
         return false;
     }
@@ -56,4 +66,6 @@ editSet.rightBeforeInsert = editSet.rightBeforeInsert.wrap(function(original, tr
 });
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Csp/etc/config.xml b/app/code/Magento/Csp/etc/config.xml
index 68328ac7bc540..dd3ddcbbf85bc 100644
--- a/app/code/Magento/Csp/etc/config.xml
+++ b/app/code/Magento/Csp/etc/config.xml
@@ -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>
@@ -77,7 +82,7 @@
                     <scripts>
                         <policy_id>script-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>1</eval>
                         <dynamic>0</dynamic>
                     </scripts>
@@ -138,6 +143,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>

From 756ad5996476d5f4f13a0fd1a1638ed64bfaa609 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Wed, 15 Apr 2020 19:47:50 -0500
Subject: [PATCH 101/307] MC-31362: Media folder update

---
 .../Unit/Model/Wysiwyg/Images/StorageTest.php | 36 +++++++++----------
 .../Unit/Model/Design/Backend/FileTest.php    | 19 +++++-----
 .../Unit/Model/Design/Backend/ImageTest.php   |  5 ++-
 3 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php
index 6bdadfa07ff3d..3dea9648e2b38 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/Wysiwyg/Images/StorageTest.php
@@ -29,17 +29,17 @@ class StorageTest extends \PHPUnit\Framework\TestCase
     protected $imagesStorage;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $filesystemMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $adapterFactoryMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $imageHelperMock;
 
@@ -49,67 +49,67 @@ class StorageTest extends \PHPUnit\Framework\TestCase
     protected $resizeParameters;
 
     /**
-     * @var \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $storageCollectionFactoryMock;
 
     /**
-     * @var \Magento\MediaStorage\Model\File\Storage\FileFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\MediaStorage\Model\File\Storage\FileFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $storageFileFactoryMock;
 
     /**
-     * @var \Magento\MediaStorage\Model\File\Storage\DatabaseFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\MediaStorage\Model\File\Storage\DatabaseFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $storageDatabaseFactoryMock;
 
     /**
-     * @var \Magento\MediaStorage\Model\File\Storage\Directory\DatabaseFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\MediaStorage\Model\File\Storage\Directory\DatabaseFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $directoryDatabaseFactoryMock;
 
     /**
-     * @var \Magento\MediaStorage\Model\File\Storage\Directory\Database|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\MediaStorage\Model\File\Storage\Directory\Database|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $directoryCollectionMock;
 
     /**
-     * @var \Magento\MediaStorage\Model\File\UploaderFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\MediaStorage\Model\File\UploaderFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $uploaderFactoryMock;
 
     /**
-     * @var \Magento\Backend\Model\Session|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Backend\Model\Session|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $sessionMock;
 
     /**
-     * @var \Magento\Backend\Model\Url|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Backend\Model\Url|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $backendUrlMock;
 
     /**
-     * @var \Magento\Framework\Filesystem\Directory\Write|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem\Directory\Write|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $directoryMock;
 
     /**
-     * @var \Magento\Framework\Filesystem\DriverInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem\DriverInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $driverMock;
 
     /**
-     * @var \Magento\MediaStorage\Helper\File\Storage\Database|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\MediaStorage\Helper\File\Storage\Database|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $coreFileStorageMock;
 
     /**
-     * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $objectManagerHelper;
 
     /**
-     * @var \Magento\Framework\Filesystem\Io\File|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem\Io\File|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $ioFileMock;
 
@@ -357,7 +357,7 @@ public function testGetDirsCollection($exclude, $include, $fileNames, $expectedR
 
         $collection = [];
         foreach ($fileNames as $filename) {
-            /** @var \Magento\Framework\DataObject|\PHPUnit_Framework_MockObject_MockObject $objectMock */
+            /** @var \Magento\Framework\DataObject|\PHPUnit\Framework\MockObject\MockObject $objectMock */
             $objectMock = $this->createPartialMock(\Magento\Framework\DataObject::class, ['getFilename']);
             $objectMock->expects($this->any())
                 ->method('getFilename')
@@ -430,7 +430,7 @@ public function dirsCollectionDataProvider()
      */
     protected function generalTestGetDirsCollection($path, $collectionArray = [], $expectedRemoveKeys = [])
     {
-        /** @var StorageCollection|\PHPUnit_Framework_MockObject_MockObject $storageCollectionMock */
+        /** @var StorageCollection|\PHPUnit\Framework\MockObject\MockObject $storageCollectionMock */
         $storageCollectionMock = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Images\Storage\Collection::class)
             ->disableOriginalConstructor()
             ->getMock();
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
index 91ba3941ca937..a8dc3a725f4a4 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/FileTest.php
@@ -16,32 +16,31 @@
 use Magento\Framework\UrlInterface;
 use Magento\MediaStorage\Helper\File\Storage\Database;
 use Magento\Theme\Model\Design\Backend\File;
-use PHPUnit_Framework_MockObject_MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class FileTest extends \PHPUnit\Framework\TestCase
 {
-    /** @var WriteInterface|PHPUnit_Framework_MockObject_MockObject */
+    /** @var WriteInterface|\PHPUnit\Framework\MockObject\MockObject */
     private $mediaDirectory;
 
-    /** @var UrlInterface|PHPUnit_Framework_MockObject_MockObject */
+    /** @var UrlInterface|\PHPUnit\Framework\MockObject\MockObject */
     private $urlBuilder;
 
     /** @var File */
     private $fileBackend;
 
-    /** @var IoFileSystem|PHPUnit_Framework_MockObject_MockObject */
+    /** @var IoFileSystem|\PHPUnit\Framework\MockObject\MockObject */
     private $ioFileSystem;
 
     /**
-     * @var Mime|PHPUnit_Framework_MockObject_MockObject
+     * @var Mime|\PHPUnit\Framework\MockObject\MockObject
      */
     private $mime;
 
     /**
-     * @var Database|PHPUnit_Framework_MockObject_MockObject
+     * @var Database|\PHPUnit\Framework\MockObject\MockObject
      */
     private $databaseHelper;
 
@@ -131,9 +130,9 @@ public function tearDown()
      *
      * @param string $class
      * @param array $methods
-     * @return PHPUnit_Framework_MockObject_MockObject
+     * @return \PHPUnit\Framework\MockObject\MockObject
      */
-    private function getMockObject(string $class, array $methods = []): PHPUnit_Framework_MockObject_MockObject
+    private function getMockObject(string $class, array $methods = []): \PHPUnit\Framework\MockObject\MockObject
     {
         $builder =  $this->getMockBuilder($class)
             ->disableOriginalConstructor();
@@ -147,9 +146,9 @@ private function getMockObject(string $class, array $methods = []): PHPUnit_Fram
      * Gets mock objects for abstract class.
      *
      * @param string $class
-     * @return PHPUnit_Framework_MockObject_MockObject
+     * @return \PHPUnit\Framework\MockObject\MockObject
      */
-    private function getMockObjectForAbstractClass(string $class): PHPUnit_Framework_MockObject_MockObject
+    private function getMockObjectForAbstractClass(string $class): \PHPUnit\Framework\MockObject\MockObject
     {
         return  $this->getMockBuilder($class)
             ->getMockForAbstractClass();
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index 2bc60ffa7aa04..38d0c8dc75754 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -21,7 +21,6 @@
 use Magento\MediaStorage\Helper\File\Storage\Database;
 use Magento\MediaStorage\Model\File\UploaderFactory;
 use Magento\Theme\Model\Design\Backend\Image;
-use PHPUnit_Framework_MockObject_MockObject;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -79,9 +78,9 @@ public function tearDown()
     /**
      * @param string $class
      * @param array $methods
-     * @return PHPUnit_Framework_MockObject_MockObject
+     * @return \PHPUnit\Framework\MockObject\MockObject
      */
-    private function getMockObject(string $class, array $methods = []): PHPUnit_Framework_MockObject_MockObject
+    private function getMockObject(string $class, array $methods = []): \PHPUnit\Framework\MockObject\MockObject
     {
         $builder =  $this->getMockBuilder($class)
             ->disableOriginalConstructor();

From 859098b2869aa05db36add385000219b2cd2a201 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Wed, 15 Apr 2020 19:52:33 -0500
Subject: [PATCH 102/307] MC-31357: Customer file uploader update

---
 .../Unit/Model/Metadata/Form/ImageTest.php    | 27 +++++++++----------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
index e64c9d87b8b82..93fbd7d096591 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
@@ -26,7 +26,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
@@ -36,67 +35,67 @@
 class ImageTest extends AbstractFormTestCase
 {
     /**
-     * @var PHPUnit_Framework_MockObject_MockObject|EncoderInterface
+     * @var \PHPUnit\Framework\MockObject\MockObject|EncoderInterface
      */
     private $urlEncode;
 
     /**
-     * @var PHPUnit_Framework_MockObject_MockObject|NotProtectedExtension
+     * @var \PHPUnit\Framework\MockObject\MockObject|NotProtectedExtension
      */
     private $fileValidatorMock;
 
     /**
-     * @var PHPUnit_Framework_MockObject_MockObject|Filesystem
+     * @var \PHPUnit\Framework\MockObject\MockObject|Filesystem
      */
     private $fileSystemMock;
 
     /**
-     * @var PHPUnit_Framework_MockObject_MockObject|Http
+     * @var \PHPUnit\Framework\MockObject\MockObject|Http
      */
     private $requestMock;
 
     /**
-     * @var PHPUnit_Framework_MockObject_MockObject|UploaderFactory
+     * @var \PHPUnit\Framework\MockObject\MockObject|UploaderFactory
      */
     private $uploaderFactoryMock;
 
     /**
-     * @var FileProcessor|PHPUnit_Framework_MockObject_MockObject
+     * @var FileProcessor|\PHPUnit\Framework\MockObject\MockObject
      */
     private $fileProcessorMock;
 
     /**
-     * @var ImageContentInterfaceFactory|PHPUnit_Framework_MockObject_MockObject
+     * @var ImageContentInterfaceFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     private $imageContentFactory;
 
     /**
-     * @var FileProcessorFactory|PHPUnit_Framework_MockObject_MockObject
+     * @var FileProcessorFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     private $fileProcessorFactoryMock;
 
     /**
-     * @var File|PHPUnit_Framework_MockObject_MockObject
+     * @var File|\PHPUnit\Framework\MockObject\MockObject
      */
     private $ioFileSystemMock;
 
     /**
-     * @var DirectoryList|PHPUnit_Framework_MockObject_MockObject
+     * @var DirectoryList|\PHPUnit\Framework\MockObject\MockObject
      */
     private $directoryListMock;
 
     /**
-     * @var WriteFactory|PHPUnit_Framework_MockObject_MockObject
+     * @var WriteFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     private $writeFactoryMock;
 
     /**
-     * @var Write|PHPUnit_Framework_MockObject_MockObject
+     * @var Write|\PHPUnit\Framework\MockObject\MockObject
      */
     private $mediaEntityTmpDirectoryMock;
 
     /**
-     * @var Driver|PHPUnit_Framework_MockObject_MockObject
+     * @var Driver|\PHPUnit\Framework\MockObject\MockObject
      */
     private $driverMock;
 

From 1aca83fe5305a6ef173e81bba727e4059129be16 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Thu, 16 Apr 2020 10:21:32 +0300
Subject: [PATCH 103/307] MC-33404: Incorrect display of file name in import
 history

---
 .../Grid/Column/Renderer/Download.php         |  6 ++--
 .../Adminhtml/Grid/Column/Renderer/Error.php  |  6 ++--
 .../Grid/Column/Renderer/DownloadTest.php     | 36 +++++++++++++++----
 3 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php
index 81fa9767fbaa4..110503a505752 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php
@@ -20,9 +20,9 @@ class Download extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
      */
     public function _getValue(\Magento\Framework\DataObject $row)
     {
-        return '<p> ' . $row->getData('imported_file') .  '</p><a href="'
-        . $this->getUrl('*/*/download', ['filename' => $row->getData('imported_file')]) . '">'
-        . __('Download')
+        return '<p> ' . $this->escapeHtml($row->getData('imported_file')) .  '</p><a href="'
+        . $this->escapeUrl($this->getUrl('*/*/download', ['filename' => $row->getData('imported_file')])) . '">'
+        . $this->escapeHtml(__('Download'))
         . '</a>';
     }
 }
diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php
index 527bc5025d139..5760d26de68b1 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php
@@ -22,9 +22,9 @@ public function _getValue(\Magento\Framework\DataObject $row)
     {
         $result = '';
         if ($row->getData('error_file') != '') {
-            $result = '<p> ' . $row->getData('error_file') .  '</p><a href="'
-                . $this->getUrl('*/*/download', ['filename' => $row->getData('error_file')]) . '">'
-                . __('Download')
+            $result = '<p> ' . $this->escapeHtml($row->getData('error_file')) .  '</p><a href="'
+                . $this->escapeUrl($this->getUrl('*/*/download', ['filename' => $row->getData('error_file')])) . '">'
+                . $this->escapeHtml(__('Download'))
                 . '</a>';
         }
         return $result;
diff --git a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
index b0d16dadb0a4d..a4ede993098b3 100644
--- a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
+++ b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
@@ -5,12 +5,20 @@
  */
 namespace Magento\ImportExport\Test\Unit\Block\Adminhtml\Grid\Column\Renderer;
 
+use Magento\Backend\Block\Context;
+use Magento\Backend\Model\Url;
+use Magento\Framework\DataObject;
+use Magento\Framework\Escaper;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
+use Magento\ImportExport\Block\Adminhtml\Grid\Column\Renderer\Download;
 
+/**
+ * Test for \Magento\ImportExport\Block\Adminhtml\Grid\Column\Renderer\Download class.
+ */
 class DownloadTest extends \PHPUnit\Framework\TestCase
 {
     /**
-     * @var \Magento\Backend\Block\Context
+     * @var Context
      */
     protected $context;
 
@@ -20,24 +28,31 @@ class DownloadTest extends \PHPUnit\Framework\TestCase
     protected $objectManagerHelper;
 
     /**
-     * @var \Magento\ImportExport\Block\Adminhtml\Grid\Column\Renderer\Download
+     * @var Download
      */
     protected $download;
 
+    /**
+     * @var Escaper|\PHPUnit_Framework_MockObject_MockObjecti
+     */
+    private $escaperMock;
+
     /**
      * Set up
      */
     protected function setUp()
     {
-        $urlModel = $this->createPartialMock(\Magento\Backend\Model\Url::class, ['getUrl']);
+        $this->escaperMock = $this->createMock(Escaper::class);
+        $urlModel = $this->createPartialMock(Url::class, ['getUrl']);
         $urlModel->expects($this->any())->method('getUrl')->willReturn('url');
-        $this->context = $this->createPartialMock(\Magento\Backend\Block\Context::class, ['getUrlBuilder']);
+        $this->context = $this->createPartialMock(Context::class, ['getUrlBuilder', 'getEscaper']);
         $this->context->expects($this->any())->method('getUrlBuilder')->willReturn($urlModel);
+        $this->context->expects($this->any())->method('getEscaper')->willReturn($this->escaperMock);
         $data = [];
 
         $this->objectManagerHelper = new ObjectManagerHelper($this);
         $this->download = $this->objectManagerHelper->getObject(
-            \Magento\ImportExport\Block\Adminhtml\Grid\Column\Renderer\Download::class,
+            Download::class,
             [
                 'context' => $this->context,
                 'data' => $data
@@ -51,7 +66,16 @@ protected function setUp()
     public function testGetValue()
     {
         $data = ['imported_file' => 'file.csv'];
-        $row = new \Magento\Framework\DataObject($data);
+        $row = new DataObject($data);
+        $this->escaperMock->expects($this->at(0))
+            ->method('escapeHtml')
+            ->with('file.csv')
+            ->willReturn('file.csv');
+        $this->escaperMock->expects($this->once())->method('escapeUrl')->willReturn('url');
+        $this->escaperMock->expects($this->at(2))
+            ->method('escapeHtml')
+            ->with('Download')
+            ->willReturn('Download');
         $this->assertEquals('<p> file.csv</p><a href="url">Download</a>', $this->download->_getValue($row));
     }
 }

From 34296032303531706db50bbde3543b8b104d4e82 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Thu, 16 Apr 2020 14:30:06 -0500
Subject: [PATCH 104/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../Session/Test/Unit/SessionManagerTest.php  |  6 ++---
 .../Magento/Framework/Test/Unit/UrlTest.php   | 24 +++++++++----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/lib/internal/Magento/Framework/Session/Test/Unit/SessionManagerTest.php b/lib/internal/Magento/Framework/Session/Test/Unit/SessionManagerTest.php
index 2d19ee4224801..062635eaa6bb2 100644
--- a/lib/internal/Magento/Framework/Session/Test/Unit/SessionManagerTest.php
+++ b/lib/internal/Magento/Framework/Session/Test/Unit/SessionManagerTest.php
@@ -31,17 +31,17 @@ class SessionManagerTest extends \PHPUnit\Framework\TestCase
         private $sessionManager;
 
         /**
-         * @var \Magento\Framework\Session\Config\ConfigInterface | \PHPUnit_Framework_MockObject_MockObject
+         * @var \Magento\Framework\Session\Config\ConfigInterface | \PHPUnit\Framework\MockObject\MockObject
          */
         private $mockSessionConfig;
 
         /**
-         * @var \Magento\Framework\Stdlib\CookieManagerInterface | \PHPUnit_Framework_MockObject_MockObject
+         * @var \Magento\Framework\Stdlib\CookieManagerInterface | \PHPUnit\Framework\MockObject\MockObject
          */
         private $mockCookieManager;
 
         /**
-         * @var \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory | \PHPUnit_Framework_MockObject_MockObject
+         * @var \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory | \PHPUnit\Framework\MockObject\MockObject
          */
         private $mockCookieMetadataFactory;
 
diff --git a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php
index 8e95e4e7bbfea..56c63bebf7963 100644
--- a/lib/internal/Magento/Framework/Test/Unit/UrlTest.php
+++ b/lib/internal/Magento/Framework/Test/Unit/UrlTest.php
@@ -15,52 +15,52 @@
 class UrlTest extends \PHPUnit\Framework\TestCase
 {
     /**
-     * @var \Magento\Framework\Url\RouteParamsResolver|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url\RouteParamsResolver|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $routeParamsResolverMock;
 
     /**
-     * @var \Magento\Framework\Url\RouteParamsPreprocessorInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url\RouteParamsPreprocessorInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $routeParamsPreprocessorMock;
 
     /**
-     * @var \Magento\Framework\Url\ScopeResolverInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url\ScopeResolverInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $scopeResolverMock;
 
     /**
-     * @var \Magento\Framework\Url\ScopeInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url\ScopeInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $scopeMock;
 
     /**
-     * @var \Magento\Framework\Url\QueryParamsResolverInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url\QueryParamsResolverInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $queryParamsResolverMock;
 
     /**
-     * @var \Magento\Framework\Session\SidResolverInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Session\SidResolverInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $sidResolverMock;
 
     /**
-     * @var \Magento\Framework\Session\Generic|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Session\Generic|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $sessionMock;
 
     /**
-     * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $scopeConfig;
 
     /**
-     * @var \Magento\Framework\Url\ModifierInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url\ModifierInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $urlModifier;
 
     /**
-     * @var HostChecker|\PHPUnit_Framework_MockObject_MockObject
+     * @var HostChecker|\PHPUnit\Framework\MockObject\MockObject
      */
     private $hostChecker;
 
@@ -102,7 +102,7 @@ protected function setUp()
 
     /**
      * @param bool $resolve
-     * @return \Magento\Framework\Url\RouteParamsResolverFactory|\PHPUnit_Framework_MockObject_MockObject
+     * @return \Magento\Framework\Url\RouteParamsResolverFactory|\PHPUnit\Framework\MockObject\MockObject
      */
     protected function getRouteParamsResolverFactory($resolve = true)
     {
@@ -116,7 +116,7 @@ protected function getRouteParamsResolverFactory($resolve = true)
 
     /**
      * @param array $mockMethods
-     * @return \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject
+     * @return \Magento\Framework\App\Request\Http|\PHPUnit\Framework\MockObject\MockObject
      */
     protected function getRequestMock()
     {

From cc063648b8cb874ea44ec96e1eb9503bf0130dd1 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Fri, 17 Apr 2020 19:52:33 +0300
Subject: [PATCH 105/307] MC-29420: Remove event handlers from CE

---
 .../Category/Helper/Sortby/Available.php      |  26 +++
 .../Category/Helper/Sortby/DefaultSortby.php  |  26 +++
 .../Product/Edit/Tab/Options/Option.php       |  17 +-
 .../adminhtml/templates/promo/fieldset.phtml  |  29 ++--
 .../CatalogSearch/Block/Advanced/Form.php     |   5 +-
 .../frontend/templates/advanced/form.phtml    |  39 +++--
 .../templates/product/widget/conditions.phtml |  11 +-
 .../Checkout/Block/Total/DefaultTotal.php     |  35 +++-
 .../view/frontend/templates/onepage.phtml     |   4 +-
 .../frontend/templates/total/default.phtml    |  35 ++--
 .../view/frontend/templates/agreements.phtml  |  33 ++--
 .../templates/multishipping_agreements.phtml  |  34 ++--
 .../templates/browser/content/files.phtml     |  24 ++-
 .../templates/browser/content/uploader.phtml  |  41 +++--
 .../adminhtml/templates/browser/tree.phtml    |  21 ++-
 .../Config/Block/System/Config/Form/Field.php |  37 ++++-
 .../Block/System/Config/Form/Fieldset.php     |  35 +++-
 .../page/system/config/robots/reset.phtml     |  16 +-
 .../system/config/form/field/array.phtml      |  87 ++++++----
 .../templates/system/config/switcher.phtml    |  36 ++--
 .../Composite/Fieldset/Configurable.php       |  56 +++++++
 .../Block/Adminhtml/Product/Steps/Bulk.php    |  15 +-
 .../product/attribute/new/created.phtml       |  10 +-
 .../composite/fieldset/configurable.phtml     |  23 +--
 .../product/edit/attribute/steps/bulk.phtml   | 156 +++++++++++-------
 .../attribute/steps/select_attributes.phtml   |  13 +-
 .../catalog/product/edit/super/matrix.phtml   |  60 ++++---
 .../product/edit/super/wizard-ajax.phtml      |  14 +-
 .../catalog/product/edit/super/wizard.phtml   |  39 +++--
 .../configurable/attribute-selector/js.phtml  |  14 +-
 .../Magento/Cookie/Block/Html/Notices.php     |  14 ++
 .../frontend/templates/html/notices.phtml     |  19 ++-
 .../templates/cart/gift_options.phtml         |  11 +-
 .../Adminhtml/Frontend/Region/Updater.php     |  25 ++-
 .../Magento/Tax/Block/Adminhtml/Rate/Form.php |   3 +
 .../view/adminhtml/templates/rate/js.phtml    |  14 +-
 .../view/adminhtml/templates/rule/edit.phtml  |  56 ++++---
 .../adminhtml/templates/rule/rate/form.phtml  |   7 +-
 .../templates/toolbar/class/add.phtml         |   8 +-
 .../templates/toolbar/class/save.phtml        |  12 +-
 .../templates/toolbar/rate/save.phtml         |  13 +-
 .../templates/toolbar/rule/add.phtml          |   8 +-
 .../templates/toolbar/rule/save.phtml         |  12 +-
 .../templates/checkout/grandtotal.phtml       |  28 ++--
 .../templates/checkout/shipping.phtml         |  37 +++--
 .../templates/checkout/subtotal.phtml         |  29 ++--
 .../frontend/templates/checkout/tax.phtml     |  43 ++---
 47 files changed, 927 insertions(+), 403 deletions(-)

diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php
index dbd4385059c73..b0f00d0f2b04b 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/Available.php
@@ -11,6 +11,11 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Data\Form\Element\Factory;
+use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class Available extends \Magento\Framework\Data\Form\Element\Multiselect
@@ -20,6 +25,27 @@ class Available extends \Magento\Framework\Data\Form\Element\Multiselect
      */
     private $secureRenderer;
 
+    /**
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
+     * @param Escaper $escaper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
+     */
+    public function __construct(
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
+        Escaper $escaper,
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
+    ) {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
+        $this->secureRenderer = $secureRenderer;
+    }
+
     /**
      * Returns js code that is used instead of default toggle code for "Use default config" checkbox
      *
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php
index bac0e8465411d..e0836a0d7cb25 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Helper/Sortby/DefaultSortby.php
@@ -11,6 +11,11 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Category\Helper\Sortby;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Data\Form\Element\Factory;
+use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class DefaultSortby extends \Magento\Framework\Data\Form\Element\Select
@@ -20,6 +25,27 @@ class DefaultSortby extends \Magento\Framework\Data\Form\Element\Select
      */
     private $secureRenderer;
 
+    /**
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
+     * @param Escaper $escaper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
+     */
+    public function __construct(
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
+        Escaper $escaper,
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
+    ) {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer, $random);
+        $this->secureRenderer = $secureRenderer;
+    }
+
     /**
      * Returns js code that is used instead of default toggle code for "Use default config" checkbox
      *
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
index 642f383d4134f..6329c490d241c 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
@@ -16,6 +16,7 @@
 use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Store\Model\Store;
 
 /**
@@ -74,6 +75,11 @@ class Option extends Widget
      */
     protected $_optionType;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Config\Model\Config\Source\Yesno $configYesNo
@@ -82,6 +88,7 @@ class Option extends Widget
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -90,7 +97,8 @@ public function __construct(
         Product $product,
         \Magento\Framework\Registry $registry,
         \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_optionType = $optionType;
         $this->_configYesNo = $configYesNo;
@@ -99,6 +107,7 @@ public function __construct(
         $this->_coreRegistry = $registry;
         $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -463,8 +472,12 @@ public function getCheckboxScopeHtml($id, $name, $checked = true, $select_id = '
             . ' name="' . $localName . '"' . 'id="' . $localId . '"'
             . ' value=""'
             . $checkedHtml
-            . ' onchange="toggleSeveralValueElements(this, [' . $containers . ']);" '
             . ' />'
+            . $this->secureRenderer->renderEventListenerAsTag(
+                'onchange',
+                "toggleSeveralValueElements(this, [' . $containers . ']);",
+                '#' . $localId
+            )
             . '<label for="' . $localId . '" class="use-default">'
             . '<span class="use-default-label">' . __('Use Default') . '</span></label></div>';
 
diff --git a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml
index 1c3eedf43b264..e1229dc56cfbf 100644
--- a/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml
+++ b/app/code/Magento/CatalogRule/view/adminhtml/templates/promo/fieldset.phtml
@@ -5,14 +5,16 @@
  */
 
 /**@var \Magento\Backend\Block\Widget\Form\Renderer\Fieldset $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $_element = $block->getElement() ?>
 <?php $_jsObjectName = $block->getFieldSetId() != null ? $block->getFieldSetId() : $_element->getHtmlId() ?>
 <div class="rule-tree">
-    <fieldset id="<?= $block->escapeHtmlAttr($_jsObjectName) ?>" <?= /* @noEscape */ $_element->serialize(['class']) ?> class="fieldset">
+<fieldset id="<?= $block->escapeHtmlAttr($_jsObjectName) ?>" <?= /* @noEscape */ $_element->serialize(['class']) ?>
+          class="fieldset">
         <legend class="legend"><span><?= $block->escapeHtml($_element->getLegend()) ?></span></legend>
         <br>
-    <?php if ($_element->getComment()) : ?>
+    <?php if ($_element->getComment()): ?>
         <div class="messages">
             <div class="message message-notice"><?= $block->escapeHtml($_element->getComment()) ?></div>
         </div>
@@ -22,16 +24,21 @@
     </div>
     </fieldset>
 </div>
-<script>
+
+<?php $scriptString = <<<script
+
 require([
-    "Magento_Rule/rules",
-    "prototype"
+    'Magento_Rule/rules',
+    'prototype'
 ], function(VarienRulesForm){
 
-window.<?= /* @noEscape */ $_jsObjectName ?> = new VarienRulesForm('<?= /* @noEscape */ $_jsObjectName ?>', '<?= /* @noEscape */ $block->getNewChildUrl() ?>');
-<?php if ($_element->getReadonly()) : ?>
-    <?= /* @noEscape */ $_element->getHtmlId() ?>.setReadonly(true);
-<?php endif; ?>
+script;
+$scriptString .= 'window.' . /* @noEscape */ $_jsObjectName . ' = new VarienRulesForm(\'' .
+    /* @noEscape */ $_jsObjectName . '\', \'' .  /* @noEscape */ $block->getNewChildUrl() . '\');';
+if ($_element->getReadonly()):
+    $scriptString .= /* @noEscape */ $_element->getHtmlId() . '.setReadonly(true);' . PHP_EOL;
+endif;
 
-});
-</script>
+$scriptString .= '});' . PHP_EOL;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/CatalogSearch/Block/Advanced/Form.php b/app/code/Magento/CatalogSearch/Block/Advanced/Form.php
index 681b7ecfb02dc..8bed5e8810a6a 100644
--- a/app/code/Magento/CatalogSearch/Block/Advanced/Form.php
+++ b/app/code/Magento/CatalogSearch/Block/Advanced/Form.php
@@ -9,11 +9,13 @@
 use Magento\CatalogSearch\Model\Advanced;
 use Magento\Directory\Model\CurrencyFactory;
 use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Collection\AbstractDb as DbCollection;
 use Magento\Framework\View\Element\AbstractBlock;
 use Magento\Framework\View\Element\BlockInterface;
 use Magento\Framework\View\Element\Template;
 use Magento\Framework\View\Element\Template\Context;
+use Magento\CatalogSearch\Helper\Data;
 
 /**
  * Advanced search form
@@ -51,6 +53,7 @@ public function __construct(
     ) {
         $this->_catalogSearchAdvanced = $catalogSearchAdvanced;
         $this->_currencyFactory = $currencyFactory;
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
         parent::__construct($context, $data);
     }
 
@@ -185,7 +188,7 @@ public function getCurrency($attribute)
      * Retrieve attribute input type
      *
      * @param AbstractAttribute $attribute
-     * @return  string
+     * @return string
      */
     public function getAttributeInputType($attribute)
     {
diff --git a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml
index 3712f221233ee..0f97d1cd9fa7e 100644
--- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml
+++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml
@@ -4,20 +4,21 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
 /**
  * Catalog advanced search form
  *
  * @var $block \Magento\CatalogSearch\Block\Advanced\Form
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<?php $maxQueryLength = $this->helper(\Magento\CatalogSearch\Helper\Data::class)->getMaxQueryLength();?>
-<form class="form search advanced" action="<?= $block->escapeUrl($block->getSearchPostUrl()) ?>" method="get" id="form-validate">
+
+<?php $jsonHelper = $block->getData('jsonHelper'); ?>
+<?php $maxQueryLength = $jsonHelper->getMaxQueryLength();?>
+<form class="form search advanced" action="<?= $block->escapeUrl($block->getSearchPostUrl()) ?>" method="get"
+      id="form-validate">
 <fieldset class="fieldset">
     <legend class="legend"><span><?= $block->escapeHtml(__('Search Settings')) ?></span></legend><br />
-    <?php foreach ($block->getSearchableAttributes() as $_attribute) : ?>
+    <?php foreach ($block->getSearchableAttributes() as $_attribute): ?>
         <?php $_code = $_attribute->getAttributeCode() ?>
         <div class="field <?= $block->escapeHtmlAttr($_code) ?>">
             <label class="label" for="<?= $block->escapeHtmlAttr($_code) ?>">
@@ -25,7 +26,7 @@
             </label>
             <div class="control">
                 <?php
-                switch ($block->getAttributeInputType($_attribute)) :
+                switch ($block->getAttributeInputType($_attribute)):
                     case 'number':
                         ?>
                 <div class="range fields group group-2">
@@ -38,7 +39,8 @@
                                    title="<?= $block->escapeHtml($block->getAttributeLabel($_attribute)) ?>"
                                    class="input-text"
                                    maxlength="<?= $block->escapeHtmlAttr($maxQueryLength) ?>"
-                                   data-validate="{number:true, 'less-than-equals-to':'#<?= $block->escapeHtmlAttr($_code) ?>_to'}" />
+                                   data-validate="{number:true, 'less-than-equals-to':'#<?=
+                                    $block->escapeHtmlAttr($_code) ?>_to'}" />
                         </div>
                     </div>
                     <div class="field no-label">
@@ -50,7 +52,8 @@
                                    title="<?= $block->escapeHtml($block->getAttributeLabel($_attribute)) ?>"
                                    class="input-text"
                                    maxlength="<?= $block->escapeHtmlAttr($maxQueryLength) ?>"
-                                   data-validate="{number:true, 'greater-than-equals-to':'#<?= $block->escapeHtmlAttr($_code) ?>'}" />
+                                   data-validate="{number:true, 'greater-than-equals-to':'#<?=
+                                    $block->escapeHtmlAttr($_code) ?>'}" />
                         </div>
                     </div>
                 </div>
@@ -68,7 +71,8 @@
                                    class="input-text"
                                    type="text"
                                    maxlength="<?= $block->escapeHtmlAttr($maxQueryLength) ?>"
-                                   data-validate="{number:true, 'less-than-equals-to':'#<?= $block->escapeHtmlAttr($_code) ?>_to'}" />
+                                   data-validate="{number:true, 'less-than-equals-to':'#<?=
+                                    $block->escapeHtmlAttr($_code) ?>_to'}" />
                         </div>
                     </div>
                     <div class="field with-addon no-label">
@@ -81,7 +85,8 @@
                                        class="input-text"
                                        type="text"
                                        maxlength="<?= $block->escapeHtmlAttr($maxQueryLength) ?>"
-                                       data-validate="{number:true, 'greater-than-equals-to':'#<?= $block->escapeHtmlAttr($_code) ?>'}" />
+                                       data-validate="{number:true, 'greater-than-equals-to':'#<?=
+                                        $block->escapeHtmlAttr($_code) ?>'}" />
                                 <label class="addafter"
                                        for="<?= $block->escapeHtmlAttr($_code) ?>_to">
                                     <?= $block->escapeHtml($block->getCurrency($_attribute)) ?>
@@ -125,7 +130,7 @@
                        id="<?= $block->escapeHtmlAttr($_code) ?>"
                        value="<?= $block->escapeHtml($block->getAttributeValue($_attribute)) ?>"
                        title="<?= $block->escapeHtml($block->getAttributeLabel($_attribute)) ?>"
-                       class="input-text <?= $block->escapeHtmlAttr($block->getAttributeValidationClass($_attribute)) ?>"
+                       class="input-text <?= $block->escapeHtmlAttr($block->getAttributeValidationClass($_attribute))?>"
                        maxlength="<?= $block->escapeHtmlAttr($maxQueryLength) ?>" />
             <?php endswitch; ?>
             </div>
@@ -142,7 +147,7 @@
   </div>
 </div>
 </form>
-<script>
+<?php $scriptString = <<<script
 require([
     "jquery",
     "mage/mage",
@@ -158,9 +163,11 @@ require([
                 }
             },
             messages: {
-                'price[to]': {'greater-than-equals-to': '<?= $block->escapeJs(__('Please enter a valid price range.')) ?>'},
-                'price[from]': {'less-than-equals-to': '<?= $block->escapeJs(__('Please enter a valid price range.')) ?>'}
+                'price[to]': {'greater-than-equals-to': '{$block->escapeJs(__('Please enter a valid price range.'))}'},
+                'price[from]': {'less-than-equals-to': '{$block->escapeJs(__('Please enter a valid price range.'))}'}
             }
         });
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml
index 0e21f9e42c995..4b1750eba9f19 100644
--- a/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml
+++ b/app/code/Magento/CatalogWidget/view/adminhtml/templates/product/widget/conditions.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var \Magento\CatalogWidget\Block\Product\Widget\Conditions $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $element = $block->getElement();
 $fieldId = $element->getHtmlContainerId() ? ' id="' . $block->escapeHtmlAttr($element->getHtmlContainerId()) . '"' : '';
@@ -25,12 +26,14 @@ $fieldAttributes = $fieldId . ' class="' . $fieldClass . '" '
     </div>
 </div>
 
-
-<script>
+<?php $scriptString = <<<script
     require([
         "Magento_Rule/rules",
         "prototype"
     ], function(VarienRulesForm){
-        window.<?= $block->escapeJs($block->getHtmlId()) ?> = new VarienRulesForm('<?= $block->escapeJs($block->getHtmlId()) ?>', '<?= $block->escapeUrl($block->getNewChildUrl()) ?>');
+        window.{$block->escapeJs($block->getHtmlId())} = new VarienRulesForm('{$block->escapeJs($block->getHtmlId())}',
+         '{$block->escapeUrl($block->getNewChildUrl())}');
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Checkout/Block/Total/DefaultTotal.php b/app/code/Magento/Checkout/Block/Total/DefaultTotal.php
index ef113ad73fcc1..7773b1c9c8674 100644
--- a/app/code/Magento/Checkout/Block/Total/DefaultTotal.php
+++ b/app/code/Magento/Checkout/Block/Total/DefaultTotal.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Checkout\Block\Total;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Sales\Model\ConfigInterface;
+use Magento\Checkout\Helper\Data;
+
 /**
  * Default Total Row Renderer
  */
@@ -21,11 +25,30 @@ class DefaultTotal extends \Magento\Checkout\Block\Cart\Totals
     protected $_store;
 
     /**
-     * @return void
+     * @param \Magento\Framework\View\Element\Template\Context $context
+     * @param \Magento\Customer\Model\Session $customerSession
+     * @param \Magento\Checkout\Model\Session $checkoutSession
+     * @param ConfigInterface $salesConfig
+     * @param array $layoutProcessors
+     * @param array $data
      */
-    protected function _construct()
-    {
-        parent::_construct();
+    public function __construct(
+        \Magento\Framework\View\Element\Template\Context $context,
+        \Magento\Customer\Model\Session $customerSession,
+        \Magento\Checkout\Model\Session $checkoutSession,
+        ConfigInterface $salesConfig,
+        array $layoutProcessors = [],
+        array $data = []
+    ) {
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        parent::__construct(
+            $context,
+            $customerSession,
+            $checkoutSession,
+            $salesConfig,
+            $layoutProcessors,
+            $data
+        );
         $this->_store = $this->_storeManager->getStore();
     }
 
@@ -40,6 +63,8 @@ public function getStyle()
     }
 
     /**
+     * Set Total value.
+     *
      * @param float $total
      * @return $this
      */
@@ -53,6 +78,8 @@ public function setTotal($total)
     }
 
     /**
+     * Return store.
+     *
      * @return \Magento\Store\Model\Store
      */
     public function getStore()
diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
index 39df3cb121ba5..10bc7b750af97 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
@@ -12,10 +12,10 @@
     <div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"checkoutLoader": {}}'>
         <div class="loader">
             <img src="<?= $block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')) ?>"
-                 alt="<?= $block->escapeHtmlAttr(__('Loading...')) ?>"
-                 style="position: absolute;">
+                 alt="<?= $block->escapeHtmlAttr(__('Loading...')) ?>">
         </div>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("position: absolute;", "#checkout-loader") ?>
     <!-- ko template: getTemplate() --><!-- /ko -->
     <script type="text/x-magento-init">
         {
diff --git a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
index 0d9da171c11a8..b5edc3abf8912 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
@@ -4,40 +4,41 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /** @var $block \Magento\Checkout\Block\Total\DefaultTotal */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <tr class="totals">
-    <th
-            colspan="<?= $block->escapeHtmlAttr($block->getColspan()) ?>"
-            style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>"
-            class="mark" scope="row"
-    >
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) :?>
+    <th colspan="<?= $block->escapeHtmlAttr($block->getColspan()) ?>"
+        class="mark" scope="row">
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
             <strong>
         <?php endif; ?>
         <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) :?>
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
             </strong>
         <?php endif; ?>
     </th>
-    <td
-            style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>"
-            class="amount"
-            data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>"
-    >
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) :?>
+    <td class="amount"
+        data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
             <strong>
         <?php endif; ?>
             <span>
                 <?= $block->escapeHtml(
-                    $this->helper(Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()),
+                    $block->getData('jsonHelper')->formatPrice($block->getTotal()->getValue()),
                     ['span']
                 ) ?>
             </span>
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) :?>
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()):?>
             </strong>
         <?php endif; ?>
     </td>
 </tr>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+    'tr.totals th.mark'
+) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+    'tr.totals td.amount'
+) ?>
diff --git a/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml
index 5cb256090c196..d7b1565c95400 100644
--- a/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml
+++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/agreements.phtml
@@ -4,30 +4,37 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Files.LineLength
-
+use Magento\CheckoutAgreements\Model\AgreementModeOptions;
 ?>
 <?php
 /**
  * @var $block \Magento\CheckoutAgreements\Block\Agreements
  */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php if (!$block->getAgreements()) {
     return;
 } ?>
 <ol id="checkout-agreements" class="agreements checkout items">
     <?php /** @var \Magento\CheckoutAgreements\Api\Data\AgreementInterface $agreement */ ?>
-    <?php foreach ($block->getAgreements() as $agreement) :?>
+    <?php foreach ($block->getAgreements() as $agreement):?>
         <li class="item">
-            <div class="checkout-agreement-item-content"<?= $block->escapeHtmlAttr($agreement->getContentHeight() ? ' style="height:' . $agreement->getContentHeight() . '"' : '') ?>>
-                <?php if ($agreement->getIsHtml()) :?>
+            <div class="checkout-agreement-item-content" id="<?= /* @noEscape */ $agreement->getAgreementId() ?>"
+                <?php if ($agreement->getIsHtml()):?>
                     <?= /* @noEscape */ $agreement->getContent() ?>
-                <?php else :?>
+                <?php else:?>
                     <?= $block->escapeHtml(nl2br($agreement->getContent())) ?>
                 <?php endif; ?>
             </div>
-            <form id="checkout-agreements-form-<?= (int) $agreement->getAgreementId() ?>" class="field choice agree required">
-                <?php if ($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_MANUAL) :?>
+            <?php if ($agreement->getContentHeight()): ?>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                    'height:' . $agreement->getContentHeight(),
+                    '#' . $agreement->getAgreementId()
+                ) ?>
+            <?php endif; ?>
+            <form id="checkout-agreements-form-<?= (int) $agreement->getAgreementId() ?>"
+                  class="field choice agree required">
+                <?php if ($agreement->getMode() == AgreementModeOptions::MODE_MANUAL):?>
                 <input type="checkbox"
                        id="agreement-<?= (int) $agreement->getAgreementId() ?>"
                        name="agreement[<?= (int) $agreement->getAgreementId() ?>]"
@@ -37,19 +44,19 @@
                        data-validate="{required:true}"/>
                 <label class="label" for="agreement-<?= (int) $agreement->getAgreementId() ?>">
                     <span>
-                        <?php if ($agreement->getIsHtml()) :?>
+                        <?php if ($agreement->getIsHtml()):?>
                             <?= /* @noEscape */ $agreement->getCheckboxText() ?>
-                        <?php else :?>
+                        <?php else:?>
                             <?= $block->escapeHtml($agreement->getCheckboxText()) ?>
                         <?php endif; ?>
                     </span>
                 </label>
-                <?php elseif ($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_AUTO) :?>
+                <?php elseif ($agreement->getMode() == AgreementModeOptions::MODE_AUTO):?>
                 <div id="checkout-agreements-form-<?= (int) $agreement->getAgreementId() ?>" class="field choice agree">
                     <span>
-                        <?php if ($agreement->getIsHtml()) :?>
+                        <?php if ($agreement->getIsHtml()):?>
                             <?= /* @noEscape */ $agreement->getCheckboxText() ?>
-                        <?php else :?>
+                        <?php else:?>
                             <?= $block->escapeHtml($agreement->getCheckboxText()) ?>
                         <?php endif; ?>
                     </span>
diff --git a/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml b/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml
index fb2d5168d21de..bc714f21e4dfa 100644
--- a/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml
+++ b/app/code/Magento/CheckoutAgreements/view/frontend/templates/multishipping_agreements.phtml
@@ -4,13 +4,12 @@
  * See COPYING.txt for license details.
  */
 
-// @deprecated
-// phpcs:disable Magento2.Files.LineLength
-
+use Magento\CheckoutAgreements\Model\AgreementModeOptions;
 ?>
 <?php
 /**
  * @var $block \Magento\CheckoutAgreements\Block\Agreements
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php if (!$block->getAgreements()) {
@@ -18,17 +17,24 @@
 } ?>
 <ol id="checkout-agreements" class="agreements checkout items">
     <?php /** @var \Magento\CheckoutAgreements\Api\Data\AgreementInterface $agreement */ ?>
-    <?php foreach ($block->getAgreements() as $agreement) :?>
+    <?php foreach ($block->getAgreements() as $agreement):?>
         <li class="item">
-            <div class="checkout-agreement-item-content"<?= $block->escapeHtmlAttr($agreement->getContentHeight() ? ' style="height:' . $agreement->getContentHeight() . '"' : '') ?>>
-                <?php if ($agreement->getIsHtml()) :?>
+            <div class="checkout-agreement-item-content" id="<?= /* @noEscape */ $agreement->getAgreementId() ?>"
+                <?php if ($agreement->getIsHtml()):?>
                     <?= /* @noEscape */ $agreement->getContent() ?>
-                <?php else :?>
+                <?php else:?>
                     <?= $block->escapeHtml(nl2br($agreement->getContent())) ?>
                 <?php endif; ?>
             </div>
-            <?php if ($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_MANUAL) :?>
-            <div id="checkout-agreements-form-<?= (int) $agreement->getAgreementId() ?>" class="field choice agree required">
+                <?php if ($agreement->getContentHeight()): ?>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                        'height:' . $agreement->getContentHeight(),
+                        '#' . $agreement->getAgreementId()
+                    ) ?>
+                <?php endif; ?>
+            <?php if ($agreement->getMode() == AgreementModeOptions::MODE_MANUAL):?>
+            <div id="checkout-agreements-form-<?= (int) $agreement->getAgreementId() ?>"
+                 class="field choice agree required">
                 <input type="checkbox"
                        id="agreement-<?= (int) $agreement->getAgreementId() ?>"
                        name="agreement[<?= (int) $agreement->getAgreementId() ?>]"
@@ -38,20 +44,20 @@
                        data-validate="{required:true}"/>
                 <label class="label" for="agreement-<?= (int) $agreement->getAgreementId() ?>">
                     <span>
-                        <?php if ($agreement->getIsHtml()) :?>
+                        <?php if ($agreement->getIsHtml()):?>
                             <?= /* @noEscape */ $agreement->getCheckboxText() ?>
-                        <?php else :?>
+                        <?php else:?>
                             <?= $block->escapeHtml($agreement->getCheckboxText()) ?>
                         <?php endif; ?>
                     </span>
                 </label>
             </div>
-            <?php elseif ($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_AUTO) :?>
+            <?php elseif ($agreement->getMode() == AgreementModeOptions::MODE_AUTO):?>
             <div id="checkout-agreements-form-<?= (int) $agreement->getAgreementId() ?>" class="field choice agree">
                 <span>
-                    <?php if ($agreement->getIsHtml()) :?>
+                    <?php if ($agreement->getIsHtml()):?>
                         <?= /* @noEscape */ $agreement->getCheckboxText() ?>
-                    <?php else :?>
+                    <?php else:?>
                         <?= $block->escapeHtml($agreement->getCheckboxText()) ?>
                     <?php endif; ?>
                 </span>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
index ff3d5f24dd5a1..27706c8dd218b 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
@@ -5,13 +5,14 @@
  */
 
 /** @var $block \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Files */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $_width  = $block->getImagesWidth();
 $_height = $block->getImagesHeight();
 
 ?>
-<?php if ($block->getFilesCount() > 0) : ?>
-    <?php foreach ($block->getFiles() as $file) : ?>
+<?php if ($block->getFilesCount() > 0): ?>
+    <?php foreach ($block->getFiles() as $file): ?>
     <div
         data-row="file"
         class="filecnt"
@@ -19,17 +20,24 @@ $_height = $block->getImagesHeight();
         data-size="<?= $block->escapeHtmlAttr($file->getSize()) ?>"
         data-mime-type="<?= $block->escapeHtmlAttr($file->getMimeType()) ?>"
     >
-        <p class="nm" style="height:<?= $block->escapeHtmlAttr($_height) ?>px;">
-        <?php if ($block->getFileThumbUrl($file)) : ?>
-            <img src="<?= $block->escapeHtmlAttr($block->getFileThumbUrl($file)) ?>" alt="<?= $block->escapeHtmlAttr($block->getFileName($file)) ?>"/>
+        <p class="nm" id="<?= $block->escapeHtmlAttr($block->getFileId($file)) ?>_nm">
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'height:' . $block->escapeHtmlAttr($_height) . 'px;',
+            '#' . $block->escapeHtmlAttr($block->getFileId($file)) . '_nm'
+        ) ?>
+        <?php if ($block->getFileThumbUrl($file)): ?>
+            <img src="<?= $block->escapeHtmlAttr($block->getFileThumbUrl($file)) ?>"
+                 alt="<?= $block->escapeHtmlAttr($block->getFileName($file)) ?>"/>
         <?php endif; ?>
         </p>
-        <?php if ($block->getFileWidth($file)) : ?>
-            <small><?= $block->escapeHtml($block->getFileWidth($file)) ?>x<?= $block->escapeHtml($block->getFileHeight($file)) ?> <?= $block->escapeHtml(__('px.')) ?></small><br/>
+        <?php if ($block->getFileWidth($file)): ?>
+            <small><?= $block->escapeHtml($block->getFileWidth($file))
+            ?>x<?= $block->escapeHtml($block->getFileHeight($file)) ?> <?= $block->escapeHtml(__('px.')) ?>
+            </small><br/>
         <?php endif; ?>
         <small><?= $block->escapeHtml($block->getFileShortName($file)) ?></small>
     </div>
     <?php endforeach; ?>
-<?php else : ?>
+<?php else: ?>
     <div class="empty"><?= $block->escapeHtml(__('No files found')) ?></div>
 <?php endif; ?>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml
index 099efa0abdb88..d1c204c01ad1c 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml
@@ -5,17 +5,21 @@
  */
 
 /** @var $block \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Content\Uploader */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $filters = $block->getConfig()->getFilters() ?? [];
 $allowedExtensions = [];
 $blockHtmlId = $block->getHtmlId();
 
+$listExtensions = [[]];
 foreach ($filters as $media_type) {
-    $allowedExtensions = array_merge($allowedExtensions, array_map(function ($fileExt) {
+    $listExtensions[] = array_map(function ($fileExt) {
         return ltrim($fileExt, '.*');
-    }, $media_type['files']));
+    }, $media_type['files']);
 }
 
+$allowedExtensions = array_merge(...$listExtensions);
+
 $resizeConfig = $block->getImageUploadConfigData()->getIsResizeEnabled()
     ? "{action: 'resize', maxWidth: "
         . $block->escapeHtml($block->getImageUploadMaxWidth())
@@ -28,7 +32,9 @@ $resizeConfig = $block->getImageUploadConfigData()->getIsResizeEnabled()
 <div id="<?= /* @noEscape */ $blockHtmlId ?>" class="uploader">
     <span class="fileinput-button form-buttons">
         <span><?= $block->escapeHtml(__('Upload Images')) ?></span>
-        <input class="fileupload" type="file" name="<?= $block->escapeHtmlAttr($block->getConfig()->getFileField()) ?>" data-url="<?= $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple>
+        <input class="fileupload" type="file"
+               name="<?= $block->escapeHtmlAttr($block->getConfig()->getFileField()) ?>"
+               data-url="<?= $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple>
     </span>
     <div class="clear"></div>
     <script type="text/x-magento-template" id="<?= /* @noEscape */ $blockHtmlId ?>-template">
@@ -40,7 +46,11 @@ $resizeConfig = $block->getImageUploadConfigData()->getIsResizeEnabled()
             <div class="clear"></div>
         </div>
     </script>
-    <script>
+    <?php $intMaxSize = $block->getFileSizeService()->getMaxFileSize();
+    $resizeConfig = /* @noEscape */ $resizeConfig;
+    $blockHtmlId = /* @noEscape */ $blockHtmlId;
+    $scriptString = <<<script
+
 require([
     'jquery',
     'mage/template',
@@ -50,10 +60,10 @@ require([
     'domReady!',
     'mage/translate'
 ], function ($, mageTemplate, validator, uiAlert) {
-    var maxFileSize = <?= $block->escapeJs($block->getFileSizeService()->getMaxFileSize()) ?>,
-        allowedExtensions = '<?= $block->escapeHtml(implode(' ', $allowedExtensions)) ?>';
+    var maxFileSize = {$block->escapeJs($block->getFileSizeService()->getMaxFileSize())},
+        allowedExtensions = '{$block->escapeJs(implode(' ', $allowedExtensions))}';
 
-    $('#<?= /* @noEscape */ $blockHtmlId ?> .fileupload').fileupload({
+    $('#{$blockHtmlId} .fileupload').fileupload({
         dataType: 'json',
         formData: {
             isAjax: 'true',
@@ -63,9 +73,9 @@ require([
         acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
         allowedExtensions: allowedExtensions,
         maxFileSize: maxFileSize,
-        dropZone: $('#<?= /* @noEscape */ $blockHtmlId ?>').closest('[role="dialog"]'),
+        dropZone: $('#{$blockHtmlId}').closest('[role="dialog"]'),
         add: function (e, data) {
-            var progressTmpl = mageTemplate('#<?= /* @noEscape */ $blockHtmlId ?>-template'),
+            var progressTmpl = mageTemplate('#{$blockHtmlId}-template'),
                 fileSize,
                 tmpl,
                 validationResult;
@@ -109,7 +119,7 @@ require([
                     }
                 });
 
-                $(tmpl).data('image', data).appendTo('#<?= /* @noEscape */ $blockHtmlId ?>');
+                $(tmpl).data('image', data).appendTo('#{$blockHtmlId}');
 
                 return true;
             });
@@ -146,17 +156,20 @@ require([
         }
     });
 
-    $('#<?= /* @noEscape */ $blockHtmlId ?> .fileupload').fileupload('option', {
+    $('#{$blockHtmlId} .fileupload').fileupload('option', {
         process: [{
             action: 'load',
             fileTypes: /^image\/(gif|jpeg|png)$/,
-            maxFileSize: <?= (int) $block->getFileSizeService()->getMaxFileSize() ?> * 10
+            maxFileSize: {$intMaxSize} * 10
         },
-        <?= /* @noEscape */ $resizeConfig ?>,
+        {$resizeConfig},
         {
             action: 'save'
         }]
     });
 });
-</script>
+
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
index 9603bb4f1a412..0c5922b16b39b 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
@@ -4,16 +4,29 @@
  * See COPYING.txt for license details.
  */
 
- /** @var \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree $block */
+/** @var \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="tree-panel" >
     <div class="categories-side-col">
         <div class="tree-actions">
-            <a onclick="jQuery('[data-role=tree]').jstree('close_all');"><?= $block->escapeHtml(__('Collapse All')) ?></a>
+            <a id="collapseAll"><?= $block->escapeHtml(__('Collapse All')) ?></a>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "jQuery('[data-role=tree]').jstree('close_all');",
+                '#div.tree-actions a#collapseAll'
+            ) ?>
             <span class="separator">|</span>
-            <a onclick="jQuery('[data-role=tree]').jstree('open_all');"><?= $block->escapeHtml(__('Expand All')) ?></a>
+            <a id="expandAll"><?= $block->escapeHtml(__('Expand All')) ?></a>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "jQuery('[data-role=tree]').jstree('open_all');",
+                '#div.tree-actions a#expandAll'
+            ) ?>
         </div>
     </div>
-    <div data-role="tree" data-mage-init='<?= $block->escapeHtml($this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getTreeWidgetOptions())) ?>'>
+    <div data-role="tree" data-mage-init='<?= $block->escapeHtml(
+        $block->getData('jsonHelper')->jsonEncode($block->getTreeWidgetOptions())
+    ) ?>'>
     </div>
 </div>
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Field.php b/app/code/Magento/Config/Block/System/Config/Form/Field.php
index ac4a85b7d3bc6..026cdce679731 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Field.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Field.php
@@ -6,6 +6,10 @@
 
 namespace Magento\Config\Block\System\Config\Form;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Backend\Block\Template\Context;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Render field html element in Stores Configuration
  *
@@ -17,6 +21,25 @@
 class Field extends \Magento\Backend\Block\Template implements
     \Magento\Framework\Data\Form\Element\Renderer\RendererInterface
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
+    ) {
+        parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * Retrieve element HTML markup
      *
@@ -108,7 +131,12 @@ protected function _renderInheritCheckbox(\Magento\Framework\Data\Form\Element\A
             '[inherit]" type="checkbox" value="1"' .
             ' class="checkbox config-inherit" ' .
             $checkedHtml . $disabled .
-            ' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ';
+            ' />';
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "toggleValueElements(this, Element.previous(this.parentNode))",
+            'input#' . $htmlId
+        );
         $html .= '<label for="' . $htmlId . '_inherit" class="inherit">' . $this->_getInheritCheckboxLabel(
             $element
         ) . '</label>';
@@ -174,7 +202,12 @@ protected function _renderHint(\Magento\Framework\Data\Form\Element\AbstractElem
     {
         $html = '<td class="">';
         if ($element->getHint()) {
-            $html .= '<div class="hint"><div style="display: none;">' . $element->getHint() . '</div></div>';
+            $html .= '<div class="hint"><div id="hint_' . $element->getHtmlId() . '">' .
+                $element->getHint() . '</div></div>';
+            $html .= /* @noEscape */ $this->secureRenderer->renderStyleAsTag(
+                "display: none;",
+                'div#hint_' . $element->getHtmlId()
+            );
         }
         $html .= '</td>';
         return $html;
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
index 05c98a3eba99d..d2681f6fa1836 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
@@ -9,7 +9,9 @@
  */
 namespace Magento\Config\Block\System\Config\Form;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\AbstractElement;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * @api
@@ -35,21 +37,29 @@ class Fieldset extends \Magento\Backend\Block\AbstractBlock implements
      */
     protected $isCollapsedDefault = false;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
      * @param \Magento\Framework\View\Helper\Js $jsHelper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
         \Magento\Framework\View\Helper\Js $jsHelper,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_jsHelper = $jsHelper;
         $this->_authSession = $authSession;
         parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -71,6 +81,8 @@ public function render(AbstractElement $element)
     }
 
     /**
+     * Return children elements html.
+     *
      * @param AbstractElement $element
      * @return string
      * @since 100.1.0
@@ -160,12 +172,13 @@ protected function _getHeaderTitleHtml($element)
             $element->getHtmlId() .
             '-head" href="#' .
             $element->getHtmlId() .
-            '-link" onclick="Fieldset.toggleCollapse(\'' .
-            $element->getHtmlId() .
-            '\', \'' .
-            $this->getUrl(
-                '*/*/state'
-            ) . '\'); return false;">' . $element->getLegend() . '</a>';
+            '-link">' . $element->getLegend() . '</a>' .
+            /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' .
+                 $this->_urlBuilder->getUrl('*/*/state') . '\'); return false;",
+                'a#' . $element->getHtmlId()
+            );
     }
 
     /**
@@ -194,6 +207,7 @@ protected function _getFieldsetCss()
 
     /**
      * Return footer html for fieldset
+     *
      * Add extra tooltip comments to elements
      *
      * @param AbstractElement $element
@@ -205,10 +219,14 @@ protected function _getFooterHtml($element)
         foreach ($element->getElements() as $field) {
             if ($field->getTooltip()) {
                 $html .= sprintf(
-                    '<div id="row_%s_comment" class="system-tooltip-box" style="display:none;">%s</div>',
+                    '<div id="row_%s_comment" class="system-tooltip-box">%s</div>',
                     $field->getId(),
                     $field->getTooltip()
                 );
+                $html .= $this->secureRenderer->renderStyleAsTag(
+                    'display:none;',
+                    'row_' . $field->getId() . '_comment'
+                );
             }
         }
         $html .= '</fieldset>' . $this->_getExtraJs($element);
@@ -233,6 +251,7 @@ protected function _getExtraJs($element)
     {
         $htmlId = $element->getHtmlId();
         $output = "require(['prototype'], function(){Fieldset.applyCollapse('{$htmlId}');});";
+
         return $this->_jsHelper->getScript($output);
     }
 
diff --git a/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml b/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml
index 49a75d36fd8a5..606d4ad2f9de0 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml
@@ -8,20 +8,22 @@
  * @deprecated
  * @var $block \Magento\Backend\Block\Page\System\Config\Robots\Reset
  * @var $jsonHelper \Magento\Framework\Json\Helper\Data
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
-$jsonHelper = $this->helper(\Magento\Framework\Json\Helper\Data::class);
+$jsonHelper = $block->getData('jsonHelper');
 ?>
-
-<script>
+<?php
+$robotsDefault = /* @noEscape */ $jsonHelper->jsonEncode($block->getRobotsDefaultCustomInstructions());
+$scriptString = <<<script
     require([
         'jquery'
     ], function ($) {
         window.resetRobotsToDefault = function(){
-            $('#design_search_engine_robots_custom_instructions').val(<?=
-                /* @noEscape */ $jsonHelper->jsonEncode($block->getRobotsDefaultCustomInstructions())
-            ?>);
+            $('#design_search_engine_robots_custom_instructions').val({$robotsDefault});
         }
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <?= $block->getButtonHtml() ?>
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml
index cf188bfeb6868..24024f62c7d6d 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php
@@ -15,7 +17,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
         <table class="admin__control-table" id="<?= $block->escapeHtmlAttr($block->getElement()->getId()) ?>">
             <thead>
             <tr>
-                <?php foreach ($block->getColumns() as $columnName => $column) : ?>
+                <?php foreach ($block->getColumns() as $columnName => $column): ?>
                     <th><?= $block->escapeHtml($column['label']) ?></th>
                 <?php endforeach; ?>
                 <th class="col-actions" colspan="<?= (int)$_colspan ?>"><?= $block->escapeHtml(__('Action')) ?></th>
@@ -24,7 +26,10 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
             <tfoot>
             <tr>
                 <td colspan="<?= count($block->getColumns())+$_colspan ?>" class="col-actions-add">
-                    <button id="addToEndBtn<?= $block->escapeHtmlAttr($_htmlId) ?>" class="action-add" title="<?= $block->escapeHtmlAttr(__('Add')) ?>" type="button">
+                    <button id="addToEndBtn<?= $block->escapeHtmlAttr($_htmlId) ?>"
+                            class="action-add"
+                            title="<?= $block->escapeHtmlAttr(__('Add')) ?>"
+                            type="button">
                         <span><?= $block->escapeHtml($block->getAddButtonLabel()) ?></span>
                     </button>
                 </td>
@@ -35,33 +40,38 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
     </div>
     <input type="hidden" name="<?= $block->escapeHtmlAttr($block->getElement()->getName()) ?>[__empty]" value="" />
 
-    <script>
+    <?php $scriptString = <<<script
         require([
             'mage/template',
             'prototype'
         ], function (mageTemplate) {
         // create row creator
-        window.arrayRow<?= $block->escapeJs($_htmlId) ?> = {
+        window.arrayRow{$block->escapeJs($_htmlId)} = {
 
             // define row prototypeJS template
             template: mageTemplate(
                     '<tr id="<%- _id %>">'
-                    <?php foreach ($block->getColumns() as $columnName => $column) : ?>
+script;
+    foreach ($block->getColumns() as $columnName => $column):
+        $scriptString .= <<<script
                         + '<td>'
-                        + '<?= $block->escapeJs($block->renderCellTemplate($columnName)) ?>'
+                        + '{$block->escapeJs($block->renderCellTemplate($columnName))}'
                         + '<\/td>'
-                    <?php endforeach; ?>
+script;
+    endforeach;
 
-                    <?php if ($block->isAddAfter()) : ?>
+    if ($block->isAddAfter()):
+        $scriptString .= <<<script
                         + '<td><button class="action-add" type="button" id="addAfterBtn<%- _id %>"><span>'
-                        + '<?= $block->escapeJs($block->escapeHtml(__('Add after'))) ?>'
+                        + '{$block->escapeJs(__('Add after'))}'
                         + '<\/span><\/button><\/td>'
-                    <?php endif; ?>
-
+script;
+    endif;
+    $scriptString .= <<<script
                     + '<td class="col-actions"><button '
-                    + 'onclick="arrayRow<?= $block->escapeJs($_htmlId) ?>.del(\'<%- _id %>\')" '
+                    + 'onclick="arrayRow{$block->escapeJs($_htmlId)}.del(\'<%- _id %>\')" '
                     + 'class="action-delete" type="button">'
-                    + '<span><?= $block->escapeJs($block->escapeHtml(__('Delete'))) ?><\/span><\/button><\/td>'
+                    + '<span>{$block->escapeJs(__('Delete'))}<\/span><\/button><\/td>'
                     + '<\/tr>'
             ),
 
@@ -75,10 +85,14 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
                 } else {
                     var d = new Date();
                     templateValues = {
-                        <?php foreach ($block->getColumns() as $columnName => $column) : ?>
-                            <?= $block->escapeJs($columnName) ?>: '',
+script;
+    foreach ($block->getColumns() as $columnName => $column):
+        $scriptString .= <<<script
+                            {$block->escapeJs($columnName)}: '',
                                 'option_extra_attrs': {},
-                        <?php endforeach; ?>
+script;
+    endforeach;
+    $scriptString .= <<<script
                         _id: '_' + d.getTime() + '_' + d.getMilliseconds()
                 };
             }
@@ -87,7 +101,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
             if (insertAfterId) {
                 Element.insert($(insertAfterId), {after: this.template(templateValues)});
             } else {
-                Element.insert($('addRow<?= $block->escapeJs($_htmlId) ?>'), {bottom: this.template(templateValues)});
+                Element.insert($('addRow{$block->escapeJs($_htmlId)}'), {bottom: this.template(templateValues)});
             }
 
             // Fill controls with data
@@ -101,9 +115,13 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
             }
 
             // Add event for {addAfterBtn} button
-            <?php if ($block->isAddAfter()) : ?>
+script;
+    if ($block->isAddAfter()):
+        $scriptString .= <<<script
             Event.observe('addAfterBtn' + templateValues._id, 'click', this.add.bind(this, false, templateValues._id));
-            <?php endif; ?>
+script;
+    endif;
+    $scriptString .= <<<script
             },
 
             del: function(rowId) {
@@ -112,24 +130,29 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
         }
 
         // bind add action to "Add" button in last row
-        Event.observe('addToEndBtn<?= $block->escapeJs($_htmlId) ?>',
+        Event.observe('addToEndBtn{$block->escapeJs($_htmlId)}',
             'click',
-            arrayRow<?= $block->escapeJs($_htmlId) ?>.add.bind(
-                arrayRow<?= $block->escapeJs($_htmlId) ?>, false, false
+            arrayRow{$block->escapeJs($_htmlId)}.add.bind(
+                arrayRow{$block->escapeJs($_htmlId)}, false, false
             )
         );
 
         // add existing rows
-        <?php
-        foreach ($block->getArrayRows() as $_rowId => $_row) {
-            echo /** @noEscape */ "arrayRow{$block->escapeJs($_htmlId)}.add(" . /** @noEscape */ $_row->toJson() . ");\n";
-        }
-        ?>
-
+script;
+    foreach ($block->getArrayRows() as $_rowId => $_row) {
+        echo /** @noEscape */ "arrayRow{$block->escapeJs($_htmlId)}.add(" . /** @noEscape */ $_row->toJson() . ");\n";
+    }
+    $scriptString .= <<<script
         // Toggle the grid availability, if element is disabled (depending on scope)
-        <?php if ($block->getElement()->getDisabled()) : ?>
-        toggleValueElements({checked: true}, $('grid<?= $block->escapeJs($_htmlId) ?>').parentNode);
-        <?php endif; ?>
+script;
+    if ($block->getElement()->getDisabled()):
+        $scriptString .= <<<script
+        toggleValueElements({checked: true}, $('grid{$block->escapeJs($_htmlId)}').parentNode);
+script;
+    endif;
+    $scriptString .= <<<script
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml
index 0d07051e6667d..d956dd0bccd84 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml
@@ -3,34 +3,46 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Backend\Block\Template */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /* @var $block \Magento\Backend\Block\Template */ ?>
 <div class="field field-store-switcher">
     <label class="label" for="store_switcher"><?= $block->escapeHtml(__('Current Configuration Scope:')) ?></label>
     <div class="control">
-        <select id="store_switcher" class="system-config-store-switcher"
-                onchange="location.href=this.options[this.selectedIndex].getAttribute('url')">
-        <?php foreach ($block->getStoreSelectOptions() as $_value => $_option) : ?>
-            <?php if (isset($_option['is_group'])) : ?>
-                <?php if ($_option['is_close']) : ?>
+        <select id="store_switcher" class="system-config-store-switcher">
+        <?php foreach ($block->getStoreSelectOptions() as $_value => $_option): ?>
+            <?php if (isset($_option['is_group'])): ?>
+                <?php if ($_option['is_close']): ?>
                     </optgroup>
-                <?php else : ?>
-                    <optgroup label="<?= $block->escapeHtmlAttr($_option['label']) ?>"
-                              style="<?= $block->escapeHtmlAttr($_option['style']) ?>">
+                <?php else: ?>
+                    <optgroup label="<?= $block->escapeHtmlAttr($_option['label']) ?>">
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                            $block->escapeHtmlAttr($_option['style']),
+                            "optgroup[label='" . $block->escapeHtmlAttr($_option['label']) . "']"
+                        ) ?>
                 <?php endif; ?>
                 <?php continue ?>
             <?php endif; ?>
               <option value="<?= $block->escapeHtmlAttr($_value) ?>"
                       url="<?= $block->escapeUrl($_option['url']) ?>"
-                      <?= $_option['selected'] ? 'selected="selected"' : '' ?>
-                      style="<?= $block->escapeHtmlAttr($_option['style']) ?>">
+                      <?= $_option['selected'] ? 'selected="selected"' : '' ?>>
                   <?= $block->escapeHtml($_option['label']) ?>
               </option>
+              <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                  $block->escapeHtmlAttr($_option['style']),
+                  "optgroup[url='" . $block->escapeUrl($_option['url']) . "']"
+              ) ?>
         <?php endforeach ?>
         </select>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onchange',
+            "location.href=this.options[this.selectedIndex].getAttribute('url')",
+            '#store_switcher'
+        ) ?>
     </div>
     <?= $block->getHintHtml() ?>
-    <?php if ($block->getAuthorization()->isAllowed('Magento_Backend::store')) : ?>
+    <?php if ($block->getAuthorization()->isAllowed('Magento_Backend::store')): ?>
         <div class="actions">
             <a href="<?= $block->escapeUrl($block->getUrl('*/system_store')) ?>">
                 <?= $block->escapeHtml(__('Stores')) ?>
diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
index 11e75839ec33c..95290940b2ad4 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
@@ -7,12 +7,68 @@
  */
 namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Composite\Fieldset;
 
+use Magento\Catalog\Helper\Product;
+use Magento\ConfigurableProduct\Model\ConfigurableAttributeData;
+use Magento\Customer\Helper\Session\CurrentCustomer;
+use Magento\Customer\Model\Session;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Locale\Format;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
+
 /**
  * @api
  * @since 100.0.2
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Configurable extends \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable
 {
+    /**
+     * @param \Magento\Catalog\Block\Product\Context $context
+     * @param \Magento\Framework\Stdlib\ArrayUtils $arrayUtils
+     * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
+     * @param \Magento\ConfigurableProduct\Helper\Data $helper
+     * @param \Magento\Catalog\Helper\Product $catalogProduct
+     * @param CurrentCustomer $currentCustomer
+     * @param PriceCurrencyInterface $priceCurrency
+     * @param ConfigurableAttributeData $configurableAttributeData
+     * @param array $data
+     * @param Format|null $localeFormat
+     * @param Session|null $customerSession
+     * @param \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices|null $variationPrices
+     */
+    public function __construct(
+        \Magento\Catalog\Block\Product\Context $context,
+        \Magento\Framework\Stdlib\ArrayUtils $arrayUtils,
+        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
+        \Magento\ConfigurableProduct\Helper\Data $helper,
+        \Magento\Catalog\Helper\Product $catalogProduct,
+        CurrentCustomer $currentCustomer,
+        PriceCurrencyInterface $priceCurrency,
+        ConfigurableAttributeData $configurableAttributeData,
+        array $data = [],
+        Format $localeFormat = null,
+        Session $customerSession = null,
+        \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices $variationPrices = null
+    ) {
+        $data['productHelper'] = ObjectManager::getInstance()->get(Product::class);
+        parent::__construct(
+            $context,
+            $arrayUtils,
+            $jsonEncoder,
+            $helper,
+            $catalogProduct,
+            $currentCustomer,
+            $priceCurrency,
+            $configurableAttributeData,
+            $data,
+            $localeFormat,
+            $customerSession,
+            $variationPrices
+        );
+    }
+
     /**
      * Retrieve product
      *
diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php
index bb5c8d8b49ca2..4184f3ffedec2 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php
@@ -11,7 +11,9 @@
 use Magento\Catalog\Model\Product\Type;
 use Magento\Catalog\Model\ProductFactory;
 use Magento\Eav\Model\Entity\Attribute;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\View\Element\Template\Context;
+use Magento\Framework\Json\Helper\Data;
 
 /**
  * Adminhtml block for fieldset of configurable product
@@ -41,21 +43,24 @@ class Bulk extends \Magento\Ui\Block\Component\StepsWizard\StepAbstract
      * @param Image $image
      * @param Config $catalogProductMediaConfig
      * @param ProductFactory $productFactory
+     * @param array $data
      */
     public function __construct(
         Context $context,
         Image $image,
         Config $catalogProductMediaConfig,
-        ProductFactory $productFactory
+        ProductFactory $productFactory,
+        array $data = []
     ) {
-        parent::__construct($context);
+        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        parent::__construct($context, $data);
         $this->image = $image;
         $this->productFactory = $productFactory;
         $this->catalogProductMediaConfig = $catalogProductMediaConfig;
     }
 
     /**
-     * {@inheritdoc}
+     * @inheritdoc
      */
     public function getCaption()
     {
@@ -63,6 +68,8 @@ public function getCaption()
     }
 
     /**
+     * Return no image url.
+     *
      * @return string
      */
     public function getNoImageUrl()
@@ -92,6 +99,8 @@ public function getImageTypes()
     }
 
     /**
+     * Return media attributes.
+     *
      * @return array
      */
     public function getMediaAttributes()
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml
index 9307da21e6659..4ad7a6419ca63 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/attribute/new/created.phtml
@@ -4,11 +4,13 @@
  * See COPYING.txt for license details.
  */
 /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\NewAttribute\Product\Created */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $attributes = /* @noEscape */ $block->getAttributesBlockJson();
+$scriptString = <<<script
 (function ($) {
 
-    var data = <?= /* @noEscape */ $block->getAttributesBlockJson() ?>;
+    var data = {$attributes};
     var set = data.set || {id: $('#attribute_set_id').val()};
     if (data.tab == 'variations') {
         $('[data-role=product-variations-matrix]').trigger('add', data.attribute);
@@ -18,4 +20,6 @@
     $('#create_new_attribute').modal('closeModal');
 
 })(window.parent.jQuery);
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml
index 844422b2a2d7a..b40121db96488 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml
@@ -3,26 +3,26 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
 
-<?php /* @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Composite\Fieldset\Configurable */ ?>
+/* @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Composite\Fieldset\Configurable */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
 <?php $_product = $block->getProduct(); ?>
 <?php $_attributes = $block->decorateArray($block->getAllowAttributes()); ?>
-<?php $_skipSaleableCheck = $this->helper(Magento\Catalog\Helper\Product::class)->getSkipSaleableCheck(); ?>
-<?php if (($_product->isSaleable() || $_skipSaleableCheck) && count($_attributes)) :?>
+<?php $_skipSaleableCheck = $block->getData('productHelper')->getSkipSaleableCheck(); ?>
+<?php if (($_product->isSaleable() || $_skipSaleableCheck) && count($_attributes)):?>
 <fieldset id="catalog_product_composite_configure_fields_configurable" class="fieldset admin__fieldset">
     <legend class="legend admin__legend">
         <span><?= $block->escapeHtml(__('Associated Products')) ?></span>
     </legend>
     <div class="product-options fieldset admin__fieldset">
-        <?php foreach ($_attributes as $_attribute) : ?>
+        <?php foreach ($_attributes as $_attribute): ?>
             <div class="field admin__field required">
                 <label class="label admin__field-label"><?=
                     $block->escapeHtml($_attribute->getProductAttribute()->getStoreLabel($_product->getStoreId()));
                 ?></label>
                 <div class="control admin__field-control <?php
-                if ($_attribute->getDecoratedIsLast()) :
+                if ($_attribute->getDecoratedIsLast()):
                     ?> last<?php
                     endif; ?>">
                     <select name="super_attribute[<?= $block->escapeHtmlAttr($_attribute->getAttributeId()) ?>]"
@@ -35,13 +35,14 @@
         <?php endforeach; ?>
     </div>
 </fieldset>
-<script>
+    <?php $config = /* @noEscape */ $block->getJsonConfig();
+    $scriptString = <<<script
 require([
     "Magento_ConfigurableProduct/js/configurable",
     "Magento_Catalog/catalog/product/composite/configure"
 ], function(){
 
-    var config = <?= /* @noEscape */ $block->getJsonConfig() ?>;
+    var config = {$config};
     if (window.productConfigure) {
         config.containerId = window.productConfigure.blockFormFields.id;
         if (window.productConfigure.restorePhase) {
@@ -52,5 +53,7 @@ require([
     ProductConfigure.spConfig = new Product.Config(config);
 
 });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif;?>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml
index a792a35da8051..b54e63c7eb7c5 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml
@@ -3,20 +3,25 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
 /* @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\Bulk */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div data-bind="scope: '<?= /* @noEscape */  $block->getComponentName() ?>'" data-role="bulk-step">
     <h2 class="steps-wizard-title"><?= $block->escapeHtml(__('Step 3: Bulk Images, Price and Quantity')) ?></h2>
     <div class="steps-wizard-info">
-        <?= /* @noEscape */ __('Based on your selections %1 new products will be created. Use this step to customize images and price for your new products.', '<span class="new-products-count" data-bind="text:countVariations"></span>') ?>
+        <?= /* @noEscape */ __(
+            'Based on your selections %1 new products will be created. ' .
+            'Use this step to customize images and price for your new products.',
+            '<span class="new-products-count" data-bind="text:countVariations"></span>'
+        ) ?>
     </div>
 
     <div data-bind="with: sections().images" class="steps-wizard-section">
         <div data-role="section">
             <div class="steps-wizard-section-title">
-            <span><?= $block->escapeHtml(__('Images')); ?></span>
+                <span><?= $block->escapeHtml(__('Images')); ?></span>
             </div>
 
             <ul class="steps-wizard-section-list">
@@ -65,7 +70,9 @@
                 <div data-role="gallery"
                      class="gallery"
                      data-images="[]"
-                     data-types="<?= $block->escapeHtml($this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getImageTypes())) ?>">
+                     data-types="<?= $block->escapeHtml($block->getData('jsonHelper')->jsonEncode(
+                         $block->getImageTypes()
+                     )) ?>">
                     <div class="image image-placeholder">
                         <div data-role="uploader" class="uploader">
                             <div class="image-browse">
@@ -75,32 +82,39 @@
                                        name="image"
                                        class="admin__control-file"
                                        multiple="multiple"
-                                       data-url="<?= /* @noEscape */ $block->getUrl('catalog/product_gallery/upload') ?>" />
+                                       data-url="<?= /* @noEscape */ $block->getUrl('catalog/product_gallery/upload')
+                                        ?>" />
                             </div>
                         </div>
                         <div class="product-image-wrapper">
-                            <p class="image-placeholder-text"><?= $block->escapeHtml(__('Browse to find or drag image here')) ?></p>
+                            <p class="image-placeholder-text"><?= $block->escapeHtml(__(
+                                'Browse to find or drag image here'
+                            )) ?></p>
                         </div>
                     </div>
 
-                    <?php foreach ($block->getImageTypes() as $typeData) : ?>
+                    <?php foreach ($block->getImageTypes() as $typeData): ?>
                         <input name="<?= $block->escapeHtml($typeData['name']) ?>"
                                class="image-<?= $block->escapeHtml($typeData['code']) ?>"
                                type="hidden"
                                value="<?= $block->escapeHtml($typeData['value']) ?>"/>
-                        <?php endforeach; ?>
+                    <?php endforeach; ?>
 
                     <script data-template="uploader" type="text/x-magento-template">
                         <div id="<%- data.id %>" class="file-row">
                             <span class="file-info"><%- data.name %> (<%- data.size %>)</span>
                             <div class="progressbar-container">
-                                <div class="progressbar upload-progress" style="width: 0%;"></div>
+                                <div class="progressbar upload-progress"></div>
                             </div>
                             <div class="spinner">
                                 <span></span><span></span><span></span><span></span>
                                 <span></span><span></span><span></span><span></span>
                             </div>
                         </div>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                            "width: 0%;",
+                            "div.progressbar-container div.progressbar.upload-progress"
+                        ) ?>
                     </script>
 
                     <script data-template="gallery-content" type="text/x-magento-template">
@@ -124,7 +138,8 @@
                             <input type="hidden"
                                    name="product[media_gallery][images][<%- data.file_id %>][removed]"/>
                             <div class="product-image-wrapper">
-                                <img class="product-image" data-role="image-element" src="<%- data.url %>" alt="<%- data.label %>"/>
+                                <img class="product-image" data-role="image-element" src="<%- data.url %>"
+                                     alt="<%- data.label %>"/>
                                 <div class="actions">
                                     <button type="button"
                                             class="action-remove"
@@ -139,16 +154,18 @@
                             <div class="item-description">
                                 <div class="item-title" data-role="img-title"><%- data.label %></div>
                                 <div class="item-size">
-                                    <span data-role="image-dimens"></span>, <span data-role="image-size"><%- data.sizeLabel %></span>
+                                    <span data-role="image-dimens"></span>,
+                                    <span data-role="image-size"><%- data.sizeLabel %></span>
                                 </div>
                             </div>
                             <ul class="item-roles" data-role="roles-labels">
-                                <?php foreach ($block->getMediaAttributes() as $attribute) :?>
+                                <?php foreach ($block->getMediaAttributes() as $attribute):?>
                                     <li data-role-code="<?= $block->escapeHtml($attribute->getAttributeCode()) ?>"
-                                        class="item-role item-role-<?= $block->escapeHtml($attribute->getAttributeCode()) ?>">
+                                        class="item-role item-role-<?=
+                                        $block->escapeHtml($attribute->getAttributeCode()) ?>">
                                         <?= /* @noEscape */ $attribute->getFrontendLabel() ?>
                                     </li>
-                                    <?php endforeach; ?>
+                                <?php endforeach; ?>
                             </ul>
                         </div>
                     </script>
@@ -210,40 +227,44 @@
 
                                 <div class="admin__field field-image-role">
                                     <label class="admin__field-label">
-                                    <span><?= $block->escapeHtml(__('Role')); ?></span>
+                                        <span><?= $block->escapeHtml(__('Role')); ?></span>
                                     </label>
                                     <div class="admin__field-control">
                                         <ul class="multiselect-alt">
                                             <?php
-                                            foreach ($block->getMediaAttributes() as $attribute) :
+                                            foreach ($block->getMediaAttributes() as $attribute):
                                                 ?>
                                                 <li class="item">
                                                     <label>
                                                         <input class="image-type"
                                                                data-role="type-selector"
                                                                type="checkbox"
-                                                               value="<?= $block->escapeHtml($attribute->getAttributeCode()) ?>"
+                                                               value="<?=
+                                                                $block->escapeHtml($attribute->getAttributeCode()) ?>"
                                                         />
                                                         <?= $block->escapeHtml($attribute->getFrontendLabel()); ?>
                                                     </label>
                                                 </li>
-                                                <?php endforeach; ?>
+                                            <?php endforeach; ?>
                                         </ul>
                                     </div>
                                 </div>
 
                                 <div class="admin__field admin__field-inline field-image-size" data-role="size">
                                     <label class="admin__field-label">
-                                    <span><?= $block->escapeHtml(__('Image Size')); ?></span>
+                                        <span><?= $block->escapeHtml(__('Image Size')); ?></span>
                                     </label>
-                                    <div class="admin__field-value" data-message="<?= $block->escapeHtml(__('{size}'));?>"></div>
+                                    <div class="admin__field-value"
+                                         data-message="<?= $block->escapeHtml(__('{size}'));?>"></div>
                                 </div>
 
-                                <div class="admin__field admin__field-inline field-image-resolution" data-role="resolution">
+                                <div class="admin__field admin__field-inline field-image-resolution"
+                                     data-role="resolution">
                                     <label class="admin__field-label">
-                                    <span><?= $block->escapeHtml(__('Image Resolution')); ?></span>
+                                        <span><?= $block->escapeHtml(__('Image Resolution')); ?></span>
                                     </label>
-                                    <div class="admin__field-value" data-message="<?= $block->escapeHtml(__('{width}^{height} px'));?>"></div>
+                                    <div class="admin__field-value"
+                                         data-message="<?= $block->escapeHtml(__('{width}^{height} px'));?>"></div>
                                 </div>
 
                                 <div class="admin__field field-image-hide">
@@ -273,7 +294,7 @@
                 <fieldset class="admin__fieldset bulk-attribute-values">
                     <div class="admin__field _required">
                         <label class="admin__field-label" for="apply-images-attributes">
-                        <span><?= $block->escapeHtml(__('Select attribute')); ?></span>
+                            <span><?= $block->escapeHtml(__('Select attribute')); ?></span>
                         </label>
                         <div class="admin__field-control">
                             <select
@@ -300,17 +321,22 @@
                         <div data-role="gallery"
                              class="gallery"
                              data-images="[]"
-                             data-types="<?= $block->escapeHtml($this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getImageTypes())) ?>">
+                             data-types="<?= $block->escapeHtml(
+                                 $block->getData('jsonHelper')->jsonEncode($block->getImageTypes())
+                             ) ?>">
                             <div class="image image-placeholder">
                                 <div data-role="uploader" class="uploader">
                                     <div class="image-browse">
-                                    <span><?= $block->escapeHtml(__('Browse Files...')); ?></span>
+                                        <span><?= $block->escapeHtml(__('Browse Files...')); ?></span>
                                         <input type="file" name="image" multiple="multiple"
-                                               data-url="<?= /* @noEscape */ $block->getUrl('catalog/product_gallery/upload') ?>" />
+                                               data-url="<?=
+                                               /* @noEscape */ $block->getUrl('catalog/product_gallery/upload') ?>" />
                                     </div>
                                 </div>
                                 <div class="product-image-wrapper">
-                                    <p class="image-placeholder-text"><?= $block->escapeHtml(__('Browse to find or drag image here')); ?></p>
+                                    <p class="image-placeholder-text">
+                                        <?= $block->escapeHtml(__('Browse to find or drag image here')); ?>
+                                    </p>
                                 </div>
                                 <div class="spinner">
                                     <span></span><span></span><span></span><span></span>
@@ -318,24 +344,28 @@
                                 </div>
                             </div>
 
-                            <?php foreach ($block->getImageTypes() as $typeData) :?>
+                            <?php foreach ($block->getImageTypes() as $typeData): ?>
                                 <input name="<?= $block->escapeHtml($typeData['name']) ?>"
                                        class="image-<?= $block->escapeHtml($typeData['code']) ?>"
                                        type="hidden"
                                        value="<?= $block->escapeHtml($typeData['value']) ?>"/>
-                                <?php endforeach; ?>
+                            <?php endforeach; ?>
 
                             <script data-template="uploader" type="text/x-magento-template">
                                 <div id="<%- data.id %>" class="file-row">
                                     <span class="file-info"><%- data.name %> (<%- data.size %>)</span>
                                     <div class="progressbar-container">
-                                        <div class="progressbar upload-progress" style="width: 0%;"></div>
+                                        <div class="progressbar upload-progress"></div>
                                     </div>
                                     <div class="spinner">
                                         <span></span><span></span><span></span><span></span>
                                         <span></span><span></span><span></span><span></span>
                                     </div>
                                 </div>
+                                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                    "width: 0%;",
+                                    "div.progressbar-container div.progressbar.upload-progress"
+                                ) ?>
                             </script>
 
                             <script data-template="gallery-content" type="text/x-magento-template">
@@ -361,31 +391,36 @@
                                            value=""
                                            class="is-removed"/>
                                     <div class="product-image-wrapper">
-                                        <img class="product-image" data-role="image-element" src="<%- data.url %>" alt="<%- data.label %>"/>
+                                        <img class="product-image" data-role="image-element" src="<%- data.url %>"
+                                             alt="<%- data.label %>"/>
                                         <div class="actions">
                                             <button type="button"
                                                     class="action-remove"
                                                     data-role="delete-button"
                                                     title="<?= $block->escapeHtml(__('Remove image')) ?>">
-                                            <span><?= $block->escapeHtml(__('Remove image')); ?></span>
+                                                <span><?= $block->escapeHtml(__('Remove image')); ?></span>
                                             </button>
                                             <div class="draggable-handle"></div>
                                         </div>
-                                        <div class="image-fade"><span><?= $block->escapeHtml(__('Hidden')); ?></span></div>
+                                        <div class="image-fade"><span><?= $block->escapeHtml(__('Hidden')); ?></span>
+                                        </div>
                                     </div>
                                     <div class="item-description">
                                         <div class="item-title" data-role="img-title"><%- data.label %></div>
                                         <div class="item-size">
-                                            <span data-role="image-dimens"></span>, <span data-role="image-size"><%- data.sizeLabel %></span>
+                                            <span data-role="image-dimens"></span>,
+                                            <span data-role="image-size"><%- data.sizeLabel %></span>
                                         </div>
                                     </div>
                                     <ul class="item-roles" data-role="roles-labels">
-                                        <?php foreach ($block->getMediaAttributes() as $attribute) :?>
-                                            <li data-role-code="<?= $block->escapeHtml($attribute->getAttributeCode()) ?>"
-                                                class="item-role item-role-<?= $block->escapeHtml($attribute->getAttributeCode()) ?>">
+                                        <?php foreach ($block->getMediaAttributes() as $attribute):?>
+                                            <li data-role-code="<?= $block->escapeHtml($attribute->getAttributeCode())
+                                            ?>"
+                                                class="item-role item-role-<?=
+                                                $block->escapeHtml($attribute->getAttributeCode()) ?>">
                                                 <?= $block->escapeHtml($attribute->getFrontendLabel()) ?>
                                             </li>
-                                            <?php endforeach; ?>
+                                        <?php endforeach; ?>
                                     </ul>
                                 </div>
                             </script>
@@ -407,7 +442,8 @@
                                             </button>
                                             <div class="draggable-handle"></div>
                                         </div>
-                                        <div class="image-fade"><span><?= $block->escapeHtml(__('Hidden')) ?></span></div>
+                                        <div class="image-fade"><span><?= $block->escapeHtml(__('Hidden')) ?></span>
+                                        </div>
                                     </div>
                                     <!--<ul class="item-roles">
                                         <li class="item-role item-role-base">Base</li>
@@ -416,7 +452,8 @@
                             </script>
 
                             <script data-role="img-dialog-container-tmpl" type="text/x-magento-template">
-                                <div class="image-panel ui-tabs-panel ui-widget-content ui-corner-bottom" data-role="dialog">
+                                <div class="image-panel ui-tabs-panel ui-widget-content ui-corner-bottom"
+                                     data-role="dialog">
                                 </div>
                             </script>
 
@@ -430,7 +467,7 @@
                                     <fieldset class="admin__fieldset fieldset-image-panel">
                                         <div class="admin__field field-image-description">
                                             <label class="admin__field-label" for="image-description">
-                                            <span><?= $block->escapeHtml(__('Alt Text'));?></span>
+                                                <span><?= $block->escapeHtml(__('Alt Text'));?></span>
                                             </label>
 
                                             <div class="admin__field-control">
@@ -444,38 +481,43 @@
 
                                         <div class="admin__field field-image-role">
                                             <label class="admin__field-label">
-                                            <span><?= $block->escapeHtml(__('Role'));?></span>
+                                                <span><?= $block->escapeHtml(__('Role'));?></span>
                                             </label>
                                             <div class="admin__field-control">
                                                 <ul class="multiselect-alt">
-                                                    <?php foreach ($block->getMediaAttributes() as $attribute) :?>
+                                                    <?php foreach ($block->getMediaAttributes() as $attribute):?>
                                                         <li class="item">
                                                             <label>
                                                                 <input class="image-type"
                                                                        data-role="type-selector"
                                                                        type="checkbox"
-                                                                       value="<?= $block->escapeHtml($attribute->getAttributeCode()) ?>"
+                                                                // @codingStandardsIgnoreLine
+                                                                value="<?= $block->escapeHtml($attribute->getAttributeCode()) ?>"
                                                                 />
-                                                                <?= $block->escapeHtml($attribute->getFrontendLabel()) ?>
+                                                                <?= $block->escapeHtml($attribute->getFrontendLabel())?>
                                                             </label>
                                                         </li>
-                                                        <?php endforeach; ?>
+                                                    <?php endforeach; ?>
                                                 </ul>
                                             </div>
                                         </div>
 
                                         <div class="admin__field admin__field-inline field-image-size" data-role="size">
                                             <label class="admin__field-label">
-                                            <span><?= $block->escapeHtml(__('Image Size')); ?></span>
+                                                <span><?= $block->escapeHtml(__('Image Size')); ?></span>
                                             </label>
-                                            <div class="admin__field-value" data-message="<?= $block->escapeHtml(__('{size}')); ?>"></div>
+                                            <div class="admin__field-value"
+                                                 data-message="<?= $block->escapeHtml(__('{size}')); ?>"></div>
                                         </div>
 
-                                        <div class="admin__field admin__field-inline field-image-resolution" data-role="resolution">
+                                        <div class="admin__field admin__field-inline field-image-resolution"
+                                             data-role="resolution">
                                             <label class="admin__field-label">
-                                            <span><?= $block->escapeHtml(__('Image Resolution')); ?></span>
+                                                <span><?= $block->escapeHtml(__('Image Resolution')); ?></span>
                                             </label>
-                                            <div class="admin__field-value" data-message="<?= $block->escapeHtml(__('{width}^{height} px')); ?>"></div>
+                                            <div class="admin__field-value"
+                                                 data-message="<?= $block->escapeHtml(__('{width}^{height} px')); ?>">
+                                            </div>
                                         </div>
 
                                         <div class="admin__field field-image-hide">
@@ -486,7 +528,8 @@
                                                            data-role="visibility-trigger"
                                                            value="1"
                                                            class="admin__control-checkbox"
-                                                           name="product[media_gallery][images][<%- data.file_id %>][disabled]"
+                                                    // @codingStandardsIgnoreLine
+                                                    name="product[media_gallery][images][<%- data.file_id %>][disabled]"
                                                     <% if (data.disabled == 1) { %>checked="checked"<% } %> />
 
                                                     <label for="hide-from-product-page" class="admin__field-label">
@@ -556,7 +599,7 @@
                 <fieldset class="admin__fieldset bulk-attribute-values" data-bind="visible: type() == 'single'">
                     <div class="admin__field _required">
                         <label for="apply-single-price-input" class="admin__field-label">
-                        <span><?= $block->escapeHtml(__('Price')); ?></span>
+                            <span><?= $block->escapeHtml(__('Price')); ?></span>
                         </label>
                         <div class="admin__field-control">
                             <div class="currency-addon">
@@ -589,7 +632,8 @@
                     <fieldset class="admin__fieldset bulk-attribute-values" data-bind="if:attribute">
                         <!-- ko foreach: attribute().chosen -->
                         <div class="admin__field _required">
-                            <label data-bind="attr: {for: 'apply-single-price-input-' + $index()}" class="admin__field-label">
+                            <label data-bind="attr: {for: 'apply-single-price-input-' + $index()}"
+                                   class="admin__field-label">
                                 <span data-bind="text:label"></span>
                             </label>
                             <div class="admin__field-control">
@@ -717,7 +761,7 @@
                     "component": "Magento_ConfigurableProduct/js/variations/steps/bulk",
                     "appendTo": "<?= /* @noEscape */  $block->getParentComponentName() ?>",
                     "noImage": "<?= /* @noEscape */  $block->getNoImageUrl() ?>",
-                    "variationsComponent": "<?= /* @noEscape */ $block->getData('config/form') ?>.configurableVariations"
+                    "variationsComponent": "<?= /* @noEscape */ $block->getData('config/form')?>.configurableVariations"
                 }
             }
         }
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/select_attributes.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/select_attributes.phtml
index c3dc614232201..92fae99f6ec24 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/select_attributes.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/select_attributes.phtml
@@ -5,8 +5,10 @@
  */
 
 /* @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\SelectAttributes */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div class="select-attributes-block <?= /* @noEscape */ $block->getData('config/dataScope') ?>" data-role="select-attributes-step">
+<div class="select-attributes-block <?= /* @noEscape */ $block->getData('config/dataScope') ?>"
+     data-role="select-attributes-step">
     <div class="select-attributes-actions" data-type="skipKO">
         <?= /* @noEscape */  $block->getAddNewAttributeButton() ?>
     </div>
@@ -37,9 +39,12 @@
         }
     }
 </script>
-<script>
+<?php $dataScope = /* @noEscape */ $block->getData('config/dataScope');
+$scriptString = <<<script
     require(['jquery'], function ($) {
-        $('.<?= /* @noEscape */ $block->getData('config/dataScope') ?>[data-role=select-attributes-step]').applyBindings();
+        $('.{$dataScope}[data-role=select-attributes-step]').applyBindings();
         $('body').trigger('contentUpdated');
     })
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml
index 22ff1992c94a7..2dc1a6a11e2eb 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml
@@ -5,6 +5,7 @@
  */
 // phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 $productMatrix = $block->getProductMatrix();
@@ -26,15 +27,25 @@ $currencySymbol = $block->getCurrencySymbol();
                 <div data-role="configurable-attributes-container">
                     <!-- ko foreach: {data: attributes, as: 'attribute'} -->
                         <div data-role="attribute-info">
-                            <input name="attributes[]" data-bind="value: attribute.id, attr:{id: 'configurable_attribute_' + attribute.id}" type="hidden"/>
-                            <input data-bind="value: attribute.id, attr: {name: $parent.getAttributeRowName(attribute, 'attribute_id')}" type="hidden"/>
-                            <input data-bind="value: attribute.code, attr: {name: $parent.getAttributeRowName(attribute, 'code')}" type="hidden"/>
-                            <input data-bind="value: attribute.label, attr: {name: $parent.getAttributeRowName(attribute, 'label')}" type="hidden"/>
-                            <input data-bind="value: $index(), attr: {name: $parent.getAttributeRowName(attribute, 'position')}" type="hidden"/>
+                            <input name="attributes[]"
+                                   data-bind="value: attribute.id, attr:{id: 'configurable_attribute_' + attribute.id}"
+                                   type="hidden"/>
+                            <input data-bind="value: attribute.id,
+                             attr: {name: $parent.getAttributeRowName(attribute, 'attribute_id')}" type="hidden"/>
+                            <input data-bind="value: attribute.code,
+                             attr: {name: $parent.getAttributeRowName(attribute, 'code')}" type="hidden"/>
+                            <input data-bind="value: attribute.label,
+                             attr: {name: $parent.getAttributeRowName(attribute, 'label')}" type="hidden"/>
+                            <input data-bind="value: $index(),
+                             attr: {name: $parent.getAttributeRowName(attribute, 'position')}" type="hidden"/>
                             <!-- ko foreach: {data: attribute.chosen, as: 'option'} -->
                                 <div data-role="option-info">
-                                    <input value="1" data-bind="attr: {name: $parents[1].getOptionRowName(attribute, option, 'include')}" type="hidden"/>
-                                    <input data-bind="value: option.value, attr: {name: $parents[1].getOptionRowName(attribute, option, 'value_index')}" type="hidden"/>
+                                    <input value="1"
+                                           data-bind="attr: {name: $parents[1].getOptionRowName(attribute, option,
+                                            'include')}" type="hidden"/>
+                                    <input data-bind="value: option.value,
+                                    attr: {name: $parents[1].getOptionRowName(attribute, option, 'value_index')}"
+                                           type="hidden"/>
                                 </div>
                             <!-- /ko -->
                         </div>
@@ -104,7 +115,9 @@ $currencySymbol = $block->getCurrencySymbol();
                                         </button>
                                         <ul class="dropdown">
                                             <li>
-                                                <a class="item" data-action="no-image"><?= $block->escapeHtml(__('No Image')) ?></a>
+                                                <a class="item" data-action="no-image">
+                                                    <?= $block->escapeHtml(__('No Image')) ?>
+                                                </a>
                                             </li>
                                         </ul>
                                     </div>
@@ -167,7 +180,8 @@ $currencySymbol = $block->getCurrencySymbol();
                                         <input type="text"
                                                class="validate-zero-or-greater"
                                                data-bind="attr: {id: $parent.getRowId(variation, 'qty'),
-                                                name: $parent.getVariationRowName(variation, 'quantity_and_stock_status/qty'),
+                                                name: $parent.getVariationRowName(variation,
+                                                 'quantity_and_stock_status/qty'),
                                                 value: variation.quantity}"/>
                                     <!-- /ko -->
                                 </td>
@@ -187,17 +201,20 @@ $currencySymbol = $block->getCurrencySymbol();
                                 <td data-bind="text: label"></td>
                                 <!-- /ko -->
                                 <td class="data-grid-actions-cell">
-                                    <input type="hidden" name="associated_product_ids[]" data-bind="value: variation.productId" data-column="entity_id"/>
+                                    <input type="hidden" name="associated_product_ids[]"
+                                           data-bind="value: variation.productId" data-column="entity_id"/>
                                     <div class="action-select-wrap" data-bind="
                                             css : {
                                                 '_active' : $parent.opened() === $index()
                                             },
                                             outerClick: $parent.closeList.bind($parent, $index)"
                                     >
-                                        <button class="action-select" data-bind="click: $parent.toggleList.bind($parent, $index())">
+                                        <button class="action-select"
+                                                data-bind="click: $parent.toggleList.bind($parent, $index())">
                                             <span data-bind="i18n: 'Select'"></span>
                                         </button>
-                                        <ul class="action-menu _active" data-bind="css: {'_active': $parent.opened() === $index()}">
+                                        <ul class="action-menu _active"
+                                            data-bind="css: {'_active': $parent.opened() === $index()}">
                                             <li>
                                                 <a class="action-menu-item"
                                                    data-bind="
@@ -211,12 +228,14 @@ $currencySymbol = $block->getCurrencySymbol();
                                             </li>
                                             <li>
                                                 <a class="action-menu-item" data-bind="
-                                                    text: variation.status == 1 ? $t('Disable Product') : $t('Enable Product'),
+                                                    text: variation.status == 1 ? $t('Disable Product') :
+                                                     $t('Enable Product'),
                                                     click: $parent.toggleProduct.bind($parent, $index())">
                                                 </a>
                                             </li>
                                             <li>
-                                                <a class="action-menu-item" data-bind="click: $parent.removeProduct.bind($parent, $index())">
+                                                <a class="action-menu-item"
+                                                   data-bind="click: $parent.removeProduct.bind($parent, $index())">
                                                     <?= $block->escapeHtml(__('Remove Product')) ?>
                                                 </a>
                                             </li>
@@ -231,7 +250,8 @@ $currencySymbol = $block->getCurrencySymbol();
         <!-- /ko -->
     </div>
     <div data-role="step-wizard-dialog"
-         data-mage-init='{"Magento_Ui/js/modal/modal":{"type":"slide","title":"<?= $block->escapeJs(__('Create Product Configurations')) ?>",
+         data-mage-init='{"Magento_Ui/js/modal/modal":{"type":"slide","title":"<?=
+            $block->escapeJs(__('Create Product Configurations')) ?>",
          "buttons":[]}}'
          class="no-display">
         <?= /* @noEscape */ $block->getVariationWizard([
@@ -249,8 +269,8 @@ $currencySymbol = $block->getCurrencySymbol();
                 "components": {
                     "configurableVariations": {
                         "component": "Magento_ConfigurableProduct/js/variations/variations",
-                        "variations": <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($productMatrix) ?>,
-                        "productAttributes": <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($attributes) ?>,
+                        "variations": <?= /* @noEscape */ $block->getData('jsonHelper')->jsonEncode($productMatrix) ?>,
+                        "productAttributes":<?=/* @noEscape */ $block->getData('jsonHelper')->jsonEncode($attributes)?>,
                         "productUrl": "<?= /* @noEscape */ $block->getUrl('catalog/product/edit', ['id' => '%id%']) ?>",
                         "currencySymbol": "<?= /* @noEscape */ $currencySymbol ?>",
                         "configurableProductGrid": "configurableProductGrid"
@@ -260,9 +280,11 @@ $currencySymbol = $block->getCurrencySymbol();
         }
     }
 </script>
-<script>
+<?php $scriptString = <<<script
     require(['jquery'], function ($) {
         $('body').trigger('contentUpdated');
         $('[data-panel=product-variations]').applyBindings();
     })
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard-ajax.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard-ajax.phtml
index 7b85efdbb73aa..9d0e78d6ad14c 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard-ajax.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard-ajax.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $productMatrix = $block->getProductMatrix();
 $attributes = $block->getProductAttributes();
@@ -15,13 +16,18 @@ $attributes = $block->getProductAttributes();
     'configurableModal' => $block->getForm() . '.' . $block->getModal()
 ]);
 ?>
-<script>
+
+<?php $dataScope = /* @noEscape */ $block->getData('config/dataScope');
+$nameStep = /* @noEscape */ $block->getData('config/nameStepWizard');
+$scriptString = <<<script
     require(['jquery', 'uiRegistry', 'underscore'], function ($, registry, _) {
         $('body').trigger('contentUpdated');
-        $('.<?= /* @noEscape */ $block->getData('config/dataScope') ?>[data-role=steps-wizard-main]').applyBindings();
+        $('.{$dataScope}[data-role=steps-wizard-main]').applyBindings();
 
-        registry.async('<?= /* @noEscape */ $block->getData('config/nameStepWizard') ?>')(function (component) {
+        registry.async('{$nameStep}')(function (component) {
             _.delay(component.open.bind(component), 500); // TODO: MAGETWO-50246
         })
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml
index f009962bb97ff..c1af2b79005a3 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml
@@ -3,18 +3,22 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
 /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 $productMatrix = $block->getProductMatrix();
 $attributes = $block->getProductAttributes();
 $currencySymbol = $block->getCurrencySymbol();
 ?>
-<div class="<?= /* @noEscape */ $block->getData('config/dataScope') ?>" data-role="step-wizard-dialog" data-bind="scope: '<?= /* @noEscape */ $block->getForm() ?>.<?= /* @noEscape */ $block->getModal() ?>'">
+<div class="<?= /* @noEscape */ $block->getData('config/dataScope') ?>"
+     data-role="step-wizard-dialog"
+     data-bind="scope: '<?= /* @noEscape */ $block->getForm() ?>.<?= /* @noEscape */ $block->getModal() ?>'">
     <!-- ko template: getTemplate() --><!-- /ko -->
 </div>
-<div class="<?= /* @noEscape */ $block->getData('config/dataScope') ?>" id="product-variations-matrix" data-role="product-variations-matrix">
+<div class="<?= /* @noEscape */ $block->getData('config/dataScope') ?>"
+     id="product-variations-matrix" data-role="product-variations-matrix">
     <div data-bind="scope: 'configurableVariations'"></div>
 </div>
 <script type="text/x-magento-init">
@@ -24,13 +28,17 @@ $currencySymbol = $block->getCurrencySymbol();
                 "components": {
                     "<?= /* @noEscape */ $block->getData('config/form') ?>.<?= /* @noEscape */ $block->getModal() ?>": {
                         "component": "Magento_ConfigurableProduct/js/components/modal-configurable",
-                        "options": {"type": "slide", "title": "<?= $block->escapeHtml(__('Create Product Configurations')) ?>"},
+                        "options": {"type": "slide",
+                         "title": "<?= $block->escapeHtml(__('Create Product Configurations')) ?>"},
                         "formName": "<?= /* @noEscape */ $block->getForm() ?>",
                         "isTemplate": false,
                         "stepWizard": "<?= /* @noEscape */ $block->getData('config/nameStepWizard') ?>",
                         "children": {
                             "wizard": {
-                                "url": "<?= /* @noEscape */ $block->getUrl($block->getData('config/urlWizard'), ['id' => $block->getProduct()->getId()]) ?>",
+                                "url": "<?= /* @noEscape */ $block->getUrl(
+                                    $block->getData('config/urlWizard'),
+                                    ['id' => $block->getProduct()->getId()]
+                                ) ?>",
                                 "component": "Magento_Ui/js/form/components/html"
                             }
                         }
@@ -43,12 +51,14 @@ $currencySymbol = $block->getCurrencySymbol();
                         "dataScopeAttributeCodes": "data.attribute_codes",
                         "dataScopeAttributesData": "data.product.configurable_attributes_data",
                         "formName": "<?= /* @noEscape */ $block->getForm() ?>",
-                        "attributeSetHandler": "<?= /* @noEscape */ $block->getForm() ?>.configurable_attribute_set_handler_modal",
-                        "wizardModalButtonName": "<?= /* @noEscape */ $block->getForm() ?>.configurable.configurable_products_button_set.create_configurable_products_button",
+                        "attributeSetHandler": "<?= /* @noEscape */ $block->getForm()
+                        ?>.configurable_attribute_set_handler_modal",
+                        "wizardModalButtonName": "<?= /* @noEscape */ $block->getForm()
+                        ?>.configurable.configurable_products_button_set.create_configurable_products_button",
                         "wizardModalButtonTitle": "<?= $block->escapeHtml(__('Edit Configurations')) ?>",
-                        "productAttributes": <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($attributes) ?>,
+                        "productAttributes":<?=/* @noEscape */ $block->getData('jsonHelper')->jsonEncode($attributes)?>,
                         "productUrl": "<?= /* @noEscape */ $block->getUrl('catalog/product/edit', ['id' => '%id%']) ?>",
-                        "variations": <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($productMatrix) ?>,
+                        "variations": <?= /* @noEscape */ $block->getData('jsonHelper')->jsonEncode($productMatrix) ?>,
                         "currencySymbol": "<?= /* @noEscape */ $currencySymbol ?>",
                         "attributeSetCreationUrl": "<?= /* @noEscape */ $block->getUrl('*/product_set/save') ?>"
                     }
@@ -57,10 +67,13 @@ $currencySymbol = $block->getCurrencySymbol();
         }
     }
 </script>
-<script>
+<?php $dataScope = /* @noEscape */ $block->getData('config/dataScope');
+$scriptString = <<<script
     require(['jquery', 'mage/apply/main'], function ($, main) {
         main.apply();
-        $('.<?= /* @noEscape */ $block->getData('config/dataScope') ?>[data-role=step-wizard-dialog]').applyBindings();
-        $('.<?= /* @noEscape */ $block->getData('config/dataScope') ?>[data-role=product-variations-matrix]').applyBindings();
+        $('.{$dataScope}[data-role=step-wizard-dialog]').applyBindings();
+        $('.{$dataScope}[data-role=product-variations-matrix]').applyBindings();
     })
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml
index e6cf1e9c6870d..ebd644a8c79a2 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml
@@ -3,12 +3,16 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
 /** @var $block \Magento\ConfigurableProduct\Block\Product\Configurable\AttributeSelector */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $jsonHelper = $block->getData('jsonHelper');
+$suggestWidgetOptions = /* @noEscape */ $jsonHelper->jsonEncode($block->getSuggestWidgetOptions());
+$scriptString = <<<script
 require(["jquery","mage/mage","mage/backend/suggest"], function($){
-    var options = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getSuggestWidgetOptions()) ?>;
+    var options = {$suggestWidgetOptions};
     $('#configurable-attribute-selector')
         .mage('suggest', options)
         .on('suggestselect', function (event, ui) {
@@ -29,4 +33,6 @@ require(["jquery","mage/mage","mage/backend/suggest"], function($){
             return false;
         })
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Cookie/Block/Html/Notices.php b/app/code/Magento/Cookie/Block/Html/Notices.php
index b4dda788a0292..b687338d382ea 100644
--- a/app/code/Magento/Cookie/Block/Html/Notices.php
+++ b/app/code/Magento/Cookie/Block/Html/Notices.php
@@ -9,12 +9,26 @@
  */
 namespace Magento\Cookie\Block\Html;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Element\Template;
+use Magento\Cookie\Helper\Cookie;
+
 /**
  * @api
  * @since 100.0.2
  */
 class Notices extends \Magento\Framework\View\Element\Template
 {
+    /**
+     * @param Template\Context $context
+     * @param array $data
+     */
+    public function __construct(Template\Context $context, array $data = [])
+    {
+        $data['cookieHelper'] = ObjectManager::getInstance()->get(Cookie::class);
+        parent::__construct($context, $data);
+    }
+
     /**
      * Get Link to cookie restriction privacy policy page
      *
diff --git a/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml b/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
index 8712f31e71b36..52b3aa9ab1f5e 100644
--- a/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
+++ b/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
@@ -5,17 +5,21 @@
  */
 
 /** @var \Magento\Cookie\Block\Html\Notices $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isCookieRestrictionModeEnabled()) : ?>
+<?php $cookieHelper = $block->getData('cookieHelper');
+if ($cookieHelper->isCookieRestrictionModeEnabled()): ?>
     <div role="alertdialog"
          tabindex="-1"
          class="message global cookie"
-         id="notice-cookie-block"
-         style="display: none;">
+         id="notice-cookie-block">
         <div role="document" class="content" tabindex="0">
             <p>
                 <strong><?= $block->escapeHtml(__('We use cookies to make your experience better.')) ?></strong>
-                <span><?= $block->escapeHtml(__('To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies.')) ?></span>
+                <span><?= $block->escapeHtml(__(
+                    'To comply with the new e-Privacy directive, we need to ask for your consent to set the cookies.'
+                )) ?>
+                </span>
                 <?= $block->escapeHtml(__('<a href="%1">Learn more</a>.', $block->getPrivacyPolicyLink()), ['a']) ?>
             </p>
             <div class="actions">
@@ -25,15 +29,16 @@
             </div>
         </div>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#notice-cookie-block') ?>
     <script type="text/x-magento-init">
         {
             "#notice-cookie-block": {
                 "cookieNotices": {
                     "cookieAllowButtonSelector": "#btn-cookie-allow",
                     "cookieName": "<?= /* @noEscape */ \Magento\Cookie\Helper\Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>",
-                    "cookieValue": <?= /* @noEscape */ $this->helper(\Magento\Cookie\Helper\Cookie::class)->getAcceptedSaveCookiesWebsiteIds() ?>,
-                    "cookieLifetime": <?= /* @noEscape */ $this->helper(\Magento\Cookie\Helper\Cookie::class)->getCookieRestrictionLifetime() ?>,
-                    "noCookiesUrl": "<?= $block->escapeJs($block->escapeUrl($block->getUrl('cookie/index/noCookies'))) ?>"
+                    "cookieValue": <?= /* @noEscape */ $cookieHelper->getAcceptedSaveCookiesWebsiteIds() ?>,
+                    "cookieLifetime": <?= /* @noEscape */ $cookieHelper->getCookieRestrictionLifetime() ?>,
+                    "noCookiesUrl": "<?= $block->escapeJs($block->getUrl('cookie/index/noCookies')) ?>"
                 }
             }
         }
diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/cart/gift_options.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/cart/gift_options.phtml
index 4d8a054e67fc5..3d814ac41302d 100644
--- a/app/code/Magento/GiftMessage/view/frontend/templates/cart/gift_options.phtml
+++ b/app/code/Magento/GiftMessage/view/frontend/templates/cart/gift_options.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="gift-options-cart" data-bind="scope:'giftOptionsCart'">
     <!-- ko template: getTemplate() --><!-- /ko -->
@@ -13,7 +15,10 @@
             }
         }
     </script>
-    <script>
-        window.giftOptionsConfig = <?= /* @noEscape */ $block->getGiftOptionsConfigJson() ?>;
-    </script>
+<?= /* @noEscape */ $secureRenderer->renderTag(
+    'script',
+    [],
+    'window.giftOptionsConfig = '. /* @noEscape */ $block->getGiftOptionsConfigJson(),
+    false
+) ?>
 </div>
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Frontend/Region/Updater.php b/app/code/Magento/Tax/Block/Adminhtml/Frontend/Region/Updater.php
index 7b66c4fd964c6..ae5da9e15cf53 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Frontend/Region/Updater.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Frontend/Region/Updater.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Tax\Block\Adminhtml\Frontend\Region;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\AbstractElement;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class Updater extends \Magento\Config\Block\System\Config\Form\Field
 {
@@ -14,21 +16,31 @@ class Updater extends \Magento\Config\Block\System\Config\Form\Field
      */
     protected $_directoryHelper;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Directory\Helper\Data $directoryHelper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Directory\Helper\Data $directoryHelper,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_directoryHelper = $directoryHelper;
         parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
+     * Return element html.
+     *
      * @param AbstractElement $element
      * @return string
      */
@@ -36,8 +48,7 @@ protected function _getElementHtml(AbstractElement $element)
     {
         $html = parent::_getElementHtml($element);
 
-        $js = '<script>
-              require(["prototype", "mage/adminhtml/form"], function(){
+        $js = 'require(["prototype", "mage/adminhtml/form"], function(){
                updater = new RegionUpdater("tax_defaults_country", "none", "tax_defaults_region", %s, "nullify");
                if(updater.lastCountryId) {
                    var tmpRegionId = $("tax_defaults_region").value;
@@ -49,10 +60,12 @@ protected function _getElementHtml(AbstractElement $element)
                } else {
                    updater.update();
                }
-                });
-               </script>';
+                });';
+
+        $scriptString = sprintf($js, $this->_directoryHelper->getRegionJson());
+
+        $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
 
-        $html .= sprintf($js, $this->_directoryHelper->getRegionJson());
         return $html;
     }
 }
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
index 1884b247e530a..05d0e63b4414a 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
@@ -13,6 +13,8 @@
 
 namespace Magento\Tax\Block\Adminhtml\Rate;
 
+use Magento\Directory\Helper\Data as DirectoryData;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Tax\Controller\RegistryConstants;
 
@@ -108,6 +110,7 @@ public function __construct(
         $this->_taxRateRepository = $taxRateRepository;
         $this->_taxRateCollection = $taxRateCollection;
         $this->_taxRateConverter = $taxRateConverter;
+        $data['directoryHelper'] = ObjectManager::getInstance()->get(DirectoryData::class);
         parent::__construct($context, $registry, $formFactory, $data);
     }
 
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml
index fec108d53948f..6956cd5990e96 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml
@@ -4,15 +4,19 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
+/** @var \Magento\Tax\Block\Adminhtml\Rate\Form $tmpBlock */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $jsonHelper = $tmpBlock->getData('directoryHelper');
+$regionJson = /* @noEscape */ $jsonHelper->getRegionJson();
+$scriptString = <<<script
 require([
     "jquery",
     "mage/adminhtml/form"
 ], function(jQuery){
 
-    var updater = new RegionUpdater('tax_country_id', 'tax_region', 'tax_region_id', <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)->getRegionJson() ?>, 'disable');
+    var updater = new RegionUpdater('tax_country_id', 'tax_region', 'tax_region_id', {$regionJson}, 'disable');
     updater.disableRegionValidation();
 
     (function ($) {
@@ -54,4 +58,6 @@ require([
 
     window.updater = updater;
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml
index 3558d359aa4d6..0b0c892e47edf 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml
@@ -5,8 +5,12 @@
  */
 
 /** @var $block \Magento\Tax\Block\Adminhtml\Rule\Edit\Form */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $formElementId = /* @noEscape */ \Magento\Tax\Block\Adminhtml\Rate\Form::FORM_ELEMENT_ID;
+$jsId = /* @noEscape */ $block->getJsId();
+//phpcs:ignore Magento2.SQL.RawQuery
+$scriptString = <<<script
 require([
     'jquery',
     'Magento_Ui/js/modal/alert',
@@ -77,7 +81,7 @@ require([
             $.ajax({
                 type: "POST",
                 data: {id:id},
-                url: '<?= $block->escapeJs($block->escapeUrl($block->getTaxRateLoadUrl())) ?>',
+                url: '{$block->escapeJs($block->getTaxRateLoadUrl())}',
                 success: function(result, status) {
                     $('body').trigger('processStop');
                     if (result.success) {
@@ -94,14 +98,14 @@ require([
                             });
                         else
                             alert({
-                                content: '<?= $block->escapeJs($block->escapeHtml(__('An error occurred'))) ?>'
+                                content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
                             });
                     }
                 },
                 error: function () {
                     $('body').trigger('processStop');
                     alert({
-                        content: '<?= $block->escapeJs($block->escapeHtml(__('An error occurred'))) ?>'
+                        content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
                     });
                 },
                 dataType: "json"
@@ -112,9 +116,9 @@ require([
             var options = {
                 mselectContainer: '#tax_rate + section.mselect-list',
                 toggleAddButton:false,
-                addText: '<?= $block->escapeJs($block->escapeHtml(__('Add New Tax Rate'))) ?>',
+                addText: '{$block->escapeJs($block->escapeHtml(__('Add New Tax Rate')))}',
                 parse: null,
-                nextPageUrl: '<?= $block->escapeHtml($block->getTaxRatesPageUrl()) ?>',
+                nextPageUrl: '{$block->escapeHtml($block->getTaxRatesPageUrl())}',
                 selectedValues: this.settings.selected_values,
                 mselectInputSubmitCallback: function (value, options) {
                     var select = $('#tax_rate');
@@ -137,7 +141,7 @@ require([
             var taxRate = $('#tax_rate'),
                 taxRateField = taxRate.parent(),
                 taxRateForm = $('#tax-rate-form'),
-                taxRateFormElement = $('#<?= /* @noEscape */ \Magento\Tax\Block\Adminhtml\Rate\Form::FORM_ELEMENT_ID ?>');
+                taxRateFormElement = $('#{$formElementId}');
 
             if (!this.isEntityEditable) {
                 // Override default layout of editable multiselect
@@ -162,11 +166,14 @@ require([
                     .on('click.mselect-edit', '.mselect-edit', this.edit)
                     .on("click.mselect-delete", ".mselect-delete", function () {
                         var that = $(this),
-                            select = that.closest('.mselect-list').prev(),
+script;
+                            // phpcs:ignore Magento2.SQL.RawQuery
+                            $scriptString .= "select = that.closest('.mselect-list').prev()," . PHP_EOL;
+                            $scriptString .= <<<script
                             rateValue = that.parent().find('input[type="checkbox"]').val();
 
                         confirm({
-                            content: '<?= $block->escapeJs(__('Do you really want to delete this tax rate?')) ?>',
+                            content: '{$block->escapeJs(__('Do you really want to delete this tax rate?'))}',
                             actions: {
                                 /**
                                  * Confirm action.
@@ -180,7 +187,7 @@ require([
                                             form_key: $('input[name="form_key"]').val()
                                         },
                                         dataType: 'json',
-                                        url: '<?= $block->escapeJs($block->escapeUrl($block->getTaxRateDeleteUrl())) ?>',
+                                        url: '{$block->escapeJs($block->getTaxRateDeleteUrl())}',
                                         success: function(result, status) {
                                             $('body').trigger('processStop');
                                             if (result.success) {
@@ -198,14 +205,18 @@ require([
                                                     });
                                                 else
                                                     alert({
-                                                        content: '<?= $block->escapeJs($block->escapeHtml(__('An error occurred'))) ?>'
+                                                        content: '{$block->escapeJs($block->escapeHtml(
+                                                            __('An error occurred')
+                                                        ))}'
                                                     });
                                             }
                                         },
                                         error: function () {
                                             $('body').trigger('processStop');
                                             alert({
-                                                content: '<?= $block->escapeJs($block->escapeHtml(__('An error occurred'))) ?>'
+                                                content: '{$block->escapeJs($block->escapeHtml(
+                                                    __('An error occurred')
+                                                ))}'
                                             });
                                         }
                                     };
@@ -228,15 +239,15 @@ require([
             taxRateFormElement.mage('form').mage('validation');
 
             taxRateForm.dialogRates({
-                title: '<?= $block->escapeJs($block->escapeHtml(__('Tax Rate'))) ?>',
+                title: '{$block->escapeJs($block->escapeHtml(__('Tax Rate')))}',
                 type: 'slide',
-                id: '<?= /* @noEscape */ $block->getJsId() ?>',
+                id: '{$jsId}',
                 modalClass: 'tax-rate-popup',
                 closed: function () {
                     taxRateFormElement.data('validation').clearError();
                 },
                 buttons: [{
-                    text: '<?= $block->escapeJs($block->escapeHtml(__('Save'))) ?>',
+                    text: '{$block->escapeJs($block->escapeHtml(__('Save')))}',
                     'class': 'action-save action-primary',
                     click: function() {
                         this.updateItemRate();
@@ -244,7 +255,10 @@ require([
                             itemRateData = $.extend({}, itemRate);
 
                         if (itemRateData.itemElement) {
-                            delete itemRateData.itemElement;
+script;
+                            //phpcs:ignore Magento2.SQL.RawQuerys
+                            $scriptString .= ' delete itemRateData.itemElement;';
+$scriptString.= <<<script
                         }
 
                         if (!taxRateFormElement.validation().valid()) {
@@ -256,7 +270,7 @@ require([
                             type: 'POST',
                             data: itemRateData,
                             dataType: 'json',
-                            url: '<?= $block->escapeJs($block->escapeUrl($block->getTaxRateSaveUrl())) ?>',
+                            url: '{$block->escapeJs($block->getTaxRateSaveUrl())}',
                             success: function(result, status) {
                                 $('body').trigger('processStop');
                                 if (result.success) {
@@ -281,14 +295,14 @@ require([
                                         });
                                     else
                                         alert({
-                                            content: '<?= $block->escapeJs($block->escapeHtml(__('An error occurred'))) ?>'
+                                            content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
                                         });
                                 }
                             },
                             error: function () {
                                 $('body').trigger('processStop');
                                 alert({
-                                    content: '<?= $block->escapeJs($block->escapeHtml(__('An error occurred'))) ?>'
+                                    content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
                                 });
                             }
                         };
@@ -302,4 +316,6 @@ require([
 
     window.TaxRateEditableMultiselect = TaxRateEditableMultiselect;
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
index f09af05303f36..0d00fa397c9a3 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
@@ -4,13 +4,18 @@
  * See COPYING.txt for license details.
  */
 /* @var $block \Magento\Tax\Block\Adminhtml\Rate\Form */
+/* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div data-role="spinner" class="grid-loading-mask">
     <div class="grid-loader"></div>
 </div>
 
-<div class="form-inline" id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>" style="display:none">
+<div class="form-inline" id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>"
     <?= $block->getFormHtml() ?>
     <?= $block->getChildHtml('form_after') ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    '#'. $block->escapeHtmlAttr($block->getNameInLayout())
+) ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml
index d5017f83affe4..ba2ca499cfec1 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml
@@ -4,9 +4,15 @@
  * See COPYING.txt for license details.
  */
 // @deprecated
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
-    <button type="button" onclick="window.location.href='<?= $block->escapeUrl($createUrl) ?>'">
+    <button type="button" id="addNewClass">
         <?= $block->escapeHtml(__('Add New Class')) ?>
     </button>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        "window.location.href='" . $block->escapeUrl($createUrl) . "'",
+        'button#addNewClass'
+    ) ?>
 </div>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml
index fa9fcb8fbcfcd..91860c70fd086 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/save.phtml
@@ -4,19 +4,23 @@
  * See COPYING.txt for license details.
  */
 // @deprecated
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
     <?= $block->getBackButtonHtml() ?>
     <?= $block->getResetButtonHtml() ?>
     <?= $block->getSaveButtonHtml() ?>
 </div>
-<?php if ($form) : ?>
+<?php if ($form): ?>
     <?= $form->toHtml() ?>
-    <script>
+    <?php $scriptString = <<<script
     require(['jquery', "mage/mage"], function(jQuery){
 
-        jQuery('#<?= $block->escapeJs($form->getForm()->getId()) ?>').mage('form').mage('validation');
+        jQuery('#{$block->escapeJs($form->getForm()->getId())}').mage('form').mage('validation');
 
     });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml
index 58c79bbfe9715..7053cd61e29ac 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rate/save.phtml
@@ -3,16 +3,19 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Tax\Block\Adminhtml\Rate\Form $form */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($form) : ?>
+<?php if ($form): ?>
     <?= $form->toHtml() ?>
-    <script>
+    <?php $scriptString = <<<script
     require([
         "jquery",
         "mage/mage"
     ], function($){
 
-        $('#<?= $block->escapeJs($form->getForm()->getId()) ?>').mage('form').mage('validation');
+        $('#{$block->escapeJs($form->getForm()->getId())}').mage('form').mage('validation');
 
         $(document).ready(function () {
             'use strict';
@@ -42,5 +45,7 @@
         });
 
     });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml
index e21dbb099ff5d..149ea004243f9 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml
@@ -4,9 +4,15 @@
  * See COPYING.txt for license details.
  */
 // @deprecated
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
-    <button type="button" onclick="window.location.href='<?= $block->escapeUrl($createUrl) ?>'">
+    <button type="button" id="addNewTaxRule">
         <?= $block->escapeHtml(__('Add New Tax Rule')) ?>
     </button>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        "window.location.href='" . $block->escapeUrl($createUrl) . "'",
+        'button#addNewClass'
+    ) ?>
 </div>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml
index 10251e2805f2f..3830be23d80a6 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/save.phtml
@@ -4,6 +4,8 @@
  * See COPYING.txt for license details.
  */
 // @deprecated
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
     <?= $block->getBackButtonHtml() ?>
@@ -11,13 +13,15 @@
     <?= $block->getSaveButtonHtml() ?>
     <?= $block->getDeleteButtonHtml() ?>
 </div>
-<?php if ($form) : ?>
+<?php if ($form): ?>
     <?= $form->toHtml() ?>
-    <script>
+    <?php $scriptString = <<<script
     require(['jquery', "mage/mage"], function(jQuery){
 
-        jQuery('#<?= $block->escapeJs($form->getForm()->getId()) ?>').mage('form').mage('validation');
+        jQuery('#{$block->escapeJs($form->getForm()->getId())}').mage('form').mage('validation');
 
     });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
index df177b6180511..d2098db4d9c43 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
@@ -4,41 +4,43 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /**
  * @var $block \Magento\Tax\Block\Checkout\Grandtotal
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php
 $style = $block->escapeHtmlAttr($block->getStyle());
 $colspan = (int) $block->getColspan();
+$jsonHelper = $block->getData('jsonHelper');
 ?>
-<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0) : ?>
+<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0): ?>
     <tr class="grand totals excl">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <strong><?= $block->escapeHtml(__('Grand Total Excl. Tax')) ?></strong>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr(__('Grand Total Excl. Tax')) ?>">
-            <strong><?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotalExclTax()) ?></strong>
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr(__('Grand Total Excl. Tax')) ?>">
+            <strong><?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotalExclTax()) ?></strong>
         </td>
     </tr>
     <?= /* @noEscape */ $block->renderTotals('taxes', $colspan) ?>
     <tr class="grand totals incl">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <strong><?= $block->escapeHtml(__('Grand Total Incl. Tax')) ?></strong>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr(__('Grand Total Incl. Tax')) ?>">
-            <strong><?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?></strong>
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr(__('Grand Total Incl. Tax')) ?>">
+            <strong><?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
-<?php else : ?>
+<?php else: ?>
     <tr class="grand totals">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <strong><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></strong>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-            <strong><?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?></strong>
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
+            <strong><?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
 <?php endif; ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping th.mark') ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping td.amount') ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
index 3f5a55e5fa325..09aa99e228713 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
@@ -9,47 +9,52 @@
 /**
  * @var $block \Magento\Tax\Block\Checkout\Shipping
  * @see \Magento\Tax\Block\Checkout\Shipping
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<?php if ($block->displayShipping()) : ?>
+<?php if ($block->displayShipping()): ?>
     <?php
         $style = $block->escapeHtmlAttr($block->getStyle());
         $colspan = (int) $block->getColspan();
+        $jsonHelper = $block->getData('jsonHelper');
     ?>
-    <?php if ($block->displayBoth()) : ?>
+    <?php if ($block->displayBoth()): ?>
     <tr class="totals shipping excl">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <?= $block->escapeHtml($block->getExcludeTaxLabel()) ?>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getExcludeTaxLabel()) ?>">
-            <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingExcludeTax()) ?>
+
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getExcludeTaxLabel()) ?>">
+            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingExcludeTax()) ?>
         </td>
     </tr>
     <tr class="totals shipping incl">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <?= $block->escapeHtml($block->getIncludeTaxLabel()) ?>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getIncludeTaxLabel()) ?>">
-            <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingIncludeTax()) ?>
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getIncludeTaxLabel()) ?>">
+            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingIncludeTax()) ?>
         </td>
     </tr>
-    <?php elseif ($block->displayIncludeTax()) : ?>
+    <?php elseif ($block->displayIncludeTax()): ?>
     <tr class="totals shipping incl">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-            <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingIncludeTax()) ?>
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
+            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingIncludeTax()) ?>
         </td>
     </tr>
-    <?php else : ?>
+    <?php else: ?>
     <tr class="totals shipping excl">
-        <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+        <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
         </th>
-        <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-            <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getShippingExcludeTax()) ?>
+        <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
+            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingExcludeTax()) ?>
         </td>
     </tr>
     <?php endif; ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping th.mark') ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping td.amount') ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
index 010a7b8dcfe4a..091303cbedb38 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
@@ -4,41 +4,44 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /**
  * @var $block \Magento\Tax\Block\Checkout\Subtotal
  * @see \Magento\Tax\Block\Checkout\Subtotal
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php
 $style = $block->escapeHtmlAttr($block->getStyle());
 $colspan = (int) $block->getColspan();
+$jsonHelper = $block->getData('jsonHelper');
 ?>
-<?php if ($block->displayBoth()) : ?>
+<?php if ($block->displayBoth()): ?>
 <tr class="totals sub excl">
-    <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+    <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
         <?= $block->escapeHtml(__('Subtotal (Excl. Tax)')) ?>
     </th>
-    <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr(__('Subtotal (Excl. Tax)')) ?>">
-        <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValueExclTax()) ?>
+    <tdclass="amount" data-th="<?= $block->escapeHtmlAttr(__('Subtotal (Excl. Tax)')) ?>">
+        <?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValueExclTax()) ?>
     </td>
 </tr>
 <tr class="totals sub incl">
-    <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+    <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
         <?= $block->escapeHtml(__('Subtotal (Incl. Tax)')) ?>
     </th>
-    <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr(__('Subtotal (Incl. Tax)')) ?>">
-        <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValueInclTax()) ?>
+    <td class="amount" data-th="<?= $block->escapeHtmlAttr(__('Subtotal (Incl. Tax)')) ?>">
+        <?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValueInclTax()) ?>
     </td>
 </tr>
-<?php else : ?>
+<?php else: ?>
 <tr class="totals sub">
-    <th style="<?= /* @noEscape */ $style ?>" class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
+    <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
         <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
     </th>
-    <td style="<?= /* @noEscape */ $style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-        <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($block->getTotal()->getValue()) ?>
+    <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
+        <?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValue()) ?>
     </td>
 </tr>
 <?php endif; ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping th.mark') ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping td.amount') ?>
+
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
index 0329db406fa16..d1b31bdf7861b 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
@@ -4,60 +4,65 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /**
  * @var $block \Magento\Tax\Block\Checkout\Tax
  * @see \Magento\Tax\Block\Checkout\Tax
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php
     $_value = $block->getTotal()->getValue();
     $_style = $block->escapeHtmlAttr($block->getTotal()->getStyle());
-
+    $jsonHelper = $block->getData('jsonHelper');
     $attributes = 'class="totals-tax"';
 
-if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_value != 0) {
-    $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown", "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\'';
+if ($jsonHelper->displayFullSummary() && $_value != 0) {
+    $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown",
+     "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\'';
 }
 ?>
 
 <tr <?= /* @noEscape */ $attributes ?>>
-    <th style="<?= /* @noEscape */ $_style ?>" class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
-        <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?>
+    <th class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
+        <?php if ($jsonHelper->displayFullSummary()): ?>
             <span class="detailed"><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></span>
-        <?php else : ?>
+        <?php else: ?>
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
         <?php endif; ?>
     </th>
-    <td style="<?= /* @noEscape */ $_style ?>" class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-        <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($_value) ?>
+    <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
+        <?= /* @noEscape */ $jsonHelper->formatPrice($_value) ?>
     </td>
 </tr>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax th.mark') ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax td.amount') ?>
 
-<?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() && $_value != 0) : ?>
-    <?php foreach ($block->getTotal()->getFullInfo() as $info) : ?>
+<?php if ($jsonHelper->displayFullSummary() && $_value != 0): ?>
+    <?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
         <?php if (isset($info['hidden']) && $info['hidden']) { continue; } ?>
         <?php $percent = $info['percent']; ?>
         <?php $amount = $info['amount']; ?>
         <?php $rates = $info['rates']; ?>
         <?php $isFirst = 1; ?>
 
-        <?php foreach ($rates as $rate) : ?>
+        <?php foreach ($rates as $rate): ?>
             <tr class="totals-tax-details">
-                <th class="mark" style="<?= /* @noEscape */ $_style ?>" colspan="<?= (int) $block->getColspan() ?>" scope="row">
+                <th class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
                     <?= $block->escapeHtml($rate['title']) ?>
-                    <?php if ($rate['percent'] !== null) : ?>
+                    <?php if ($rate['percent'] !== null): ?>
                         (<?= (float) $rate['percent'] ?>%)
                     <?php endif; ?>
                 </th>
-                <?php if ($isFirst) : ?>
-                    <td style="<?= /* @noEscape */ $_style ?>" class="amount" rowspan="<?= count($rates) ?>"
-                       data-th="<?= $block->escapeHtmlAttr($rate['title']) ?><?php if ($rate['percent'] !== null) : ?>(<?= (float) $rate['percent'] ?>%)<?php endif; ?>">
-                        <?= /* @noEscape */ $this->helper(\Magento\Checkout\Helper\Data::class)->formatPrice($amount) ?>
+                <?php if ($isFirst): ?>
+                    <td class="amount" rowspan="<?= count($rates) ?>"
+                       data-th="<?= $block->escapeHtmlAttr($rate['title']) ?>
+                        <?php if ($rate['percent'] !== null): ?>(<?= (float) $rate['percent'] ?>%)<?php endif; ?>">
+                        <?= /* @noEscape */ $jsonHelper->formatPrice($amount) ?>
                     </td>
                 <?php endif; ?>
             </tr>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details th.mark') ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details td.amount') ?>
             <?php $isFirst = 0; ?>
         <?php endforeach; ?>
     <?php endforeach; ?>

From 39a6e2b5033b67268e75bc1892f0e20e90f505de Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Wed, 22 Apr 2020 16:35:38 +0300
Subject: [PATCH 106/307] MC-29420: Remove event handlers from CE

---
 app/code/Magento/Backend/Block/Template.php   |   1 +
 .../Magento/Backend/etc/adminhtml/system.xml  |   4 +-
 app/code/Magento/Backend/i18n/en_US.csv       |   6 +-
 .../templates/widget/form/container.phtml     |  19 +-
 .../templates/widget/grid/extended.phtml      | 141 ++++---
 .../widget/grid/massaction_extended.phtml     |  55 ++-
 .../adminhtml/templates/widget/tabs.phtml     |   2 +-
 .../Catalog/Block/Adminhtml/Category/Tree.php |   6 +-
 .../etc/adminhtml/system.xml                  |   2 +-
 .../Magento/CatalogUrlRewrite/i18n/en_US.csv  |   2 +-
 .../Config/Block/System/Config/Form/Field.php |   2 +-
 .../Block/System/Config/Form/Fieldset.php     |   6 +-
 .../Magento/Cookie/etc/adminhtml/system.xml   |   2 +-
 .../view/adminhtml/templates/grid.phtml       |   9 +-
 .../system/currency/rate/matrix.phtml         |  64 ++-
 .../Block/Adminhtml/Edit/Renderer/Region.php  |  29 +-
 .../Sales/Order/Address/Form/Renderer/Vat.php |  20 +-
 .../Magento/Customer/Block/Form/Register.php  |   2 +
 .../view/adminhtml/templates/tab/cart.phtml   |  41 +-
 .../frontend/templates/address/edit.phtml     |   4 +-
 .../view/frontend/templates/form/edit.phtml   |  22 +-
 .../frontend/templates/form/register.phtml    |  58 +--
 .../TemplateEngine/Decorator/DebugHints.php   |  80 +++-
 .../adminhtml/templates/unitofmeasure.phtml   |  26 +-
 .../templates/js/optional_zip_countries.phtml |  16 +-
 .../Sales/Items/Column/Downloadable/Name.php  |   6 +
 .../column/downloadable/creditmemo/name.phtml |  45 ++-
 .../column/downloadable/invoice/name.phtml    |  47 ++-
 .../items/column/downloadable/name.phtml      |  46 ++-
 .../templates/customer/products/list.phtml    |  52 ++-
 .../Block/Adminhtml/Template/Edit/Form.php    |  30 +-
 .../templates/preview/iframeswitcher.phtml    |   9 +-
 .../adminhtml/templates/template/edit.phtml   |  63 +--
 .../view/adminhtml/templates/popup.phtml      |  26 +-
 .../sales/order/create/giftoptions.phtml      |  20 +-
 .../sales/order/view/giftoptions.phtml        |  14 +-
 .../view/frontend/templates/inline.phtml      | 364 ++++++++++++++----
 .../view/frontend/templates/code.phtml        |  33 +-
 .../Magento/Msrp/etc/adminhtml/system.xml     |   2 +-
 app/code/Magento/Msrp/i18n/en_US.csv          |   2 +-
 .../etc/adminhtml/system/express_checkout.xml |   2 +-
 app/code/Magento/Paypal/i18n/en_US.csv        |   4 +-
 .../Adminhtml/Order/Invoice/Create/Form.php   |  18 +
 .../order/creditmemo/create/items.phtml       |  29 +-
 .../create/totals/adjustments.phtml           |  14 +-
 .../templates/order/invoice/create/form.phtml |  52 ++-
 .../order/invoice/create/items.phtml          |  61 +--
 .../templates/order/view/history.phtml        |  47 ++-
 .../templates/order/view/tab/info.phtml       |  14 +-
 .../frontend/templates/reorder/sidebar.phtml  |  20 +-
 .../Magento/Theme/etc/adminhtml/system.xml    |   2 +-
 .../Magento/backend/web/css/styles.less       |   4 +
 52 files changed, 1137 insertions(+), 508 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php
index 46777427ec70b..1c4cd4f9bcc33 100644
--- a/app/code/Magento/Backend/Block/Template.php
+++ b/app/code/Magento/Backend/Block/Template.php
@@ -73,6 +73,7 @@ public function __construct(\Magento\Backend\Block\Template\Context $context, ar
         $this->formKey = $context->getFormKey();
         $this->nameBuilder = $context->getNameBuilder();
         $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['directoryHelper']= ObjectManager::getInstance()->get(\Magento\Directory\Helper\Data::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml
index 1e8ec226d6b88..71cdd4881d5d7 100644
--- a/app/code/Magento/Backend/etc/adminhtml/system.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/system.xml
@@ -146,7 +146,7 @@
                     <label>Allow Symlinks</label>
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                     <comment>
-                        <![CDATA[<strong style="color:red">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk.]]>
+                        <![CDATA[<strong class="colorRed">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk.]]>
                     </comment>
                 </field>
                 <field id="minify_html" translate="label comment" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
@@ -460,7 +460,7 @@
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                     <backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
                     <comment>
-                        <![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
+                        <![CDATA[<strong class="colorRed">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
                     </comment>
                 </field>
                 <field id="redirect_to_base" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv
index 53f7fe90cbbe5..d148c1a3efb88 100644
--- a/app/code/Magento/Backend/i18n/en_US.csv
+++ b/app/code/Magento/Backend/i18n/en_US.csv
@@ -333,7 +333,7 @@ Debug,Debug
 "Add Block Names to Hints","Add Block Names to Hints"
 "Template Settings","Template Settings"
 "Allow Symlinks","Allow Symlinks"
-"<strong style=""color:red"">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk.","<strong style=""color:red"">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk."
+"<strong class=""colorRed">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk.","<strong class=""colorRed"">Warning!</strong> Enabling this feature is not recommended on production environments because it represents a potential security risk."
 "Minify Html","Minify Html"
 "Minification is not applied in developer mode.","Minification is not applied in developer mode."
 "Translate Inline","Translate Inline"
@@ -405,9 +405,9 @@ Web,Web
 "Url Options","Url Options"
 "Add Store Code to Urls","Add Store Code to Urls"
 "
-                        <strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
+                        <strong class=""colorRed">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
                     ","
-                        <strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
+                        <strong class=""colorRed">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
                     "
 "Auto-redirect to Base URL","Auto-redirect to Base URL"
 "Search Engine Optimization","Search Engine Optimization"
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml
index aa289dbf1eb0f..21843215758d5 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml
@@ -5,12 +5,15 @@
  */
 
 /** @var $block \Magento\Backend\Block\Widget\Form\Container */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?= /* @noEscape */ $block->getFormInitScripts() ?>
-<?php if ($block->getButtonsHtml('header')) : ?>
-    <div class="page-form-actions" <?= /* @noEscape */ $block->getUiId('content-header') ?>><?= $block->getButtonsHtml('header') ?></div>
+<?php if ($block->getButtonsHtml('header')): ?>
+    <div class="page-form-actions" <?= /* @noEscape */ $block->getUiId('content-header') ?>>
+        <?= $block->getButtonsHtml('header') ?>
+    </div>
 <?php endif; ?>
-<?php if ($block->getButtonsHtml('toolbar')) : ?>
+<?php if ($block->getButtonsHtml('toolbar')): ?>
     <div class="page-main-actions">
         <div class="page-actions">
             <div class="page-actions-buttons">
@@ -20,12 +23,12 @@
     </div>
 <?php endif; ?>
 <?= $block->getFormHtml() ?>
-<?php if ($block->hasFooterButtons()) : ?>
+<?php if ($block->hasFooterButtons()): ?>
     <div class="content-footer">
         <p class="form-buttons"><?= $block->getButtonsHtml('footer') ?></p>
     </div>
 <?php endif; ?>
-<script>
+<?php $scriptString = <<<script
 require([
     'jquery',
     'mage/backend/form',
@@ -34,7 +37,7 @@ require([
 
     $('#edit_form').form()
         .validation({
-            validationUrl: '<?= $block->escapeJs($block->getValidationUrl()) ?>',
+            validationUrl: '{$block->escapeJs($block->getValidationUrl())}',
             highlight: function(element) {
                 var detailsElement = $(element).closest('details');
                 if (detailsElement.length && detailsElement.is('.details')) {
@@ -48,5 +51,7 @@ require([
         });
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?= /* @noEscape */ $block->getFormScripts() ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 3044985ef65f2..4ea657b14e2dd 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -284,67 +284,114 @@ $numColumns = count($block->getColumns());
         </table>
 
     </div>
-    <?php if ($block->canDisplayContainer()): ?>
 </div>
-<script>
+    <?php $jsonHelper = $block->getData('jsonHelper');
+    if ($block->canDisplayContainer()):
+        $scriptString = <<<script
     var deps = [];
-
-        <?php if ($block->getDependencyJsObject()): ?>
+script;
+        if ($block->getDependencyJsObject()):
+            $scriptString .= <<<script
     deps.push('uiRegistry');
-        <?php endif; ?>
+script;
+        endif;
 
-        <?php if (strpos($block->getRowClickCallback(), 'order.') !== false): ?>
+        if (strpos($block->getRowClickCallback(), 'order.') !== false):
+            $scriptString .= <<<script
     deps.push('Magento_Sales/order/create/form')
-        <?php endif; ?>
+script;
+        endif;
+        $scriptString .= <<<script
 
     deps.push('mage/adminhtml/grid');
+script;
+        if (is_array($block->getRequireJsDependencies())):
+            foreach ($block->getRequireJsDependencies() as $dependency):
+                $scriptString .= <<<script
+            deps.push('{$block->escapeJs($dependency)}');
+script;
+            endforeach;
+        endif;
+        $dependencyJsObject = ($block->getDependencyJsObject() ? 'registry' : '');
+        $scriptString .= <<<script
 
-        <?php if (is_array($block->getRequireJsDependencies())): ?>
-            <?php foreach ($block->getRequireJsDependencies() as $dependency): ?>
-            deps.push('<?= $block->escapeJs($dependency) ?>');
-            <?php endforeach; ?>
-        <?php endif; ?>
-
-    require(deps, function(<?= ($block->getDependencyJsObject() ? 'registry' : '') ?>){
-        <?php //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed ?>
+    require(deps, function({$dependencyJsObject}){
+script;
+        //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed
+        $scriptString .= <<<script
 
         //<![CDATA[
-        <?php if ($block->getDependencyJsObject()): ?>
-        registry.get('<?= $block->escapeJs($block->getDependencyJsObject())
-        ?>', function (<?= $block->escapeJs($block->getDependencyJsObject()) ?>) {
-        <?php endif; ?>
-    <?php // phpcs:disable ?>
-    <?= $block->escapeJs($block->getJsObjectName()) ?> = new varienGrid(<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getId()) ?>, '<?= $block->escapeJs($block->getGridUrl()) ?>', '<?= $block->escapeJs($block->getVarNamePage()) ?>', '<?= $block->escapeJs($block->getVarNameSort()) ?>', '<?= $block->escapeJs($block->getVarNameDir()) ?>', '<?= $block->escapeJs($block->getVarNameFilter()) ?>');
-    <?php //phpcs:enable ?>
-        <?= $block->escapeJs($block->getJsObjectName()) ?>.useAjax = '<?= $block->escapeJs($block->getUseAjax()) ?>';
-        <?php if ($block->getRowClickCallback()): ?>
-            <?= $block->escapeJs($block->getJsObjectName())
-            ?>.rowClickCallback = <?= /* @noEscape */ $block->getRowClickCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getCheckboxCheckCallback()): ?>
-            <?= $block->escapeJs($block->getJsObjectName())
-            ?>.checkboxCheckCallback = <?= /* @noEscape */ $block->getCheckboxCheckCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getFilterKeyPressCallback()): ?>
-            <?= $block->escapeJs($block->getJsObjectName())
-            ?>.filterKeyPressCallback = <?= /* @noEscape */ $block->getFilterKeyPressCallback() ?>;
-        <?php endif; ?>
-        <?php if ($block->getRowInitCallback()): ?>
-            <?= $block->escapeJs($block->getJsObjectName())
-            ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.initGridRows();
-        <?php endif; ?>
-        <?php if ($block->getMassactionBlock() && $block->getMassactionBlock()->isAvailable()): ?>
-            <?= /* @noEscape */ $block->getMassactionBlock()->getJavaScript() ?>
-        <?php endif ?>
-        <?= /* @noEscape */ $block->getAdditionalJavaScript() ?>
+script;
+        if ($block->getDependencyJsObject()):
+            $scriptString .= <<<script
+
+        registry.get('{$block->escapeJs($block->getDependencyJsObject())}',
+         function ({$block->escapeJs($block->getDependencyJsObject())}) {
+script;
+        endif;
+        $encodedId = /* @noEscape */ $jsonHelper->jsonEncode($block->getId());
+        $scriptString .= <<<script
+
+    {$block->escapeJs($block->getJsObjectName())} = new varienGrid(
+        {$encodedId},
+         '{$block->escapeJs($block->getGridUrl())}',
+         '{$block->escapeJs($block->getVarNamePage())}',
+         '{$block->escapeJs($block->getVarNameSort())}',
+         '{$block->escapeJs($block->getVarNameDir())}',
+         '{$block->escapeJs($block->getVarNameFilter())}'
+         );
+
+        {$block->escapeJs($block->getJsObjectName())}.useAjax = '{$block->escapeJs($block->getUseAjax())}';
+
+script;
+        if ($block->getRowClickCallback()):
+            $rowClickCallback = /* @noEscape */ $block->getRowClickCallback();
+            $scriptString .= <<<script
+
+            {$block->escapeJs($block->getJsObjectName())}.rowClickCallback = {$rowClickCallback};
+script;
+        endif;
+        if ($block->getCheckboxCheckCallback()):
+            $checkboxCheckCallback = /* @noEscape */ $block->getCheckboxCheckCallback();
+            $scriptString .= <<<script
+
+            {$block->escapeJs($block->getJsObjectName())}.checkboxCheckCallback = {$checkboxCheckCallback};
+script;
+        endif;
+        if ($block->getFilterKeyPressCallback()):
+            $filterKeyPressCallback = /* @noEscape */ $block->getFilterKeyPressCallback();
+            $scriptString .= <<<script
+
+            {$block->escapeJs($block->getJsObjectName())}.filterKeyPressCallback = {$filterKeyPressCallback};
+script;
+        endif;
+        if ($block->getRowInitCallback()):
+            $rowInitCallback = /* @noEscape */ $block->getRowInitCallback();
+            $scriptString .= <<<script
+
+            {$block->escapeJs($block->getJsObjectName())}.initRowCallback = {$rowInitCallback};
+            {$block->escapeJs($block->getJsObjectName())}.initGridRows();
+
+script;
+        endif;
+        if ($block->getMassactionBlock() && $block->getMassactionBlock()->isAvailable()):
+            $scriptString .= /* @noEscape */ $block->getMassactionBlock()->getJavaScript() . PHP_EOL;
+        endif;
+        $scriptString .= /* @noEscape */ $block->getAdditionalJavaScript() . PHP_EOL;
+
+        if ($block->getDependencyJsObject()):
+            $scriptString .= <<<script
 
-        <?php if ($block->getDependencyJsObject()): ?>
         });
-        <?php endif; ?>
+script;
+        endif;
+        $scriptString .= <<<script
+
     //]]>
 
 });
-</script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
 <?php endif ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml
index c0f30fc282f38..495cb572fe125 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml
@@ -3,10 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="<?= $block->getHtmlId() ?>" class="admin__grid-massaction">
 
-    <?php if ($block->getHideFormElement() !== true) : ?>
+    <?php if ($block->getHideFormElement() !== true): ?>
     <form action="" id="<?= $block->getHtmlId() ?>-form" method="post">
     <?php endif ?>
         <div class="admin__grid-massaction-form">
@@ -14,20 +16,25 @@
             <select
                 id="<?= $block->getHtmlId() ?>-select"
                 class="required-entry local-validation admin__control-select">
-                <option class="admin__control-select-placeholder" value="" selected><?= $block->escapeHtml(__('Actions')) ?></option>
-                <?php foreach ($block->getItems() as $_item) : ?>
-                    <option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"<?= ($_item->getSelected() ? ' selected="selected"' : '') ?>><?= $block->escapeHtml($_item->getLabel()) ?></option>
+                <option class="admin__control-select-placeholder" value="" selected>
+                    <?= $block->escapeHtml(__('Actions')) ?>
+                </option>
+                <?php foreach ($block->getItems() as $_item): ?>
+                    <option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"
+                        <?= ($_item->getSelected() ? ' selected="selected"' : '') ?>>
+                        <?= $block->escapeHtml($_item->getLabel()) ?>
+                    </option>
                 <?php endforeach; ?>
             </select>
             <span class="outer-span" id="<?= $block->getHtmlId() ?>-form-hiddens"></span>
             <span class="outer-span" id="<?= $block->getHtmlId() ?>-form-additional"></span>
             <?= $block->getApplyButtonHtml() ?>
         </div>
-    <?php if ($block->getHideFormElement() !== true) : ?>
+    <?php if ($block->getHideFormElement() !== true): ?>
     </form>
     <?php endif ?>
     <div class="no-display">
-        <?php foreach ($block->getItems() as $_item) : ?>
+        <?php foreach ($block->getItems() as $_item): ?>
             <div id="<?= $block->getHtmlId() ?>-item-<?= /* @noEscape */ $_item->getId() ?>-block">
                 <?= $_item->getAdditionalActionBlockHtml() ?>
             </div>
@@ -40,7 +47,7 @@
             data-menu="grid-mass-select">
             <optgroup label="<?= $block->escapeHtml(__('Mass Actions')) ?>">
                 <option disabled selected></option>
-            <?php if ($block->getUseSelectAll()) : ?>
+            <?php if ($block->getUseSelectAll()): ?>
                 <option value="selectAll">
                     <?= $block->escapeHtml(__('Select All')) ?>
                 </option>
@@ -58,33 +65,41 @@
         </select>
         <label for="<?= $block->getHtmlId() ?>-mass-select"></label>
     </div>
-<script>
+    <?php $scriptString = <<<script
     require(['jquery'], function($){
         'use strict';
-        $('#<?= $block->getHtmlId() ?>-mass-select').change(function () {
+        $('#{$block->getHtmlId()}-mass-select').change(function () {
             var massAction = $('option:selected', this).val();
             switch (massAction) {
-                <?php if ($block->getUseSelectAll()) : ?>
+script;
+    if ($block->getUseSelectAll()):
+        $scriptString .= <<<script
                 case 'selectAll':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.selectAll();
+                    return {$block->escapeJs($block->getJsObjectName())}.selectAll();
                     break;
                 case 'unselectAll':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.unselectAll();
+                    return {$block->escapeJs($block->getJsObjectName())}.unselectAll();
                     break;
-                <?php endif; ?>
+script;
+endif;
+    $scriptString .= <<<script
                 case 'selectVisible':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.selectVisible();
+                    return {$block->escapeJs($block->getJsObjectName())}.selectVisible();
                     break;
                 case 'unselectVisible':
-                    return <?= $block->escapeJs($block->getJsObjectName()) ?>.unselectVisible();
+                    return {$block->escapeJs($block->getJsObjectName())}.unselectVisible();
                     break;
             }
             this.blur();
         });
     });
-
-    <?php if (!$block->getParentBlock()->canDisplayContainer()) : ?>
-        <?= $block->escapeJs($block->getJsObjectName()) ?>.setGridIds('<?= /* @noEscape */ $block->getGridIdsJson() ?>');
-    <?php endif; ?>
-</script>
+script;
+    if (!$block->getParentBlock()->canDisplayContainer()):
+        $gridIdsJson = /* @noEscape */ $block->getGridIdsJson();
+        $scriptString .= <<<script
+        {$block->escapeJs($block->getJsObjectName())}.setGridIds('{$gridIdsJson}');
+script;
+    endif;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
index 498b403508f2c..4ebf586fce533 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
@@ -80,7 +80,7 @@
                 <?php endif; ?>
                 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                     'display:none',
-                    'div#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+                    'div#' . $block->escapeHtmlAttr($block->getTabId($_tab)) . '_content'
                 ); ?>
             </li>
         <?php endforeach; ?>
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
index 7d6db21fd4cef..4433dc80a0fa3 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
@@ -85,10 +85,8 @@ public function __construct(
         $this->_resourceHelper = $resourceHelper;
         $this->_backendSession = $backendSession;
         parent::__construct($context, $categoryTree, $registry, $categoryFactory, $data);
-        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
-        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
-        $this->secureRenderer = $secureRenderer;
-        $this->random = $random;
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
     }
 
     /**
diff --git a/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/system.xml b/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/system.xml
index 75d395473f969..ccd077e615221 100644
--- a/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/system.xml
+++ b/app/code/Magento/CatalogUrlRewrite/etc/adminhtml/system.xml
@@ -32,7 +32,7 @@
                     <label>Generate "category/product" URL Rewrites</label>
                     <backend_model>Magento\CatalogUrlRewrite\Model\TableCleaner</backend_model>
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
-                    <comment><![CDATA[<strong style="color:red">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them.]]></comment>
+                    <comment><![CDATA[<strong class="colorRed">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them.]]></comment>
                     <frontend_class>generate_category_product_rewrites</frontend_class>
                 </field>
             </group>
diff --git a/app/code/Magento/CatalogUrlRewrite/i18n/en_US.csv b/app/code/Magento/CatalogUrlRewrite/i18n/en_US.csv
index 7f1e1cd086408..0def4f6de32eb 100644
--- a/app/code/Magento/CatalogUrlRewrite/i18n/en_US.csv
+++ b/app/code/Magento/CatalogUrlRewrite/i18n/en_US.csv
@@ -9,4 +9,4 @@
 "URL key ""%1"" matches a reserved endpoint name (%2). Use another URL key.","URL key ""%1"" matches a reserved endpoint name (%2). Use another URL key."
 "Invalid URL key. The ""%1"" URL key can not be used to generate Latin URL key. Please use Latin letters and numbers to avoid generating URL key issues.","Invalid URL key. The ""%1"" URL key can not be used to generate Latin URL key. Please use Latin letters and numbers to avoid generating URL key issues."
 "Invalid URL key. The ""%1"" category name can not be used to generate Latin URL key. Please add URL key or change category name using Latin letters and numbers to avoid generating URL key issues.","Invalid URL key. The ""%1"" category name can not be used to generate Latin URL key. Please add URL key or change category name using Latin letters and numbers to avoid generating URL key issues."
-"<strong style=""color:red"">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them.","<strong style=""color:red"">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them."
+"<strong class=""colorRed"">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them.","<strong style=""color:red"">Warning!</strong> Turning this option off will result in permanent removal of category/product URL rewrites without an ability to restore them."
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Field.php b/app/code/Magento/Config/Block/System/Config/Form/Field.php
index 026cdce679731..9801467a4cf61 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Field.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Field.php
@@ -135,7 +135,7 @@ protected function _renderInheritCheckbox(\Magento\Framework\Data\Form\Element\A
         $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
             'onclick',
             "toggleValueElements(this, Element.previous(this.parentNode))",
-            'input#' . $htmlId
+            'input#' . $htmlId . '_inherit'
         );
         $html .= '<label for="' . $htmlId . '_inherit" class="inherit">' . $this->_getInheritCheckboxLabel(
             $element
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
index d2681f6fa1836..20b6408eebe82 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
@@ -175,9 +175,9 @@ protected function _getHeaderTitleHtml($element)
             '-link">' . $element->getLegend() . '</a>' .
             /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
                 'onclick',
-                "Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' .
-                 $this->_urlBuilder->getUrl('*/*/state') . '\'); return false;",
-                'a#' . $element->getHtmlId()
+                "Fieldset.toggleCollapse('" . $element->getHtmlId() . "', '" .
+                 $this->_urlBuilder->getUrl('*/*/state') . "'); return false;",
+                'a#' . $element->getHtmlId() . '-head'
             );
     }
 
diff --git a/app/code/Magento/Cookie/etc/adminhtml/system.xml b/app/code/Magento/Cookie/etc/adminhtml/system.xml
index d1dcbf45ae5be..c12ba742f3f11 100644
--- a/app/code/Magento/Cookie/etc/adminhtml/system.xml
+++ b/app/code/Magento/Cookie/etc/adminhtml/system.xml
@@ -25,7 +25,7 @@
                 <field id="cookie_httponly" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Use HTTP Only</label>
                     <comment>
-                        <![CDATA[<strong style="color:red">Warning</strong>:  Do not set to "No". User security could be compromised.]]>
+                        <![CDATA[<strong class="colorRed">Warning</strong>:  Do not set to "No". User security could be compromised.]]>
                     </comment>
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                 </field>
diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml
index 55195698c5dc8..cde9ef3614c7f 100644
--- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml
+++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml
@@ -6,6 +6,7 @@
 
 /**
  * @var $block \Magento\CurrencySymbol\Block\Adminhtml\System\Currencysymbol
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 
@@ -31,9 +32,6 @@
                     ?>
                     <input id="custom_currency_symbol_inherit<?= $block->escapeHtmlAttr($code) ?>"
                            class="admin__control-checkbox" type="checkbox"
-                           <?php //@codingStandardsIgnoreStart ?>
-                           onclick="toggleUseDefault(<?= '\'' . $escapedCode . '\',\'' . $escapedSymbol . '\'' ?>)"
-                            <?php //@codingStandardsIgnoreEnd ?>
                             <?= $data['inherited'] ? ' checked="checked"' : '' ?>
                            value="1"
                            name="inherit_custom_currency_symbol[<?= $block->escapeHtmlAttr($code) ?>]">
@@ -43,6 +41,11 @@
                             <?= $block->escapeHtml($block->getInheritText()) ?>
                         </span>
                     </label>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        "toggleUseDefault('" . $escapedCode . "','" . $escapedSymbol . "')",
+                        'custom_currency_symbol_inherit' . $block->escapeHtmlAttr($code)
+                    ) ?>
                 </div>
             </div>
         </div>
diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml
index 18b3c7eef746d..bbc2f95825127 100644
--- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml
+++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/system/currency/rate/matrix.phtml
@@ -6,15 +6,20 @@
 
 /**
  * @var $block \Magento\CurrencySymbol\Block\Adminhtml\System\Currency\Rate\Matrix
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 
 $_oldRates = $block->getOldRates();
 $_newRates = $block->getNewRates();
 $_rates = ($_newRates) ? $_newRates : $_oldRates;
 ?>
-<?php if (empty($_rates)) : ?>
-    <div class="message message-warning warning"><p><?= $block->escapeHtml(__('You must first configure currency options before being able to see currency rates.')) ?></p></div>
-<?php else : ?>
+<?php if (empty($_rates)): ?>
+    <div class="message message-warning warning"><p>
+            <?= $block->escapeHtml(
+                __('You must first configure currency options before being able to see currency rates.')
+            ) ?></p>
+    </div>
+<?php else: ?>
     <form name="rateForm" id="rate-form" method="post" action="<?= $block->escapeUrl($block->getRatesFormAction()) ?>">
         <?= $block->getBlockHtml('formkey') ?>
         <div class="admin__control-table-wrapper">
@@ -22,36 +27,53 @@ $_rates = ($_newRates) ? $_newRates : $_oldRates;
                 <thead>
                     <tr>
                         <th> </th>
-                        <?php $_i = 0; foreach ($block->getAllowedCurrencies() as $_currencyCode) : ?>
+                        <?php $_i = 0; foreach ($block->getAllowedCurrencies() as $_currencyCode): ?>
                             <th><span><?= $block->escapeHtml($_currencyCode) ?></span></th>
                         <?php endforeach; ?>
                     </tr>
                 </thead>
-                <?php $_j = 0; foreach ($block->getDefaultCurrencies() as $_currencyCode) : ?>
+                <?php $_j = 0; foreach ($block->getDefaultCurrencies() as $_currencyCode): ?>
                 <tr>
-                    <?php if (isset($_rates[$_currencyCode]) && is_array($_rates[$_currencyCode])) : ?>
-                        <?php foreach ($_rates[$_currencyCode] as $_rate => $_value) : ?>
-                            <?php if (++$_j == 1) : ?>
-                                <td><span class="admin__control-support-text"><?= $block->escapeHtml($_currencyCode) ?></span></td>
+                    <?php if (isset($_rates[$_currencyCode]) && is_array($_rates[$_currencyCode])): ?>
+                        <?php foreach ($_rates[$_currencyCode] as $_rate => $_value): ?>
+                            <?php if (++$_j == 1): ?>
+                                <td><span class="admin__control-support-text"><?= $block->escapeHtml($_currencyCode) ?>
+                                    </span></td>
                                 <td>
                                     <input type="text"
-                                           name="rate[<?= $block->escapeHtmlAttr($_currencyCode) ?>][<?= $block->escapeHtmlAttr($_rate) ?>]"
-                                           value="<?= ($_currencyCode == $_rate) ? '1.0000' : ($_value>0 ? $block->escapeHtmlAttr($_value) : (isset($_oldRates[$_currencyCode][$_rate]) ? $block->escapeHtmlAttr($_oldRates[$_currencyCode][$_rate]) : '')) ?>"
+                                           name="rate[<?= $block->escapeHtmlAttr($_currencyCode)
+                                            ?>][<?= $block->escapeHtmlAttr($_rate) ?>]"
+                                           value="<?= ($_currencyCode == $_rate) ? '1.0000' :
+                                               ($_value>0 ? $block->escapeHtmlAttr($_value) :
+                                                   (isset($_oldRates[$_currencyCode][$_rate]) ?
+                                                       $block->escapeHtmlAttr($_oldRates[$_currencyCode][$_rate]) : ''))
+                                                    ?>"
                                            class="admin__control-text"
                                             <?= ($_currencyCode == $_rate) ? ' disabled' : '' ?> />
-                                    <?php if (isset($_newRates) && $_currencyCode != $_rate && isset($_oldRates[$_currencyCode][$_rate])) : ?>
-                                    <div class="admin__field-note"><?= $block->escapeHtml(__('Old rate:')) ?> <strong><?= $block->escapeHtml($_oldRates[$_currencyCode][$_rate]) ?></strong></div>
+                                    <?php if (isset($_newRates) && $_currencyCode != $_rate &&
+                                        isset($_oldRates[$_currencyCode][$_rate])): ?>
+                                    <div class="admin__field-note"><?= $block->escapeHtml(__('Old rate:')) ?>
+                                        <strong><?= $block->escapeHtml($_oldRates[$_currencyCode][$_rate]) ?></strong>
+                                    </div>
                                     <?php endif; ?>
                                 </td>
-                            <?php else : ?>
+                            <?php else: ?>
                                 <td>
                                     <input type="text"
-                                           name="rate[<?= $block->escapeHtmlAttr($_currencyCode) ?>][<?= $block->escapeHtmlAttr($_rate) ?>]"
-                                           value="<?= ($_currencyCode == $_rate) ? '1.0000' : ($_value>0 ? $block->escapeHtmlAttr($_value) : (isset($_oldRates[$_currencyCode][$_rate]) ? $block->escapeHtmlAttr($_oldRates[$_currencyCode][$_rate]) : '')) ?>"
+                                           name="rate[<?= $block->escapeHtmlAttr($_currencyCode)
+                                            ?>][<?= $block->escapeHtmlAttr($_rate) ?>]"
+                                           value="<?= ($_currencyCode == $_rate) ? '1.0000' :
+                                               ($_value>0 ? $block->escapeHtmlAttr($_value) :
+                                                   (isset($_oldRates[$_currencyCode][$_rate]) ?
+                                                       $block->escapeHtmlAttr($_oldRates[$_currencyCode][$_rate]) : ''))
+                                                    ?>"
                                            class="admin__control-text"
                                            <?= ($_currencyCode == $_rate) ? ' disabled' : '' ?> />
-                                    <?php if (isset($_newRates) && $_currencyCode != $_rate && isset($_oldRates[$_currencyCode][$_rate])) : ?>
-                                    <div class="admin__field-note"><?= $block->escapeHtml(__('Old rate:')) ?> <strong><?= $block->escapeHtml($_oldRates[$_currencyCode][$_rate]) ?></strong></div>
+                                    <?php if (isset($_newRates) && $_currencyCode != $_rate &&
+                                        isset($_oldRates[$_currencyCode][$_rate])): ?>
+                                    <div class="admin__field-note"><?= $block->escapeHtml(__('Old rate:')) ?>
+                                        <strong><?= $block->escapeHtml($_oldRates[$_currencyCode][$_rate]) ?></strong>
+                                    </div>
                                     <?php endif; ?>
                                 </td>
                             <?php endif; ?>
@@ -64,10 +86,12 @@ $_rates = ($_newRates) ? $_newRates : $_oldRates;
         </div>
     </form>
 <?php endif; ?>
-<script>
+<?php $scriptString = <<<script
 require(['jquery', "mage/mage"], function(jQuery){
 
     jQuery('#rate-form').mage('form').mage('validation');
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
index 0aeed1562c51e..afe040ee28a95 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Customer\Block\Adminhtml\Edit\Renderer;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Customer address region field renderer
  */
@@ -16,18 +19,26 @@ class Region extends \Magento\Backend\Block\AbstractBlock implements
      */
     protected $_directoryHelper;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Directory\Helper\Data $directoryHelper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Directory\Helper\Data $directoryHelper,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_directoryHelper = $directoryHelper;
         parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -60,14 +71,15 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
             $selectId .
             '" name="' .
             $selectName .
-            '" class="select required-entry admin__control-select" style="display:none">';
+            '" class="select required-entry admin__control-select">';
         $html .= '<option value="">' . __('Please select') . '</option>';
         $html .= '</select>';
+        $html .= $this->secureRenderer->renderStyleAsTag("display:none", '#region');
 
-        $html .= '<script>' . "\n";
-        $html .= 'require(["prototype", "mage/adminhtml/form"], function(){';
-        $html .= '$("' . $selectId . '").setAttribute("defaultValue", "' . $regionId . '");' . "\n";
-        $html .= 'new regionUpdater("' .
+        $scriptString = "\n";
+        $scriptString .= 'require(["prototype", "mage/adminhtml/form"], function(){';
+        $scriptString .= '$("' . $selectId . '").setAttribute("defaultValue", "' . $regionId . '");' . "\n";
+        $scriptString .= 'new regionUpdater("' .
             $country->getHtmlId() .
             '", "' .
             $element->getHtmlId() .
@@ -78,8 +90,9 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
             ');' .
             "\n";
 
-        $html .= '});';
-        $html .= '</script>' . "\n";
+        $scriptString .= '});';
+        $scriptString .= "\n";
+        $html .= $this->secureRenderer->renderTag('script', [], $scriptString, false);
 
         $html .= '</div></div>' . "\n";
 
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php
index 9ee856f6e0af9..ebdf0090fe1c8 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Sales/Order/Address/Form/Renderer/Vat.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Customer\Block\Adminhtml\Sales\Order\Address\Form\Renderer;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\View\Element\Template;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
  * VAT ID element renderer
@@ -31,18 +33,26 @@ class Vat extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Element
      */
     protected $_jsonEncoder;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -95,11 +105,8 @@ public function getValidateButton()
             );
 
             $optionsVarName = $this->getJsVariablePrefix() . 'VatParameters';
-            $beforeHtml = '<script>var ' .
-                $optionsVarName .
-                ' = ' .
-                $vatValidateOptions .
-                ';</script>';
+            $scriptString = 'var ' . $optionsVarName . ' = ' . $vatValidateOptions . ';';
+            $beforeHtml = $this->secureRenderer->renderTag('script', [], $scriptString, false);
             $this->_validateButton = $this->getLayout()->createBlock(
                 \Magento\Backend\Block\Widget\Button::class
             )->setData(
@@ -110,6 +117,7 @@ public function getValidateButton()
                 ]
             );
         }
+
         return $this->_validateButton;
     }
 }
diff --git a/app/code/Magento/Customer/Block/Form/Register.php b/app/code/Magento/Customer/Block/Form/Register.php
index 46d1088e37d0f..b62537495f2c6 100644
--- a/app/code/Magento/Customer/Block/Form/Register.php
+++ b/app/code/Magento/Customer/Block/Form/Register.php
@@ -7,6 +7,7 @@
 
 use Magento\Customer\Model\AccountManagement;
 use Magento\Framework\App\ObjectManager;
+use Magento\Customer\Helper\Address as AddressHelper;
 use Magento\Newsletter\Model\Config;
 
 /**
@@ -72,6 +73,7 @@ public function __construct(
         $this->_moduleManager = $moduleManager;
         $this->_customerSession = $customerSession;
         $this->newsLetterConfig = $newsLetterConfig ?: ObjectManager::getInstance()->get(Config::class);
+        $data['addressHelper'] = ObjectManager::getInstance()->get(AddressHelper::class);
         parent::__construct(
             $context,
             $directoryHelper,
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml
index 434e5606cd032..81ad513351841 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/cart.phtml
@@ -5,39 +5,41 @@
  */
 
 /* @var \Magento\Customer\Block\Adminhtml\Edit\Tab\Cart $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($block->getCartHeader()) : ?>
+<?php if ($block->getCartHeader()): ?>
 <div class="content-header skip-header">
     <table>
         <tr>
-            <td style="width:50%;"><h4><?= $block->escapeHtml($block->getCartHeader()) ?></h4></td>
+            <td><h4><?= $block->escapeHtml($block->getCartHeader()) ?></h4></td>
         </tr>
     </table>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("width:50%;", 'div.content-header.skip-header table tr td') ?>
 </div>
 <?php endif ?>
 <?= $block->getGridParentHtml() ?>
-<?php if ($block->canDisplayContainer()) : ?>
+<?php if ($block->canDisplayContainer()): ?>
     <?php $listType = $block->getJsObjectName(); ?>
-    <script>
+    <?php $scriptString = <<<script
         require([
             "Magento_Ui/js/modal/alert",
             "Magento_Ui/js/modal/confirm",
             "Magento_Catalog/catalog/product/composite/configure"
         ], function(alert, confirm){
 
-        <?= $block->escapeJs($block->getJsObjectName()) ?>cartControl = {
+        {$block->escapeJs($block->getJsObjectName())}cartControl = {
             reload: function (params) {
             if (!params) {
                 params = {};
             }
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.reloadParams = params;
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.reload();
-            <?= $block->escapeJs($block->getJsObjectName()) ?>.reloadParams = {};
+            {$block->escapeJs($block->getJsObjectName())}.reloadParams = params;
+            {$block->escapeJs($block->getJsObjectName())}.reload();
+            {$block->escapeJs($block->getJsObjectName())}.reloadParams = {};
         },
 
         configureItem: function (itemId) {
-            productConfigure.setOnLoadIFrameCallback('<?= $block->escapeJs($listType) ?>', this.cbOnLoadIframe.bind(this));
-            productConfigure.showItemConfiguration('<?= $block->escapeJs($listType) ?>', itemId);
+            productConfigure.setOnLoadIFrameCallback('{$block->escapeJs($listType)}', this.cbOnLoadIframe.bind(this));
+            productConfigure.showItemConfiguration('{$block->escapeJs($listType)}', itemId);
             return false;
         },
 
@@ -53,14 +55,14 @@
 
             if (!itemId) {
                 alert({
-                    content: '<?= $block->escapeJs(__('No item specified.')) ?>'
+                    content: '{$block->escapeJs(__('No item specified.'))}'
                 });
 
                 return false;
             }
 
             confirm({
-                content: '<?= $block->escapeJs(__('Are you sure you want to remove this item?')) ?>',
+                content: '{$block->escapeJs(__('Are you sure you want to remove this item?'))}',
                 actions: {
                     confirm: function(){
                         self.reload({'delete':itemId});
@@ -70,21 +72,24 @@
         }
     };
 
-    <?php
+script;
+
     $params = [
         'customer_id' => $block->getCustomerId(),
         'website_id' => $block->getWebsiteId(),
     ];
-    ?>
+    $scriptString .= <<<script
     productConfigure.addListType(
-        '<?= $block->escapeJs($listType) ?>',
+        '{$block->escapeJs($listType)}',
         {
-            urlFetch: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('customer/cart_product_composite_cart/configure', $params))) ?>',
-            urlConfirm: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('customer/cart_product_composite_cart/update', $params))) ?>'
+            urlFetch: '{$block->escapeJs($block->getUrl('customer/cart_product_composite_cart/configure', $params))}',
+            urlConfirm: '{$block->escapeJs($block->getUrl('customer/cart_product_composite_cart/update', $params))}'
         }
     );
 
     });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif ?>
 <br />
diff --git a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml
index e7519c7c3320b..7f09361e4d505 100644
--- a/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/address/edit.phtml
@@ -7,6 +7,7 @@
 /** @var \Magento\Customer\Block\Address\Edit $block */
 /** @var \Magento\Customer\ViewModel\Address $viewModel */
 /** @var \Magento\Framework\Escaper $escaper */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 $viewModel = $block->getViewModel();
 ?>
 <?php $_company = $block->getLayout()->createBlock(\Magento\Customer\Block\Widget\Company::class) ?>
@@ -152,9 +153,10 @@ $viewModel = $block->getViewModel();
                        id="zip"
                        class="input-text validate-zip-international
                         <?= $escaper->escapeHtmlAttr($_postcodeValidationClass) ?>">
-                <div role="alert" class="message warning" style="display:none">
+                <div role="alert" class="message warning">
                     <span></span>
                 </div>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div.message.warning') ?>
             </div>
         </div>
 
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
index 89b86f8af8e55..5b877500aa0c8 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/edit.phtml
@@ -7,6 +7,7 @@
 use Magento\Customer\Block\Widget\Name;
 
 /** @var \Magento\Customer\Block\Form\Edit $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <form class="form form-edit-account"
       action="<?= $block->escapeUrl($block->getUrl('customer/account/editPost')) ?>"
@@ -117,16 +118,19 @@ use Magento\Customer\Block\Widget\Name;
         </div>
     </div>
 </form>
-<script>
+<?php $ignore = /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null';
+$scriptString = <<<script
     require([
         "jquery",
         "mage/mage"
     ], function($){
         var dataForm = $('#form-validate');
-        var ignore = <?= /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null' ?>;
+        var ignore = {$ignore};
 
         dataForm.mage('validation', {
-        <?php if ($_dob->isEnabled()): ?>
+script;
+if ($_dob->isEnabled()):
+    $scriptString .= <<<script
             errorPlacement: function(error, element) {
                 if (element.prop('id').search('full') !== -1) {
                     var dobElement = $(element).parents('.customer-dob'),
@@ -140,13 +144,19 @@ use Magento\Customer\Block\Widget\Name;
                 }
             },
             ignore: ':hidden:not(' + ignore + ')'
-        <?php else: ?>
+script;
+else:
+    $scriptString .= <<<script
             ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden'
-        <?php endif ?>
+script;
+endif;
+$scriptString .= <<<script
         });
 
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php $changeEmailAndPasswordTitle = $block->escapeHtml(__('Change Email and Password')) ?>
 <script type="text/x-magento-init">
     {
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
index f7d10f6df1728..7ae8d963aafbb 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
@@ -3,13 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 
 use Magento\Customer\Helper\Address;
 
 /** @var \Magento\Customer\Block\Form\Register $block */
 /** @var \Magento\Framework\Escaper $escaper */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+$addressHelper = $block->getData('adressHelper');
 $formData = $block->getFormData();
 ?>
 <?php $displayAll = $block->getConfig('general/region/display_all'); ?>
@@ -65,9 +66,9 @@ $formData = $block->getFormData();
         <?php endif ?>
     </fieldset>
     <?php if ($block->getShowAddressFields()): ?>
-        <?php $cityValidationClass = $this->helper(Address::class)->getAttributeValidationClass('city'); ?>
-        <?php $postcodeValidationClass = $this->helper(Address::class)->getAttributeValidationClass('postcode'); ?>
-        <?php $regionValidationClass = $this->helper(Address::class)->getAttributeValidationClass('region'); ?>
+        <?php $cityValidationClass = $addressHelper->getAttributeValidationClass('city'); ?>
+        <?php $postcodeValidationClass = $addressHelper->getAttributeValidationClass('postcode'); ?>
+        <?php $regionValidationClass = $addressHelper->getAttributeValidationClass('region'); ?>
         <fieldset class="fieldset address">
             <legend class="legend"><span><?= $escaper->escapeHtml(__('Address Information')) ?></span></legend><br>
             <input type="hidden" name="create_address" value="1" />
@@ -88,8 +89,7 @@ $formData = $block->getFormData();
             <?php endif ?>
 
             <?php
-                $_streetValidationClass = $this->helper(Address::class)
-                    ->getAttributeValidationClass('street');
+                $_streetValidationClass = $addressHelper->getAttributeValidationClass('street');
             ?>
 
             <div class="field street required">
@@ -106,7 +106,7 @@ $formData = $block->getFormData();
                     <div class="nested">
                         <?php
                             $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass));
-                            $streetLines = $this->helper(Address::class)->getStreetLines();
+                            $streetLines = $addressHelper->getStreetLines();
                         ?>
                         <?php for ($_i = 2, $_n = $streetLines; $_i <= $_n; $_i++): ?>
                             <div class="field additional">
@@ -144,19 +144,19 @@ $formData = $block->getFormData();
                     <select id="region_id"
                             name="region_id"
                             title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>"
-                            class="validate-select region_id"
-                            style="display: none;">
+                            class="validate-select region_id">
                         <option value="">
                             <?= $escaper->escapeHtml(__('Please select a region, state or province.')) ?>
                         </option>
                     </select>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'select#region_id') ?>
                     <input type="text"
                            id="region"
                            name="region"
                            value="<?= $escaper->escapeHtml($block->getRegion()) ?>"
                            title="<?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('region') ?>"
-                           class="input-text <?= $escaper->escapeHtmlAttr($regionValidationClass) ?>"
-                           style="display:none;">
+                           class="input-text <?= $escaper->escapeHtmlAttr($regionValidationClass) ?>">
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'input#region') ?>
                 </div>
             </div>
 
@@ -273,17 +273,20 @@ $formData = $block->getFormData();
         </div>
     </div>
 </form>
-<script>
+<?php $ignore = /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null';
+$scriptString = <<<script
 require([
     'jquery',
     'mage/mage'
 ], function($){
 
     var dataForm = $('#form-validate');
-    var ignore = <?= /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null' ?>;
+    var ignore = {$ignore};
 
     dataForm.mage('validation', {
-    <?php if ($_dob->isEnabled()): ?>
+script;
+if ($_dob->isEnabled()):
+    $scriptString .= <<<script
         errorPlacement: function(error, element) {
             if (element.prop('id').search('full') !== -1) {
                 var dobElement = $(element).parents('.customer-dob'),
@@ -297,9 +300,13 @@ require([
             }
         },
         ignore: ':hidden:not(' + ignore + ')'
-    <?php else: ?>
+script;
+else:
+    $scriptString .= <<<script
         ignore: ignore ? ':hidden:not(' + ignore + ')' : ':hidden'
-    <?php endif ?>
+script;
+endif;
+$scriptString .= <<<script
     }).find('input:text').attr('autocomplete', 'off');
     dataForm.submit(function () {
         $(this).find(':submit').attr('disabled', 'disabled');
@@ -309,8 +316,15 @@ require([
     });
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php if ($block->getShowAddressFields()): ?>
+    <?php
+    $regionJson = /* @noEscape */ $addressHelper->getRegionJson();
+    $regionId = (int) $formData->getRegionId();
+    $countriesWithOptionalZip = /* @noEscape */ $addressHelper->getCountriesWithOptionalZip(true);
+    ?>
 <script type="text/x-magento-init">
     {
         "#country": {
@@ -320,11 +334,9 @@ require([
                 "regionInputId": "#region",
                 "postcodeId": "#zip",
                 "form": "#form-validate",
-                "regionJson": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)
-                    ->getRegionJson() ?>,
-                "defaultRegion": "<?= (int) $formData->getRegionId() ?>",
-                "countriesWithOptionalZip": <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)
-                    ->getCountriesWithOptionalZip(true) ?>
+                "regionJson": {$regionJson},
+                "defaultRegion": "{$regionId}",
+                "countriesWithOptionalZip": {$countriesWithOptionalZip}
             }
         }
     }
diff --git a/app/code/Magento/Developer/Model/TemplateEngine/Decorator/DebugHints.php b/app/code/Magento/Developer/Model/TemplateEngine/Decorator/DebugHints.php
index c689bc7aee80a..f331923f4b696 100644
--- a/app/code/Magento/Developer/Model/TemplateEngine/Decorator/DebugHints.php
+++ b/app/code/Magento/Developer/Model/TemplateEngine/Decorator/DebugHints.php
@@ -8,6 +8,10 @@
 
 namespace Magento\Developer\Model\TemplateEngine\Decorator;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Decorates block with block and template hints
  *
@@ -26,20 +30,39 @@ class DebugHints implements \Magento\Framework\View\TemplateEngineInterface
      */
     private $_showBlockHints;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
     /**
      * @param \Magento\Framework\View\TemplateEngineInterface $subject
      * @param bool $showBlockHints Whether to include block into the debugging information or not
+     * @param SecureHtmlRenderer|null $secureRenderer
+     * @param Random|null $random
      */
-    public function __construct(\Magento\Framework\View\TemplateEngineInterface $subject, $showBlockHints)
-    {
+    public function __construct(
+        \Magento\Framework\View\TemplateEngineInterface $subject,
+        $showBlockHints,
+        ?SecureHtmlRenderer $secureRenderer = null,
+        ?Random $random = null
+    ) {
         $this->_subject = $subject;
         $this->_showBlockHints = $showBlockHints;
+        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
      * Insert debugging hints into the rendered block contents
      *
-     * {@inheritdoc}
+     * Insert debugging hints into the rendered block contents
+     * @inheritdoc
      */
     public function render(\Magento\Framework\View\Element\BlockInterface $block, $templateFile, array $dictionary = [])
     {
@@ -60,14 +83,33 @@ public function render(\Magento\Framework\View\Element\BlockInterface $block, $t
      */
     protected function _renderTemplateHints($blockHtml, $templateFile)
     {
-        // @codingStandardsIgnoreStart
-        return <<<HTML
-<div class="debugging-hints" style="position: relative; border: 1px dotted red; margin: 6px 2px; padding: 18px 2px 2px 2px;">
-<div class="debugging-hint-template-file" style="position: absolute; top: 0; padding: 2px 5px; font: normal 11px Arial; background: red; left: 0; color: white; white-space: nowrap;" onmouseover="this.style.zIndex = 999;" onmouseout="this.style.zIndex = 'auto';" title="{$templateFile}">{$templateFile}</div>
+        $hintsId = 'hintsId_' .$this->random->getRandomString(32);
+        $hintsTemplateFileId = 'hintsTemplateFileId_' .$this->random->getRandomString(32);
+
+        $scriptString = <<<HTML
+<div class="debugging-hints" id="{$hintsId}">
+<div class="debugging-hint-template-file" id="{$hintsTemplateFileId}" title="{$templateFile}">{$templateFile}</div>
 {$blockHtml}
 </div>
 HTML;
-        // @codingStandardsIgnoreEnd
+
+        return $scriptString .
+            $this->secureRenderer->renderStyleAsTag(
+                "position: relative; border: 1px dotted red; margin: 6px 2px; padding: 18px 2px 2px 2px;",
+                '#' . $hintsId
+            ) . $this->secureRenderer->renderStyleAsTag(
+                "position: absolute; top: 0; padding: 2px 5px; font: normal 11px Arial; background: red; left: 0;" .
+                " color: white; white-space: nowrap;",
+                '#' . $hintsTemplateFileId
+            ) . $this->secureRenderer->renderEventListenerAsTag(
+                'onmouseover',
+                "this.style.zIndex = 999;",
+                '#' . $hintsTemplateFileId
+            ) . $this->secureRenderer->renderEventListenerAsTag(
+                'onmouseout',
+                "this.style.zIndex = 'auto';",
+                '#' . $hintsTemplateFileId
+            );
     }
 
     /**
@@ -80,11 +122,25 @@ protected function _renderTemplateHints($blockHtml, $templateFile)
     protected function _renderBlockHints($blockHtml, \Magento\Framework\View\Element\BlockInterface $block)
     {
         $blockClass = get_class($block);
-        // @codingStandardsIgnoreStart
-        return <<<HTML
-<div class="debugging-hint-block-class" style="position: absolute; top: 0; padding: 2px 5px; font: normal 11px Arial; background: red; right: 0; color: blue; white-space: nowrap;" onmouseover="this.style.zIndex = 999;" onmouseout="this.style.zIndex = 'auto';" title="{$blockClass}">{$blockClass}</div>
+        $hintsId = 'hintsBlockId_' .$this->random->getRandomString(32);
+        $scriptString = <<<HTML
+<div class="debugging-hint-block-class" id="{$hintsId}" title="{$blockClass}">{$blockClass}</div>
 {$blockHtml}
 HTML;
-        // @codingStandardsIgnoreEnd
+
+        return $scriptString .
+            $this->secureRenderer->renderStyleAsTag(
+                "position: absolute; top: 0; padding: 2px 5px; font: normal 11px Arial; background: red; right: 0;" .
+                " color: blue; white-space: nowrap;",
+                '#' . $hintsId
+            ) . $this->secureRenderer->renderEventListenerAsTag(
+                'onmouseover',
+                "this.style.zIndex = 999;",
+                '#' . $hintsId
+            ) . $this->secureRenderer->renderEventListenerAsTag(
+                'onmouseout',
+                "this.style.zIndex = 'auto';",
+                '#' . $hintsId
+            );
     }
 }
diff --git a/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml b/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml
index 36ff8138f3955..5ad46f13af90a 100644
--- a/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml
+++ b/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml
@@ -5,24 +5,24 @@
  */
 /**
  * @var \Magento\Dhl\Block\Adminhtml\Unitofmeasure $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<script>
+
+<?php $scriptString = <<<script
     //<![CDATA[
     require(["prototype"], function(){
         function changeDimensions() {
-            var dimensionUnit = "(<?= $block->escapeHtml($block->getInch()) ?>)";
-            var dhlUnitOfMeasureNote = "<?= $block->escapeHtml($block->getDivideOrderWeightNoteLbp()) ?>";
+            var dimensionUnit = "({$block->escapeHtml($block->getInch())})";
+            var dhlUnitOfMeasureNote = "{$block->escapeHtml($block->getDivideOrderWeightNoteLbp())}";
             if ($("carriers_dhl_unit_of_measure").value == "K") {
-                dimensionUnit = "(<?= $block->escapeHtml($block->getCm()) ?>)";
-                dhlUnitOfMeasureNote = "<?= $block->escapeHtml($block->getDivideOrderWeightNoteKg()) ?>";
+                dimensionUnit = "({$block->escapeHtml($block->getCm())})";
+                dhlUnitOfMeasureNote = "{$block->escapeHtml($block->getDivideOrderWeightNoteKg())}";
             }
-            $$('[for="carriers_dhl_height"]')[0].innerHTML = "<?=
-                $block->escapeHtml($block->getHeight()); ?> " + dimensionUnit;
-            $$('[for="carriers_dhl_depth"]')[0].innerHTML = "<?=
-                $block->escapeHtml($block->getDepth()); ?> " + dimensionUnit;
-            $$('[for="carriers_dhl_width"]')[0].innerHTML = "<?=
-                $block->escapeHtml($block->getWidth()); ?> " + dimensionUnit;
+            $$('[for="carriers_dhl_height"]')[0].innerHTML = "{$block->escapeHtml($block->getHeight())} " +
+             dimensionUnit;
+            $$('[for="carriers_dhl_depth"]')[0].innerHTML = "{$block->escapeHtml($block->getDepth())} " + dimensionUnit;
+            $$('[for="carriers_dhl_width"]')[0].innerHTML = "{$block->escapeHtml($block->getWidth())} " + dimensionUnit;
 
             $("carriers_dhl_divide_order_weight").next().down().innerHTML = dhlUnitOfMeasureNote;
         }
@@ -33,4 +33,6 @@
         });
     });
     //]]>
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml b/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml
index 524c86fbaf604..900a6a2775863 100644
--- a/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml
+++ b/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml
@@ -10,15 +10,23 @@
  * @see \Magento\Backend\Block\Template
  */
 
+/**
+ * @var \Magento\Backend\Block\Template $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<script>
+<?php
+$directoryHelper = $block->getData('directoryHelper');
+$countriesWithOptionalZip = /* @noEscape */ $directoryHelper->getCountriesWithOptionalZip(true);
+$scriptString = <<<script
+
 require([
     "prototype",
     "mage/adminhtml/events"
 ], function(){
 
 //<![CDATA[
-optionalZipCountries = <?= /* @noEscape */ $this->helper(\Magento\Directory\Helper\Data::class)->getCountriesWithOptionalZip(true) ?>;
+optionalZipCountries = {$countriesWithOptionalZip};
 
 function onAddressCountryChanged (countryElement) {
     var zipElementId = countryElement.id.replace(/country_id/, 'postcode');
@@ -55,4 +63,6 @@ window.optionalZipCountries = optionalZipCountries;
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
index fced70593704c..e252c42b970b7 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
@@ -8,6 +8,7 @@
 
 use Magento\Downloadable\Model\Link;
 use Magento\Downloadable\Model\Link\Purchased;
+use Magento\Framework\App\ObjectManager;
 use Magento\Store\Model\ScopeInterface;
 
 /**
@@ -55,10 +56,13 @@ public function __construct(
     ) {
         $this->_purchasedFactory = $purchasedFactory;
         $this->_itemsFactory = $itemsFactory;
+        $data['catalogHelper'] = ObjectManager::getInstance()->get(\Magento\Catalog\Helper\Data::class);
         parent::__construct($context, $stockRegistry, $stockConfiguration, $registry, $optionFactory, $data);
     }
 
     /**
+     * Return purchased links.
+     *
      * @return Purchased
      */
     public function getLinks()
@@ -73,6 +77,8 @@ public function getLinks()
     }
 
     /**
+     * Retunrn links title.
+     *
      * @return null|string
      */
     public function getLinksTitle()
diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml
index 94c8405c718a8..422fda2ddc127 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml
@@ -3,42 +3,51 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
+/**
+ * @var \Magento\Downloadable\Block\Adminhtml\Sales\Items\Column\Downloadable\Name $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 
-<?php if ($_item = $block->getItem()) : ?>
+<?php $catalogHelper = $block->getData('catalogHelper');
+if ($_item = $block->getItem()): ?>
     <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
-    <div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong> <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($block->getSku())) ?></div>
-    <?php if ($block->getOrderOptions()) : ?>
+    <div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong>
+        <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($block->getSku())) ?></div>
+    <?php if ($block->getOrderOptions()): ?>
         <dl class="item-options">
-        <?php foreach ($block->getOrderOptions() as $_option) : ?>
+        <?php foreach ($block->getOrderOptions() as $_option): ?>
             <dt><?= $block->escapeHtml($_option['label']) ?></dt>
             <dd>
-            <?php if (isset($_option['custom_view']) && $_option['custom_view']) : ?>
+            <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                 <?= $block->escapeHtml($_option['value']) ?>
-            <?php else : ?>
+            <?php else: ?>
                 <?= $block->escapeHtml($block->truncateString($_option['value'], 55, '', $_remainder)) ?>
-                <?php if ($_remainder) :?>
-                    ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                    <script>
+                <?php if ($_remainder):?>
+                    ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>">
+                        <?= $block->escapeHtml($_remainder) ?>
+                    </span>
+                    <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                    $scriptString = <<<script
                         require(['prototype'], function(){
-                            <?php $escapedId = $block->escapeJs($_id) ?>
-                            $('<?= /* @noEscape */ $escapedId ?>').hide();
-                            $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                            $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
-
+                            $('{$escapedId}').hide();
+                            $('{$escapedId}').up().observe('mouseover', function(){ $('{$escapedId}').show();});
+                            $('{$escapedId}').up().observe('mouseout',  function(){ $('{$escapedId}').hide();});
                         });
-                    </script>
+script;
+                    ?>
+                    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <?php endif;?>
             <?php endif;?>
             </dd>
         <?php endforeach; ?>
         </dl>
     <?php endif; ?>
-    <?php if ($block->getLinks()) : ?>
+    <?php if ($block->getLinks()): ?>
         <dl class="item-options">
             <dt><?= $block->escapeHtml($block->getLinksTitle()) ?></dt>
-            <?php foreach ($block->getLinks()->getPurchasedItems() as $_link) : ?>
+            <?php foreach ($block->getLinks()->getPurchasedItems() as $_link): ?>
                 <dd><?= $block->escapeHtml($_link->getLinkTitle()) ?></dd>
             <?php endforeach; ?>
         </dl>
diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml
index 9a45066f64d15..71cd03132c27c 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml
@@ -3,42 +3,53 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
+/** @var \Magento\Downloadable\Block\Adminhtml\Sales\Items\Column\Downloadable\Name $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php if ($_item = $block->getItem()) : ?>
+<?php $catalogHelper = $block->getData('catalogHelper');
+if ($_item = $block->getItem()): ?>
     <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
-    <div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong> <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($block->getSku())) ?></div>
-    <?php if ($block->getOrderOptions()) : ?>
+    <div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong>
+        <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($block->getSku())) ?></div>
+    <?php if ($block->getOrderOptions()): ?>
         <dl class="item-options">
-        <?php foreach ($block->getOrderOptions() as $_option) : ?>
+        <?php foreach ($block->getOrderOptions() as $_option): ?>
             <dt><?= $block->escapeHtml($_option['label']) ?></dt>
             <dd>
-            <?php if (isset($_option['custom_view']) && $_option['custom_view']) : ?>
+            <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                 <?= $block->escapeHtml($_option['value']) ?>
-            <?php else : ?>
+            <?php else: ?>
                 <?= $block->escapeHtml($block->truncateString($_option['value'], 55, '', $_remainder)) ?>
-                <?php if ($_remainder) :?>
-                    ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                    <script>
+                <?php if ($_remainder):?>
+                    ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>">
+                        <?= $block->escapeHtml($_remainder) ?>
+                    </span>
+                    <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                    $scriptString = <<<script
                         require(['prototype'], function(){
-                            <?php $escapedId = $block->escapeJs($_id) ?>
-                            $('<?= /* @noEscape */ $escapedId ?>').hide();
-                            $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                            $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                            $('{$escapedId}').hide();
+                            $('{$escapedId}').up().observe('mouseover', function(){ $('{$escapedId}').show();});
+                            $('{$escapedId}').up().observe('mouseout',  function(){ $('{$escapedId}').hide();});
                         });
-                    </script>
+script;
+                    ?>
+                    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <?php endif;?>
             <?php endif;?>
             </dd>
         <?php endforeach; ?>
         </dl>
     <?php endif; ?>
-    <?php if ($block->getLinks()) : ?>
+    <?php if ($block->getLinks()): ?>
         <dl class="item-options">
             <dt><?= $block->escapeHtml($block->getLinksTitle()) ?></dt>
-            <?php foreach ($block->getLinks()->getPurchasedItems() as $_link) : ?>
-                <dd><?= $block->escapeHtml($_link->getLinkTitle()) ?> (<?= $block->escapeHtml($_link->getNumberOfDownloadsBought() ? $_link->getNumberOfDownloadsBought() : __('Unlimited')) ?>)</dd>
+            <?php foreach ($block->getLinks()->getPurchasedItems() as $_link): ?>
+                <dd><?= $block->escapeHtml($_link->getLinkTitle()) ?>
+                    (<?= $block->escapeHtml($_link->getNumberOfDownloadsBought() ?
+                        $_link->getNumberOfDownloadsBought() : __('Unlimited')) ?>)
+                </dd>
             <?php endforeach; ?>
         </dl>
     <?php endif; ?>
diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
index b5fe7b3385630..2244f1e1de108 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
@@ -3,45 +3,55 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
+/** @var \Magento\Downloadable\Block\Adminhtml\Sales\Items\Column\Downloadable\Name $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php if ($_item = $block->getItem()) : ?>
+<?php $catalogHelper = $block->getData('catalogHelper');
+if ($_item = $block->getItem()): ?>
     <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
     <div class="product-sku-block">
         <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-        <?= /* @noEscape */ implode('<br />', $this->helper(Magento\Catalog\Helper\Data::class)->splitSku($block->getSku())) ?>
+        <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($block->getSku())) ?>
     </div>
-    <?php if ($block->getOrderOptions()) : ?>
+    <?php if ($block->getOrderOptions()): ?>
         <dl class="item-options">
-        <?php foreach ($block->getOrderOptions() as $_option) : ?>
+        <?php foreach ($block->getOrderOptions() as $_option): ?>
             <dt><?= $block->escapeHtml($_option['label']) ?>:</dt>
             <dd>
-            <?php if (isset($_option['custom_view']) && $_option['custom_view']) : ?>
+            <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                 <?= $block->escapeHtml($_option['value']) ?>
-            <?php else : ?>
+            <?php else: ?>
                 <?= $block->escapeHtml($block->truncateString($_option['value'], 55, '', $_remainder)) ?>
-                <?php if ($_remainder) :?>
-                    ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>"><?= $block->escapeHtml($_remainder) ?></span>
-                    <script>
+                <?php if ($_remainder):?>
+                    ... <span id="<?= $block->escapeHtmlAttr($_id = 'id' . uniqid()) ?>">
+                        <?= $block->escapeHtml($_remainder) ?>
+                    </span>
+                    <?php $escapedId = /* @noEscape */ $block->escapeJs($_id);
+                    $scriptString = <<<script
                         require(['prototype'], function(){
-                            <?php $escapedId = $block->escapeJs($_id) ?>
-                            $('<?= /* @noEscape */ $escapedId ?>').hide();
-                            $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $escapedId ?>').show();});
-                            $('<?= /* @noEscape */ $escapedId ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $escapedId ?>').hide();});
+                            $('{$escapedId}').hide();
+                            $('{$escapedId}').up().observe('mouseover', function(){ $('{$escapedId}').show();});
+                            $('{$escapedId}').up().observe('mouseout',  function(){ $('{$escapedId}').hide();});
                         });
-                    </script>
+script;
+                    ?>
+                    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <?php endif;?>
             <?php endif;?>
             </dd>
         <?php endforeach; ?>
         </dl>
     <?php endif; ?>
-    <?php if ($block->getLinks()) : ?>
+    <?php if ($block->getLinks()): ?>
         <dl class="item-options">
             <dt><?= $block->escapeHtml($block->getLinksTitle()) ?>:</dt>
-            <?php foreach ($block->getLinks()->getPurchasedItems() as $_link) : ?>
-                <dd><?= $block->escapeHtml($_link->getLinkTitle()) ?> (<?= $block->escapeHtml($_link->getNumberOfDownloadsUsed() . ' / ' . ($_link->getNumberOfDownloadsBought() ? $_link->getNumberOfDownloadsBought() : __('U'))) ?>)</dd>
+            <?php foreach ($block->getLinks()->getPurchasedItems() as $_link): ?>
+                <dd><?= $block->escapeHtml($_link->getLinkTitle()) ?>
+                    (<?= $block->escapeHtml($_link->getNumberOfDownloadsUsed() . ' / ' .
+                        ($_link->getNumberOfDownloadsBought() ? $_link->getNumberOfDownloadsBought() : __('U'))) ?>)
+                </dd>
             <?php endforeach; ?>
         </dl>
     <?php endif; ?>
diff --git a/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml b/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml
index eca72b3500924..4935743c2de7d 100644
--- a/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml
+++ b/app/code/Magento/Downloadable/view/frontend/templates/customer/products/list.phtml
@@ -3,14 +3,16 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-?>
-<?php
+
+use Magento\Downloadable\Model\Link\Purchased\Item;
+
 /**
  * @var $block \Magento\Downloadable\Block\Customer\Products\ListProducts
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php $_items = $block->getItems(); ?>
-<?php if (count($_items)) : ?>
+<?php if (count($_items)): ?>
     <div class="table-wrapper downloadable-products">
         <table id="my-downloadable-products-table" class="data table table-downloadable-products">
             <caption class="table-caption"><?= $block->escapeHtml(__('Downloadable Products')) ?></caption>
@@ -24,35 +26,57 @@
                 </tr>
             </thead>
             <tbody>
-            <?php foreach ($_items as $_item) : ?>
+            <?php foreach ($_items as $_item): ?>
                 <tr>
                     <td data-th="<?= $block->escapeHtmlAttr(__('Order #')) ?>" class="col id">
-                        <a href="<?= $block->escapeUrl($block->getOrderViewUrl($_item->getPurchased()->getOrderId())) ?>"
+                        <a href="<?= $block->escapeUrl($block->getOrderViewUrl($_item->getPurchased()->getOrderId()))?>"
                             title="<?= $block->escapeHtml(__('View Order')) ?>">
                             <?= $block->escapeHtml($_item->getPurchased()->getOrderIncrementId()) ?>
                         </a>
                     </td>
-                    <td data-th="<?= $block->escapeHtmlAttr(__('Date')) ?>" class="col date"><?= $block->escapeHtml($block->formatDate($_item->getPurchased()->getCreatedAt())) ?></td>
+                    <td data-th="<?= $block->escapeHtmlAttr(__('Date')) ?>" class="col date">
+                        <?= $block->escapeHtml($block->formatDate($_item->getPurchased()->getCreatedAt())) ?>
+                    </td>
                     <td data-th="<?= $block->escapeHtmlAttr(__('Title')) ?>" class="col title">
-                        <strong class="product-name"><?= $block->escapeHtml($_item->getPurchased()->getProductName()) ?></strong>
-                        <?php if ($_item->getStatus() == \Magento\Downloadable\Model\Link\Purchased\Item::LINK_STATUS_AVAILABLE) : ?>
-                        <a href="<?= $block->escapeUrl($block->getDownloadUrl($_item)) ?>" title="<?= $block->escapeHtmlAttr(__('Start Download')) ?>" class="action download" <?= /* @noEscape */ $block->getIsOpenInNewWindow() ? 'onclick="this.target=\'_blank\'"' : '' ?>><?= $block->escapeHtml($_item->getLinkTitle()) ?></a>
+                        <strong class="product-name">
+                            <?= $block->escapeHtml($_item->getPurchased()->getProductName()) ?>
+                        </strong>
+                        <?php if ($_item->getStatus() == Item::LINK_STATUS_AVAILABLE): ?>
+                            <a href="<?= $block->escapeUrl($block->getDownloadUrl($_item)) ?>"
+                               id="download_<?= /* @noEscape */ $_item->getPurchased()->getProductId() ?>"
+                               title="<?= $block->escapeHtmlAttr(__('Start Download')) ?>"
+                               class="action download">
+                                <?= $block->escapeHtml($_item->getLinkTitle()) ?>
+                            </a>
+                            <?php if ($block->getIsOpenInNewWindow()): ?>
+                                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                    'onclick',
+                                    "this.target='_blank'",
+                                    'a#download_' . $_item->getPurchased()->getProductId()
+                                ) ?>
+                            <?php endif; ?>
                         <?php endif; ?>
                     </td>
-                    <td data-th="<?= $block->escapeHtmlAttr(__('Status')) ?>" class="col status"><?= $block->escapeHtml(__(ucfirst($_item->getStatus()))) ?></td>
-                    <td data-th="<?= $block->escapeHtmlAttr(__('Remaining Downloads')) ?>" class="col remaining"><?= $block->escapeHtml($block->getRemainingDownloads($_item)) ?></td>
+                    <td data-th="<?= $block->escapeHtmlAttr(__('Status')) ?>" class="col status">
+                        <?= $block->escapeHtml(__(ucfirst($_item->getStatus()))) ?>
+                    </td>
+                    <td data-th="<?= $block->escapeHtmlAttr(__('Remaining Downloads')) ?>" class="col remaining">
+                        <?= $block->escapeHtml($block->getRemainingDownloads($_item)) ?>
+                    </td>
                 </tr>
             <?php endforeach; ?>
             </tbody>
         </table>
     </div>
-    <?php if ($block->getChildHtml('pager')) : ?>
+    <?php if ($block->getChildHtml('pager')): ?>
         <div class="toolbar downloadable-products-toolbar bottom">
             <?= $block->getChildHtml('pager') ?>
         </div>
     <?php endif; ?>
-<?php else : ?>
-    <div class="message info empty"><span><?= $block->escapeHtml(__('You have not purchased any downloadable products yet.')) ?></span></div>
+<?php else: ?>
+    <div class="message info empty">
+        <span><?= $block->escapeHtml(__('You have not purchased any downloadable products yet.')) ?></span>
+    </div>
 <?php endif; ?>
 
 <div class="actions-toolbar">
diff --git a/app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php b/app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php
index 2cd3ea42649c1..ec97d462c0f74 100644
--- a/app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php
+++ b/app/code/Magento/Email/Block/Adminhtml/Template/Edit/Form.php
@@ -9,8 +9,13 @@
  */
 namespace Magento\Email\Block\Adminhtml\Template\Edit;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Adminhtml email template edit form block
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Form extends \Magento\Backend\Block\Widget\Form\Generic
 {
@@ -29,6 +34,11 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      */
     private $serializer;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Framework\Registry $registry
@@ -37,6 +47,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Variable\Model\Source\Variables $variables
      * @param array $data
      * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
+     * @param SecureHtmlRenderer|null $secureRenderer
      * @throws \RuntimeException
      */
     public function __construct(
@@ -46,12 +57,14 @@ public function __construct(
         \Magento\Variable\Model\VariableFactory $variableFactory,
         \Magento\Variable\Model\Source\Variables $variables,
         array $data = [],
-        \Magento\Framework\Serialize\Serializer\Json $serializer = null
+        \Magento\Framework\Serialize\Serializer\Json $serializer = null,
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_variableFactory = $variableFactory;
         $this->_variables = $variables;
         $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
             ->get(\Magento\Framework\Serialize\Serializer\Json::class);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
         parent::__construct($context, $registry, $formFactory, $data);
     }
 
@@ -93,11 +106,16 @@ protected function _prepareForm()
             [
                 'label' => __('Currently Used For'),
                 'container_id' => 'currently_used_for',
-                'after_element_html' => '<script>require(["prototype"], function () {' .
-                (!$this->getEmailTemplate()->getSystemConfigPathsWhereCurrentlyUsed() ? '$(\'' .
-                'currently_used_for' .
-                '\').hide(); ' : '') .
-                '});</script>'
+                'after_element_html' => $this->secureRenderer->renderTag(
+                    'script',
+                    [],
+                    'require(["prototype"], function () {' .
+                    (!$this->getEmailTemplate()->getSystemConfigPathsWhereCurrentlyUsed() ? '$(\'' .
+                    'currently_used_for' .
+                    '\').hide(); ' : '') .
+                    '});',
+                    false
+                ),
             ]
         );
 
diff --git a/app/code/Magento/Email/view/adminhtml/templates/preview/iframeswitcher.phtml b/app/code/Magento/Email/view/adminhtml/templates/preview/iframeswitcher.phtml
index 29ceb71a138e4..900c527dcff17 100644
--- a/app/code/Magento/Email/view/adminhtml/templates/preview/iframeswitcher.phtml
+++ b/app/code/Magento/Email/view/adminhtml/templates/preview/iframeswitcher.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var \Magento\Backend\Block\Page $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="preview" class="cms-revision-preview">
     <iframe name="preview_iframe"
@@ -20,12 +21,12 @@
           target="preview_iframe"
     >
     <input type="hidden" name="form_key" value="<?= /* @noEscape */ $block->getFormKey() ?>" />
-    <?php foreach ($block->getPreviewFormViewModel()->getFormFields() as $name => $value) : ?>
+    <?php foreach ($block->getPreviewFormViewModel()->getFormFields() as $name => $value): ?>
         <input type="hidden" name="<?= $block->escapeHtmlAttr($name) ?>" value="<?= $block->escapeHtmlAttr($value) ?>"/>
     <?php endforeach; ?>
     </form>
 </div>
-<script>
+<?php $scriptString = <<<script
 require([
     'jquery'
 ], function($) {
@@ -37,4 +38,6 @@ require([
         $(this).height($(this).contents().height());
     });
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml
index 7378fa4b2e47f..fef2da0ed33dd 100644
--- a/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml
+++ b/app/code/Magento/Email/view/adminhtml/templates/template/edit.phtml
@@ -7,24 +7,30 @@
 use Magento\Framework\App\TemplateTypesInterface;
 
 /** @var $block \Magento\Email\Block\Adminhtml\Template\Edit */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if (!$block->getEditMode()) : ?>
+<?php if (!$block->getEditMode()): ?>
 <form action="<?= $block->escapeUrl($block->getLoadUrl()) ?>" method="post" id="email_template_load_form">
     <?= $block->getBlockHtml('formkey') ?>
     <fieldset class="admin__fieldset form-inline">
         <legend class="admin__legend"><span><?= $block->escapeHtml(__('Load Default Template')) ?></span></legend><br>
         <div class="admin__field required">
-            <label class="admin__field-label" for="template_select"><span><?= $block->escapeHtml(__('Template')) ?></span></label>
+            <label class="admin__field-label" for="template_select">
+                <span><?= $block->escapeHtml(__('Template')) ?></span>
+            </label>
             <div class="admin__field-control">
                 <select id="template_select" name="code" class="admin__control-select required-entry">
-                    <?php foreach ($block->getTemplateOptions() as $group => $options) : ?>
-                        <?php if ($group) : ?>
+                    <?php foreach ($block->getTemplateOptions() as $group => $options): ?>
+                        <?php if ($group): ?>
                             <optgroup label="<?= $block->escapeHtmlAttr($group) ?>">
                         <?php endif; ?>
-                        <?php foreach ($options as $option) : ?>
-                            <option value="<?= $block->escapeHtmlAttr($option['value']) ?>"<?= /* @noEscape */ $block->getOrigTemplateCode() == $option['value'] ? ' selected="selected"' : '' ?>><?= $block->escapeHtml($option['label']) ?></option>
+                        <?php foreach ($options as $option): ?>
+                            <option value="<?= $block->escapeHtmlAttr($option['value']) ?>"
+                                <?= /* @noEscape */ $block->getOrigTemplateCode() == $option['value'] ?
+                                    ' selected="selected"' : '' ?>><?= $block->escapeHtml($option['label']) ?>
+                            </option>
                         <?php endforeach; ?>
-                        <?php if ($group) : ?>
+                        <?php if ($group): ?>
                             </optgroup>
                         <?php endif; ?>
                     <?php endforeach; ?>
@@ -44,19 +50,26 @@ use Magento\Framework\App\TemplateTypesInterface;
 <form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="email_template_edit_form">
     <?= /* @noEscape */ $block->getBlockHtml('formkey') ?>
     <input type="hidden" id="change_flag_element" name="_change_type_flag" value="" />
-    <input type="hidden" id="orig_template_code" name="orig_template_code" value="<?= $block->escapeHtmlAttr($block->getOrigTemplateCode()) ?>" />
+    <input type="hidden" id="orig_template_code" name="orig_template_code"
+           value="<?= $block->escapeHtmlAttr($block->getOrigTemplateCode()) ?>" />
     <?= /* @noEscape */ $block->getFormHtml() ?>
 </form>
 
-<form action="<?= $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="email_template_preview_form" target="_blank">
+<form action="<?= $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="email_template_preview_form"
+      target="_blank">
     <?= /* @noEscape */ $block->getBlockHtml('formkey') ?>
     <div class="no-display">
-        <input type="hidden" id="preview_type" name="type" value="<?= /* @noEscape */ $block->isTextType() ? 1 : 2 ?>" />
+        <input type="hidden" id="preview_type" name="type" value="<?= /* @noEscape */ $block->isTextType() ? 1 : 2 ?>"/>
         <input type="hidden" id="preview_text" name="text" value="" />
         <input type="hidden" id="preview_styles" name="styles" value="" />
     </div>
 </form>
-<script>
+<?php
+$currentlyUsedForPaths = /* @noEscape */ $block->getCurrentlyUsedForPaths();
+$templateType = (int)$block->getTemplateType();
+$typeText = /* @noEscape */ TemplateTypesInterface::TYPE_TEXT;
+$scriptString = <<<script
+
 require([
     "jquery",
     "wysiwygAdapter",
@@ -92,7 +105,7 @@ require([
 
             this.bindEvents();
 
-            this.renderPaths(<?= /* @noEscape */ $block->getCurrentlyUsedForPaths() ?>, 'currently_used_for');
+            this.renderPaths({$currentlyUsedForPaths}, 'currently_used_for');
         },
 
         bindEvents: function(){
@@ -115,7 +128,7 @@ require([
 
         stripTags: function () {
             confirm({
-                content: "<?= $block->escapeJs($block->escapeHtml(__('Are you sure you want to strip tags?'))) ?>",
+                content: "{$block->escapeJs(__('Are you sure you want to strip tags?'))}",
                 actions: {
                     confirm: function () {
                         this.unconvertedText = $('template_text').value;
@@ -149,9 +162,9 @@ require([
         },
         preview: function() {
             if (this.typeChange) {
-                $('preview_type').value = <?= /* @noEscape */ TemplateTypesInterface::TYPE_TEXT ?>;
+                $('preview_type').value = {$typeText};
             } else {
-                $('preview_type').value = <?= (int) $block->getTemplateType() ?>;
+                $('preview_type').value = {$templateType};
             }
 
             if (typeof tinyMCE == 'undefined' || !tinyMCE.get('template_text')) {
@@ -171,10 +184,10 @@ require([
 
         deleteTemplate: function() {
             confirm({
-                content: "<?= $block->escapeJs($block->escapeHtml(__('Are you sure you want to delete this template?'))) ?>",
+                content: "{$block->escapeJs(__('Are you sure you want to delete this template?'))}",
                 actions: {
                     confirm: function () {
-                        window.location.href = '<?= $block->escapeJs($block->escapeUrl($block->getDeleteUrl())) ?>';
+                        window.location.href = '{$block->escapeJs($block->getDeleteUrl())}';
                     }
                 }
             });
@@ -193,7 +206,7 @@ require([
                area: $('email_template_load_form'),
                onComplete: function (transport) {
                    if (transport.responseText.isJSON()) {
-                       var fields = $H(transport.responseText.evalJSON());
+                       var fields = \$H(transport.responseText.evalJSON());
                        fields.each(function(pair) {
                           if ($(pair.key)) {
                               $(pair.key).value = pair.value.strip();
@@ -221,7 +234,9 @@ require([
                        }.bind(this));
                    } else {
                        alert({
-                           content: '<?= $block->escapeJs($block->escapeHtml(__('The template did not load. Please review the log for details.'))) ?>'
+                           content: '{$block->escapeJs(__(
+                               'The template did not load. Please review the log for details.'
+                            ))}'
                        });
                    }
                }.bind(this)
@@ -232,7 +247,8 @@ require([
         renderPaths: function(paths, fieldId) {
             var field = $(fieldId);
             if (field) {
-                field.down('div').down('div').update(this.parsePath(paths, '<span class="path-delimiter"> -> </span>', '<br />'));
+                field.down('div').down('div')
+                .update(this.parsePath(paths, '<span class="path-delimiter"> -> </span>', '<br />'));
             }
         },
 
@@ -246,7 +262,8 @@ require([
             }
 
             if(!Object.isString(value) && value.title) {
-                value = (value.url ? '<a href="' + value.url + '">' + value.title + '</a>' : value.title) + (value.scope ? '  <span class="path-scope-label">(' + value.scope + ')</span>' : '');
+                value = (value.url ? '<a href="' + value.url + '">' + value.title + '</a>' : value.title) +
+                 (value.scope ? '  <span class="path-scope-label">(' + value.scope + ')</span>' : '');
             }
 
             return value;
@@ -274,4 +291,6 @@ require([
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
index 908d6c91bfb5f..397b4db4d811f 100644
--- a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
+++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
@@ -3,26 +3,32 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php if ($block->getChildHtml()) :?>
-<div id="gift_options_configure_new" class="gift-options-popup product-configure-popup" style="display: none;">
+<?php if ($block->getChildHtml()):?>
+<div id="gift_options_configure_new" class="gift-options-popup product-configure-popup">
     <div id="gift_options_form_contents">
         <div class="content">
             <?= $block->getChildHtml() ?>
         </div>
         <div class="ui-dialog-buttonset">
-            <button type="button" class="action-close" id="gift_options_cancel_button"><span><?= $block->escapeHtml(__('Cancel')) ?></span></button>
-            <button type="button" class="action-primary" id="gift_options_ok_button"><span><?= $block->escapeHtml(__('OK')) ?></span></button>
+            <button type="button" class="action-close" id="gift_options_cancel_button">
+                <span><?= $block->escapeHtml(__('Cancel')) ?></span>
+            </button>
+            <button type="button" class="action-primary" id="gift_options_ok_button">
+                <span><?= $block->escapeHtml(__('OK')) ?></span>
+            </button>
         </div>
     </div>
 </div>
-
-<div id="giftoptions_tooltip_window" class="gift-options-tooltip" style="display: none;">
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#gift_options_configure_new') ?>
+<div id="giftoptions_tooltip_window" class="gift-options-tooltip">
     <div id="giftoptions_tooltip_window_content"> </div>
 </div>
-
-<script>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#giftoptions_tooltip_window') ?>
+    <?php $scriptString = <<<script
 require([
     "Magento_Sales/order/create/giftmessage",
     "Magento_Sales/order/giftoptions_tooltip"
@@ -36,5 +42,7 @@ giftOptionsTooltip.setTooltipWindow('giftoptions_tooltip_window','giftoptions_to
 //]]>
 window.giftMessageSet = giftMessageSet;
 });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif;?>
diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml
index 1833ae0d2e339..41b77ad74d148 100644
--- a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml
+++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/create/giftoptions.phtml
@@ -3,24 +3,32 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_item = $block->getItem() ?>
-<?php if ($_item) : ?>
+<?php if ($_item): ?>
     <?php $_childHtml = trim($block->getChildHtml('', false));?>
-    <?php if ($_childHtml) : ?>
+    <?php if ($_childHtml): ?>
         <tr class="row-gift-options">
             <td colspan="7">
-                <a class="action-link" href="#" id="gift_options_link_<?= (int) $_item->getId() ?>"><?= $block->escapeHtml(__('Gift Options')) ?></a>
-                <script>
+                <a class="action-link" href="#" id="gift_options_link_<?= (int) $_item->getId() ?>">
+                    <?= $block->escapeHtml(__('Gift Options')) ?>
+                </a>
+                <?php $itemId = (int) ($_item->getId());
+                $scriptString = <<<script
+
 require([
     "Magento_Sales/order/giftoptions_tooltip"
 ], function(){
 
-    giftOptionsTooltip.addTargetLink('gift_options_link_<?= (int) $_item->getId() ?>', <?= (int) $_item->getId() ?>);
+    giftOptionsTooltip.addTargetLink('gift_options_link_{$itemId}', {$itemId});
 
 });
-</script>
+script;
+                ?>
+                <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                 <div id="gift_options_data_<?= (int) $_item->getId() ?>">
                     <?= /* @noEscape */ $_childHtml ?>
                 </div>
diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml
index 60a6e1b222b17..1c2486d5471e4 100644
--- a/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml
+++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/sales/order/view/giftoptions.phtml
@@ -3,26 +3,30 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_childHtml = trim($block->getChildHtml('', false)); ?>
-<?php if ($_childHtml) : ?>
+<?php if ($_childHtml): ?>
     <?php $_item = $block->getItem() ?>
     <tr>
         <td colspan="10" class="last">
             <a class="action-link" href="#" id="gift_options_link_<?= (int) $_item->getId() ?>">
                 <?= $block->escapeHtml(__('Gift Options')) ?>
             </a>
-            <script>
+            <?php $itemId = (int) ($_item->getId());
+            $scriptString = <<<script
     require([
         "Magento_Sales/order/giftoptions_tooltip"
     ], function(){
         giftOptionsTooltip.addTargetLink(
-            'gift_options_link_<?= (int) ($_item->getId()) ?>',
-            <?= (int) $_item->getId() ?>
+            'gift_options_link_{$itemId}', {$itemId}
         );
     });
-    </script>
+script;
+            ?>
+            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
             <div id="gift_options_data_<?= (int) $_item->getId() ?>">
                 <?= /* @noEscape */ $_childHtml ?>
             </div>
diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
index cb462a630e3a6..45dc79aa99a13 100644
--- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
+++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
@@ -3,73 +3,120 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Squiz.ControlStructures.ControlSignature
-//phpcs:disable Squiz.WhiteSpace.ScopeClosingBrace
-//phpcs:disable PSR2.ControlStructures.SwitchDeclaration
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php $_giftMessage = false; ?>
-<?php switch ($block->getCheckoutType()) : case 'onepage_checkout': ?>
+<?php $_giftMessage = false;
+switch ($block->getCheckoutType()):
+    case 'onepage_checkout':
+        ?>
     <fieldset class="fieldset gift-message">
-        <legend class="legend"><span><?= $block->escapeHtml(__('Do you have any gift items in your order?')) ?></span></legend><br>
+        <legend class="legend">
+            <span><?= $block->escapeHtml(__('Do you have any gift items in your order?')) ?></span>
+        </legend><br>
 
         <div class="field choice" id="add-gift-options-<?= (int) $block->getEntity()->getId() ?>">
-            <input type="checkbox" name="allow_gift_options" id="allow_gift_options" data-mage-init='{"giftOptions":{}}' value="1" data-selector='{"id":"#allow-gift-options-container"}'<?php if ($block->getItemsHasMesssages() || $block->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" />
-            <label for="allow_gift_options" class="label"><span><?= $block->escapeHtml(__('Add Gift Options')) ?></span></label>
+            <input type="checkbox" name="allow_gift_options" id="allow_gift_options" data-mage-init='{"giftOptions":{}}'
+                   value="1" data-selector='{"id":"#allow-gift-options-container"}'
+                <?php if ($block->getItemsHasMesssages() || $block->getEntityHasMessage()):?>
+                    checked="checked"<?php endif; ?> class="checkbox" />
+            <label for="allow_gift_options" class="label">
+                <span><?= $block->escapeHtml(__('Add Gift Options')) ?></span>
+            </label>
         </div>
 
         <dl class="options-items" id="allow-gift-options-container">
             <?php if ($block->isMessagesAvailable()): ?>
             <dt id="add-gift-options-for-order-<?= (int) $block->getEntity()->getId() ?>" class="order-title">
                 <div class="field choice">
-                    <input type="checkbox" name="allow_gift_messages_for_order" id="allow_gift_options_for_order" data-mage-init='{"giftOptions":{}}' value="1" data-selector='{"id":"#allow-gift-options-for-order-container"}'<?php if ($block->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" />
-                    <label for="allow_gift_options_for_order" class="label"><span><?= $block->escapeHtml(__('Gift Options for the Entire Order')) ?></span></label>
+                    <input type="checkbox" name="allow_gift_messages_for_order" id="allow_gift_options_for_order"
+                           data-mage-init='{"giftOptions":{}}' value="1"
+                           data-selector='{"id":"#allow-gift-options-for-order-container"}'
+                        <?php if ($block->getEntityHasMessage()): ?> checked="checked"<?php endif; ?>
+                           class="checkbox" />
+                    <label for="allow_gift_options_for_order" class="label">
+                        <span><?= $block->escapeHtml(__('Gift Options for the Entire Order')) ?></span>
+                    </label>
                 </div>
             </dt>
 
             <dd id="allow-gift-options-for-order-container" class="order-options">
-                <div class="options-order-container" id="options-order-container-<?= (int) $block->getEntity()->getId() ?>"></div>
+                <div class="options-order-container"
+                     id="options-order-container-<?= (int) $block->getEntity()->getId() ?>"></div>
                     <button class="action action-gift"
-                            data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden", "toggleContainers":"#allow-gift-messages-for-order-container"}}'>
+                            data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden",
+                             "toggleContainers":"#allow-gift-messages-for-order-container"}}'>
                         <span><?= $block->escapeHtml(__('Gift Message')) ?></span>
                     </button>
                     <div id="allow-gift-messages-for-order-container" class="gift-messages-order hidden">
                         <fieldset class="fieldset">
-                            <p><?= $block->escapeHtml(__('Leave this box blank if you don\'t want to leave a gift message for the entire order.')) ?></p>
+                            <p><?= $block->escapeHtml(__(
+                                'Leave this box blank if you don\'t want to leave a gift message for the entire order.'
+                            )) ?></p>
                             <div class="field from">
-                                <label for="gift-message-whole-from" class="label"><span><?= $block->escapeHtml(__('From')) ?></span></label>
+                                <label for="gift-message-whole-from" class="label">
+                                    <span><?= $block->escapeHtml(__('From')) ?></span></label>
                                 <div class="control">
-                                    <input type="text" name="giftmessage[quote][<?= (int) $block->getEntity()->getId() ?>][from]" id="gift-message-whole-from" title="<?= $block->escapeHtmlAttr(__('From')) ?>"  value="<?= /* @noEscape */ $block->getEscaped($block->getMessage()->getSender(), $block->getDefaultFrom()) ?>" class="input-text">
+                                    <input type="text"
+                                           name="giftmessage[quote][<?= (int) $block->getEntity()->getId() ?>][from]"
+                                           id="gift-message-whole-from"
+                                           title="<?= $block->escapeHtmlAttr(__('From')) ?>"
+                                           value="<?= /* @noEscape */ $block
+                                               ->getEscaped($block->getMessage()->getSender(), $block->getDefaultFrom())
+                                            ?>"
+                                           class="input-text">
                                 </div>
                             </div>
                             <div class="field to">
-                                <label for="gift-message-whole-to" class="label"><span><?= $block->escapeHtml(__('To')) ?></span></label>
+                                <label for="gift-message-whole-to" class="label">
+                                    <span><?= $block->escapeHtml(__('To')) ?></span>
+                                </label>
                                 <div class="control">
-                                    <input type="text" name="giftmessage[quote][<?= (int) $block->getEntity()->getId() ?>][to]" id="gift-message-whole-to" title="<?= $block->escapeHtmlAttr(__('To')) ?>" value="<?= /* @noEscape */ $block->getEscaped($block->getMessage()->getRecipient(), $block->getDefaultTo()) ?>" class="input-text">
+                                    <input type="text"
+                                           name="giftmessage[quote][<?= (int) $block->getEntity()->getId() ?>][to]"
+                                           id="gift-message-whole-to" title="<?= $block->escapeHtmlAttr(__('To')) ?>"
+                                           value="<?= /* @noEscape */ $block
+                                              ->getEscaped($block->getMessage()->getRecipient(), $block->getDefaultTo())
+                                            ?>" class="input-text">
                                 </div>
                             </div>
                             <div class="field text">
-                                <label for="gift-message-whole-message" class="label"><span><?= $block->escapeHtml(__('Message')) ?></span></label>
+                                <label for="gift-message-whole-message" class="label">
+                                    <span><?= $block->escapeHtml(__('Message')) ?></span>
+                                </label>
                                 <div class="control">
-                                    <textarea id="gift-message-whole-message" class="input-text" name="giftmessage[quote][<?= (int) $block->getEntity()->getId() ?>][message]" title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="10"><?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?></textarea>
+                                    <textarea id="gift-message-whole-message" class="input-text"
+                                              name="giftmessage[quote][<?=(int)$block->getEntity()->getId()?>][message]"
+                                              title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="10">
+                                        <?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?>
+                                    </textarea>
                                 </div>
                             </div>
                         </fieldset>
-                        <script>
+                        <?php $entityId = (int) $block->getEntity()->getId();
+                        $scriptString = <<<script
                             require(['jquery'], function(jQuery){
-                                jQuery('#add-gift-options-<?= (int) $block->getEntity()->getId() ?>')
-                                    .add('#add-gift-options-for-order-<?= (int) $block->getEntity()->getId() ?>')
+                                jQuery('#add-gift-options-{$entityId}')
+                                    .add('#add-gift-options-for-order-{$entityId}')
                                     .removeClass('hidden');
                             });
-                        </script>
+script;
+                        ?>
+                        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                     </div>
             </dd>
             <?php endif ?>
             <?php if ($block->isItemsAvailable()): ?>
-            <dt id="add-gift-options-for-items-<?= (int) $block->getEntity()->getId() ?>" class="order-title individual">
+            <dt id="add-gift-options-for-items-<?= (int) $block->getEntity()->getId()?>" class="order-title individual">
                 <div class="field choice">
-                    <input type="checkbox" name="allow_gift_options_for_items" id="allow_gift_options_for_items" data-mage-init='{"giftOptions":{}}' value="1" data-selector='{"id":"#allow-gift-options-for-items-container"}'<?php if ($block->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" />
-                    <label for="allow_gift_options_for_items" class="label"><span><?= $block->escapeHtml(__('Gift Options for Individual Items')) ?></span></label>
+                    <input type="checkbox" name="allow_gift_options_for_items" id="allow_gift_options_for_items"
+                           data-mage-init='{"giftOptions":{}}' value="1"
+                           data-selector='{"id":"#allow-gift-options-for-items-container"}'
+                        <?php if ($block->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?>
+                           class="checkbox" />
+                    <label for="allow_gift_options_for_items" class="label">
+                        <span><?= $block->escapeHtml(__('Gift Options for Individual Items')) ?></span>
+                    </label>
                 </div>
             </dt>
 
@@ -80,7 +127,11 @@
                     <li class="item">
                          <div class="product">
                              <div class="number">
-                                 <?= $block->escapeHtml(__('<span>Item %1</span> of %2', $_index+1, $block->countItems()), ['span']) ?>
+                                 <?= $block->escapeHtml(__(
+                                     '<span>Item %1</span> of %2',
+                                     $_index+1,
+                                     $block->countItems()
+                                 ), ['span']) ?>
                              </div>
                              <div class="img photo container">
                                  <?= $block->getImage($_product, 'gift_messages_checkout_thumbnail')->toHtml() ?>
@@ -88,31 +139,68 @@
                              <strong class="product name"><?= $block->escapeHtml($_product->getName()) ?></strong>
                          </div>
                          <div class="options">
-                             <div class="options-items-container" id="options-items-container-<?= (int) $block->getEntity()->getId() ?>-<?= (int) $_item->getId() ?>"></div>
+                             <div class="options-items-container"
+                                  id="options-items-container-<?= (int) $block->getEntity()->getId()
+                                    ?>-<?= (int) $_item->getId() ?>"></div>
                              <?php if ($block->isItemMessagesAvailable($_item)): ?>
                              <button class="action action-gift"
-                                     data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden", "toggleContainers":"#gift-messages-for-item-container-<?= (int) $_item->getId() ?>"}}'>
+                                     data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden",
+                                      "toggleContainers":"#gift-messages-for-item-container-<?= (int) $_item->getId()
+                                        ?>"}}'>
                                  <span><?= $block->escapeHtml(__('Gift Message')) ?></span>
                              </button>
-                             <div id="gift-messages-for-item-container-<?= (int) $_item->getId() ?>" class="block message hidden">
+                             <div id="gift-messages-for-item-container-<?= (int) $_item->getId() ?>"
+                                  class="block message hidden">
                                  <fieldset class="fieldset">
-                                     <p><?= $block->escapeHtml(__('Leave a box blank if you don\'t want to add a gift message for that item.')) ?></p>
+                                     <p><?= $block->escapeHtml(__(
+                                         'Leave a box blank if you don\'t want to add a gift message for that item.'
+                                     )) ?></p>
                                      <div class="field from">
-                                         <label for="gift-message-<?= (int) $_item->getId() ?>-from" class="label"><span><?= $block->escapeHtml(__('From')) ?></span></label>
+                                         <label for="gift-message-<?= (int) $_item->getId() ?>-from" class="label">
+                                             <span><?= $block->escapeHtml(__('From')) ?></span>
+                                         </label>
                                          <div class="control">
-                                             <input type="text" name="giftmessage[quote_item][<?= (int) $_item->getId() ?>][from]" id="gift-message-<?= (int) $_item->getId() ?>-from" title="<?= $block->escapeHtmlAttr(__('From')) ?>" value="<?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getSender(), $block->getDefaultFrom()) ?>" class="input-text">
+                                             <input type="text"
+                                                    name="giftmessage[quote_item][<?= (int) $_item->getId() ?>][from]"
+                                                    id="gift-message-<?= (int) $_item->getId() ?>-from"
+                                                    title="<?= $block->escapeHtmlAttr(__('From')) ?>"
+                                                    value=
+                                                    "<?= /* @noEscape */
+                                                     $block->getEscaped(
+                                                         $block->getMessage($_item)->getSender(),
+                                                         $block->getDefaultFrom()
+                                                     ) ?>" class="input-text">
                                          </div>
                                      </div>
                                      <div class="field to">
-                                        <label for="gift-message-<?= (int) $_item->getId() ?>-to" class="label"><span><?= $block->escapeHtmlAttr(__('To')) ?></span></label>
+                                        <label for="gift-message-<?= (int) $_item->getId() ?>-to" class="label">
+                                            <span><?= $block->escapeHtmlAttr(__('To')) ?></span>
+                                        </label>
                                         <div class="control">
-                                            <input type="text" name="giftmessage[quote_item][<?= (int) $_item->getId() ?>][to]" id="gift-message-<?= (int) $_item->getId() ?>-to" title="<?= $block->escapeHtmlAttr(__('To')) ?>" value="<?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getRecipient(), $block->getDefaultTo()) ?>" class="input-text">
+                                            <input type="text"
+                                                   name="giftmessage[quote_item][<?= (int) $_item->getId() ?>][to]"
+                                                   id="gift-message-<?= (int) $_item->getId() ?>-to"
+                                                   title="<?= $block->escapeHtmlAttr(__('To')) ?>"
+                                                   value="<?= /* @noEscape */ $block->getEscaped($block
+                                                       ->getMessage($_item)->getRecipient(), $block->getDefaultTo()) ?>"
+                                                   class="input-text">
                                         </div>
                                      </div>
                                      <div class="field text">
-                                         <label for="gift-message-<?= (int) $_item->getId() ?>-message" class="label"><span><?= $block->escapeHtml(__('Message')) ?></span></label>
+                                         <label for="gift-message-<?= (int) $_item->getId() ?>-message" class="label">
+                                             <span><?= $block->escapeHtml(__('Message')) ?></span>
+                                         </label>
                                          <div class="control">
-                                            <textarea id="gift-message-<?= (int) $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[quote_item][<?= (int) $_item->getId() ?>][message]" title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="40"><?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getMessage()) ?></textarea>
+                                            <textarea id="gift-message-<?= (int) $_item->getId() ?>-message"
+                                                      class="input-text giftmessage-area"
+                                                      name="giftmessage[quote_item][<?= (int) $_item->getId()
+                                                        ?>][message]"
+                                                      title="<?= $block->escapeHtmlAttr(__('Message')) ?>"
+                                                      rows="5" cols="40">
+                                                <?= /* @noEscape */ $block->getEscaped(
+                                                    $block->getMessage($_item)->getMessage()
+                                                ) ?>
+                                            </textarea>
                                          </div>
                                      </div>
                                 </fieldset>
@@ -123,15 +211,20 @@
                     <?php endforeach; ?>
                 </ol>
             </dd>
-            <script>
+                <?php $entityId = (int) $block->getEntity()->getId();
+                $scriptString = <<<script
                 require(['jquery'], function(jQuery){
-                    jQuery('#add-gift-options-<?= (int) $block->getEntity()->getId() ?>')
-                        .add('#add-gift-options-for-items-<?= (int) $block->getEntity()->getId() ?>')
+                    jQuery('#add-gift-options-{$entityId}')
+                        .add('#add-gift-options-for-items-{$entityId}')
                         .removeClass('hidden');
                 });
-            </script>
+script;
+                ?>
+                <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
             <?php endif; ?>
-            <dt class="extra-options-container" id="extra-options-container-<?= (int) $block->getEntity()->getId() ?>"></dt>
+            <dt class="extra-options-container"
+                id="extra-options-container-<?= (int) $block->getEntity()->getId() ?>">
+            </dt>
         </dl>
     </fieldset>
     <script type="text/x-magento-init">
@@ -141,52 +234,97 @@
         }
     }
     </script>
-<?php break;
-case 'multishipping_address': ?>
+        <?php
+        break;
+    case 'multishipping_address':
+        ?>
     <fieldset id="add-gift-options-<?= (int) $block->getEntity()->getId() ?>" class="fieldset gift-message">
-        <legend class="legend"><span><?= $block->escapeHtml(__('Do you have any gift items in your order?')) ?></span></legend><br>
+        <legend class="legend">
+            <span><?= $block->escapeHtml(__('Do you have any gift items in your order?')) ?></span>
+        </legend><br>
 
         <div class="field choice" id="add-gift-options-<?= (int) $block->getEntity()->getId() ?>">
-            <input type="checkbox" name="allow_gift_options_<?= (int) $block->getEntity()->getId() ?>" id="allow_gift_options_<?= (int) $block->getEntity()->getId() ?>" data-mage-init='{"giftOptions":{}}' value="1" data-selector='{"id":"#allow-gift-options-container-<?= (int) $block->getEntity()->getId() ?>"}'<?php if ($block->getItemsHasMesssages() || $block->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" />
-            <label for="allow_gift_options_<?= (int) $block->getEntity()->getId() ?>" class="label"><span><?= $block->escapeHtml(__('Add Gift Options')) ?></span></label>
+            <input type="checkbox" name="allow_gift_options_<?= (int) $block->getEntity()->getId() ?>"
+                   id="allow_gift_options_<?= (int) $block->getEntity()->getId() ?>" data-mage-init='{"giftOptions":{}}'
+                   value="1"
+                   data-selector='{"id":"#allow-gift-options-container-<?= (int) $block->getEntity()->getId() ?>"}'
+                <?php if ($block->getItemsHasMesssages() || $block->getEntityHasMessage()):?> checked="checked"
+                <?php endif; ?> class="checkbox" />
+            <label for="allow_gift_options_<?= (int) $block->getEntity()->getId() ?>" class="label">
+                <span><?= $block->escapeHtml(__('Add Gift Options')) ?></span>
+            </label>
         </div>
 
         <dl class="options-items" id="allow-gift-options-container-<?= (int) $block->getEntity()->getId() ?>">
             <?php if ($block->isMessagesOrderAvailable() || $block->isMessagesAvailable()): ?>
             <dt id="add-gift-options-for-order-<?= (int) $block->getEntity()->getId() ?>" class="order-title">
                 <div class="field choice">
-                    <input type="checkbox" name="allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>" id="allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>" data-mage-init='{"giftOptions":{}}' value="1" data-selector='{"id":"#allow-gift-options-for-order-container-<?= (int) $block->getEntity()->getId() ?>"}'<?php if ($block->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox" />
-                    <label for="allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>" class="label"><span><?= $block->escapeHtml(__('Add Gift Options for the Entire Order')) ?></span></label>
+                    <input type="checkbox" name="allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>"
+                           id="allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>"
+                           data-mage-init='{"giftOptions":{}}' value="1"
+                           data-selector='{"id":"#allow-gift-options-for-order-container-<?= (int) $block->getEntity()
+                               ->getId() ?>"}'
+                        <?php if ($block->getEntityHasMessage()): ?> checked="checked"<?php endif; ?> class="checkbox"/>
+                    <label for="allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>" class="label">
+                        <span><?= $block->escapeHtml(__('Add Gift Options for the Entire Order')) ?></span>
+                    </label>
                 </div>
             </dt>
 
-            <dd id="allow-gift-options-for-order-container-<?= (int) $block->getEntity()->getId() ?>" class="order-options">
-                <div class="options-order-container" id="options-order-container-<?= (int) $block->getEntity()->getId() ?>"></div>
-                <?php if ($block->isMessagesAvailable()): ?>
-                    <?php $_giftMessage = true; ?>
+            <dd id="allow-gift-options-for-order-container-<?= (int) $block->getEntity()->getId() ?>"
+                class="order-options">
+                <div class="options-order-container"
+                     id="options-order-container-<?= (int) $block->getEntity()->getId() ?>"></div>
+                    <?php if ($block->isMessagesAvailable()): ?>
+                        <?php $_giftMessage = true; ?>
                     <button class="action action-gift"
-                            data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden", "toggleContainers":"#gift-messages-for-order-container-<?= (int) $block->getEntity()->getId() ?>"}}'>
+                            data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden",
+                             "toggleContainers":"#gift-messages-for-order-container-<?= (int) $block->getEntity()
+                                ->getId() ?>"}}'>
                         <span><?= $block->escapeHtml(__('Gift Message')) ?></span>
                     </button>
-                    <div id="gift-messages-for-order-container-<?= (int) $block->getEntity()->getId() ?>" class="gift-messages-order hidden">
+                    <div id="gift-messages-for-order-container-<?= (int) $block->getEntity()->getId() ?>"
+                         class="gift-messages-order hidden">
                         <fieldset class="fieldset">
-                            <p><?= $block->escapeHtml(__('You can leave this box blank if you don\'t want to add a gift message for this address.')) ?></p>
+                            <p><?= $block->escapeHtml(__('You can leave this box blank if you don\'t want to add a ' .
+                                    'gift message for this address.')) ?></p>
                             <div class="field from">
-                                <label for="gift-message-<?= (int) $block->getEntity()->getId() ?>-from" class="label"><span><?= $block->escapeHtml(__('From')) ?></span></label>
+                                <label for="gift-message-<?= (int) $block->getEntity()->getId() ?>-from"
+                                       class="label"><span><?= $block->escapeHtml(__('From')) ?></span>
+                                </label>
                                 <div class="control">
-                                    <input type="text" name="giftmessage[quote_address][<?= (int) $block->getEntity()->getId() ?>][from]" id="gift-message-<?= (int) $block->getEntity()->getId() ?>-from" title="<?= $block->escapeHtmlAttr(__('From')) ?>" value="<?= /* @noEscape */ $block->getEscaped($block->getMessage()->getSender(), $block->getDefaultFrom()) ?>" class="input-text">
+                                    <input type="text" name="giftmessage[quote_address][<?= (int) $block->getEntity()
+                                        ->getId() ?>][from]"
+                                           id="gift-message-<?= (int) $block->getEntity()->getId() ?>-from"
+                                           title="<?= $block->escapeHtmlAttr(__('From')) ?>"
+                                           value="<?= /* @noEscape */ $block->getEscaped($block->getMessage()
+                                               ->getSender(), $block->getDefaultFrom()) ?>" class="input-text">
                                 </div>
                             </div>
                             <div class="field to">
-                                <label for="gift-message-<?= (int) $block->getEntity()->getId() ?>-to" class="label"><span><?= $block->escapeHtml(__('To')) ?></span></label>
+                                <label for="gift-message-<?= (int) $block->getEntity()->getId() ?>-to"
+                                       class="label"><span><?= $block->escapeHtml(__('To')) ?></span>
+                                </label>
                                 <div class="control">
-                                    <input type="text" name="giftmessage[quote_address][<?= (int) $block->getEntity()->getId() ?>][to]" id="gift-message-<?= (int) $block->getEntity()->getId() ?>-to" title="<?= $block->escapeHtmlAttr(__('To')) ?>" value="<?= /* @noEscape */ $block->getEscaped($block->getMessage()->getRecipient(), $block->getDefaultTo()) ?>" class="input-text">
+                                    <input type="text" name="giftmessage[quote_address][<?= (int) $block->getEntity()
+                                        ->getId() ?>][to]"
+                                           id="gift-message-<?= (int) $block->getEntity()->getId() ?>-to"
+                                           title="<?= $block->escapeHtmlAttr(__('To')) ?>"
+                                           value="<?= /* @noEscape */ $block->getEscaped($block->getMessage()
+                                               ->getRecipient(), $block->getDefaultTo()) ?>" class="input-text">
                                 </div>
                             </div>
                             <div class="field text">
-                                <label for="gift-message-<?= (int) $block->getEntity()->getId() ?>-message" class="label"><span><?= $block->escapeHtml(__('Message')) ?></span></label>
+                                <label for="gift-message-<?= (int) $block->getEntity()->getId() ?>-message"
+                                       class="label"><span><?= $block->escapeHtml(__('Message')) ?></span>
+                                </label>
                                 <div class="control">
-                                    <textarea id="gift-message-<?= (int) $block->getEntity()->getId() ?>-message" class="input-text" name="giftmessage[quote_address][<?= (int) $block->getEntity()->getId() ?>][message]" title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="40"><?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?></textarea>
+                                    <textarea id="gift-message-<?= (int) $block->getEntity()->getId() ?>-message"
+                                              class="input-text" name="giftmessage[quote_address][<?= (int) $block
+                                                ->getEntity()->getId() ?>][message]"
+                                              title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="40">
+                                        <?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?>
+                                    </textarea>
                                 </div>
                             </div>
                         </fieldset>
@@ -195,54 +333,106 @@ case 'multishipping_address': ?>
             </dd>
             <?php endif; ?>
             <?php if ($block->isItemsAvailable()): ?>
-            <dt id="add-gift-options-for-items-<?= (int) $block->getEntity()->getId() ?>" class="order-title individual">
+            <dt id="add-gift-options-for-items-<?= (int) $block->getEntity()->getId()?>" class="order-title individual">
                 <div class="field choice">
-                    <input type="checkbox" name="allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>" id="allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>" data-mage-init='{"giftOptions":{}}' value="1" data-selector='{"id":"#allow-gift-options-for-items-container-<?= (int) $block->getEntity()->getId() ?>"}'<?php if ($block->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?> class="checkbox" />
-                    <label for="allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>" class="label"><span><?= $block->escapeHtml(__('Add Gift Options for Individual Items')) ?></span></label>
+                    <input type="checkbox" name="allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>"
+                           id="allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>"
+                           data-mage-init='{"giftOptions":{}}' value="1"
+                           data-selector='{"id":"#allow-gift-options-for-items-container-<?= (int) $block->getEntity()
+                               ->getId() ?>"}'
+                        <?php if ($block->getItemsHasMesssages()): ?> checked="checked"<?php endif; ?>
+                           class="checkbox" />
+                    <label for="allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>" class="label">
+                        <span><?= $block->escapeHtml(__('Add Gift Options for Individual Items')) ?></span>
+                    </label>
                 </div>
             </dt>
 
-            <dd id="allow-gift-options-for-items-container-<?= (int) $block->getEntity()->getId() ?>" class="order-options individual">
+            <dd id="allow-gift-options-for-items-container-<?= (int) $block->getEntity()->getId() ?>"
+                class="order-options individual">
                 <ol class="items">
                 <?php foreach ($block->getItems() as $_index => $_item): ?>
                      <?php $_product = $_item->getProduct() ?>
                     <li class="item">
                         <div class="product">
-                            <div class="number"><?= $block->escapeHtml(__('<span>Item %1</span> of %2', $_index+1, $block->countItems()), ['span']) ?></div>
+                            <div class="number">
+                                <?= $block->escapeHtml(
+                                    __('<span>Item %1</span> of %2', $_index+1, $block->countItems()),
+                                    ['span']
+                                ) ?></div>
                             <div class="img photo container">
                              <?= $block->getImage($_product, 'gift_messages_checkout_thumbnail')->toHtml() ?>
                             </div>
                             <strong class="product-name"><?= $block->escapeHtml($_product->getName()) ?></strong>
                         </div>
                         <div class="options">
-                            <div class="options-items-container" id="options-items-container-<?= (int) $block->getEntity()->getId() ?>-<?= (int) $_item->getId() ?>"></div>
-                            <input type="hidden" name="giftoptions[quote_address_item][<?= (int) $_item->getId() ?>][address]" value="<?= (int) $block->getEntity()->getId() ?>" />
+                            <div class="options-items-container"
+                                 id="options-items-container-<?= (int) $block->getEntity()->getId()?>-<?= (int)$_item
+                                     ->getId() ?>">
+                            </div>
+                            <input type="hidden"
+                                   name="giftoptions[quote_address_item][<?= (int) $_item->getId() ?>][address]"
+                                   value="<?= (int) $block->getEntity()->getId() ?>" />
                             <?php if ($block->isItemMessagesAvailable($_item)): ?>
                                 <?php $_giftMessage = true; ?>
                                 <button class="action action-gift"
-                                     data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden", "toggleContainers":"#gift-messages-for-item-container-<?= (int) $_item->getId() ?>"}}'>
+                                     data-mage-init='{"toggleAdvanced": {"selectorsToggleClass":"hidden",
+                                      "toggleContainers":"#gift-messages-for-item-container-<?= (int) $_item->getId()
+                                        ?>"}}'>
                                     <span><?= $block->escapeHtml(__('Gift Message')) ?></span>
                                 </button>
-                                <div id="gift-messages-for-item-container-<?= (int) $_item->getId() ?>" class="block message hidden">
+                                <div id="gift-messages-for-item-container-<?= (int) $_item->getId() ?>"
+                                     class="block message hidden">
                                     <fieldset class="fieldset">
-                                        <p><?= $block->escapeHtml(__('You can leave this box blank if you don\'t want to add a gift message for the item.')) ?></p>
-                                        <input type="hidden" name="giftmessage[quote_address_item][<?= (int) $_item->getId() ?>][address]" value="<?= (int) $block->getEntity()->getId() ?>" />
+                                        <p><?= $block->escapeHtml(__(
+                                            'You can leave this box blank if you don\'t want to add a gift message ' .
+                                            'for the item.'
+                                        )) ?></p>
+                                        <input type="hidden" name="giftmessage[quote_address_item][<?= (int) $_item
+                                            ->getId() ?>][address]" value="<?= (int) $block->getEntity()->getId() ?>" />
                                         <div class="field from">
-                                            <label for="gift-message-<?= (int) $_item->getId() ?>-from" class="label"><span><?= $block->escapeHtml(__('From')) ?></span></label>
+                                            <label for="gift-message-<?= (int) $_item->getId() ?>-from" class="label">
+                                                <span><?= $block->escapeHtml(__('From')) ?></span>
+                                            </label>
                                             <div class="control">
-                                                <input type="text" name="giftmessage[quote_address_item][<?= (int) $_item->getId() ?>][from]" id="gift-message-<?= (int) $_item->getId() ?>-from" title="<?= $block->escapeHtmlAttr(__('From')) ?>"  value="<?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getSender(), $block->getDefaultFrom()) ?>" class="input-text">
+                                                <input type="text"
+                                                       name="giftmessage[quote_address_item][<?= (int) $_item->getId()
+                                                        ?>][from]" id="gift-message-<?= (int) $_item->getId() ?>-from"
+                                                       title="<?= $block->escapeHtmlAttr(__('From')) ?>"
+                                                       value="<?= /* @noEscape */ $block->getEscaped($block
+                                                           ->getMessage($_item)->getSender(), $block->getDefaultFrom())
+                                                                ?>" class="input-text">
                                             </div>
                                         </div>
                                         <div class="field to">
-                                            <label for="gift-message-<?= (int) $_item->getId() ?>-to" class="label"><span><?= $block->escapeHtml(__('To')) ?></span></label>
+                                            <label for="gift-message-<?= (int) $_item->getId() ?>-to" class="label">
+                                                <span><?= $block->escapeHtml(__('To')) ?></span>
+                                            </label>
                                             <div class="control">
-                                                <input type="text" name="giftmessage[quote_address_item][<?= (int) $_item->getId() ?>][to]" id="gift-message-<?= (int) $_item->getId() ?>-to" title="<?= $block->escapeHtmlAttr(__('To')) ?>" value="<?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getRecipient(), $block->getDefaultTo()) ?>" class="input-text">
+                                                <input type="text"
+                                                       name="giftmessage[quote_address_item][<?= (int) $_item->getId()
+                                                        ?>][to]" id="gift-message-<?= (int) $_item->getId() ?>-to"
+                                                       title="<?= $block->escapeHtmlAttr(__('To')) ?>"
+                                                       value=
+                                                       "<?= /* @noEscape */ $block->getEscaped($block
+                                                           ->getMessage($_item)->getRecipient(), $block->getDefaultTo())
+                                                        ?>" class="input-text">
                                             </div>
                                         </div>
                                         <div class="field text">
-                                            <label for="gift-message-<?= (int) $_item->getId() ?>-message" class="label"><span><?= $block->escapeHtml(__('Message')) ?></span></label>
+                                            <label for="gift-message-<?= (int) $_item->getId()?>-message" class="label">
+                                                <span><?= $block->escapeHtml(__('Message')) ?></span>
+                                            </label>
                                             <div class="control">
-                                                <textarea id="gift-message-<?= (int) $_item->getId() ?>-message" class="input-text giftmessage-area" name="giftmessage[quote_address_item][<?= (int) $_item->getId() ?>][message]" title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="10"><?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getMessage()) ?></textarea>
+                                                <textarea id="gift-message-<?= (int) $_item->getId() ?>-message"
+                                                          class="input-text giftmessage-area"
+                                                          name="giftmessage[quote_address_item][<?= (int) $_item
+                                                              ->getId() ?>][message]"
+                                                          title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5"
+                                                          cols="10">
+                                                    <?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)
+                                                        ->getMessage()) ?>
+                                                </textarea>
                                             </div>
                                         </div>
                                  </fieldset>
@@ -254,19 +444,23 @@ case 'multishipping_address': ?>
                 </ol>
             </dd>
             <?php endif; ?>
-            <dt class="extra-options-container" id="extra-options-container-<?= (int) $block->getEntity()->getId() ?>"></dt>
+            <dt class="extra-options-container" id="extra-options-container-<?= (int) $block->getEntity()->getId() ?>">
+            </dt>
         </dl>
     </fieldset>
     <script type="text/x-magento-init">
         {
-            "#allow_gift_options_<?= (int) $block->getEntity()->getId() ?>, #allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>, #allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>": {
+            "#allow_gift_options_<?= (int) $block->getEntity()->getId() ?>,
+             #allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>,
+              #allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>": {
                 "giftOptions": {}
             }
         }
     </script>
-    <?php break; ?>
-<?php endswitch ?>
-<?php if ($_giftMessage): ?>
+        <?php
+        break;
+    endswitch;
+if ($_giftMessage): ?>
 <script type="text/x-magento-init">
     {
         "#shipping_method_form": {
diff --git a/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml b/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml
index e3c46bc27834c..45ffe733f5c5f 100644
--- a/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml
+++ b/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml
@@ -5,22 +5,31 @@
  */
 ?>
 <?php
-/** @var $block \Magento\GoogleAdwords\Block\Code */
+/**
+ * @var $block \Magento\GoogleAdwords\Block\Code
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <!-- Google Code for Sale Conversion Page -->
-<script>
+<?php $scriptString = <<<script
     /* <![CDATA[ */
-    var google_conversion_id = <?= $block->escapeJs($block->getHelper()->getConversionId()) ?>;
-    var google_conversion_language = "<?= $block->escapeJs($block->getHelper()->getConversionLanguage()) ?>";
-    var google_conversion_format = "<?= $block->escapeJs($block->getHelper()->getConversionFormat()) ?>";
-    var google_conversion_color = "<?= $block->escapeJs($block->getHelper()->getConversionColor()) ?>";
-    var google_conversion_label = "<?= $block->escapeJs($block->getHelper()->getConversionLabel()) ?>";
-    var google_conversion_value = <?= $block->escapeJs($block->getHelper()->getConversionValue()) ?>;
-    <?php if ($block->getHelper()->hasSendConversionValueCurrency() && $block->getHelper()->getConversionValueCurrency()) : ?>
-    var google_conversion_currency = "<?= $block->escapeJs($block->getHelper()->getConversionValueCurrency()) ?>";
-    <?php endif; ?>
+    var google_conversion_id = {$block->escapeJs($block->getHelper()->getConversionId())};
+    var google_conversion_language = "{$block->escapeJs($block->getHelper()->getConversionLanguage())}";
+    var google_conversion_format = "{$block->escapeJs($block->getHelper()->getConversionFormat())}";
+    var google_conversion_color = "{$block->escapeJs($block->getHelper()->getConversionColor())}";
+    var google_conversion_label = "{$block->escapeJs($block->getHelper()->getConversionLabel())}";
+    var google_conversion_value = {$block->escapeJs($block->getHelper()->getConversionValue())};
+script;
+if ($block->getHelper()->hasSendConversionValueCurrency() && $block->getHelper()->getConversionValueCurrency()):
+        $scriptString .= <<<script
+    var google_conversion_currency = "{$block->escapeJs($block->getHelper()->getConversionValueCurrency())}";
+script;
+endif;
+$scriptString .= <<<script
     /* ]]> */
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <script src="<?= $block->escapeHtmlAttr($block->getHelper()->getConversionJsSrc()) ?>"></script>
 <noscript>
     <div style="display:inline;">
diff --git a/app/code/Magento/Msrp/etc/adminhtml/system.xml b/app/code/Magento/Msrp/etc/adminhtml/system.xml
index 8f6c3750c3835..3b9d07be2f7c7 100644
--- a/app/code/Magento/Msrp/etc/adminhtml/system.xml
+++ b/app/code/Magento/Msrp/etc/adminhtml/system.xml
@@ -14,7 +14,7 @@
                     <label>Enable MAP</label>
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                     <comment>
-                        <![CDATA[<strong style="color:red">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.]]>
+                        <![CDATA[<strong class="colorRed">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.]]>
                     </comment>
                 </field>
                 <field id="display_price_type" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" canRestore="1">
diff --git a/app/code/Magento/Msrp/i18n/en_US.csv b/app/code/Magento/Msrp/i18n/en_US.csv
index d47d72b2bdc9a..9ed2d2fb86597 100644
--- a/app/code/Magento/Msrp/i18n/en_US.csv
+++ b/app/code/Magento/Msrp/i18n/en_US.csv
@@ -13,7 +13,7 @@ Price,Price
 "Add to Cart","Add to Cart"
 "Minimum Advertised Price","Minimum Advertised Price"
 "Enable MAP","Enable MAP"
-"<strong style=""color:red"">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.","<strong style=""color:red"">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront."
+"<strong class=""colorRed"">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.","<strong class=""colorRed"">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront."
 "Display Actual Price","Display Actual Price"
 "Default Popup Text Message","Default Popup Text Message"
 "Default ""What's This"" Text Message","Default ""What's This"" Text Message"
diff --git a/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml b/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml
index 04d5fae435816..3f8b31d784452 100644
--- a/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml
+++ b/app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml
@@ -623,7 +623,7 @@
                         <label>Header Image URL</label>
                         <config_path>paypal/style/paypal_hdrimg</config_path>
                         <tooltip>
-                            <![CDATA[The image at the top left of the checkout page. Max size is 750x90-pixel. <strong style="color:red">https</strong> is highly encouraged.]]>
+                            <![CDATA[The image at the top left of the checkout page. Max size is 750x90-pixel. <strong class="colorRed">https</strong> is highly encouraged.]]>
                         </tooltip>
                         <attribute type="shared">1</attribute>
                     </field>
diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv
index 54dd611d49073..e85353dc1d98f 100644
--- a/app/code/Magento/Paypal/i18n/en_US.csv
+++ b/app/code/Magento/Paypal/i18n/en_US.csv
@@ -585,9 +585,9 @@ Schedule,Schedule
                         "
 "Header Image URL","Header Image URL"
 "
-                            The image at the top left of the checkout page. Max size is 750x90-pixel. <strong style=""color:red"">https</strong> is highly encouraged.
+                            The image at the top left of the checkout page. Max size is 750x90-pixel. <strong class=""colorRed"">https</strong> is highly encouraged.
                         ","
-                            The image at the top left of the checkout page. Max size is 750x90-pixel. <strong style=""color:red"">https</strong> is highly encouraged.
+                            The image at the top left of the checkout page. Max size is 750x90-pixel. <strong class=""colorRed"">https</strong> is highly encouraged.
                         "
 "Header Background Color","Header Background Color"
 "
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
index 3eb6cce37f567..d86954f0124ea 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Order\Invoice\Create;
 
+use Magento\Framework\App\ObjectManager;
+
 /**
  * Adminhtml invoice create form
  *
@@ -14,6 +16,22 @@
  */
 class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
 {
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Sales\Helper\Admin $adminHelper
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Framework\Registry $registry,
+        \Magento\Sales\Helper\Admin $adminHelper,
+        array $data = []
+    ) {
+        $data['taxHelper'] = ObjectManager::getInstance()->get(\Magento\Tax\Helper\Data::class);
+        parent::__construct($context, $registry, $adminHelper, $data);
+    }
+
     /**
      * Retrieve invoice order
      *
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml
index 81dc778cff2df..d798f8e5359e3 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml
@@ -5,6 +5,7 @@
  */
 
 /* @var \Magento\Sales\Block\Adminhtml\Order\Creditmemo\Create\Items $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 /** @var Magento\Sales\ViewModel\CreditMemo\Create\UpdateTotalsButton $viewModel */
@@ -17,7 +18,7 @@ $_items = $block->getCreditmemo()->getAllItems();
         <span class="title"><?= $block->escapeHtml(__('Items to Refund')) ?></span>
     </div>
 
-    <?php if (count($_items)) : ?>
+    <?php if (count($_items)): ?>
     <div class="admin__table-wrapper">
         <table class="data-table admin__table-primary order-creditmemo-tables">
             <thead>
@@ -25,7 +26,7 @@ $_items = $block->getCreditmemo()->getAllItems();
                     <th class="col-product"><span><?= $block->escapeHtml(__('Product')) ?></span></th>
                     <th class="col-price"><span><?= $block->escapeHtml(__('Price')) ?></span></th>
                     <th class="col-ordered-qty"><span><?= $block->escapeHtml(__('Qty')) ?></span></th>
-                    <?php if ($block->canReturnToStock()) : ?>
+                    <?php if ($block->canReturnToStock()): ?>
                     <th class="col-return-to-stock"><span><?= $block->escapeHtml(__('Return to Stock')) ?></span></th>
                     <?php endif; ?>
                     <th class="col-refund"><span><?= $block->escapeHtml(__('Qty to Refund')) ?></span></th>
@@ -35,7 +36,7 @@ $_items = $block->getCreditmemo()->getAllItems();
                     <th class="col-total last"><span><?= $block->escapeHtml(__('Row Total')) ?></span></th>
                 </tr>
             </thead>
-            <?php if ($block->canEditQty()) : ?>
+            <?php if ($block->canEditQty()): ?>
             <tfoot>
                 <tr>
                     <td colspan="4"> </td>
@@ -46,10 +47,10 @@ $_items = $block->getCreditmemo()->getAllItems();
                 </tr>
             </tfoot>
             <?php endif; ?>
-            <?php $i = 0; foreach ($_items as $_item) : ?>
-                <?php if ($_item->getOrderItem()->getParentItem()) :
+            <?php $i = 0; foreach ($_items as $_item): ?>
+                <?php if ($_item->getOrderItem()->getParentItem()):
                     continue;
-                else :
+                else:
                     $i++;
                 endif; ?>
                 <tbody class="<?= /* @noEscape */ $i%2 ? 'even' : 'odd' ?>">
@@ -59,7 +60,7 @@ $_items = $block->getCreditmemo()->getAllItems();
             <?php endforeach; ?>
         </table>
     </div>
-    <?php else : ?>
+    <?php else: ?>
     <div class="no-items">
         <?= $block->escapeHtml(__('No Items To Refund')) ?>
     </div>
@@ -68,7 +69,7 @@ $_items = $block->getCreditmemo()->getAllItems();
 
 <?php $orderTotalBar = $block->getChildHtml('order_totalbar'); ?>
 
-<?php if (!empty($orderTotalBar)) : ?>
+<?php if (!empty($orderTotalBar)): ?>
 <section class="fieldset-wrapper">
     <?= /* @noEscape */ $orderTotalBar ?>
 </section>
@@ -94,7 +95,8 @@ $_items = $block->getCreditmemo()->getAllItems();
                                   class="admin__control-textarea"
                                   name="creditmemo[comment_text]"
                                   rows="3"
-                                  cols="5"><?= $block->escapeHtml($block->getCreditmemo()->getCommentText()) ?></textarea>
+                                  cols="5"><?= $block->escapeHtml($block->getCreditmemo()->getCommentText()) ?>
+                        </textarea>
                     </div>
                 </div>
             </div>
@@ -116,7 +118,7 @@ $_items = $block->getCreditmemo()->getAllItems();
                         <span><?= $block->escapeHtml(__('Append Comments')) ?></span>
                     </label>
                 </div>
-                <?php if ($block->canSendCreditmemoEmail()) :?>
+                <?php if ($block->canSendCreditmemoEmail()):?>
                 <div class="field choice admin__field admin__field-option field-email-copy">
                     <input id="send_email"
                            class="admin__control-checkbox"
@@ -139,7 +141,8 @@ $_items = $block->getCreditmemo()->getAllItems();
     </div>
 </section>
 
-<script>
+<?php $scriptString = <<<script
+
 require(['jquery'], function(jQuery){
 
 //<![CDATA[
@@ -217,4 +220,6 @@ window.checkButtonsRelation = checkButtonsRelation;
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml
index f46b8c11cc240..b47ddc95ce363 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/totals/adjustments.phtml
@@ -3,9 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $_source  = $block->getSource() ?>
-<?php if ($_source) : ?>
+<?php if ($_source): ?>
     <tr>
         <td class="label"><?= $block->escapeHtml($block->getShippingLabel()) ?><div id="shipping_amount_adv"></div></td>
         <td>
@@ -17,7 +18,7 @@
         </td>
     </tr>
     <tr>
-        <td class="label"><?= $block->escapeHtml(__('Adjustment Refund')) ?><div id="adjustment_positive_adv"></div></td>
+        <td class="label"><?= $block->escapeHtml(__('Adjustment Refund'))?><div id="adjustment_positive_adv"></div></td>
         <td>
             <input type="text"
                    name="creditmemo[adjustment_positive]"
@@ -34,12 +35,13 @@
                    value="<?= $block->escapeHtmlAttr($_source->getBaseAdjustmentNegative()) ?>"
                    class="input-text admin__control-text not-negative-amount"
                    id="adjustment_negative"/>
-            <script>
+            <?php $scriptString = <<<script
                 require(['prototype'], function(){
 
                 //<![CDATA[
                 Validation.addAllThese([
-                    ['not-negative-amount', '<?= $block->escapeJs(__('Please enter a positive number in this field.')) ?>', function(v) {
+                    ['not-negative-amount', '{$block->escapeJs(__('Please enter a positive number in this field.'))}',
+                     function(v) {
                         if(v.length)
                             return /^\s*\d+([,.]\d+)*\s*%?\s*$/.test(v);
                         else
@@ -73,7 +75,9 @@
                 //]]>
 
                 });
-            </script>
+script;
+            ?>
+            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
         </td>
     </tr>
 
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
index da9f0d273af24..02bbdae875962 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
@@ -7,10 +7,12 @@
 // phpcs:disable Magento2.Templates.ThisInTemplate
 
 /* @var \Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Form $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <form id="edit_form" class="order-invoice-edit" method="post" action="<?= $block->escapeUrl($block->getSaveUrl()) ?>">
     <?= $block->getBlockHtml('formkey') ?>
     <?php $_order = $block->getInvoice()->getOrder() ?>
+    <?php $taxHelper = $block->getData('taxHelper') ?>
     <?= $block->getChildHtml('order_info') ?>
 
     <section class="admin__page-section">
@@ -18,17 +20,20 @@
             <span class="title"><?= $block->escapeHtml(__('Payment & Shipping Method')) ?></span>
         </div>
         <div class="admin__page-section-content">
-            <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()) : ?> order-payment-method-virtual<?php endif; ?>">
+            <div class="admin__page-section-item order-payment-method
+            <?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
                 <div class="admin__page-section-item-title">
                     <span class="title"><?= $block->escapeHtml(__('Payment Information')) ?></span>
                 </div>
                 <div class="admin__page-section-item-content">
                     <div class="order-payment-method-title"><?= $block->getChildHtml('order_payment') ?></div>
-                    <div class="order-payment-currency"><?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?></div>
+                    <div class="order-payment-currency">
+                        <?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?>
+                    </div>
                     <div class="order-payment-additional"><?= $block->getChildHtml('order_payment_additional') ?></div>
                 </div>
             </div>
-            <?php if (!$_order->getIsVirtual()) : ?>
+            <?php if (!$_order->getIsVirtual()): ?>
                 <div class="admin__page-section-item order-shipping-address">
                     <?php /*Shipping Address */ ?>
                     <div class="admin__page-section-item-title">
@@ -36,35 +41,45 @@
                     </div>
                     <div class="admin__page-section-item-content">
                         <div class="shipping-description-wrapper">
-                            <div class="shipping-description-title"><?= $block->escapeHtml($_order->getShippingDescription()) ?></div>
+                            <div class="shipping-description-title">
+                                <?= $block->escapeHtml($_order->getShippingDescription()) ?></div>
                             <div class="shipping-description-content">
                                 <?= $block->escapeHtml(__('Total Shipping Charges')) ?>:
 
-                                <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayShippingPriceIncludingTax()) : ?>
+                                <?php if ($taxHelper->displayShippingPriceIncludingTax()): ?>
                                     <?php $_excl = $block->displayShippingPriceInclTax($_order); ?>
-                                <?php else : ?>
+                                <?php else: ?>
                                     <?php $_excl = $block->displayPriceAttribute('shipping_amount', false, ' '); ?>
                                 <?php endif; ?>
                                 <?php $_incl = $block->displayShippingPriceInclTax($_order); ?>
 
                                 <?= /* @noEscape */ $_excl ?>
-                                <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayShippingBothPrices() && $_incl != $_excl) : ?>
+                                <?php if ($taxHelper->displayShippingBothPrices() && $_incl != $_excl): ?>
                                     (<?= $block->escapeHtml(__('Incl. Tax')) ?> <?= /* @noEscape */ $_incl ?>)
                                 <?php endif; ?>
                             </div>
                         </div>
-                        <?php if ($block->canCreateShipment() && $block->canShipPartiallyItem()) : ?>
+                        <?php if ($block->canCreateShipment() && $block->canShipPartiallyItem()): ?>
                             <div class="admin__field admin__field-option">
                                 <input type="checkbox" name="invoice[do_shipment]" id="invoice_do_shipment" value="1"
-                                       class="admin__control-checkbox" <?= $block->hasInvoiceShipmentTypeMismatch() ? ' disabled="disabled"' : '' ?> />
+                                       class="admin__control-checkbox"
+                                    <?= $block->hasInvoiceShipmentTypeMismatch() ? ' disabled="disabled"' : '' ?> />
                                 <label for="invoice_do_shipment"
-                                       class="admin__field-label"><span><?= $block->escapeHtml(__('Create Shipment')) ?></span></label>
+                                       class="admin__field-label">
+                                    <span><?= $block->escapeHtml(__('Create Shipment')) ?></span>
+                                </label>
                             </div>
-                            <?php if ($block->hasInvoiceShipmentTypeMismatch()) : ?>
-                                <small><?= $block->escapeHtml(__('Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.')) ?></small>
+                            <?php if ($block->hasInvoiceShipmentTypeMismatch()): ?>
+                                <small>
+                                    <?= $block->escapeHtml(__(
+                                        'Invoice and shipment types do not match for some items on this order. ' .
+                                        'You can create a shipment only after creating the invoice.'
+                                    )) ?>
+                                </small>
                             <?php endif; ?>
                         <?php endif; ?>
-                        <div id="tracking" style="display:none;"><?= $block->getChildHtml('tracking', false) ?></div>
+                        <div id="tracking"><?= $block->getChildHtml('tracking', false) ?></div>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'div#tracking') ?>
                     </div>
                 </div>
             <?php endif; ?>
@@ -75,7 +90,10 @@
         <?= $block->getChildHtml('order_items') ?>
     </section>
 </form>
-<script>
+
+<?php $forcedShipmentCreate = (int) $block->getForcedShipmentCreate();
+$scriptString = <<<script
+
 require(['prototype'], function(){
 
 //<![CDATA[
@@ -91,7 +109,7 @@ require(['prototype'], function(){
     }
 
     /*forced creating of shipment*/
-    var forcedShipmentCreate = <?= (int) $block->getForcedShipmentCreate() ?>;
+    var forcedShipmentCreate = {$forcedShipmentCreate};
     var shipmentElement = $('invoice_do_shipment');
     if (forcedShipmentCreate && shipmentElement) {
         shipmentElement.checked = true;
@@ -105,4 +123,6 @@ require(['prototype'], function(){
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml
index 9837a6b3c209b..2d3c517e98daf 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml
@@ -3,10 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Items $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <section class="admin__page-section">
     <div class="admin__page-section-title">
-        <?php $_itemsGridLabel = $block->getForcedShipmentCreate() ? 'Items to Invoice and Ship' : 'Items to Invoice'; ?>
+        <?php $_itemsGridLabel = $block->getForcedShipmentCreate() ? 'Items to Invoice and Ship' : 'Items to Invoice';?>
         <span class="title"><?= $block->escapeHtml(__('%1', $_itemsGridLabel)) ?></span>
     </div>
     <div class="admin__page-section-content grid">
@@ -24,7 +27,7 @@
                         <th class="col-total last"><span><?= $block->escapeHtml(__('Row Total')) ?></span></th>
                     </tr>
                 </thead>
-                <?php if ($block->canEditQty()) : ?>
+                <?php if ($block->canEditQty()): ?>
                     <tfoot>
                         <tr>
                             <td colspan="3"> </td>
@@ -34,10 +37,10 @@
                     </tfoot>
                 <?php endif; ?>
                 <?php $_items = $block->getInvoice()->getAllItems() ?>
-                <?php $_i = 0; foreach ($_items as $_item) : ?>
-                    <?php if ($_item->getOrderItem()->getParentItem()) :
+                <?php $_i = 0; foreach ($_items as $_item): ?>
+                    <?php if ($_item->getOrderItem()->getParentItem()):
                         continue;
-                    else :
+                    else:
                         $_i++;
                     endif; ?>
                     <tbody class="<?= /* @noEscape */ $_i%2 ? 'even' : 'odd' ?>">
@@ -52,7 +55,7 @@
 
 <?php $orderTotalBar = $block->getChildHtml('order_totalbar'); ?>
 
-<?php if (!empty($orderTotalBar)) : ?>
+<?php if (!empty($orderTotalBar)): ?>
 <section class="admin__page-section">
     <?= /* @noEscape */ $orderTotalBar ?>
 </section>
@@ -74,7 +77,8 @@
                     </label>
                     <div class="admin__field-control">
                         <textarea id="invoice_comment_text" name="invoice[comment_text]" class="admin__control-textarea"
-                                  rows="3" cols="5"><?= $block->escapeHtml($block->getInvoice()->getCommentText()) ?></textarea>
+                                  rows="3" cols="5"><?= $block->escapeHtml($block->getInvoice()->getCommentText()) ?>
+                        </textarea>
                     </div>
                 </div>
             </div>
@@ -86,37 +90,41 @@
             </div>
             <div class="admin__page-section-item-content order-totals-actions">
                 <?= $block->getChildHtml('invoice_totals') ?>
-                <?php if ($block->isCaptureAllowed()) : ?>
-                    <?php if ($block->canCapture()) : ?>
+                <?php if ($block->isCaptureAllowed()): ?>
+                    <?php if ($block->canCapture()): ?>
                         <div class="admin__field">
-                            <?php
-                            /*
-                            <label for="invoice_do_capture" class="normal"><?= __('Capture Amount') ?></label>
-                            <input type="checkbox" name="invoice[do_capture]" id="invoice_do_capture" value="1" checked/>
-                            */
-                            ?>
-                          <label for="invoice_do_capture" class="admin__field-label"><?= $block->escapeHtml(__('Amount')) ?></label>
+                          <label for="invoice_do_capture" class="admin__field-label">
+                              <?= $block->escapeHtml(__('Amount')) ?>
+                          </label>
                           <select class="admin__control-select" name="invoice[capture_case]">
                               <option value="online"><?= $block->escapeHtml(__('Capture Online')) ?></option>
                               <option value="offline"><?= $block->escapeHtml(__('Capture Offline')) ?></option>
                               <option value="not_capture"><?= $block->escapeHtml(__('Not Capture')) ?></option>
                           </select>
                         </div>
-                    <?php elseif ($block->isGatewayUsed()) :?>
+                    <?php elseif ($block->isGatewayUsed()):?>
                         <input type="hidden" name="invoice[capture_case]" value="offline"/>
-                        <div><?= $block->escapeHtml(__('The invoice will be created offline without the payment gateway.')) ?></div>
+                        <div>
+                            <?= $block->escapeHtml(__(
+                                'The invoice will be created offline without the payment gateway.'
+                            )) ?>
+                        </div>
                     <?php endif; ?>
                 <?php endif; ?>
                 <div class="admin__field admin__field-option field-append">
                     <input id="notify_customer" name="invoice[comment_customer_notify]" value="1" type="checkbox"
                            class="admin__control-checkbox" />
-                    <label class="admin__field-label" for="notify_customer"><?= $block->escapeHtml(__('Append Comments')) ?></label>
+                    <label class="admin__field-label" for="notify_customer">
+                        <?= $block->escapeHtml(__('Append Comments')) ?>
+                    </label>
                 </div>
-                <?php if ($block->canSendInvoiceEmail()) : ?>
+                <?php if ($block->canSendInvoiceEmail()): ?>
                 <div class="admin__field admin__field-option field-email">
                     <input id="send_email" name="invoice[send_email]" value="1" type="checkbox"
                            class="admin__control-checkbox" />
-                    <label class="admin__field-label" for="send_email"><?= $block->escapeHtml(__('Email Copy of Invoice')) ?></label>
+                    <label class="admin__field-label" for="send_email">
+                        <?= $block->escapeHtml(__('Email Copy of Invoice')) ?>
+                    </label>
                 </div>
                 <?php endif; ?>
                 <?= $block->getChildHtml('submit_before') ?>
@@ -129,13 +137,16 @@
     </div>
 </section>
 
-<script>
+<?php
+$enableSubmitButton = (int) !$block->getDisableSubmitButton();
+$scriptString = <<<script
+
 require(['jquery'], function(jQuery){
 
 //<![CDATA[
 var submitButtons = jQuery('.submit-button');
 var updateButtons = jQuery('.update-button');
-var enableSubmitButtons = <?= (int) !$block->getDisableSubmitButton() ?>;
+var enableSubmitButtons = {$enableSubmitButton};
 var fields = jQuery('.qty-input');
 
 function enableButtons(buttons) {
@@ -193,4 +204,6 @@ window.checkButtonsRelation = checkButtonsRelation;
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml
index 16643a29a7fbe..a168a89ed5ef4 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/history.phtml
@@ -5,17 +5,22 @@
  */
 
 /** @var \Magento\Sales\Block\Adminhtml\Order\View\History $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="order_history_block" class="edit-order-comments">
-    <?php if ($block->canAddComment()) : ?>
+    <?php if ($block->canAddComment()): ?>
         <div class="order-history-block" id="history_form">
 
             <div class="admin__field">
                 <label for="history_status" class="admin__field-label"><?= $block->escapeHtml(__('Status')) ?></label>
                 <div class="admin__field-control">
                     <select name="history[status]" id="history_status" class="admin__control-select">
-                        <?php foreach ($block->getStatuses() as $_code => $_label) : ?>
-                            <option value="<?= $block->escapeHtmlAttr($_code) ?>"<?php if ($_code == $block->getOrder()->getStatus()) : ?> selected="selected"<?php endif; ?>><?= $block->escapeHtml($_label) ?></option>
+                        <?php foreach ($block->getStatuses() as $_code => $_label): ?>
+                            <option value="<?= $block->escapeHtmlAttr($_code) ?>"
+                                <?php if ($_code == $block->getOrder()->getStatus()): ?> selected="selected"
+                                <?php endif; ?>>
+                                <?= $block->escapeHtml($_label) ?>
+                            </option>
                         <?php endforeach; ?>
                     </select>
                 </div>
@@ -37,7 +42,7 @@
             <div class="admin__field">
                 <div class="order-history-comments-options">
                     <div class="admin__field admin__field-option">
-                        <?php if ($block->canSendCommentEmail()) : ?>
+                        <?php if ($block->canSendCommentEmail()): ?>
                             <input name="history[is_customer_notified]"
                                    type="checkbox"
                                    id="history_notify"
@@ -69,30 +74,40 @@
     <?php endif;?>
 
     <ul class="note-list">
-    <?php foreach ($block->getOrder()->getStatusHistoryCollection(true) as $_item) : ?>
+    <?php foreach ($block->getOrder()->getStatusHistoryCollection(true) as $_item): ?>
         <li class="note-list-item">
-            <span class="note-list-date"><?= /* @noEscape */ $block->formatDate($_item->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?></span>
-            <span class="note-list-time"><?= /* @noEscape */ $block->formatTime($_item->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?></span>
+            <span class="note-list-date">
+                <?= /* @noEscape */ $block->formatDate($_item->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?>
+            </span>
+            <span class="note-list-time">
+                <?= /* @noEscape */ $block->formatTime($_item->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?>
+            </span>
             <span class="note-list-status"><?= $block->escapeHtml($_item->getStatusLabel()) ?></span>
             <span class="note-list-customer">
                 <?= $block->escapeHtml(__('Customer')) ?>
-                <?php if ($block->isCustomerNotificationNotApplicable($_item)) : ?>
-                    <span class="note-list-customer-notapplicable"><?= $block->escapeHtml(__('Notification Not Applicable')) ?></span>
-                <?php elseif ($_item->getIsCustomerNotified()) : ?>
+                <?php if ($block->isCustomerNotificationNotApplicable($_item)): ?>
+                    <span class="note-list-customer-notapplicable">
+                        <?= $block->escapeHtml(__('Notification Not Applicable')) ?>
+                    </span>
+                <?php elseif ($_item->getIsCustomerNotified()): ?>
                     <span class="note-list-customer-notified"><?= $block->escapeHtml(__('Notified')) ?></span>
-                <?php else : ?>
+                <?php else: ?>
                     <span class="note-list-customer-not-notified"><?= $block->escapeHtml(__('Not Notified')) ?></span>
                 <?php endif; ?>
             </span>
-            <?php if ($_item->getComment()) : ?>
-                <div class="note-list-comment"><?= $block->escapeHtml($_item->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?></div>
+            <?php if ($_item->getComment()): ?>
+                <div class="note-list-comment">
+                    <?= $block->escapeHtml($_item->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?>
+                </div>
             <?php endif; ?>
         </li>
     <?php endforeach; ?>
     </ul>
-    <script>
+    <?php $scriptString = <<<script
         require(['prototype'], function(){
-            if($('order_status'))$('order_status').update('<?= $block->escapeJs($block->escapeHtml($block->getOrder()->getStatusLabel())) ?>');
+            if($('order_status'))$('order_status').update('{$block->escapeJs($block->getOrder()->getStatusLabel())}');
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml
index 390adb7d5cfce..590aca0acfc0d 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\Sales\Block\Adminhtml\Order\View\Tab\Info */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $_order = $block->getOrder() ?>
 
@@ -20,14 +21,17 @@
         <span class="title"><?= $block->escapeHtml(__('Payment & Shipping Method')) ?></span>
     </div>
     <div class="admin__page-section-content">
-        <div class="admin__page-section-item order-payment-method<?= ($_order->getIsVirtual() ? ' order-payment-method-virtual' : '') ?>">
+        <div class="admin__page-section-item order-payment-method<?= ($_order->getIsVirtual() ?
+            ' order-payment-method-virtual' : '') ?>">
             <?php /* Payment Method */ ?>
             <div class="admin__page-section-item-title">
                 <span class="title"><?= $block->escapeHtml(__('Payment Information')) ?></span>
             </div>
             <div class="admin__page-section-item-content">
                 <div class="order-payment-method-title"><?= $block->getPaymentHtml() ?></div>
-                <div class="order-payment-currency"><?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?></div>
+                <div class="order-payment-currency">
+                    <?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?>
+                </div>
                 <div class="order-payment-additional">
                     <?= $block->getChildHtml('order_payment_additional') ?>
                     <?= $block->getChildHtml('payment_additional_info') ?>
@@ -72,7 +76,7 @@
 
 <?= $block->getChildHtml('popup_window') ?>
 
-<script>
+<?php $scriptString = <<<script
 require([
     "prototype",
     "Magento_Sales/order/giftoptions_tooltip"
@@ -104,4 +108,6 @@ require([
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml
index ba1204fac8ec5..22664e8138925 100644
--- a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml
+++ b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml
@@ -8,12 +8,15 @@
  * Last ordered items sidebar
  *
  * @var $block \Magento\Sales\Block\Reorder\Sidebar
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <div class="block block-reorder" data-bind="scope: 'lastOrderedItems'">
     <div class="block-title no-display"
          data-bind="css: {'no-display': !lastOrderedItems().items || lastOrderedItems().items.length === 0}">
-        <strong id="block-reorder-heading" role="heading" aria-level="2"><?= $block->escapeHtml(__('Recently Ordered')) ?></strong>
+        <strong id="block-reorder-heading" role="heading" aria-level="2">
+            <?= $block->escapeHtml(__('Recently Ordered')) ?>
+        </strong>
     </div>
     <div class="block-content no-display"
          data-bind="css: {'no-display': !lastOrderedItems().items || lastOrderedItems().items.length === 0}"
@@ -33,7 +36,8 @@
                                    data-bind="attr: {
                                         id: 'reorder-item-' + id,
                                         value: id,
-                                        title: is_saleable ? '<?= $block->escapeHtml(__('Add to Cart')) ?>' : '<?= $block->escapeHtml(__('Product is not salable.')) ?>'
+                                        title: is_saleable ? '<?= $block->escapeHtml(__('Add to Cart')) ?>' : '
+                                        <?= $block->escapeHtml(__('Product is not salable.')) ?>'
                                    },
                                    disable: !is_saleable"
                                    class="checkbox" data-validate='{"validate-one-checkbox-required-by-name": true}'/>
@@ -50,19 +54,21 @@
             <div class="actions-toolbar">
                 <div class="primary"
                      data-bind="visible: isShowAddToCart">
-                    <button type="submit" title="<?= $block->escapeHtml(__('Add to Cart')) ?>" class="action tocart primary">
+                    <button type="submit" title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
+                            class="action tocart primary">
                         <span><?= $block->escapeHtml(__('Add to Cart')) ?></span>
                     </button>
                 </div>
                 <div class="secondary">
-                    <a class="action view" href="<?= $block->escapeUrl($block->getUrl('customer/account')) ?>#my-orders-table">
+                    <a class="action view"
+                       href="<?= $block->escapeUrl($block->getUrl('customer/account')) ?>#my-orders-table">
                         <span><?= $block->escapeHtml(__('View All')) ?></span>
                     </a>
                 </div>
             </div>
         </form>
     </div>
-    <script>
+    <?php $scriptString = <<<script
     require(["jquery", "mage/mage"], function(jQuery){
         jQuery('#reorder-validate-detail').mage('validation', {
             errorPlacement: function(error, element) {
@@ -70,7 +76,9 @@
             }
         });
     });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </div>
 <script type="text/x-magento-init">
 {
diff --git a/app/code/Magento/Theme/etc/adminhtml/system.xml b/app/code/Magento/Theme/etc/adminhtml/system.xml
index 20500619354e0..7a0ea8fe6b2d9 100644
--- a/app/code/Magento/Theme/etc/adminhtml/system.xml
+++ b/app/code/Magento/Theme/etc/adminhtml/system.xml
@@ -19,7 +19,7 @@
                     <label>Use CSS critical path</label>
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                     <comment>
-                        <![CDATA[<strong style="color:red">Warning!</strong> Be sure that you have critical.css file for your theme. Other CSS files will be loaded asynchronously.]]>
+                        <![CDATA[<strong class="colorRed">Warning!</strong> Be sure that you have critical.css file for your theme. Other CSS files will be loaded asynchronously.]]>
                     </comment>
                 </field>
             </group>
diff --git a/app/design/adminhtml/Magento/backend/web/css/styles.less b/app/design/adminhtml/Magento/backend/web/css/styles.less
index 80d0923ced75a..02f8edc2b493b 100644
--- a/app/design/adminhtml/Magento/backend/web/css/styles.less
+++ b/app/design/adminhtml/Magento/backend/web/css/styles.less
@@ -53,6 +53,10 @@ td.col-date.col-date-min-width.col-created_at {
     min-width: 14rem;
 }
 
+.colorRed {
+    color:red;
+}
+
 //  ToDo UI: Temporary. Should be changed
 @import 'source/components/_calendar-temp.less';
 @import 'source/components/_rules-temp.less';

From 1edf22403419c04d09ccff1c587ad2479b524d37 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 23 Apr 2020 09:10:46 +0300
Subject: [PATCH 107/307] MC-29420: Remove event handlers from CE

---
 .../templates/export/form/after.phtml         | 23 ++++++++----
 .../templates/export/form/before.phtml        | 36 +++++++++++--------
 .../templates/export/form/filter/after.phtml  | 10 ++++--
 .../templates/import/form/after.phtml         | 13 +++++--
 .../templates/import/form/before.phtml        | 32 +++++++++--------
 5 files changed, 73 insertions(+), 41 deletions(-)

diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/after.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/after.phtml
index 150f7dbeb1046..784e140041004 100644
--- a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/after.phtml
+++ b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/after.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\ImportExport\Block\Adminhtml\Form\After $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<fieldset class="admin__fieldset" id="export_filter_container" style="display:none;">
+<fieldset class="admin__fieldset" id="export_filter_container">
     <legend class="admin__legend">
         <span><?= $block->escapeHtml(__('Entity Attributes')) ?></span>
     </legend>
@@ -13,11 +16,17 @@
         <input name="form_key" type="hidden" value="<?= /* @noEscape */ $block->getFormKey() ?>" />
         <div id="export_filter_grid_container"><!-- --></div>
     </form>
-    <button class="action- scalable" type="button" onclick="getFile();"><span><?=
-        $block->escapeHtml(__('Continue'))
-    ?></span></button>
+    <button class="action- scalable" type="button">
+        <span><?= $block->escapeHtml(__('Continue')) ?></span>
+    </button>
 </fieldset>
-<script>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'fieldset#export_filter_container') ?>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    "getFile();",
+    'fieldset#export_filter_container button'
+) ?>
+<?php $scriptString = <<<script
 require(['prototype'], function(){
 
 //<![CDATA[
@@ -25,4 +34,6 @@ require(['prototype'], function(){
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml
index 3e7a19a0c0d82..b569518d9d239 100644
--- a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml
+++ b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/before.phtml
@@ -3,8 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Backend\Block\Template $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require([
     'Magento_Ui/js/modal/alert',
     'prototype'
@@ -26,14 +30,14 @@ require([
          *  Handle value change in entity type selector
          */
         modifyFilterGrid: function() {
-            if ($('entity') && $F('entity') && $F('entity') != 'catalog_product') {
-                    $$('col:first-child').each(function(el) {
+            if ($('entity') && \$F('entity') && \$F('entity') != 'catalog_product') {
+                    \$$('col:first-child').each(function(el) {
                         el.show();
                     });
-                    $$('th.no-link:first-child').each(function(el) {
+                    \$$('th.no-link:first-child').each(function(el) {
                         el.show();
                     });
-                    $$('td.a-center').each(function(el) {
+                    \$$('td.a-center').each(function(el) {
                         el.show();
                     });
             }
@@ -43,9 +47,9 @@ require([
          * Post form data and process response via AJAX
          */
         getFilter: function() {
-            if ($('entity') && $F('entity')) {
-                var url    = "<?= $block->escapeJs($block->escapeUrl($block->getUrl('*/*/getFilter'))) ?>";
-                var entity = $F('entity');
+            if ($('entity') && \$F('entity')) {
+                var url    = "{$block->escapeJs($block->getUrl('*/*/getFilter'))}";
+                var entity = \$F('entity');
                 if (entity != this.previousGridEntity) {
                     this.previousGridEntity = entity;
                     url += ((url.slice(-1) != '/') ? '/' : '') + 'entity/' + entity;
@@ -76,20 +80,20 @@ require([
      * return void
      */
     getFile = function() {
-        if ($('entity') && $F('entity')) {
+        if ($('entity') && \$F('entity')) {
             var form      = $('export_filter_form');
             var oldAction = form.action;
-            var url = oldAction + ((oldAction.slice(-1) != '/') ? '/' : '') + 'entity/' + $F('entity')
-                + '/file_format/' + $F('file_format');
-            if ($F('fields_enclosure')) {
-                url += '/fields_enclosure/' + $F('fields_enclosure');
+            var url = oldAction + ((oldAction.slice(-1) != '/') ? '/' : '') + 'entity/' + \$F('entity')
+                + '/file_format/' + \$F('file_format');
+            if (\$F('fields_enclosure')) {
+                url += '/fields_enclosure/' + \$F('fields_enclosure');
             }
             form.action = url;
             form.submit();
             form.action   = oldAction;
         } else {
             alert({
-                content: '<?= $block->escapeHtml(__('Invalid data')); ?>'
+                content: '{$block->escapeHtml(__('Invalid data'))}'
             });
         }
     };
@@ -98,4 +102,6 @@ require([
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/filter/after.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/filter/after.phtml
index 704b88b0c0f69..a34eaf09c0058 100644
--- a/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/filter/after.phtml
+++ b/app/code/Magento/ImportExport/view/adminhtml/templates/export/form/filter/after.phtml
@@ -3,8 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Backend\Block\Template $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require([
     'mage/adminhtml/grid'
 ], function(){
@@ -17,4 +21,6 @@ require([
         };
     }
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/after.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/after.phtml
index f629e6c9e9f59..5a59ffca17cb5 100644
--- a/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/after.phtml
+++ b/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/after.phtml
@@ -3,19 +3,26 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\ImportExport\Block\Adminhtml\Form\After $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div class="entry-edit fieldset" id="import_validation_container" style="display:none;">
+
+<div class="entry-edit fieldset" id="import_validation_container">
     <div class="entry-edit-head legend">
         <span class="icon-head head-edit-form fieldset-legend"
             id="import_validation_container_header"><?= $block->escapeHtml(__('Validation Results')) ?></span>
     </div><br>
     <div id="import_validation_messages" class="fieldset"><!-- --></div>
 </div>
-<script>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'div#import_validation_container') ?>
+<?php $scriptString = <<<script
 require(['jquery', 'Magento_Ui/js/modal/alert', 'prototype'], function(jQuery){
 //<![CDATA[
     varienImport.resetSelectIndex('entity'); // forced resetting entity selector after page refresh
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml
index bd88ec419d848..69779baba381d 100644
--- a/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml
+++ b/app/code/Magento/ImportExport/view/adminhtml/templates/import/form/before.phtml
@@ -6,8 +6,10 @@
 ?>
 <?php
 /** @var $block \Magento\ImportExport\Block\Adminhtml\Import\Edit\Before */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
 require([
     'jquery',
     'Magento_Ui/js/modal/alert',
@@ -27,27 +29,25 @@ require([
          * List of existing behavior sets
          * @type {Array}
          */
-        uniqueBehaviors: <?= /* @noEscape */ $block->getUniqueBehaviors() ?>,
+        uniqueBehaviors: {$block->getUniqueBehaviors()},
 
         /**
          * Behaviour codes for import entities
          * @type {Array}
          */
-        entityBehaviors: <?= /* @noEscape */ $block->getEntityBehaviors() ?>,
+        entityBehaviors: {$block->getEntityBehaviors()},
 
         /**
          * Behaviour notes for import entities
          * @type {Array}
          */
-        entityBehaviorsNotes: <?= /* @noEscape */ $block->getEntityBehaviorsNotes() ?>,
+        entityBehaviorsNotes: {$block->getEntityBehaviorsNotes()},
 
         /**
          * Base url
          * @type {string}
          */
-        sampleFilesBaseUrl: '<?= $block->escapeJs(
-            $block->escapeUrl($block->getUrl('*/*/download/', ['filename' => 'entity-name']))
-        ) ?>',
+        sampleFilesBaseUrl: '{$block->escapeJs($block->getUrl('*/*/download/', ['filename' => 'entity-name']))}',
 
         /**
          * Reset selected index
@@ -168,8 +168,8 @@ require([
          */
         postToFrame: function(newActionUrl) {
             if (!jQuery('[name="' + this.ifrElemName + '"]').length) {
-                jQuery('body').append('<iframe name="' + this.ifrElemName + '" id="' + this.ifrElemName
-                    + '" style="display:none;"/>');
+                jQuery('body').append('<iframe name="' + this.ifrElemName + '" id="' + this.ifrElemName + '"/>');
+                jQuery('iframe#' + this.ifrElemName).attr('display', 'none');
             }
             jQuery('body')
                 .loader({
@@ -209,17 +209,17 @@ require([
         postToFrameProcessResponse: function(response) {
             if ('object' != typeof(response)) {
                 alert({
-                    content: '<?= $block->escapeHtml(__('Invalid response')); ?>'
+                    content: '{$block->escapeHtml(__('Invalid response'))}'
                 });
 
                 return false;
             }
-            $H(response).each(function(pair) {
+            \$H(response).each(function(pair) {
                 switch (pair.key) {
                     case 'show':
                     case 'clear':
                     case 'hide':
-                        $H(pair.value).each(function(val) {
+                        \$H(pair.value).each(function(val) {
                             if ($(val.value)) {
                                 $(val.value)[pair.key]();
                             }
@@ -227,7 +227,7 @@ require([
                         break;
                     case 'innerHTML':
                     case 'value':
-                        $H(pair.value).each(function(val) {
+                        \$H(pair.value).each(function(val) {
                             var el = $(val.key);
                             if (el) {
                                 el[pair.key] = val.value;
@@ -238,7 +238,7 @@ require([
                         break;
                     case 'removeClassName':
                     case 'addClassName':
-                        $H(pair.value).each(function(val) {
+                        \$H(pair.value).each(function(val) {
                             if ($(val.key)) $(val.key)[pair.key](val.value);
                         });
                         break;
@@ -265,4 +265,6 @@ require([
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

From 50d039e555ee094da23ee254d4bc1c2635296fe6 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 23 Apr 2020 11:02:11 +0300
Subject: [PATCH 108/307] MC-29421: Remove event handlers

---
 app/code/Magento/Customer/Block/Address/Edit.php     |  7 ++++++-
 .../luma/Magento_Rma/web/css/source/_module.less     | 12 ++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Customer/Block/Address/Edit.php b/app/code/Magento/Customer/Block/Address/Edit.php
index ef9937a0cde8b..9ac1870cd17d9 100644
--- a/app/code/Magento/Customer/Block/Address/Edit.php
+++ b/app/code/Magento/Customer/Block/Address/Edit.php
@@ -6,6 +6,7 @@
 namespace Magento\Customer\Block\Address;
 
 use Magento\Customer\Api\AddressMetadataInterface;
+use Magento\Customer\Helper\Address;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Exception\NoSuchEntityException;
 
@@ -69,6 +70,7 @@ class Edit extends \Magento\Directory\Block\Data
      * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper
      * @param array $data
      * @param AddressMetadataInterface|null $addressMetadata
+     * @param Address|null $addressHelper
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -85,7 +87,8 @@ public function __construct(
         \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
         \Magento\Framework\Api\DataObjectHelper $dataObjectHelper,
         array $data = [],
-        AddressMetadataInterface $addressMetadata = null
+        AddressMetadataInterface $addressMetadata = null,
+        Address $addressHelper = null
     ) {
         $this->_customerSession = $customerSession;
         $this->_addressRepository = $addressRepository;
@@ -93,6 +96,8 @@ public function __construct(
         $this->currentCustomer = $currentCustomer;
         $this->dataObjectHelper = $dataObjectHelper;
         $this->addressMetadata = $addressMetadata ?: ObjectManager::getInstance()->get(AddressMetadataInterface::class);
+        $data['addressHelper'] = $addressHelper ?: ObjectManager::getInstance()->get(Address::class);
+        $data['directoryHelper'] = $directoryHelper;
         parent::__construct(
             $context,
             $directoryHelper,
diff --git a/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
index e8adcc2f0e4f3..dda1bad1e8366 100644
--- a/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
@@ -194,3 +194,15 @@
         }
     }
 }
+
+#registrant-options {
+    .item {
+        .control {
+            table {
+                .col.qty {
+                    .input-qty {display: none;}
+                }
+            }
+        }
+    }
+}

From dcf6b0f0079023c6801d1ac8a0219235ad9545d7 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Thu, 23 Apr 2020 12:46:13 +0300
Subject: [PATCH 109/307] MC-33647: [2.4.0][MFTF] Test
 AdminConfigurableProductTypeSwitchingToVirtualProductTest fails on Jenkins
 because of bad design (MC-17952)

---
 .../Mftf/Section/AdminProductGridSection.xml  |  2 ++
 ...oductTypeSwitchingToVirtualProductTest.xml | 11 +++++-----
 ...TypeSwitchingToConfigurableProductTest.xml | 20 +++++++++----------
 3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml
index 1aff1a5031413..540db609f550b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/AdminProductGridSection.xml
@@ -9,6 +9,7 @@
         xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
     <section name="AdminProductGridSection">
         <element name="productRowBySku" type="block" selector="//td[count(../../..//th[./*[.='SKU']]/preceding-sibling::th) + 1][./*[.='{{sku}}']]" parameterized="true" />
+        <element name="productRowByName" type="block" selector="//td[count(../../..//th[./*[.='Name']]/preceding-sibling::th) + 1][./*[.='{{sku}}']]" parameterized="true" />
         <element name="productRowCheckboxBySku" type="block" selector="//td[count(../../..//th[./*[.='SKU']]/preceding-sibling::th) + 1][./*[.='{{sku}}']]/../td//input[@data-action='select-row']" parameterized="true" />
         <element name="loadingMask" type="text" selector=".admin__data-grid-loading-mask[data-component*='product_listing']"/>
         <element name="columnHeader" type="button" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]/thead/tr/th[contains(@class, 'data-grid-th')]/span[text() = '{{label}}']" parameterized="true" timeout="30"/>
@@ -35,5 +36,6 @@
         <element name="productGridContentsOnRow" type="checkbox" selector="//*[@id='container']//tr[{{row}}]/td" parameterized="true"/>
         <element name="selectRowBasedOnName" type="input" selector="//td/div[text()='{{var1}}']" parameterized="true"/>
         <element name="changeStatus" type="button" selector="//div[contains(@class,'admin__data-grid-header-row') and contains(@class, 'row')]//div[contains(@class, 'action-menu-item')]//ul/li/span[text() = '{{status}}']" parameterized="true"/>
+        <element name="productRowByTypeAndName" type="block" selector="//div[@data-role='grid-wrapper']//table[contains(@class, 'data-grid')]//td[count(../../..//th[./*[.='Type']]/preceding-sibling::th) + 1][./*[.='{{type}}']]/../td[contains(.,'{{name}}')]" parameterized="true" />
     </section>
 </sections>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminConfigurableProductTypeSwitchingToVirtualProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminConfigurableProductTypeSwitchingToVirtualProductTest.xml
index 36450313f9f3a..dd176455a03ba 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminConfigurableProductTypeSwitchingToVirtualProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminConfigurableProductTypeSwitchingToVirtualProductTest.xml
@@ -13,7 +13,7 @@
             <stories value="Product type switching"/>
             <title value="Configurable product type switching on editing to virtual product"/>
             <description value="Configurable product type switching on editing to virtual product"/>
-            <testCaseId value="MC-17952"/>
+            <testCaseId value="MC-28742"/>
             <useCaseId value="MAGETWO-44170"/>
             <severity value="MAJOR"/>
             <group value="catalog"/>
@@ -21,7 +21,7 @@
         <!--Delete product configurations-->
         <comment userInput="Delete product configuration" stepKey="commentDeleteConfigs"/>
         <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="gotToConfigProductPage">
-            <argument name="productId" value="$$createProduct.id$$"/>
+            <argument name="productId" value="$createProduct.id$"/>
         </actionGroup>
         <waitForPageLoad stepKey="waitForConfigurableProductPageLoad"/>
         <conditionalClick selector="{{ AdminProductFormConfigurationsSection.sectionHeader}}" dependentSelector="{{AdminProductFormConfigurationsSection.createConfigurations}}" visible="false" stepKey="openConfigurationSection"/>
@@ -38,13 +38,12 @@
         <comment userInput="Assert virtual product on Admin product page grid" stepKey="commentAssertVirtualProductOnAdmin"/>
         <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPageForVirtual"/>
         <actionGroup ref="FilterProductGridBySku2ActionGroup" stepKey="filterProductGridBySkuForVirtual">
-            <argument name="sku" value="$$createProduct.sku$$"/>
+            <argument name="sku" value="$createProduct.sku$"/>
         </actionGroup>
-        <see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeVirtualProductNameInGrid"/>
-        <see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Virtual Product" stepKey="seeVirtualProductTypeInGrid"/>
+        <seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Virtual Product',$createProduct.name$)}}" stepKey="seeVirtualProductInGrid"/>
         <!--Assert virtual product on storefront-->
         <comment userInput="Assert virtual product on storefront" stepKey="commentAssertVirtualProductOnStorefront"/>
-        <amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="openVirtualProductPage"/>
+        <amOnPage url="{{StorefrontProductPage.url($createProduct.name$)}}" stepKey="openVirtualProductPage"/>
         <waitForPageLoad stepKey="waitForStorefrontVirtualProductPageLoad"/>
         <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertVirtualProductInStock"/>
     </test>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml
index c5fdbfb36490a..14979f93ca423 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminSimpleProductTypeSwitchingToConfigurableProductTest.xml
@@ -32,6 +32,8 @@
             <createData entity="productAttributeOption2" stepKey="createConfigProductAttributeOptionTwo">
                 <requiredEntity createDataKey="createConfigProductAttribute"/>
             </createData>
+            <!-- Reindex invalidated indices after product attribute has been created/deleted -->
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         </before>
         <after>
             <!--Delete product-->
@@ -39,7 +41,7 @@
             <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
             <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/>
             <actionGroup ref="DeleteAllDuplicateProductUsingProductGridActionGroup" stepKey="deleteAllDuplicateProducts">
-                <argument name="product" value="$$createProduct$$"/>
+                <argument name="product" value="$createProduct$"/>
             </actionGroup>
             <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
@@ -50,27 +52,25 @@
         <!--Add configurations to product-->
         <comment userInput="Add configurations to product" stepKey="commentAddConfigs"/>
         <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="gotToSimpleProductPage">
-            <argument name="productId" value="$$createProduct.id$$"/>
+            <argument name="productId" value="$createProduct.id$"/>
         </actionGroup>
         <waitForPageLoad stepKey="waitForSimpleProductPageLoad"/>
         <actionGroup ref="GenerateConfigurationsByAttributeCodeActionGroup" stepKey="setupConfigurations">
-            <argument name="attributeCode" value="$$createConfigProductAttribute.attribute_code$$"/>
+            <argument name="attributeCode" value="$createConfigProductAttribute.attribute_code$"/>
         </actionGroup>
         <actionGroup ref="SaveConfiguredProductActionGroup" stepKey="saveConfigProductForm"/>
         <!--Assert configurable product on Admin product page grid-->
         <comment userInput="Assert configurable product in Admin product page grid" stepKey="commentAssertConfigProductOnAdmin"/>
         <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/>
         <actionGroup ref="FilterProductGridBySku2ActionGroup" stepKey="filterProductGridBySku">
-            <argument name="sku" value="$$createProduct.sku$$"/>
+            <argument name="sku" value="$createProduct.sku$"/>
         </actionGroup>
-        <see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeProductNameInGrid"/>
-        <see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Configurable Product" stepKey="seeProductTypeInGrid"/>
-        <see selector="{{AdminProductGridSection.productGridCell('2', 'Name')}}" userInput="$$createProduct.name$$-option1" stepKey="seeProductNameInGrid1"/>
-        <see selector="{{AdminProductGridSection.productGridCell('3', 'Name')}}" userInput="$$createProduct.name$$-option2" stepKey="seeProductNameInGrid2"/>
-        <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearProductFilters"/>
+        <seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Configurable Product',$createProduct.name$)}}" stepKey="seeConfigurableProductInGrid"/>
+        <seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Simple Product',$createProduct.name$-option1)}}" stepKey="seeSimpleProduct1NameInGrid"/>
+        <seeElement selector="{{AdminProductGridSection.productRowByTypeAndName('Simple Product',$createProduct.name$-option2)}}" stepKey="seeSimpleProduct2NameInGrid"/>
         <!--Assert configurable product on storefront-->
         <comment userInput="Assert configurable product on storefront" stepKey="commentAssertConfigProductOnStorefront"/>
-        <amOnPage url="{{StorefrontProductPage.url($$createProduct.name$$)}}" stepKey="openProductPage"/>
+        <amOnPage url="{{StorefrontProductPage.url($createProduct.name$)}}" stepKey="openProductPage"/>
         <waitForPageLoad stepKey="waitForStorefrontProductPageLoad"/>
         <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/>
         <click selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="clickAttributeDropDown"/>

From 6386ac6394dd60c1891571202380d84a9f861ad9 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 23 Apr 2020 17:07:44 +0300
Subject: [PATCH 110/307] MC-29421: Remove event handlers

---
 app/code/Magento/Customer/Block/Form/Register.php          | 7 ++++++-
 .../Magento_CatalogPermissions/web/css/source/_module.less | 4 ++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Customer/Block/Form/Register.php b/app/code/Magento/Customer/Block/Form/Register.php
index 46d1088e37d0f..d6d0d9c494c11 100644
--- a/app/code/Magento/Customer/Block/Form/Register.php
+++ b/app/code/Magento/Customer/Block/Form/Register.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Customer\Block\Form;
 
+use Magento\Customer\Helper\Address;
 use Magento\Customer\Model\AccountManagement;
 use Magento\Framework\App\ObjectManager;
 use Magento\Newsletter\Model\Config;
@@ -52,6 +53,7 @@ class Register extends \Magento\Directory\Block\Data
      * @param \Magento\Customer\Model\Url $customerUrl
      * @param array $data
      * @param Config $newsLetterConfig
+     * @param Address|null $addressHelper
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -66,8 +68,11 @@ public function __construct(
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Customer\Model\Url $customerUrl,
         array $data = [],
-        Config $newsLetterConfig = null
+        Config $newsLetterConfig = null,
+        Address $addressHelper = null
     ) {
+        $data['addressHelper'] = $addressHelper ?: ObjectManager::getInstance()->get(Address::class);
+        $data['directoryHelper'] = $directoryHelper;
         $this->_customerUrl = $customerUrl;
         $this->_moduleManager = $moduleManager;
         $this->_customerSession = $customerSession;
diff --git a/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
index 6ce041fc19ac8..1a673e881fb6a 100644
--- a/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
+++ b/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
@@ -17,3 +17,7 @@
         }
     }
 }
+
+.warning-enable-permissions {
+    color: red;
+}

From a22254e64338327808afac10d9dff02c112598e5 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 23 Apr 2020 18:51:11 +0300
Subject: [PATCH 111/307] MC-29420: Remove event handlers from CE

---
 .../templates/notification/window.phtml       |   1 -
 .../templates/directpost/iframe.phtml         |   0
 .../adminhtml/templates/directpost/info.phtml |   0
 app/code/Magento/Backend/Block/Template.php   |  17 +-
 .../Block/Widget/Form/Element/Dependence.php  |  13 +-
 .../adminhtml/templates/dashboard/chart.phtml |   2 +-
 .../templates/dashboard/store/switcher.phtml  |   7 +-
 .../adminhtml/templates/store/switcher.phtml  |   2 +-
 .../templates/system/cache/edit.phtml         |   6 +-
 .../widget/form/element/gallery.phtml         |   4 +-
 .../templates/widget/grid/extended.phtml      |   8 +-
 .../adminhtml/templates/widget/tabs.phtml     |   4 +-
 .../templates/widget/tabshoriz.phtml          |   2 +-
 .../adminhtml/templates/backup/dialogs.phtml  |  14 +-
 .../view/adminhtml/templates/form/cc.phtml    |   7 +-
 .../templates/multishipping/form.phtml        |   4 +-
 .../templates/multishipping/form_paypal.phtml |   4 +-
 .../Product/Edit/Tab/Bundle/Option.php        |   6 +-
 .../Adminhtml/Sales/Order/Items/Renderer.php  |   6 +-
 .../product/edit/bundle/option.phtml          |  22 +--
 .../creditmemo/create/items/renderer.phtml    |   9 +-
 .../creditmemo/view/items/renderer.phtml      |   9 +-
 .../sales/invoice/create/items/renderer.phtml |   9 +-
 .../sales/invoice/view/items/renderer.phtml   |   9 +-
 .../sales/order/view/items/renderer.phtml     |   9 +-
 .../shipment/create/items/renderer.phtml      |   8 +-
 .../sales/shipment/view/items/renderer.phtml  |   9 +-
 .../view/adminhtml/templates/default.phtml    |   2 +-
 .../Catalog/Block/Adminhtml/Category/Tree.php |  11 +-
 .../Block/Adminhtml/Helper/Form/Wysiwyg.php   |  27 +--
 .../Catalog/Block/Adminhtml/Product/Edit.php  |   8 +-
 .../Adminhtml/Product/Edit/AttributeSet.php   |   8 +-
 .../Block/Adminhtml/Product/Edit/Js.php       |   8 +-
 .../Product/Edit/Tab/Attributes/Search.php    |   8 +-
 .../Product/Edit/Tab/Options/Option.php       |   6 +-
 .../Adminhtml/Product/Edit/Tab/Price/Tier.php |  10 +-
 .../Product/Helper/Form/Category.php          |  11 +-
 .../Adminhtml/Product/Helper/Form/Config.php  |   2 +-
 .../Product/Helper/Form/Gallery/Content.php   |   8 +-
 .../Adminhtml/Product/Helper/Form/Image.php   |   4 +
 .../Catalog/Block/Product/ListProduct.php     |   8 +-
 .../catalog/category/widget/tree.phtml        |   4 +-
 .../form/renderer/fieldset/element.phtml      |   4 +-
 .../catalog/product/attribute/js.phtml        |   6 +-
 .../fieldset/options/type/file.phtml          |   5 +-
 .../templates/catalog/product/edit.phtml      | 157 +++++++++---------
 .../catalog/product/edit/attribute_set.phtml  |  11 +-
 .../product/edit/category/new/form.phtml      |   2 +-
 .../catalog/product/edit/options/option.phtml |  10 +-
 .../catalog/product/edit/price/tier.phtml     |   3 +-
 .../catalog/product/helper/gallery.phtml      |   1 +
 .../templates/catalog/product/js.phtml        |   7 +-
 .../product/edit/attribute/search.phtml       |   1 +
 .../fieldset/options/view/checkable.phtml     |  12 +-
 .../product/image_with_borders.phtml          |   2 +-
 .../frontend/templates/product/list.phtml     |   3 +-
 .../CatalogSearch/Block/Advanced/Form.php     |   9 +-
 .../frontend/templates/advanced/form.phtml    |   6 +-
 .../Checkout/Block/Total/DefaultTotal.php     |   8 +-
 .../view/frontend/templates/onepage.phtml     |   2 +-
 .../frontend/templates/total/default.phtml    |  17 +-
 .../templates/browser/content/files.phtml     |   4 +-
 .../adminhtml/templates/browser/tree.phtml    |   7 +-
 .../page/system/config/robots/reset.phtml     |   3 +-
 .../templates/system/config/js.phtml          |   3 +-
 .../templates/system/config/switcher.phtml    |   8 +-
 .../Composite/Fieldset/Configurable.php       |   8 +-
 .../Block/Adminhtml/Product/Steps/Bulk.php    |   9 +-
 .../composite/fieldset/configurable.phtml     |   6 +-
 .../product/edit/attribute/steps/bulk.phtml   |  12 +-
 .../catalog/product/edit/super/matrix.phtml   |   9 +-
 .../catalog/product/edit/super/wizard.phtml   |   6 +-
 .../configurable/attribute-selector/js.phtml  |   4 +-
 .../Magento/Cookie/Block/Html/Notices.php     |  12 +-
 .../frontend/templates/html/notices.phtml     |   4 +-
 .../view/adminhtml/templates/grid.phtml       |   2 +-
 .../Magento/Customer/Block/Form/Register.php  |   6 +-
 .../templates/system/config/validatevat.phtml |  19 +--
 .../frontend/templates/form/register.phtml    |   1 +
 .../templates/js/optional_zip_countries.phtml |   1 +
 .../Sales/Items/Column/Downloadable/Name.php  |   7 +-
 .../column/downloadable/creditmemo/name.phtml |   4 +-
 .../column/downloadable/invoice/name.phtml    |   4 +-
 .../items/column/downloadable/name.phtml      |   4 +-
 .../view/frontend/templates/code.phtml        |  25 +--
 .../system/storage/media/synchronize.phtml    |  41 +++--
 .../templates/product/view/list.phtml         |   9 +-
 .../Adminhtml/Order/Invoice/Create/Form.php   |   7 +-
 .../templates/order/invoice/create/form.phtml |   5 +-
 .../Magento/Tax/Block/Adminhtml/Rate/Form.php |   8 +-
 .../view/adminhtml/templates/rate/js.phtml    |   3 +-
 .../adminhtml/templates/rule/rate/form.phtml  |   2 +-
 .../templates/toolbar/class/add.phtml         |   2 +-
 .../templates/toolbar/rule/add.phtml          |   2 +-
 .../templates/checkout/grandtotal.phtml       |   9 +-
 .../templates/checkout/shipping.phtml         |  13 +-
 .../templates/checkout/subtotal.phtml         |   9 +-
 .../frontend/templates/checkout/tax.phtml     |  13 +-
 .../Block/Backend/System/CarrierConfig.php    |   6 +-
 .../system/shipping/carrier_config.phtml      |   4 +-
 100 files changed, 498 insertions(+), 385 deletions(-)
 delete mode 100644 app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml
 delete mode 100644 app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml

diff --git a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
index 980d8e89137ba..f2e8e96fa2585 100644
--- a/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
+++ b/app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml
@@ -10,7 +10,6 @@
  */
 ?>
 <ul class="message-system-list"
-    style="display: none;"
     data-mage-init='{
         "Magento_Ui/js/modal/modal": {
             "autoOpen": true,
diff --git a/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml
deleted file mode 100644
index e69de29bb2d1d..0000000000000
diff --git a/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml b/app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml
deleted file mode 100644
index e69de29bb2d1d..0000000000000
diff --git a/app/code/Magento/Backend/Block/Template.php b/app/code/Magento/Backend/Block/Template.php
index 1c4cd4f9bcc33..b4c41645d7f65 100644
--- a/app/code/Magento/Backend/Block/Template.php
+++ b/app/code/Magento/Backend/Block/Template.php
@@ -9,7 +9,8 @@
 namespace Magento\Backend\Block;
 
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
+use Magento\Directory\Helper\Data as DirectoryHelper;
 
 /**
  * Standard admin block. Adds admin-specific behavior and event.
@@ -63,17 +64,23 @@ class Template extends \Magento\Framework\View\Element\Template
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
+     * @param DirectoryHelper|null $directoryHelper
      */
-    public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = [])
-    {
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        array $data = [],
+        ?JsonHelper $jsonHelper = null,
+        ?DirectoryHelper $directoryHelper = null
+    ) {
         $this->_localeDate = $context->getLocaleDate();
         $this->_authorization = $context->getAuthorization();
         $this->mathRandom = $context->getMathRandom();
         $this->_backendSession = $context->getBackendSession();
         $this->formKey = $context->getFormKey();
         $this->nameBuilder = $context->getNameBuilder();
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
-        $data['directoryHelper']= ObjectManager::getInstance()->get(\Magento\Directory\Helper\Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
+        $data['directoryHelper']= $directoryHelper ?? ObjectManager::getInstance()->get(DirectoryHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
index 45024ad16b31f..5517cb8d4d617 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php
@@ -55,21 +55,29 @@ class Dependence extends \Magento\Backend\Block\AbstractBlock
      */
     protected $_jsonEncoder;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Config\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
         \Magento\Config\Model\Config\Structure\Element\Dependency\FieldFactory $fieldFactory,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_fieldFactory = $fieldFactory;
         parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -134,12 +142,11 @@ protected function _toHtml()
             $params .= ', ' .  $this->_jsonEncoder->encode($this->_configOptions);
         }
 
-        $secureHtmlRenderer = ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
         $scriptString = 'require([\'mage/adminhtml/form\'], function(){
     new FormElementDependenceController(' . $params . ');
 });';
 
-        return /* @noEscape */ $secureHtmlRenderer->renderTag('script', [], $scriptString, false);
+        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 
     /**
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml
index df47f3f41be1b..56131fa622321 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/chart.phtml
@@ -22,7 +22,7 @@ $viewModel = $block->getViewModel();
         <canvas id="chart_<?= $escaper->escapeHtmlAttr($block->getData('html_id')) ?>_period"/>
         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
             'display:none',
-            '#chart_' . $escaper->escapeHtmlAttr($block->getData('html_id')) . '_period'
+            '#chart_' . $escaper->escapeJs($block->getData('html_id')) . '_period'
         ) ?>
         <div class="dashboard-diagram-nodata">
             <span><?= $escaper->escapeHtml(__('No Data Found')) ?></span>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
index 870c1dbb7ef1e..b99051f33fe3a 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
@@ -8,7 +8,7 @@
 ?>
 <p class="switcher"><label for="store_switcher"><?= $block->escapeHtml(__('View Statistics For:')) ?></label>
 <?= $block->getHintHtml() ?>
-<select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
+<select name="store_switcher" id="store_switcher" class="left-col-block">
     <option value=""><?= $block->escapeHtml(__('All Websites')) ?></option>
     <?php foreach ($block->getWebsiteCollection() as $_website): ?>
         <?php $showWebsite = false; ?>
@@ -40,6 +40,11 @@
         <?php endforeach; ?>
     <?php endforeach; ?>
 </select>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onchange',
+    "return switchStore($('select#store_switcher');",
+    'select#store_switcher'
+) ?>
 </p>
 <?php $scriptString = <<<script
     require([
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
index 2a6d7e39c5db2..e067a4dd27a77 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
@@ -17,7 +17,7 @@
                <?= /* @noEscape */ $block->getUiId() ?> />
         <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
             'onchange',
-            'switchScope(this);',
+            "switchScope($('#store_switcher'));",
             '#store_switcher'
         ) ?>
         <input type="hidden" name="store_group_switcher" id="store_group_switcher"
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
index 36184816dc172..5255fe4de8737 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
@@ -63,6 +63,9 @@ script;
                                     id="<?= $block->escapeHtmlAttr($_button['name']) ?>"
                                     type="button"
                                     class="scalable
+                                <?php if (isset($_button['disabled']) && $_button['disabled']):?>disabled<?php endif;?>"
+                                ><span><span><span><?= $block->escapeHtml($_button['action']) ?></span></span></span>
+                                </button>
                                 <?php if (!isset($_button['disabled']) || !$_button['disabled']):?>
                                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                         'onclick',
@@ -70,9 +73,6 @@ script;
                                         '#' . $block->escapeHtmlAttr($_button['name'])
                                     ) ?>
                                 <?php endif; ?>
-                                <?php if (isset($_button['disabled']) && $_button['disabled']):?>disabled<?php endif;?>"
-                                ><span><span><span><?= $block->escapeHtml($_button['action']) ?></span></span></span>
-                                </button>
                                 <?php if (isset($_button['comment'])): ?> <br />
                                     <small><?= $block->escapeHtml($_button['comment']) ?></small>
                                 <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
index 4120348daec00..955fb4fd1183c 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
@@ -90,7 +90,9 @@ script;
 
 </tbody></table>
 
-<?php $jsonHelper = $block->getData('jsonHelper');
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 
 $scriptString = <<<script
 require([
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 4ea657b14e2dd..59fe83013b1a7 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -116,7 +116,7 @@ $numColumns = count($block->getColumns());
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                 /* @noEscape */ ($_curPage - 1) . '\');return false;',
-                                'button.action-previous'
+                                '. admin__data-grid-pager button.action-previous'
                             ) ?>
                         <?php else: ?>
                             <button type="button" class="action-previous disabled">
@@ -150,7 +150,7 @@ $numColumns = count($block->getColumns());
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                 /* @noEscape */ ($_curPage + 1) . '\');return false;',
-                                'button.action-next'
+                                '. admin__data-grid-pager button.action-next'
                             ) ?>
                         <?php else: ?>
                             <button type="button" class="action-next disabled">
@@ -285,7 +285,9 @@ $numColumns = count($block->getColumns());
 
     </div>
 </div>
-    <?php $jsonHelper = $block->getData('jsonHelper');
+    <?php
+    /** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+    $jsonHelper = $block->getData('jsonHelper');
     if ($block->canDisplayContainer()):
         $scriptString = <<<script
     var deps = [];
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
index 4ebf586fce533..2346a619f4dc8 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
@@ -75,12 +75,12 @@
                 <?php if ($block->getTabIsHidden($_tab)): ?>
                     <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                         'display:none',
-                        'li.admin__page-nav-item#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+                        'li.admin__page-nav-item#' . $block->escapeJs($block->getTabId($_tab))
                     ); ?>
                 <?php endif; ?>
                 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                     'display:none',
-                    'div#' . $block->escapeHtmlAttr($block->getTabId($_tab)) . '_content'
+                    'div#' . $block->escapeJs($block->getTabId($_tab)) . '_content'
                 ); ?>
             </li>
         <?php endforeach; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
index 3d77d12604930..75858f044e76b 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
@@ -42,7 +42,7 @@
         </div>
         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
             'display:none',
-            '#' . $block->escapeHtmlAttr($block->getTabId($_tab))
+            '#' . $block->escapeJs($block->getTabId($_tab))
         ); ?>
     </li>
     <?php endforeach; ?>
diff --git a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml
index 5251feb8c6710..33313e71d8c6a 100644
--- a/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml
+++ b/app/code/Magento/Backup/view/adminhtml/templates/backup/dialogs.phtml
@@ -14,10 +14,9 @@
 <p><?= $block->escapeHtml(__('Are you sure you want to continue?')) ?></p>
 </script>
 <script type="text/x-magento-template" id="backup-options-template">
-    <div class="backup-messages">
+    <div class="backup-messages no-display">
         <div class="messages"></div>
     </div>
-    <?=/* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'div.backup-messages') ?>
     <div class="messages">
         <div class="message message-warning">
             <?= $block->escapeHtml(__('This may take a few moments.')) ?>
@@ -61,7 +60,8 @@
                 </div>
             </div>
 
-            <div class="admin__field field maintenance-checkbox-container" id="exclude-media-checkbox-container">
+            <div class="admin__field field maintenance-checkbox-container no-display"
+                 id="exclude-media-checkbox-container">
                 <label for="exclude_media" class="admin__field-label">
                     <span><?= $block->escapeHtml(__('Exclude')) ?></span>
                 </label>
@@ -78,16 +78,14 @@
                     </div>
                 </div>
             </div>
-            <?=/* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#exclude-media-checkbox-container') ?>
         </fieldset>
     </form>
 </script>
 
 <script type="text/x-magento-template" id="rollback-request-password-template">
-    <div class="backup-messages">
+    <div class="backup-messages no-display">
         <div class="messages"></div>
     </div>
-    <?=/* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'div.backup-messages') ?>
     <div class="messages">
         <div class="message message-warning">
             <?= $block->escapeHtml(__('Please enter the password to confirm rollback.')) ?><br>
@@ -137,7 +135,7 @@
                 </div>
             </div>
         </fieldset>
-        <div class="entry-edit" id="ftp-credentials-container">
+        <div class="entry-edit no-display" id="ftp-credentials-container">
             <fieldset class="admin__fieldset">
                 <legend class="admin__legend legend">
                     <span><?= $block->escapeHtml(__('FTP credentials')) ?></span>
@@ -202,8 +200,6 @@ require([
 script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#use-ftp-checkbox-row') ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#ftp-credentials-container') ?>
 <?=/* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
     'backup.toggleFtpCredentialsForm(event)',
diff --git a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
index 995db82618106..d90722caf4fe2 100644
--- a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
+++ b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml
@@ -88,6 +88,9 @@ $ccType = $block->getInfoData('cc_type');
     <input type="hidden" id="<?= /* @noEscape */ $code ?>_payment_method_nonce"
            name="payment[payment_method_nonce]"/>
     <input type="submit" name="Submit">
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display;none', 'input[name=\'Submit\']') ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display;none',
+        '#payment_form_' . /* @noEscape */ $code . ' input[name=\'Submit\']'
+    ) ?>
 </fieldset>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display;none', 'payment_form_' . /* @noEscape */ $code) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display;none', '#payment_form_' . /* @noEscape */ $code) ?>
diff --git a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml
index 3c0828cb3677d..af622fcfab9fb 100644
--- a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml
+++ b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form.phtml
@@ -4,7 +4,7 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $scriptString = <<<script
     require([
@@ -29,5 +29,5 @@
     })
 script;
 ?>
-<?= /* @noEscape */ $csp->renderTag('script', [], $scriptString) ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString) ?>
 <!-- ko template: getTemplate() --><!-- /ko -->
diff --git a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml
index abb99e5290442..b191d9621167c 100644
--- a/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml
+++ b/app/code/Magento/Braintree/view/frontend/templates/multishipping/form_paypal.phtml
@@ -4,7 +4,7 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $scriptString = <<<script
 
@@ -30,5 +30,5 @@
     })
 script;
 ?>
-<?= /* @noEscape */ $csp->renderTag('script', [], $scriptString) ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <!-- ko template: getTemplate() --><!-- /ko -->
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
index 63542b381d34b..befa5794bfb69 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php
@@ -61,18 +61,20 @@ class Option extends \Magento\Backend\Block\Widget
      * @param \Magento\Bundle\Model\Source\Option\Type $optionTypes
      * @param \Magento\Framework\Registry $registry
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Config\Model\Config\Source\Yesno $yesno,
         \Magento\Bundle\Model\Source\Option\Type $optionTypes,
         \Magento\Framework\Registry $registry,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->_coreRegistry = $registry;
         $this->_optionTypes = $optionTypes;
         $this->_yesno = $yesno;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
index de1caac75e143..f1a09369df74c 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
@@ -32,6 +32,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
      * @param \Magento\Framework\Registry $registry
      * @param array $data
      * @param \Magento\Framework\Serialize\Serializer\Json $serializer
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -39,10 +40,11 @@ public function __construct(
         \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration,
         \Magento\Framework\Registry $registry,
         array $data = [],
-        Json $serializer = null
+        Json $serializer = null,
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $stockRegistry, $stockConfiguration, $registry, $data);
     }
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml
index 4582de57a8b4a..d6637401cff9f 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml
@@ -134,7 +134,9 @@
 
 <?= $block->getSelectionHtml() ?>
 
-<?php $helper = $block->getData('jsonHelper');
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
 $scriptString = <<<script
 require([
     'jquery',
@@ -193,14 +195,14 @@ $scriptString .= <<<script
 
         //set selected type
         if (data.type) {
-            $A($(this.idLabel + '_'+data.index+'_type').options).each(function(option){
+            \$A($(this.idLabel + '_'+data.index+'_type').options).each(function(option){
                 if (option.value==data.type) option.selected = true;
             });
         }
 
         //set selected is_require
         if (data.required) {
-            $A($(this.idLabel + '_'+data.index+'_required').options).each(function(option){
+            \$A($(this.idLabel + '_'+data.index+'_required').options).each(function(option){
                 if (option.value==data.required) option.selected = true;
             });
         }
@@ -240,7 +242,7 @@ $scriptString .= <<<script
         parts = element.id.split('_');
         i = parts[2];
         if (element.value == 'multi' || element.value == 'checkbox') {
-            inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' tr.selection input.default'));
+            inputs = \$A($$('#' + bSelection.idLabel + '_box_' + i + ' tr.selection input.default'));
             inputs.each(
                 function(elem){
                     //elem.type = "checkbox";
@@ -250,7 +252,7 @@ $scriptString .= <<<script
             /**
              * Hide not needed elements (user defined qty select box)
              */
-            inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' .qty-box'));
+            inputs = \$A($$('#' + bSelection.idLabel + '_box_' + i + ' .qty-box'));
             inputs.each(
                 function(elem){
                     elem.hide();
@@ -258,7 +260,7 @@ $scriptString .= <<<script
             );
 
         } else {
-            inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' tr.selection input.default'));
+            inputs = \$A($$('#' + bSelection.idLabel + '_box_' + i + ' tr.selection input.default'));
             have = false;
             for (j=0; j< inputs.length; j++) {
                 //inputs[j].type = "radio";
@@ -273,7 +275,7 @@ $scriptString .= <<<script
             /**
              * Show user defined select box
              */
-            inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' .qty-box'));
+            inputs = \$A($$('#' + bSelection.idLabel + '_box_' + i + ' .qty-box'));
             inputs.each(
                 function(elem){
                     elem.show();
@@ -283,7 +285,7 @@ $scriptString .= <<<script
     },
 
     priceTypeFixed : function() {
-        inputs = $A($$('.price-type-box'));
+        inputs = \$A($$('.price-type-box'));
         inputs.each(
             function(elem){
                 elem.show();
@@ -292,7 +294,7 @@ $scriptString .= <<<script
     },
 
     priceTypeDynamic : function() {
-        inputs = $A($$('.price-type-box'));
+        inputs = \$A($$('.price-type-box'));
         inputs.each(
             function(elem){
                 elem.hide();
@@ -316,7 +318,7 @@ foreach ($block->getOptions() as $_option) {
         }
     }
 }
-?>
+
 $scriptString .= <<<script
 function togglePriceType() {
     bOption['priceType' + ($('price_type').value == '1' ? 'Fixed' : 'Dynamic')]();
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
index f42e1eb070479..5fef2baf2ed65 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
@@ -3,9 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
+
 /**
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
@@ -17,7 +15,10 @@
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
-<?php $helper = $block->getData('jsonHelper') ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 
 <?php $_prevOptionId = '' ?>
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
index 49df0468ec992..f19767bf488ca 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
@@ -3,9 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
+
 /**
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
@@ -17,7 +15,10 @@
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
-<?php $helper = $block->getData('jsonHelper') ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 
 <?php $_prevOptionId = '' ?>
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
index 2bcede5899e56..caf2470f20f50 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
@@ -3,9 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
+
 /**
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
@@ -17,7 +15,10 @@
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
-<?php $helper = $block->getData('jsonHelper') ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 
 <?php $_prevOptionId = '' ?>
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
index b783003958b59..b7906fe5bf044 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
@@ -3,9 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
+
 /**
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer
  */
@@ -17,7 +15,10 @@
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
-<?php $helper = $block->getData('jsonHelper') ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 
 <?php $_prevOptionId = '' ?>
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
index 3f0987f129f21..c8d3a9b1f091c 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
@@ -3,9 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
+
 /**
  * @see \Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items\Renderer
  */
@@ -17,7 +15,10 @@
 <?php $items = array_merge([$_item], $_item->getChildrenItems()); ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
-<?php $helper = $block->getData('jsonHelper') ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 
 <?php $_prevOptionId = '' ?>
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
index d40eaa83e76ba..0a5083ba0b569 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
@@ -3,15 +3,15 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
 
-<?php
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php $helper = $block->getData('jsonHelper'); ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
 <?php $_count = count($items) ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
index 6f4a2888b13f7..6510d1493f764 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
@@ -3,9 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-?>
-<?php
+
 /** @var $block \Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
@@ -15,7 +13,10 @@
 <?php $shipItems = $block->getChildren($_item) ?>
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
-<?php $helper = $block->getData('jsonHelper') ?>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $helper */
+$helper = $block->getData('jsonHelper');
+?>
 
 <?php $_prevOptionId = '' ?>
 
diff --git a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
index 490bd159f28bd..e73174d3768df 100644
--- a/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
+++ b/app/code/Magento/Captcha/view/adminhtml/templates/default.phtml
@@ -44,7 +44,7 @@ $captcha = $block->getCaptchaModel();
 </div>
 
 <?php
-$url = $block->escapeJs($block->escapeUrl($block->getRefreshUrl()));
+$url = $block->escapeJs($block->getRefreshUrl());
 $formId = $block->escapeJs($block->escapeHtml($block->getFormId()));
 $scriptString = <<<script
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
index 4433dc80a0fa3..a66dcece2bef0 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
@@ -12,7 +12,6 @@
 use Magento\Catalog\Model\ResourceModel\Category\Collection;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Tree\Node;
-use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Store\Model\Store;
 
@@ -52,11 +51,6 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
      */
     protected $secureRenderer;
 
-    /**
-     * @var Random
-     */
-    private $random;
-
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Catalog\Model\ResourceModel\Category\Tree $categoryTree
@@ -67,7 +61,6 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory
      * @param \Magento\Backend\Model\Auth\Session $backendSession
      * @param array $data
      * @param SecureHtmlRenderer|null $secureRenderer
-     * @param Random|null $random
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -78,15 +71,13 @@ public function __construct(
         \Magento\Framework\DB\Helper $resourceHelper,
         \Magento\Backend\Model\Auth\Session $backendSession,
         array $data = [],
-        ?SecureHtmlRenderer $secureRenderer = null,
-        ?Random $random = null
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_resourceHelper = $resourceHelper;
         $this->_backendSession = $backendSession;
         parent::__construct($context, $categoryTree, $registry, $categoryFactory, $data);
         $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
-        $this->random = $random ?? ObjectManager::getInstance()->get(Random::class);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
index 95b7397e385a6..48753bfd6efb4 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Helper/Form/Wysiwyg.php
@@ -12,7 +12,6 @@
 namespace Magento\Catalog\Block\Adminhtml\Helper\Form;
 
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 /**
@@ -51,11 +50,6 @@ class Wysiwyg extends \Magento\Framework\Data\Form\Element\Textarea
      */
     protected $secureRenderer;
 
-    /**
-     * @var Random
-     */
-    private $random;
-
     /**
      * @param \Magento\Framework\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection
@@ -66,7 +60,6 @@ class Wysiwyg extends \Magento\Framework\Data\Form\Element\Textarea
      * @param \Magento\Backend\Helper\Data $backendData
      * @param array $data
      * @param SecureHtmlRenderer|null $secureRenderer
-     * @param Random|null $random
      */
     public function __construct(
         \Magento\Framework\Data\Form\Element\Factory $factoryElement,
@@ -77,18 +70,14 @@ public function __construct(
         \Magento\Framework\Module\Manager $moduleManager,
         \Magento\Backend\Helper\Data $backendData,
         array $data = [],
-        ?SecureHtmlRenderer $secureRenderer = null,
-        ?Random $random = null
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_wysiwygConfig = $wysiwygConfig;
         $this->_layout = $layout;
         $this->_moduleManager = $moduleManager;
         $this->_backendData = $backendData;
         parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
-        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
-        $random = $random ?? ObjectManager::getInstance()->get(Random::class);
-        $this->secureRenderer = $secureRenderer;
-        $this->random = $random;
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
 
     /**
@@ -103,18 +92,19 @@ public function getAfterElementHtml()
 
         $html = parent::getAfterElementHtml();
         if ($this->getIsWysiwygEnabled()) {
-            $buttonId = 'wysiwyg_action_button_' . $this->random->getRandomString(32);
             $disabled = $this->getDisabled() || $this->getReadonly();
             $html .= $this->_layout->createBlock(
                 \Magento\Backend\Block\Widget\Button::class,
                 '',
                 [
                     'data' => [
-                        'id' => $buttonId,
                         'label' => __('WYSIWYG Editor'),
                         'type' => 'button',
                         'disabled' => $disabled,
                         'class' => 'action-wysiwyg',
+                        'onclick' => 'catalogWysiwygEditor.open(\'' . $this->_backendData->getUrl(
+                            'catalog/product/wysiwyg'
+                        ) . '\', \'' . $this->getHtmlId() . '\')',
                     ]
                 ]
             )->toHtml();
@@ -143,13 +133,6 @@ public function getAfterElementHtml()
 });
 HTML;
             $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
-            $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
-                'onclick',
-                'catalogWysiwygEditor.open(\'' . $this->_backendData->getUrl(
-                    'catalog/product/wysiwyg'
-                ) . '\', \'' . $this->getHtmlId() . '\')',
-                $buttonId
-            );
         }
 
         return $html;
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
index 5be85db894c40..f4080104b40cd 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
@@ -14,7 +14,7 @@
 
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Escaper;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Class for Product Edit.
@@ -61,6 +61,7 @@ class Edit extends \Magento\Backend\Block\Widget
      * @param \Magento\Catalog\Helper\Product $productHelper
      * @param Escaper $escaper
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -69,14 +70,15 @@ public function __construct(
         \Magento\Framework\Registry $registry,
         \Magento\Catalog\Helper\Product $productHelper,
         Escaper $escaper,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->_productHelper = $productHelper;
         $this->_attributeSetFactory = $attributeSetFactory;
         $this->_coreRegistry = $registry;
         $this->jsonEncoder = $jsonEncoder;
         $this->escaper = $escaper;
-        $data['helper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php
index 01c82df6b2293..6419ae2d70588 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/AttributeSet.php
@@ -12,7 +12,7 @@
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit;
 
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Admin AttributeSet block
@@ -30,14 +30,16 @@ class AttributeSet extends \Magento\Backend\Block\Widget\Form
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\Registry $registry,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->_coreRegistry = $registry;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php
index 4436099c215d9..2620fd345c667 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Js.php
@@ -10,7 +10,7 @@
 use Magento\Tax\Api\TaxCalculationInterface;
 use Magento\Tax\Model\TaxClass\Source\Product as ProductTaxClassSource;
 use Magento\Framework\App\ObjectManager;
-use Magento\Tax\Helper\Data;
+use Magento\Tax\Helper\Data as TaxHelper;
 
 class Js extends \Magento\Backend\Block\Template
 {
@@ -53,6 +53,7 @@ class Js extends \Magento\Backend\Block\Template
      * @param TaxCalculationInterface $calculationService
      * @param ProductTaxClassSource $productTaxClassSource
      * @param array $data
+     * @param TaxHelper|null $taxHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -61,14 +62,15 @@ public function __construct(
         \Magento\Framework\Json\Helper\Data $jsonHelper,
         TaxCalculationInterface $calculationService,
         ProductTaxClassSource $productTaxClassSource,
-        array $data = []
+        array $data = [],
+        ?TaxHelper $taxHelper = null
     ) {
         $this->coreRegistry = $registry;
         $this->currentCustomer = $currentCustomer;
         $this->jsonHelper = $jsonHelper;
         $this->calculationService = $calculationService;
         $this->productTaxClassSource = $productTaxClassSource;
-        $data['helper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
index 7bef31e0839a3..702c77e3a5595 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes/Search.php
@@ -12,7 +12,7 @@
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Attributes;
 
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Admin product attribute search block
@@ -42,18 +42,20 @@ class Search extends \Magento\Backend\Block\Widget
      * @param \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $collectionFactory
      * @param \Magento\Framework\Registry $registry
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\DB\Helper $resourceHelper,
         \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $collectionFactory,
         \Magento\Framework\Registry $registry,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->_resourceHelper = $resourceHelper;
         $this->_collectionFactory = $collectionFactory;
         $this->_coreRegistry = $registry;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
index 6329c490d241c..0a9434768737d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php
@@ -15,7 +15,7 @@
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Store\Model\Store;
 
@@ -88,6 +88,7 @@ class Option extends Widget
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
@@ -98,6 +99,7 @@ public function __construct(
         \Magento\Framework\Registry $registry,
         \Magento\Catalog\Model\ProductOptions\ConfigInterface $productOptionConfig,
         array $data = [],
+        ?JsonHelper $jsonHelper = null,
         ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_optionType = $optionType;
@@ -105,7 +107,7 @@ public function __construct(
         $this->_product = $product;
         $this->_productOptionConfig = $productOptionConfig;
         $this->_coreRegistry = $registry;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
         $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
     }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
index 993b256fb7317..00cd020e4f525 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Price/Tier.php
@@ -8,10 +8,12 @@
 use Magento\Customer\Api\GroupManagementInterface;
 use Magento\Customer\Api\GroupRepositoryInterface;
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Adminhtml tier price item renderer
+ *
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 class Tier extends Group\AbstractGroup
 {
@@ -30,6 +32,7 @@ class Tier extends Group\AbstractGroup
      * @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
      * @param \Magento\Framework\Locale\CurrencyInterface $localeCurrency
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -40,9 +43,10 @@ public function __construct(
         GroupManagementInterface $groupManagement,
         \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
         \Magento\Framework\Locale\CurrencyInterface $localeCurrency,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct(
             $context,
             $groupRepository,
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
index f1d3483e9dbd0..698bb12022bc6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
@@ -141,6 +141,7 @@ public function getAfterElementHtml()
                 'id' => 'add_category_button',
                 'label' => $newCategoryCaption,
                 'title' => $newCategoryCaption,
+                'onclick' => 'jQuery("#new-category").modal("openModal")',
                 'disabled' => $this->getDisabled(),
             ]
         );
@@ -153,14 +154,8 @@ public function getAfterElementHtml()
         });
 script;
 
-        return $return .
-            /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false) .
-            $button->toHtml() .
-            /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
-                'onclick',
-                'jQuery("#new-category").modal("openModal")',
-                '#add_category_button'
-            );
+        return $return . $button->toHtml() .
+            /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
index bec1a57320aa0..541d0f79f4da6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
@@ -52,7 +52,7 @@ public function getElementHtml()
         $html .= /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
         $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
             'onclick',
-            "toggleValueElements(this, this.parentNode);",
+            "toggleValueElements($('#' . $htmlId), $('#' . $htmlId).parentNode);",
             '#' . $htmlId
         );
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
index c5a7bf3ae5fd6..57cea59bee207 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery/Content.php
@@ -15,7 +15,7 @@
 
 use Magento\Framework\App\ObjectManager;
 use Magento\Backend\Block\Media\Uploader;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 use Magento\Framework\View\Element\AbstractBlock;
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Exception\FileSystemException;
@@ -66,6 +66,7 @@ class Content extends \Magento\Backend\Block\Widget
      * @param array $data
      * @param ImageUploadConfigDataProvider $imageUploadConfigDataProvider
      * @param Database $fileStorageDatabase
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -73,11 +74,12 @@ public function __construct(
         \Magento\Catalog\Model\Product\Media\Config $mediaConfig,
         array $data = [],
         ImageUploadConfigDataProvider $imageUploadConfigDataProvider = null,
-        Database $fileStorageDatabase = null
+        Database $fileStorageDatabase = null,
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_mediaConfig = $mediaConfig;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
         $this->imageUploadConfigDataProvider = $imageUploadConfigDataProvider
             ?: ObjectManager::getInstance()->get(ImageUploadConfigDataProvider::class);
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
index 5fa07b2077053..a873d1465af21 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
@@ -11,6 +11,10 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Data\Form\Element\Factory;
+use Magento\Framework\Math\Random;
+use Magento\Framework\UrlInterface;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class Image extends \Magento\Framework\Data\Form\Element\Image
diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php
index 8ca815becfab1..3d1c3f504f91a 100644
--- a/app/code/Magento/Catalog/Block/Product/ListProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php
@@ -24,7 +24,7 @@
 use Magento\Framework\Pricing\Render;
 use Magento\Framework\Url\Helper\Data;
 use Magento\Framework\App\ObjectManager;
-use Magento\Catalog\Helper\Output;
+use Magento\Catalog\Helper\Output as OutputHelper;
 
 /**
  * Product list
@@ -77,6 +77,7 @@ class ListProduct extends AbstractProduct implements IdentityInterface
      * @param CategoryRepositoryInterface $categoryRepository
      * @param Data $urlHelper
      * @param array $data
+     * @param OutputHelper|null $outputHelper
      */
     public function __construct(
         Context $context,
@@ -84,13 +85,14 @@ public function __construct(
         Resolver $layerResolver,
         CategoryRepositoryInterface $categoryRepository,
         Data $urlHelper,
-        array $data = []
+        array $data = [],
+        ?OutputHelper $outputHelper = null
     ) {
         $this->_catalogLayer = $layerResolver->get();
         $this->_postDataHelper = $postDataHelper;
         $this->categoryRepository = $categoryRepository;
         $this->urlHelper = $urlHelper;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Output::class);
+        $data['outputHelper'] = $outputHelper ?? ObjectManager::getInstance()->get(OutputHelper::class);
         parent::__construct(
             $context,
             $data
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml
index 3efdf1a82b40a..6c92ddcf36243 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget/tree.phtml
@@ -4,7 +4,7 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Csp\Api\InlineUtilInterface $csp */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_divId = 'tree' . $block->getId() ?>
@@ -201,4 +201,4 @@ $scriptString .= <<<script
 });
 script;
 ?>
-<?= /* @noEscape */ $csp->renderTag('script', [], $scriptString); ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml
index e340e83e1f520..4e70bff5a4884 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml
@@ -26,6 +26,8 @@ $fieldClass .= ($entity && $entity->getIsUserDefined()) ? ' user-defined type-'
 
 $fieldAttributes = $fieldId . ' class="' . $block->escapeHtmlAttr($fieldClass) . '" '
     . $block->getUiId('form-field', $block->escapeHtmlAttr($element->getId()));
+
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
 $jsonHelper = $block->getData('jsonHelper');
 ?>
 
@@ -65,7 +67,7 @@ $jsonHelper = $block->getData('jsonHelper');
                             value="<?= $block->escapeHtmlAttr($block->getAttributeCode()) ?>"/>
                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                         'onclick',
-                        "toggleValueElements(this, this.parentNode);",
+                        $elementToggleCode,
                         "#" . $element->getHtmlId() . "_default"
                     ) ?>
                     <span class="use-default-label"><?= $block->escapeHtml(__('Use Default Value')) ?></span>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml
index 1290df418e5a6..8dde7013763dc 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml
@@ -9,7 +9,9 @@ use Magento\Catalog\Helper\Data;
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php $jsonHelper = $block->getData('jsonHelper');
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 $scriptString = <<<script
 require([
     "jquery",
@@ -288,7 +290,7 @@ function setRowVisibility(id, isVisible)
 
 function updateRequriedOptions()
 {
-    if ($F('frontend_input')=='select' && $F('is_required')==1) {
+    if (\$F('frontend_input')=='select' && \$F('is_required')==1) {
         $('option-count-check').addClassName('required-options-count');
     } else {
         $('option-count-check').removeClassName('required-options-count');
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml
index cda4e363d3f1e..a181ed8d67120 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/fieldset/options/type/file.phtml
@@ -76,12 +76,13 @@ script;
     <div class="admin__field-control control" id="<?= /* @noEscape */ $_fileName ?>">
         <?php if ($_fileExists):?>
             <span class="<?= /* @noEscape */ $_fileNamed ?>"><?= $block->escapeHtml($_fileInfo->getTitle()) ?></span>
-            <a href="javascript:void(0)" class="label">
+            <a href="#" class="label">
                 <?= $block->escapeHtml(__('Change')) ?>
             </a> 
             <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                 'onclick',
-                "opFile" . /* @noEscape */ $_rand . ".toggleFileChange($(this).next('.input-box'))",
+                "event.preventDefault(); opFile" . /* @noEscape */ $_rand .
+                ".toggleFileChange($(this).next('.input-box'))",
                 '#' . /* @noEscape */ $_fileName . ' a'
             ); ?>
             <?php if (!$_option->getIsRequire()):?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
index 624e006bab9a1..eaaee91d7226c 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
@@ -3,9 +3,6 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-?>
-<?php
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
 
 /**
  * @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit
@@ -61,9 +58,11 @@
 <?php if ($block->getUseContainer()):?>
 </form>
 <?php endif; ?>
-<?php $helper = $block->getData('helper');
-$jsonFieldsAutogenerationMasks  = /* @noEscape */ $helper->jsonEncode($block->getFieldsAutogenerationMasks());
-$jsonAttributesAllowedForAutogeneration = /* @noEscape */ $helper->jsonEncode(
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
+$jsonFieldsAutogenerationMasks  = /* @noEscape */ $jsonHelper->jsonEncode($block->getFieldsAutogenerationMasks());
+$jsonAttributesAllowedForAutogeneration = /* @noEscape */ $jsonHelper->jsonEncode(
     $block->getAttributesAllowedForAutogeneration()
 );
 $scriptString = <<<scriptStr
@@ -75,8 +74,8 @@ require([
     "mage/backend/tabs",
     "domReady!"
 ], function($, TypeSwitcher){
-    var $form = $('[data-form=edit-product]');
-    $form.data('typeSwitcher', TypeSwitcher.init());
+    var \$form = $('[data-form=edit-product]');
+    \$form.data('typeSwitcher', TypeSwitcher.init());
 
     var scriptTagManager = (function($) {
         var hiddenPrefix = 'hidden',
@@ -118,7 +117,7 @@ require([
             $(this).val($(this).val().substr(0, maxLength));
         }
     });
-    $form.mage('form', {
+    \$form.mage('form', {
         handlersData: {
             save: {},
             saveAndContinueEdit: {
@@ -138,7 +137,7 @@ require([
             }
         }
     });
-    $form.mage('validation', {validationUrl: '{$block->escapeJs($block->getValidationUrl())}'});
+    \$form.mage('validation', {validationUrl: '{$block->escapeJs($block->getValidationUrl())}'});
 
     var masks = {$jsonFieldsAutogenerationMasks};
     var availablePlaceholders = {$jsonAttributesAllowedForAutogeneration};
@@ -164,13 +163,13 @@ require([
                     'change init',
                     elementSelector,
                     $.proxy(function(event) {
-                        var $element = $(event.target);
-                        if (event.type == 'init' && $element.data('disablerInited')) {
+                        var \$element = $(event.target);
+                        if (event.type == 'init' && \$element.data('disablerInited')) {
                             return;
                         } else {
-                            $element.data('disablerInited', true);
+                            \$element.data('disablerInited', true);
                         }
-                        $element.data(this.data.disabled, $element.val().replace(/\s/g, '') != '');
+                        \$element.data(this.data.disabled, \$element.val().replace(/\s/g, '') != '');
                     }, this)
                 ).find(elementSelector).trigger('init');
             };
@@ -178,19 +177,19 @@ require([
             $("#product_info_tabs").on("tabscreate tabsactivate", $.proxy(disabler, this));
 
             $.each(this._masks, function(field, mask) {
-                var $field = $('#' + field);
-                if (!$field.val() && mask && mask.length > 0 && !self.varRegexp.test(mask)) {
-                    $field.val(mask);
+                var \$field = $('#' + field);
+                if (!\$field.val() && mask && mask.length > 0 && !self.varRegexp.test(mask)) {
+                    \$field.val(mask);
                 }
-                $field.trigger('change');
+                \$field.trigger('change');
             });
 
             $.each(self._fieldReverseIndex, function(field) {
-                var fields = this, $field = $('#' + field);
+                var fields = this, \$field = $('#' + field);
                 var filler = function(onlyText) {
                     $.each(fields, function() {
-                        var $el = $('#' + this);
-                        if ($el.data(self.data.disabled)) {
+                        var \$el = $('#' + this);
+                        if (\$el.data(self.data.disabled)) {
                             return;
                         }
                         if (onlyText === true && self.varRegexp.test(self._masks[this])) {
@@ -199,12 +198,12 @@ require([
                         var value = self._masks[this].replace(self.varsRegexp, function(maskfieldName) {
                             return $('#' + maskfieldName.slice(2, -2)).val();
                         });
-                        $el.val(value);
+                        \$el.val(value);
                     });
                 };
-                if ($field.length) {
+                if (\$field.length) {
                     self.form.on('keyup change blur click paste', '#' + field, filler);
-                    $field.trigger('change');
+                    \$field.trigger('change');
                 }
             });
         },
@@ -226,7 +225,7 @@ require([
         }
     });
 
-    $form.data('autogenerator', new Autogenerator(masks).bindAll());
+    \$form.data('autogenerator', new Autogenerator(masks).bindAll());
 
     $('.widget-button-save .item-default').parent().hide();
 
@@ -238,7 +237,7 @@ require([
         $('#status').val($(this).prop('checked') ? '1' : '2');
     });
 
-    $form.on('changeAttributeSet', function(event, data) {
+    \$form.on('changeAttributeSet', function(event, data) {
         if (data.label) {
             $('#product-template-suggest-container .action-toggle>span').text(data.label);
             $('[data-role=affected-attribute-set-selector] [data-role=name-container]').text(data.label);
@@ -249,13 +248,13 @@ require([
         uri += /\?/.test(uri) ? '&' : '?';
         uri += 'set=' + window.encodeURIComponent(data.id);
 
-        var $form = $('[data-form=edit-product]');
-        $form.attr('action', $form.attr('action').replace(/(\/|&|\?)?\bset(\/|=)\d+/g, ''));
-        $form.find('#attribute_set_id').attr('name', 'set').val(data.id);
+        var \$form = $('[data-form=edit-product]');
+        \$form.attr('action', \$form.attr('action').replace(/(\/|&|\?)?\bset(\/|=)\d+/g, ''));
+        \$form.find('#attribute_set_id').attr('name', 'set').val(data.id);
         $.ajax({
             url: uri.replace('/edit/', '/new/') + '&popup=1',
             type: 'post',
-            data: $form.serializeArray(),
+            data: \$form.serializeArray(),
             dataType: 'html',
             context: $('body'),
             showLoader: true
@@ -264,68 +263,68 @@ require([
             data = scriptTagManager.disableScripts(data);
             var removedElementClass = 'removed';
 
-            var $page = $('body');
-            var $newPage = $(data);
+            var \$page = $('body');
+            var \$newPage = $(data);
 
             var nameMapper = function() {
                 return $(this).attr('name');
             };
             var activeTabId = $('.ui-tabs-active>a').attr('id');
             //add new tab tabs or reorder
-            $page.find('#product_info_tabs .tabs').each(function(i, tabContainer) {
-                $newPage.find('#product_info_tabs .tabs').each(function(j, newTabContainer) {
+            \$page.find('#product_info_tabs .tabs').each(function(i, tabContainer) {
+                \$newPage.find('#product_info_tabs .tabs').each(function(j, newTabContainer) {
                     if (i != j) {
                         return;
                     }
-                    var $tabContainer = $(tabContainer);
+                    var \$tabContainer = $(tabContainer);
                     $(tabContainer).find('li').removeClass(removedElementClass);
-                    var $tabs = $(tabContainer)
+                    var \$tabs = $(tabContainer)
                         .find('li:not(.' + removedElementClass + ')  .tab-item-link.user-defined:not(.ajax)');
-                    var $newTabs = $(newTabContainer).find('.tab-item-link.user-defined:not(.ajax)'),
-                        tabsNames = $tabs.map(nameMapper).toArray();
+                    var \$newTabs = $(newTabContainer).find('.tab-item-link.user-defined:not(.ajax)'),
+                        tabsNames = \$tabs.map(nameMapper).toArray();
 
                     //hide not exists elements
                     $.each(
-                        _.difference(tabsNames, $newTabs.map(nameMapper).toArray()),
+                        _.difference(tabsNames, \$newTabs.map(nameMapper).toArray()),
                         function(index, tabName) {
-                            $tabContainer.find('[name=' + tabName + ']').closest('li')
+                            \$tabContainer.find('[name=' + tabName + ']').closest('li')
                                 .addClass(removedElementClass);
-                            $page.find('#' + tabName)
+                            \$page.find('#' + tabName)
                                 .addClass(removedElementClass)
                                 .addClass('ignore-validate');
                         }
                     );
 
                     $(newTabContainer).find('.tab-item-link.user-defined:not(.ajax)').each(function(index, tab) {
-                        var $tab = $(tab),
-                            tabName = nameMapper.apply($tab),
-                            $tabsContent = $tab.closest('li').clone();
-                        $tabsContent.find('.fieldset>.field').remove();
-                        if (nameMapper.apply($tabs.eq(index)) == tabName) {
+                        var \$tab = $(tab),
+                            tabName = nameMapper.apply(\$tab),
+                            \$tabsContent = \$tab.closest('li').clone();
+                        \$tabsContent.find('.fieldset>.field').remove();
+                        if (nameMapper.apply(\$tabs.eq(index)) == tabName) {
                             return true;
                         }
-                        var $tabToMove = $.inArray(tabName, tabsNames) !== -1
-                            ? $tabs.filter(function() {
+                        var \$tabToMove = $.inArray(tabName, tabsNames) !== -1
+                            ? \$tabs.filter(function() {
                             return nameMapper.apply(this) === tabName;
                         }).closest('li')
-                            : $tabsContent;
+                            : \$tabsContent;
                         if (index === 0) {
-                            $tabToMove.prependTo($tabContainer);
+                            \$tabToMove.prependTo(\$tabContainer);
                         } else {
-                            $tabToMove.insertAfter($tabs.eq(index - 1).closest('li'));
+                            \$tabToMove.insertAfter(\$tabs.eq(index - 1).closest('li'));
                         }
-                        $tabToMove.removeClass(removedElementClass).removeClass('ignore-validate');
-                        $tabs = $tabContainer
+                        \$tabToMove.removeClass(removedElementClass).removeClass('ignore-validate');
+                        \$tabs = \$tabContainer
                         .find('li:not(.' + removedElementClass + ')  .tab-item-link.user-defined:not(.ajax)');
                     });
                 });
             });
 
             //add new fieldsets or reorder
-            $newPage.find('#product_info_tabs .fieldset.user-defined').each(function(index, newFieldset) {
+            \$newPage.find('#product_info_tabs .fieldset.user-defined').each(function(index, newFieldset) {
                 var fieldsetContainer, newFieldsetContainer, sourceContainer, destinationContainer;
                 newFieldsetContainer = $(newFieldset).parents('[data-ui-id*=-tab-content-]').first();
-                if ($page.find('[data-ui-id=' + newFieldsetContainer.data('uiId') + ']').length === 0) {
+                if (\$page.find('[data-ui-id=' + newFieldsetContainer.data('uiId') + ']').length === 0) {
                     fieldsetContainer = newFieldsetContainer
                         .clone()
                         .removeClass(removedElementClass)
@@ -333,10 +332,10 @@ require([
                     //Enable hidden js scripts in node. These scripts will be performed after inserting into page
                     fieldsetContainer = scriptTagManager.enableScripts(fieldsetContainer);
                 } else {
-                    fieldsetContainer = $page.find('[data-ui-id=' + newFieldsetContainer.data('uiId') + ']').first();
+                    fieldsetContainer = \$page.find('[data-ui-id=' + newFieldsetContainer.data('uiId') + ']').first();
                 }
                 sourceContainer = newFieldsetContainer.parents('[data-ui-id*=-tab-content-]').first();
-                destinationContainer = $page.find('[data-ui-id=' + sourceContainer.data('uiId') + ']').first();
+                destinationContainer = \$page.find('[data-ui-id=' + sourceContainer.data('uiId') + ']').first();
                 fieldsetContainer.appendTo(destinationContainer);
             });
 
@@ -344,7 +343,7 @@ require([
                 return $(this).data('attributeCode');
             };
             //add new element elements or reorder
-            $page.find('[data-form=edit-product] [data-role=tabs] .fieldset, #product_info_tabs .fieldset')
+            \$page.find('[data-form=edit-product] [data-role=tabs] .fieldset, #product_info_tabs .fieldset')
                 .removeClass('ignore-validate')
                 .removeClass(removedElementClass)
                 .each(function(i, fieldSet) {
@@ -352,49 +351,49 @@ require([
                     if ($(fieldSet).attr('id') != $(newFieldSet).attr('id')) {
                         return
                     }
-                    var $elements = $(fieldSet).find('>.field:not(.' + removedElementClass + ')');
-                    var $newFieldSet = $(newFieldSet);
-                    var $newElements = $newFieldSet.find('>.field');
+                    var \$elements = $(fieldSet).find('>.field:not(.' + removedElementClass + ')');
+                    var \$newFieldSet = $(newFieldSet);
+                    var \$newElements = \$newFieldSet.find('>.field');
 
-                    $elements.removeClass(removedElementClass);
+                    \$elements.removeClass(removedElementClass);
 
-                    var elementNames = $elements.map(nameDataMapper).toArray();
+                    var elementNames = \$elements.map(nameDataMapper).toArray();
 
                     //hide not exists elements
                     $.each(
-                        _.difference(elementNames, $newElements.map(nameDataMapper).toArray()),
+                        _.difference(elementNames, \$newElements.map(nameDataMapper).toArray()),
                         function(index, elementId) {
-                            $page.find('#attribute-' + elementId + '-container')
+                            \$page.find('#attribute-' + elementId + '-container')
                                 .addClass(removedElementClass)
                                 .addClass('ignore-validate');
                         }
                     );
 
-                    $newElements.each(function(index, element) {
-                        var $element = $(element),
-                            elementId = nameDataMapper.apply($element);
-                        if (nameDataMapper.apply($elements.get(index)) == elementId) {
+                    \$newElements.each(function(index, element) {
+                        var \$element = $(element),
+                            elementId = nameDataMapper.apply(\$element);
+                        if (nameDataMapper.apply(\$elements.get(index)) == elementId) {
                             return true;
                         }
-                        var $elementToMove = $('.fieldset>.field[data-attribute-code="' + elementId + '"]');
-                        if ($elementToMove.length === 0) {
-                            $elementToMove = $element.clone();
+                        var \$elementToMove = $('.fieldset>.field[data-attribute-code="' + elementId + '"]');
+                        if (\$elementToMove.length === 0) {
+                            \$elementToMove = \$element.clone();
                         }
                         if (index === 0) {
-                            $elementToMove.prependTo(fieldSet);
+                            \$elementToMove.prependTo(fieldSet);
                         } else {
-                            $elementToMove.insertAfter($elements.get(index - 1))
+                            \$elementToMove.insertAfter(\$elements.get(index - 1))
                         }
-                        $elementToMove.trigger('contentUpdated');
-                        $elementToMove.removeClass(removedElementClass).removeClass('.ignore-validate');
-                        $elements = $(fieldSet).find('>.field:not(.' + removedElementClass + ')');
+                        \$elementToMove.trigger('contentUpdated');
+                        \$elementToMove.removeClass(removedElementClass).removeClass('.ignore-validate');
+                        \$elements = $(fieldSet).find('>.field:not(.' + removedElementClass + ')');
                     });
                 };
 
-                $newPage.find('#product_info_tabs .fieldset').each(updateFieldsetElements);
+                \$newPage.find('#product_info_tabs .fieldset').each(updateFieldsetElements);
 
                 fieldsetContainer = $(fieldSet).parents('[data-ui-id*=-tab-content-]').first();
-                var newFieldsetContainer = $newPage.find('[data-ui-id=' + $(fieldsetContainer).data('uiId') + ']');
+                var newFieldsetContainer = \$newPage.find('[data-ui-id=' + $(fieldsetContainer).data('uiId') + ']');
                 if (newFieldsetContainer.length == 0) {
                     $(fieldsetContainer).find('fieldset .field')
                         .addClass('ignore-validate')
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml
index 3a25ed1e135bd..261de795f7199 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml
@@ -24,17 +24,18 @@
 </button>
 <% } %>
 </script>
-<?php $jsonHelper = $block->getData('jsonHelper');
+<?php /** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 $selectorOptions = /* @noEscape */ $jsonHelper->jsonEncode($block->getSelectorOptions());
 $scriptString = <<<script
     require(["jquery","mage/mage","mage/backend/suggest"],function ($) {
-        var $suggest = $('#product-template-suggest');
-        $suggest.closest('.dropdown-menu').siblings('[data-toggle=dropdown]').on('click.toggleDropdown', function () {
+        var \$suggest = $('#product-template-suggest');
+        \$suggest.closest('.dropdown-menu').siblings('[data-toggle=dropdown]').on('click.toggleDropdown', function () {
             if ($(this).hasClass('active')) {
-                $suggest.click();
+                \$suggest.click();
             }
         });
-        $suggest
+        \$suggest
             .mage('suggest', {$selectorOptions})
             .on('suggestselect', function (e, ui) {
                 if (ui.item.id) {
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml
index 85876946fda02..22dd5de45a073 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/category/new/form.phtml
@@ -12,5 +12,5 @@
 </div>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     'display:none',
-    $block->escapeHtmlAttr($block->getNameInLayout())
+    $block->escapeJs($block->getNameInLayout())
 ) ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml
index 1811217eeac11..ce7dac70010b1 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml
@@ -95,12 +95,14 @@
                             <label for="field-option-req">
                                 <?= $block->escapeHtml(__('Required')) ?>
                             </label>
-                            <span><?= $block->getRequireSelectHtml() ?></span>
+                            <span id="span_<?= /* @noEscape */ $block->getFieldId() ?>">
+                                <?= $block->getRequireSelectHtml() ?>
+                            </span>
                         </div>
                     </div>
                     <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                         "display:none",
-                        "input#" . /* @noEscape */ $block->getFieldId() ."_<%- data.id %>_required"
+                        "span_#" . /* @noEscape */ $block->getFieldId()
                     ) ?>
                 </fieldset>
             </fieldset>
@@ -113,7 +115,9 @@
 <?php if (!$block->isReadonly()):?>
 <div><input type="hidden" name="affect_product_custom_options" value="1"/></div>
 <?php endif; ?>
-<?php $jsonHelper = $block->getData('jsonHelper');
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 
 $customOptions = /* @noEscape */ $jsonHelper->jsonEncode(
     [
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml
index 34fcebba8854c..7e1c48d535dc1 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml
@@ -21,7 +21,8 @@ $element = $block->getElement();
 
 <?php $_showWebsite = $block->isShowWebsiteColumn(); ?>
 <?php $_showWebsite = $block->isMultiWebsites(); ?>
-<?php $jsonHelper = $block->getData('jsonHelper'); ?>
+<?php /** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper'); ?>
 <div class="field" id="attribute-<?= /* @noEscape */ $_htmlId ?>-container"
      data-attribute-code="<?= /* @noEscape */ $_htmlId ?>"
      data-apply-to="<?= $block->escapeHtml(
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml
index 7bbba8b752ced..94d71dbb5ab28 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml
@@ -8,6 +8,7 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 $elementName = $block->getElement()->getName() . '[images]';
 $formName = $block->getFormName();
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
 $jsonHelper = $block->getData('jsonHelper');
 ?>
 <div id="<?= $block->getHtmlId() ?>"
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml
index bdf985d0a3436..4a0a37147dd13 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/js.phtml
@@ -4,15 +4,14 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-
 /** @var \Magento\Catalog\Block\Adminhtml\Product\Edit\Js $block */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php
-$helper = $block->getData('helper');
-$priceFormat = /* @noEscape */ $helper->getPriceFormat($block->getStore());
+/** @var TaxHelper $taxHelper */
+$taxHelper = $block->getData('taxHelper');
+$priceFormat = /* @noEscape */ $taxHelper->getPriceFormat($block->getStore());
 $allRatesByProductClassJson = /* @noEscape */ $block->getAllRatesByProductClassJson();
 $scriptString = <<<script
 require([
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml
index 77f64930071e7..f58e213b60772 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml
@@ -34,6 +34,7 @@
 </script>
 
 <?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
 $jsonHelper = $block->getData('jsonHelper');
 $selectorOptions = /* @noEscape */ $jsonHelper->jsonEncode($block->getSelectorOptions());
 $scriptString = <<<script
diff --git a/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml b/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
index 79e1ce352a4c1..950eb16fb5019 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/composite/fieldset/options/view/checkable.phtml
@@ -30,11 +30,13 @@ if ($option): ?>
                value=""
                checked="checked"
         />
-        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
-            'onclick',
-            $block->getSkipJsReloadPrice() ? '' : 'opConfig.reloadPrice()',
-            "options_" . $block->escapeHtmlAttr($option->getId())
-        ) ?>
+        <?php if (!$block->getSkipJsReloadPrice()): ?>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                'opConfig.reloadPrice()',
+                "options_" . $block->escapeJs($option->getId())
+            ) ?>
+        <?php endif; ?>
         <label class="label admin__field-label" for="options_<?= $block->escapeHtmlAttr($option->getId()) ?>">
                         <span>
                             <?= $block->escapeHtml(__('None'))  ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index bfc8adcc70107..9aaee9727b68f 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -23,7 +23,7 @@
             alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
 </span>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'width:' . $escaper->escapeHtmlAttr($block->getWidth()) . 'px;',
+    'width:' . (int)$escaper->escapeHtmlAttr($block->getWidth()) . 'px;',
     'span.product-image-container'
 ) ?>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
index f088be85262e3..e0bb6b62f0bf6 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
@@ -17,7 +17,8 @@ use Magento\Framework\App\Action\Action;
 ?>
 <?php
 $_productCollection = $block->getLoadedProductCollection();
-$_helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Output $_helper */
+$_helper = $block->getData('outputHelper');
 ?>
 <?php if (!$_productCollection->count()):?>
     <div class="message info empty">
diff --git a/app/code/Magento/CatalogSearch/Block/Advanced/Form.php b/app/code/Magento/CatalogSearch/Block/Advanced/Form.php
index 8bed5e8810a6a..f8c159f5d6d73 100644
--- a/app/code/Magento/CatalogSearch/Block/Advanced/Form.php
+++ b/app/code/Magento/CatalogSearch/Block/Advanced/Form.php
@@ -15,7 +15,7 @@
 use Magento\Framework\View\Element\BlockInterface;
 use Magento\Framework\View\Element\Template;
 use Magento\Framework\View\Element\Template\Context;
-use Magento\CatalogSearch\Helper\Data;
+use Magento\CatalogSearch\Helper\Data as CatalogSearchHelper;
 
 /**
  * Advanced search form
@@ -44,16 +44,19 @@ class Form extends Template
      * @param Advanced $catalogSearchAdvanced
      * @param CurrencyFactory $currencyFactory
      * @param array $data
+     * @param CatalogSearchHelper|null $catalogSearchHelper
      */
     public function __construct(
         Context $context,
         Advanced $catalogSearchAdvanced,
         CurrencyFactory $currencyFactory,
-        array $data = []
+        array $data = [],
+        ?CatalogSearchHelper $catalogSearchHelper = null
     ) {
         $this->_catalogSearchAdvanced = $catalogSearchAdvanced;
         $this->_currencyFactory = $currencyFactory;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['catalogSearchHelper'] = $catalogSearchHelper ??
+            ObjectManager::getInstance()->get(CatalogSearchHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml
index 0f97d1cd9fa7e..cebabdc0c422b 100644
--- a/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml
+++ b/app/code/Magento/CatalogSearch/view/frontend/templates/advanced/form.phtml
@@ -12,8 +12,10 @@
  */
 ?>
 
-<?php $jsonHelper = $block->getData('jsonHelper'); ?>
-<?php $maxQueryLength = $jsonHelper->getMaxQueryLength();?>
+<?php
+/** @var \Magento\CatalogSearch\Helper\Data $catalogSearchHelper */
+$catalogSearchHelper = $block->getData('catalogSearchHelper'); ?>
+<?php $maxQueryLength = $catalogSearchHelper->getMaxQueryLength();?>
 <form class="form search advanced" action="<?= $block->escapeUrl($block->getSearchPostUrl()) ?>" method="get"
       id="form-validate">
 <fieldset class="fieldset">
diff --git a/app/code/Magento/Checkout/Block/Total/DefaultTotal.php b/app/code/Magento/Checkout/Block/Total/DefaultTotal.php
index 7773b1c9c8674..a351d73005fe7 100644
--- a/app/code/Magento/Checkout/Block/Total/DefaultTotal.php
+++ b/app/code/Magento/Checkout/Block/Total/DefaultTotal.php
@@ -7,7 +7,7 @@
 
 use Magento\Framework\App\ObjectManager;
 use Magento\Sales\Model\ConfigInterface;
-use Magento\Checkout\Helper\Data;
+use Magento\Checkout\Helper\Data as CheckoutHelper;
 
 /**
  * Default Total Row Renderer
@@ -31,6 +31,7 @@ class DefaultTotal extends \Magento\Checkout\Block\Cart\Totals
      * @param ConfigInterface $salesConfig
      * @param array $layoutProcessors
      * @param array $data
+     * @param CheckoutHelper $checkoutHelper
      */
     public function __construct(
         \Magento\Framework\View\Element\Template\Context $context,
@@ -38,9 +39,10 @@ public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
         ConfigInterface $salesConfig,
         array $layoutProcessors = [],
-        array $data = []
+        array $data = [],
+        ?CheckoutHelper $checkoutHelper = null
     ) {
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['checkoutHelper'] = $checkoutHelper ?? ObjectManager::getInstance()->get(CheckoutHelper::class);
         parent::__construct(
             $context,
             $customerSession,
diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
index 10bc7b750af97..f4cc667e4ce8a 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/onepage.phtml
@@ -15,7 +15,7 @@
                  alt="<?= $block->escapeHtmlAttr(__('Loading...')) ?>">
         </div>
     </div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("position: absolute;", "#checkout-loader") ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("position: absolute;", "#checkout-loader img") ?>
     <!-- ko template: getTemplate() --><!-- /ko -->
     <script type="text/x-magento-init">
         {
diff --git a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
index b5edc3abf8912..37e9ded4a3aa4 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
@@ -7,6 +7,11 @@
 /** @var $block \Magento\Checkout\Block\Total\DefaultTotal */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
+
+<?php
+/** @var \Magento\Checkout\Helper\Data $checkoutHelper */
+$checkoutHelper = $block->getData('checkoutHelper');
+?>
 <tr class="totals">
     <th colspan="<?= $block->escapeHtmlAttr($block->getColspan()) ?>"
         class="mark" scope="row">
@@ -25,7 +30,7 @@
         <?php endif; ?>
             <span>
                 <?= $block->escapeHtml(
-                    $block->getData('jsonHelper')->formatPrice($block->getTotal()->getValue()),
+                    $checkoutHelper->formatPrice($block->getTotal()->getValue()),
                     ['span']
                 ) ?>
             </span>
@@ -34,11 +39,5 @@
         <?php endif; ?>
     </td>
 </tr>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    $block->escapeHtmlAttr($block->getTotal()->getStyle()),
-    'tr.totals th.mark'
-) ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    $block->escapeHtmlAttr($block->getTotal()->getStyle()),
-    'tr.totals td.amount'
-) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals th.mark') ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals td.amount') ?>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
index 27706c8dd218b..eb63d9f051d42 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/files.phtml
@@ -22,8 +22,8 @@ $_height = $block->getImagesHeight();
     >
         <p class="nm" id="<?= $block->escapeHtmlAttr($block->getFileId($file)) ?>_nm">
         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-            'height:' . $block->escapeHtmlAttr($_height) . 'px;',
-            '#' . $block->escapeHtmlAttr($block->getFileId($file)) . '_nm'
+            'height:' . $block->escapeJs($_height) . 'px;',
+            '#' . $block->escapeJs($block->getFileId($file)) . '_nm'
         ) ?>
         <?php if ($block->getFileThumbUrl($file)): ?>
             <img src="<?= $block->escapeHtmlAttr($block->getFileThumbUrl($file)) ?>"
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
index 0c5922b16b39b..738cf72f86592 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
@@ -7,6 +7,11 @@
 /** @var \Magento\Cms\Block\Adminhtml\Wysiwyg\Images\Tree $block */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
+
+<?php
+/** Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
+?>
 <div class="tree-panel" >
     <div class="categories-side-col">
         <div class="tree-actions">
@@ -26,7 +31,7 @@
         </div>
     </div>
     <div data-role="tree" data-mage-init='<?= $block->escapeHtml(
-        $block->getData('jsonHelper')->jsonEncode($block->getTreeWidgetOptions())
+        $jsonHelper->jsonEncode($block->getTreeWidgetOptions())
     ) ?>'>
     </div>
 </div>
diff --git a/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml b/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml
index 606d4ad2f9de0..d8fb7cd412a7a 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/page/system/config/robots/reset.phtml
@@ -7,9 +7,10 @@
 /**
  * @deprecated
  * @var $block \Magento\Backend\Block\Page\System\Config\Robots\Reset
- * @var $jsonHelper \Magento\Framework\Json\Helper\Data
  * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
+
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
 $jsonHelper = $block->getData('jsonHelper');
 ?>
 <?php
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml
index de83471e5eff4..a0ada7814cee8 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/js.phtml
@@ -75,8 +75,7 @@ originModel.prototype = {
         this.loader = new varienLoader(true);
 script;
 
-$scriptString .= 'this.regionsUrl = "' .
-    $block->escapeJs($block->escapeUrl($block->getUrl('directory/json/countryRegion'))) . '";';
+$scriptString .= 'this.regionsUrl = "' . $block->escapeJs($block->getUrl('directory/json/countryRegion')) . '";';
 $scriptString .= <<<script
 
         this.bindCountryRegionRelation();
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml
index d956dd0bccd84..19f7a73739400 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/switcher.phtml
@@ -18,8 +18,8 @@
                 <?php else: ?>
                     <optgroup label="<?= $block->escapeHtmlAttr($_option['label']) ?>">
                         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                            $block->escapeHtmlAttr($_option['style']),
-                            "optgroup[label='" . $block->escapeHtmlAttr($_option['label']) . "']"
+                            $_option['style'],
+                            "optgroup[label='" . $block->escapeJs($_option['label']) . "']"
                         ) ?>
                 <?php endif; ?>
                 <?php continue ?>
@@ -30,8 +30,8 @@
                   <?= $block->escapeHtml($_option['label']) ?>
               </option>
               <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                  $block->escapeHtmlAttr($_option['style']),
-                  "optgroup[url='" . $block->escapeUrl($_option['url']) . "']"
+                  $_option['style'],
+                  "optgroup[url='" . $block->escapeJs($_option['url']) . "']"
               ) ?>
         <?php endforeach ?>
         </select>
diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
index 95290940b2ad4..34d4d22dd09bc 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
@@ -7,7 +7,7 @@
  */
 namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Composite\Fieldset;
 
-use Magento\Catalog\Helper\Product;
+use Magento\Catalog\Helper\Product as ProductHelper;
 use Magento\ConfigurableProduct\Model\ConfigurableAttributeData;
 use Magento\Customer\Helper\Session\CurrentCustomer;
 use Magento\Customer\Model\Session;
@@ -37,6 +37,7 @@ class Configurable extends \Magento\ConfigurableProduct\Block\Product\View\Type\
      * @param Format|null $localeFormat
      * @param Session|null $customerSession
      * @param \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices|null $variationPrices
+     * @param ProductHelper|null $productHelper
      */
     public function __construct(
         \Magento\Catalog\Block\Product\Context $context,
@@ -50,9 +51,10 @@ public function __construct(
         array $data = [],
         Format $localeFormat = null,
         Session $customerSession = null,
-        \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices $variationPrices = null
+        \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices $variationPrices = null,
+        ?ProductHelper $productHelper = null
     ) {
-        $data['productHelper'] = ObjectManager::getInstance()->get(Product::class);
+        $data['productHelper'] = $productHelper ?? ObjectManager::getInstance()->get(ProductHelper::class);
         parent::__construct(
             $context,
             $arrayUtils,
diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php
index 4184f3ffedec2..b400ef5f97efb 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Steps/Bulk.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps;
 
+use Magento\Backend\Helper\Js;
 use Magento\Catalog\Helper\Image;
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Model\Product\Media\Config;
@@ -13,7 +14,7 @@
 use Magento\Eav\Model\Entity\Attribute;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\View\Element\Template\Context;
-use Magento\Framework\Json\Helper\Data;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
  * Adminhtml block for fieldset of configurable product
@@ -44,15 +45,17 @@ class Bulk extends \Magento\Ui\Block\Component\StepsWizard\StepAbstract
      * @param Config $catalogProductMediaConfig
      * @param ProductFactory $productFactory
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         Context $context,
         Image $image,
         Config $catalogProductMediaConfig,
         ProductFactory $productFactory,
-        array $data = []
+        array $data = [],
+        JsonHelper $jsonHelper = null
     ) {
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(Data::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
         $this->image = $image;
         $this->productFactory = $productFactory;
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml
index b40121db96488..a46d50176369a 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/composite/fieldset/configurable.phtml
@@ -9,7 +9,11 @@
 ?>
 <?php $_product = $block->getProduct(); ?>
 <?php $_attributes = $block->decorateArray($block->getAllowAttributes()); ?>
-<?php $_skipSaleableCheck = $block->getData('productHelper')->getSkipSaleableCheck(); ?>
+<?php
+/** @var \Magento\Catalog\Helper\Product $productHelper */
+$productHelper = $block->getData('productHelper');
+?>
+<?php $_skipSaleableCheck = $productHelper->getSkipSaleableCheck(); ?>
 <?php if (($_product->isSaleable() || $_skipSaleableCheck) && count($_attributes)):?>
 <fieldset id="catalog_product_composite_configure_fields_configurable" class="fieldset admin__fieldset">
     <legend class="legend admin__legend">
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml
index b54e63c7eb7c5..6cd930978c85f 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/attribute/steps/bulk.phtml
@@ -8,6 +8,10 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
+?>
 <div data-bind="scope: '<?= /* @noEscape */  $block->getComponentName() ?>'" data-role="bulk-step">
     <h2 class="steps-wizard-title"><?= $block->escapeHtml(__('Step 3: Bulk Images, Price and Quantity')) ?></h2>
     <div class="steps-wizard-info">
@@ -70,7 +74,7 @@
                 <div data-role="gallery"
                      class="gallery"
                      data-images="[]"
-                     data-types="<?= $block->escapeHtml($block->getData('jsonHelper')->jsonEncode(
+                     data-types="<?= $block->escapeHtmlAttr($jsonHelper->jsonEncode(
                          $block->getImageTypes()
                      )) ?>">
                     <div class="image image-placeholder">
@@ -321,8 +325,8 @@
                         <div data-role="gallery"
                              class="gallery"
                              data-images="[]"
-                             data-types="<?= $block->escapeHtml(
-                                 $block->getData('jsonHelper')->jsonEncode($block->getImageTypes())
+                             data-types="<?= $block->escapeHtmlAttr(
+                                 $jsonHelper->jsonEncode($block->getImageTypes())
                              ) ?>">
                             <div class="image image-placeholder">
                                 <div data-role="uploader" class="uploader">
@@ -492,7 +496,7 @@
                                                                        data-role="type-selector"
                                                                        type="checkbox"
                                                                 // @codingStandardsIgnoreLine
-                                                                value="<?= $block->escapeHtml($attribute->getAttributeCode()) ?>"
+                                                                value="<?= $block->escapeHtmlAttr($attribute->getAttributeCode()) ?>"
                                                                 />
                                                                 <?= $block->escapeHtml($attribute->getFrontendLabel())?>
                                                             </label>
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml
index 2dc1a6a11e2eb..73067fdee3b84 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml
@@ -3,7 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
 /** @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Edit\Tab\Variations\Config\Matrix */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
@@ -11,6 +11,9 @@
 $productMatrix = $block->getProductMatrix();
 $attributes = $block->getProductAttributes();
 $currencySymbol = $block->getCurrencySymbol();
+
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 
 <div id="product-variations-matrix" data-role="product-variations-matrix">
@@ -269,8 +272,8 @@ $currencySymbol = $block->getCurrencySymbol();
                 "components": {
                     "configurableVariations": {
                         "component": "Magento_ConfigurableProduct/js/variations/variations",
-                        "variations": <?= /* @noEscape */ $block->getData('jsonHelper')->jsonEncode($productMatrix) ?>,
-                        "productAttributes":<?=/* @noEscape */ $block->getData('jsonHelper')->jsonEncode($attributes)?>,
+                        "variations": <?= /* @noEscape */ $jsonHelper->jsonEncode($productMatrix) ?>,
+                        "productAttributes":<?=/* @noEscape */ $jsonHelper->jsonEncode($attributes)?>,
                         "productUrl": "<?= /* @noEscape */ $block->getUrl('catalog/product/edit', ['id' => '%id%']) ?>",
                         "currencySymbol": "<?= /* @noEscape */ $currencySymbol ?>",
                         "configurableProductGrid": "configurableProductGrid"
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml
index c1af2b79005a3..2cd5a32ce5449 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/wizard.phtml
@@ -8,6 +8,8 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 $productMatrix = $block->getProductMatrix();
 $attributes = $block->getProductAttributes();
 $currencySymbol = $block->getCurrencySymbol();
@@ -56,9 +58,9 @@ $currencySymbol = $block->getCurrencySymbol();
                         "wizardModalButtonName": "<?= /* @noEscape */ $block->getForm()
                         ?>.configurable.configurable_products_button_set.create_configurable_products_button",
                         "wizardModalButtonTitle": "<?= $block->escapeHtml(__('Edit Configurations')) ?>",
-                        "productAttributes":<?=/* @noEscape */ $block->getData('jsonHelper')->jsonEncode($attributes)?>,
+                        "productAttributes":<?=/* @noEscape */ $jsonHelper->jsonEncode($attributes)?>,
                         "productUrl": "<?= /* @noEscape */ $block->getUrl('catalog/product/edit', ['id' => '%id%']) ?>",
-                        "variations": <?= /* @noEscape */ $block->getData('jsonHelper')->jsonEncode($productMatrix) ?>,
+                        "variations": <?= /* @noEscape */ $jsonHelper->jsonEncode($productMatrix) ?>,
                         "currencySymbol": "<?= /* @noEscape */ $currencySymbol ?>",
                         "attributeSetCreationUrl": "<?= /* @noEscape */ $block->getUrl('*/product_set/save') ?>"
                     }
diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml
index ebd644a8c79a2..59bfabe736c02 100644
--- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml
+++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml
@@ -8,7 +8,9 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php $jsonHelper = $block->getData('jsonHelper');
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 $suggestWidgetOptions = /* @noEscape */ $jsonHelper->jsonEncode($block->getSuggestWidgetOptions());
 $scriptString = <<<script
 require(["jquery","mage/mage","mage/backend/suggest"], function($){
diff --git a/app/code/Magento/Cookie/Block/Html/Notices.php b/app/code/Magento/Cookie/Block/Html/Notices.php
index b687338d382ea..4bc7ffd7e7e16 100644
--- a/app/code/Magento/Cookie/Block/Html/Notices.php
+++ b/app/code/Magento/Cookie/Block/Html/Notices.php
@@ -11,7 +11,7 @@
 
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\View\Element\Template;
-use Magento\Cookie\Helper\Cookie;
+use Magento\Cookie\Helper\Cookie as CookieHelper;
 
 /**
  * @api
@@ -22,10 +22,14 @@ class Notices extends \Magento\Framework\View\Element\Template
     /**
      * @param Template\Context $context
      * @param array $data
+     * @param CookieHelper|null $cookieHelper
      */
-    public function __construct(Template\Context $context, array $data = [])
-    {
-        $data['cookieHelper'] = ObjectManager::getInstance()->get(Cookie::class);
+    public function __construct(
+        Template\Context $context,
+        array $data = [],
+        ?CookieHelper $cookieHelper = null
+    ) {
+        $data['cookieHelper'] = $cookieHelper ?? ObjectManager::getInstance()->get(CookieHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml b/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
index 52b3aa9ab1f5e..38f0d8655f2d6 100644
--- a/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
+++ b/app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml
@@ -7,7 +7,9 @@
 /** @var \Magento\Cookie\Block\Html\Notices $block */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php $cookieHelper = $block->getData('cookieHelper');
+<?php
+/** @var \Magento\Cookie\Helper\Cookie $cookieHelper */
+$cookieHelper = $block->getData('cookieHelper');
 if ($cookieHelper->isCookieRestrictionModeEnabled()): ?>
     <div role="alertdialog"
          tabindex="-1"
diff --git a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml
index cde9ef3614c7f..5cce76a791e2d 100644
--- a/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml
+++ b/app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml
@@ -44,7 +44,7 @@
                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                         'onclick',
                         "toggleUseDefault('" . $escapedCode . "','" . $escapedSymbol . "')",
-                        'custom_currency_symbol_inherit' . $block->escapeHtmlAttr($code)
+                        '#custom_currency_symbol_inherit' . $block->escapeJs($code)
                     ) ?>
                 </div>
             </div>
diff --git a/app/code/Magento/Customer/Block/Form/Register.php b/app/code/Magento/Customer/Block/Form/Register.php
index b62537495f2c6..4f030c38ac63c 100644
--- a/app/code/Magento/Customer/Block/Form/Register.php
+++ b/app/code/Magento/Customer/Block/Form/Register.php
@@ -53,6 +53,7 @@ class Register extends \Magento\Directory\Block\Data
      * @param \Magento\Customer\Model\Url $customerUrl
      * @param array $data
      * @param Config $newsLetterConfig
+     * @param AddressHelper|null $addressHelper
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -67,13 +68,14 @@ public function __construct(
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Customer\Model\Url $customerUrl,
         array $data = [],
-        Config $newsLetterConfig = null
+        Config $newsLetterConfig = null,
+        ?AddressHelper $addressHelper = null
     ) {
         $this->_customerUrl = $customerUrl;
         $this->_moduleManager = $moduleManager;
         $this->_customerSession = $customerSession;
         $this->newsLetterConfig = $newsLetterConfig ?: ObjectManager::getInstance()->get(Config::class);
-        $data['addressHelper'] = ObjectManager::getInstance()->get(AddressHelper::class);
+        $data['addressHelper'] = $addressHelper ?? ObjectManager::getInstance()->get(AddressHelper::class);
         parent::__construct(
             $context,
             $directoryHelper,
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
index 60b351100eb33..3824a759dfb97 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
@@ -11,7 +11,7 @@
 <?php
  $merchantCountryField = $block->escapeJs($block->getMerchantCountryField());
  $merchantVatNumberField = $block->escapeJs($block->getMerchantVatNumberField());
- $ajaxUrl = $block->escapeJs($block->escapeUrl($block->getAjaxUrl()));
+ $ajaxUrl = $block->escapeJs($block->getAjaxUrl());
  $errorMessage = $block->escapeJs($block->escapeHtml(__('Error during VAT Number verification.')));
 
  $scriptString = <<<script
@@ -65,15 +65,8 @@ script;
     </button>
 </div>
 <?= /* @noEscape */ $secureRenderer->renderTag('style', [], '#validation_result {margin-bottom: 10px;}', false); ?>
-
-<?php
- $htmlId = /* @noEscape */ $block->getHtmlId();
- $scriptString =<<<script
-require(['jquery'], function($) {
-    $('#{$htmlId}').on('click', function() {
-        javascript:validateVat(); return false;
-        });
-    });
-script;
-?>
-<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    'javascript:validateVat(); return false;',
+    '#' . $htmlId
+); ?>
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
index 7ae8d963aafbb..a9a28295be09a 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
@@ -10,6 +10,7 @@ use Magento\Customer\Helper\Address;
 /** @var \Magento\Framework\Escaper $escaper */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
+/** @var Magento\Customer\Helper\Address $addressHelper */
 $addressHelper = $block->getData('adressHelper');
 $formData = $block->getFormData();
 ?>
diff --git a/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml b/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml
index 900a6a2775863..4037dc19bde33 100644
--- a/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml
+++ b/app/code/Magento/Directory/view/adminhtml/templates/js/optional_zip_countries.phtml
@@ -16,6 +16,7 @@
  */
 ?>
 <?php
+/** @var \Magento\Directory\Helper\Data $directoryHelper */
 $directoryHelper = $block->getData('directoryHelper');
 $countriesWithOptionalZip = /* @noEscape */ $directoryHelper->getCountriesWithOptionalZip(true);
 $scriptString = <<<script
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
index e252c42b970b7..40599efef4f05 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Sales/Items/Column/Downloadable/Name.php
@@ -10,6 +10,7 @@
 use Magento\Downloadable\Model\Link\Purchased;
 use Magento\Framework\App\ObjectManager;
 use Magento\Store\Model\ScopeInterface;
+use Magento\Catalog\Helper\Data as CatalogHelper;
 
 /**
  * Sales Order downloadable items name column renderer
@@ -43,6 +44,7 @@ class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\Name
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
      * @param \Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item\CollectionFactory $itemsFactory
      * @param array $data
+     * @param CatalogHelper|null $catalogHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -52,11 +54,12 @@ public function __construct(
         \Magento\Catalog\Model\Product\OptionFactory $optionFactory,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
         \Magento\Downloadable\Model\ResourceModel\Link\Purchased\Item\CollectionFactory $itemsFactory,
-        array $data = []
+        array $data = [],
+        ?CatalogHelper $catalogHelper = null
     ) {
         $this->_purchasedFactory = $purchasedFactory;
         $this->_itemsFactory = $itemsFactory;
-        $data['catalogHelper'] = ObjectManager::getInstance()->get(\Magento\Catalog\Helper\Data::class);
+        $data['catalogHelper'] = $catalogHelper ?? ObjectManager::getInstance()->get(CatalogHelper::class);
         parent::__construct($context, $stockRegistry, $stockConfiguration, $registry, $optionFactory, $data);
     }
 
diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml
index 422fda2ddc127..91dd22bc3ce5c 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/creditmemo/name.phtml
@@ -10,7 +10,9 @@
  */
 ?>
 
-<?php $catalogHelper = $block->getData('catalogHelper');
+<?php
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 if ($_item = $block->getItem()): ?>
     <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
     <div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong>
diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml
index 71cd03132c27c..a0b710bdb5d17 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/invoice/name.phtml
@@ -8,7 +8,9 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php $catalogHelper = $block->getData('catalogHelper');
+<?php
+/** @var \Magento\Catalog\Helper\Data  $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 if ($_item = $block->getItem()): ?>
     <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
     <div><strong><?= $block->escapeHtml(__('SKU')) ?>:</strong>
diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
index 2244f1e1de108..7808a214dd76a 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
@@ -8,7 +8,9 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php $catalogHelper = $block->getData('catalogHelper');
+<?php
+/** @var \Magento\Catalog\Helper\Data  $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 if ($_item = $block->getItem()): ?>
     <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
     <div class="product-sku-block">
diff --git a/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml b/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml
index 45ffe733f5c5f..0de78ca8b62c2 100644
--- a/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml
+++ b/app/code/Magento/GoogleAdwords/view/frontend/templates/code.phtml
@@ -11,18 +11,21 @@
  */
 ?>
 <!-- Google Code for Sale Conversion Page -->
-<?php $scriptString = <<<script
+<?php
+/** @var \Magento\GoogleAdwords\Helper\Data $helper */
+$helper = $block->getHelper();
+$scriptString = <<<script
     /* <![CDATA[ */
-    var google_conversion_id = {$block->escapeJs($block->getHelper()->getConversionId())};
-    var google_conversion_language = "{$block->escapeJs($block->getHelper()->getConversionLanguage())}";
-    var google_conversion_format = "{$block->escapeJs($block->getHelper()->getConversionFormat())}";
-    var google_conversion_color = "{$block->escapeJs($block->getHelper()->getConversionColor())}";
-    var google_conversion_label = "{$block->escapeJs($block->getHelper()->getConversionLabel())}";
-    var google_conversion_value = {$block->escapeJs($block->getHelper()->getConversionValue())};
+    var google_conversion_id = {$block->escapeJs($helper->getConversionId())};
+    var google_conversion_language = "{$block->escapeJs($helper->getConversionLanguage())}";
+    var google_conversion_format = "{$block->escapeJs($helper->getConversionFormat())}";
+    var google_conversion_color = "{$block->escapeJs($helper->getConversionColor())}";
+    var google_conversion_label = "{$block->escapeJs($helper->getConversionLabel())}";
+    var google_conversion_value = {$block->escapeJs($helper->getConversionValue())};
 script;
-if ($block->getHelper()->hasSendConversionValueCurrency() && $block->getHelper()->getConversionValueCurrency()):
+if ($helper->hasSendConversionValueCurrency() && $helper->getConversionValueCurrency()):
         $scriptString .= <<<script
-    var google_conversion_currency = "{$block->escapeJs($block->getHelper()->getConversionValueCurrency())}";
+    var google_conversion_currency = "{$block->escapeJs($helper->getConversionValueCurrency())}";
 script;
 endif;
 $scriptString .= <<<script
@@ -30,11 +33,11 @@ $scriptString .= <<<script
 script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
-<script src="<?= $block->escapeHtmlAttr($block->getHelper()->getConversionJsSrc()) ?>"></script>
+<script src="<?= $block->escapeHtmlAttr($helper->getConversionJsSrc()) ?>"></script>
 <noscript>
     <div style="display:inline;">
         <img height="1" width="1" style="border-style:none;" alt=""
-             src="<?= $block->escapeHtmlAttr($block->getHelper()->getConversionImgSrc()) ?>"/>
+             src="<?= $block->escapeHtmlAttr($helper->getConversionImgSrc()) ?>"/>
     </div>
 </noscript>
 <!-- END Google Code for Sale Conversion Page -->
diff --git a/app/code/Magento/MediaStorage/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml b/app/code/Magento/MediaStorage/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml
index fd437161dfbb0..aaf03b33514c1 100644
--- a/app/code/Magento/MediaStorage/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml
+++ b/app/code/Magento/MediaStorage/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml
@@ -3,11 +3,19 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-?>
 
-<?php /* @var $block \Magento\MediaStorage\Block\System\Config\System\Storage\Media\Synchronize */ ?>
+/**
+ * @var $block \Magento\MediaStorage\Block\System\Config\System\Storage\Media\Synchronize
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+?>
 
-<script>
+<?php
+$syncStorageParams = $block->getSyncStorageParams();
+$stateRunning  = /* @noEscape */ (int)\Magento\MediaStorage\Model\File\Storage\Flag::STATE_RUNNING;
+$stateFinished = /* @noEscape */ (int)\Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED;
+$stateNotified = /* @noEscape */ (int)\Magento\MediaStorage\Model\File\Storage\Flag::STATE_NOTIFIED;
+$scriptString = <<<script
 require([
     'jquery',
     'prototype',
@@ -31,12 +39,14 @@ require([
         $('system_media_storage_configuration_media_database').value
     );
 
-    <?php $syncStorageParams = $block->getSyncStorageParams() ?>
-    addAllowedStorage(<?= $block->escapeJs($syncStorageParams['storage_type']) ?>, '<?= $block->escapeJs($syncStorageParams['connection_name']) ?>');
+    addAllowedStorage({$block->escapeJs($syncStorageParams['storage_type'])},
+     '{$block->escapeJs($syncStorageParams['connection_name'])}');
 
     defaultValues   = [];
-    defaultValues['system_media_storage_configuration_media_storage']   = $('system_media_storage_configuration_media_storage').value;
-    defaultValues['system_media_storage_configuration_media_database']  = $('system_media_storage_configuration_media_database').value;
+    defaultValues['system_media_storage_configuration_media_storage']   =
+     $('system_media_storage_configuration_media_storage').value;
+    defaultValues['system_media_storage_configuration_media_database']  =
+     $('system_media_storage_configuration_media_database').value;
 
 
     function addAllowedStorage(storageType, connection)
@@ -90,7 +100,7 @@ require([
     }
 
     var checkStatus = function() {
-        u = new Ajax.PeriodicalUpdater('', '<?= $block->escapeUrl($block->getAjaxStatusUpdateUrl()) ?>', {
+        u = new Ajax.PeriodicalUpdater('', '{$block->escapeJs($block->getAjaxStatusUpdateUrl())}', {
             method:     'get',
             frequency:  5,
             loaderArea: false,
@@ -100,7 +110,7 @@ require([
 
                 try {
                     response = JSON.parse(transport.responseText);
-                    if (response.state == '<?= /* @noEscape */ (int)\Magento\MediaStorage\Model\File\Storage\Flag::STATE_RUNNING ?>'
+                    if (response.state == '{$stateRunning}'
                         && response.message
                     ) {
                         if ($('sync_span').hasClassName('no-display')) {
@@ -112,12 +122,12 @@ require([
                         enableStorageSelection();
                         $('sync_span').addClassName('no-display');
 
-                        if (response.state == '<?= /* @noEscape */ (int)\Magento\MediaStorage\Model\File\Storage\Flag::STATE_FINISHED ?>') {
+                        if (response.state == '{$stateFinished}') {
                             addAllowedStorage(
                                 $('system_media_storage_configuration_media_storage').value,
                                 $('system_media_storage_configuration_media_database').value
                             );
-                        } else if (response.state == '<?= /* @noEscape */ (int)\Magento\MediaStorage\Model\File\Storage\Flag::STATE_NOTIFIED ?>') {
+                        } else if (response.state == '{$stateNotified}') {
                             if (response.has_errors) {
                                 enableSyncButton();
                             } else {
@@ -152,7 +162,7 @@ require([
             connection: $('system_media_storage_configuration_media_database').value
         };
 
-        new Ajax.Request('<?= $block->escapeUrl($block->getAjaxSyncUrl()) ?>', {
+        new Ajax.Request('{$block->escapeJs($block->getAjaxSyncUrl())}', {
             parameters:     params,
             loaderArea:     false,
             asynchronous:   true
@@ -172,11 +182,14 @@ require([
         return allowedStorages.include(storage);
     }, 'Synchronization is required.');
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <?= $block->getButtonHtml() ?>
 <span class="sync-indicator no-display" id="sync_span">
-    <img alt="Synchronize" style="margin:0 5px" src="<?= $block->escapeUrl($block->getViewFileUrl('images/process_spinner.gif')) ?>"/>
+    <img alt="Synchronize" src="<?= $block->escapeUrl($block->getViewFileUrl('images/process_spinner.gif')) ?>"/>
     <span id="sync_message_span"></span>
 </span>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("margin:0 5px", '#sync_span img') ?>
 <input type="hidden" id="synchronize-validation-input" class="required-synchronize no-display"/>
diff --git a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
index 93fb7b250c777..e631f5bc19580 100644
--- a/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/product/view/list.phtml
@@ -34,14 +34,19 @@ $format = $block->getDateFormat() ?: \IntlDateFormatter::SHORT;
                             <span><?= $block->escapeHtml($_vote->getRatingCode()) ?></span>
                         </span>
                         <div class="rating-result"
-                             id="rating-result_<?= 'a'?>"
+                             id="review_<?= /* @noEscape */ $_review->getReviewId()
+                                ?>_vote_<?= /* @noEscape */ $_vote->getVoteId() ?>"
                              title="<?= $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
                             <meta itemprop="worstRating" content = "1"/>
                             <meta itemprop="bestRating" content = "100"/>
-                            <span style="width:<?= $block->escapeHtmlAttr($_vote->getPercent()) ?>%">
+                            <span>
                                 <span itemprop="ratingValue"><?= $block->escapeHtml($_vote->getPercent()) ?>%</span>
                             </span>
                         </div>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                            'width:' . $_vote->getPercent() . '%',
+                            'div#review_' . $_review->getReviewId() . '_vote_' . $_vote->getVoteId() . ' span'
+                        ) ?>
                     </div>
                     <?php endforeach; ?>
                     </div>
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
index d86954f0124ea..3f41eb5ba7d8e 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
@@ -6,6 +6,7 @@
 namespace Magento\Sales\Block\Adminhtml\Order\Invoice\Create;
 
 use Magento\Framework\App\ObjectManager;
+use Magento\Tax\Helper\Data as TaxHelper;
 
 /**
  * Adminhtml invoice create form
@@ -21,14 +22,16 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Sales\Helper\Admin $adminHelper
      * @param array $data
+     * @param TaxHelper|null $taxHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Sales\Helper\Admin $adminHelper,
-        array $data = []
+        array $data = [],
+        ?TaxHelper $taxHelper = null
     ) {
-        $data['taxHelper'] = ObjectManager::getInstance()->get(\Magento\Tax\Helper\Data::class);
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
         parent::__construct($context, $registry, $adminHelper, $data);
     }
 
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
index 02bbdae875962..6c04bc7ddd803 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
@@ -12,7 +12,10 @@
 <form id="edit_form" class="order-invoice-edit" method="post" action="<?= $block->escapeUrl($block->getSaveUrl()) ?>">
     <?= $block->getBlockHtml('formkey') ?>
     <?php $_order = $block->getInvoice()->getOrder() ?>
-    <?php $taxHelper = $block->getData('taxHelper') ?>
+    <?php
+    /** @var \Magento\Tax\Helper\Data $taxHelper */
+    $taxHelper = $block->getData('taxHelper');
+    ?>
     <?= $block->getChildHtml('order_info') ?>
 
     <section class="admin__page-section">
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
index 05d0e63b4414a..7ec16fd7f5373 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php
@@ -13,7 +13,7 @@
 
 namespace Magento\Tax\Block\Adminhtml\Rate;
 
-use Magento\Directory\Helper\Data as DirectoryData;
+use Magento\Directory\Helper\Data as DirectoryHelper;
 use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Tax\Controller\RegistryConstants;
@@ -88,6 +88,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Tax\Model\TaxRateCollection $taxRateCollection
      * @param \Magento\Tax\Model\Calculation\Rate\Converter $taxRateConverter
      * @param array $data
+     * @param DirectoryHelper|null $directoryHelper
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -101,7 +102,8 @@ public function __construct(
         \Magento\Tax\Api\TaxRateRepositoryInterface $taxRateRepository,
         \Magento\Tax\Model\TaxRateCollection $taxRateCollection,
         \Magento\Tax\Model\Calculation\Rate\Converter $taxRateConverter,
-        array $data = []
+        array $data = [],
+        ?DirectoryHelper $directoryHelper = null
     ) {
         $this->_regionFactory = $regionFactory;
         $this->_country = $country;
@@ -110,7 +112,7 @@ public function __construct(
         $this->_taxRateRepository = $taxRateRepository;
         $this->_taxRateCollection = $taxRateCollection;
         $this->_taxRateConverter = $taxRateConverter;
-        $data['directoryHelper'] = ObjectManager::getInstance()->get(DirectoryData::class);
+        $data['directoryHelper'] = $directoryHelper ?? ObjectManager::getInstance()->get(DirectoryHelper::class);
         parent::__construct($context, $registry, $formFactory, $data);
     }
 
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml
index 6956cd5990e96..d7b04f8e29f27 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rate/js.phtml
@@ -8,7 +8,8 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php $jsonHelper = $tmpBlock->getData('directoryHelper');
+<?php /** @var \Magento\Directory\Helper\Data $jsonHelper */
+$jsonHelper = $tmpBlock->getData('directoryHelper');
 $regionJson = /* @noEscape */ $jsonHelper->getRegionJson();
 $scriptString = <<<script
 require([
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
index 0d00fa397c9a3..23797977fe6a2 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
@@ -17,5 +17,5 @@
 </div>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     "display:none",
-    '#'. $block->escapeHtmlAttr($block->getNameInLayout())
+    '#'. $block->escapeJs($block->getNameInLayout())
 ) ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml
index ba2ca499cfec1..8a4cfd9d6b574 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/class/add.phtml
@@ -12,7 +12,7 @@
     </button>
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onclick',
-        "window.location.href='" . $block->escapeUrl($createUrl) . "'",
+        "window.location.href='" . $block->escapeJs($createUrl) . "'",
         'button#addNewClass'
     ) ?>
 </div>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml
index 149ea004243f9..f7af88b8207dc 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/toolbar/rule/add.phtml
@@ -12,7 +12,7 @@
     </button>
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onclick',
-        "window.location.href='" . $block->escapeUrl($createUrl) . "'",
+        "window.location.href='" . $block->escapeJs($createUrl) . "'",
         'button#addNewClass'
     ) ?>
 </div>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
index d2098db4d9c43..a85e5e9b76972 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
@@ -12,7 +12,8 @@
 <?php
 $style = $block->escapeHtmlAttr($block->getStyle());
 $colspan = (int) $block->getColspan();
-$jsonHelper = $block->getData('jsonHelper');
+/** @var \Magento\Checkout\Helper\Data $checkoutHelper */
+$checkoutHelper = $block->getData('checkoutHelper');
 ?>
 <?php if ($block->includeTax() && $block->getTotalExclTax() >= 0): ?>
     <tr class="grand totals excl">
@@ -20,7 +21,7 @@ $jsonHelper = $block->getData('jsonHelper');
             <strong><?= $block->escapeHtml(__('Grand Total Excl. Tax')) ?></strong>
         </th>
         <td class="amount" data-th="<?= $block->escapeHtmlAttr(__('Grand Total Excl. Tax')) ?>">
-            <strong><?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotalExclTax()) ?></strong>
+            <strong><?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotalExclTax()) ?></strong>
         </td>
     </tr>
     <?= /* @noEscape */ $block->renderTotals('taxes', $colspan) ?>
@@ -29,7 +30,7 @@ $jsonHelper = $block->getData('jsonHelper');
             <strong><?= $block->escapeHtml(__('Grand Total Incl. Tax')) ?></strong>
         </th>
         <td class="amount" data-th="<?= $block->escapeHtmlAttr(__('Grand Total Incl. Tax')) ?>">
-            <strong><?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
+            <strong><?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
 <?php else: ?>
@@ -38,7 +39,7 @@ $jsonHelper = $block->getData('jsonHelper');
             <strong><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></strong>
         </th>
         <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-            <strong><?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
+            <strong><?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
index 09aa99e228713..9f08c668952f1 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
@@ -4,8 +4,6 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /**
  * @var $block \Magento\Tax\Block\Checkout\Shipping
  * @see \Magento\Tax\Block\Checkout\Shipping
@@ -16,7 +14,8 @@
     <?php
         $style = $block->escapeHtmlAttr($block->getStyle());
         $colspan = (int) $block->getColspan();
-        $jsonHelper = $block->getData('jsonHelper');
+        /** @var \Magento\Checkout\Helper\Data $checkoutHelper */
+        $checkoutHelper = $block->getData('checkoutHelper');
     ?>
     <?php if ($block->displayBoth()): ?>
     <tr class="totals shipping excl">
@@ -25,7 +24,7 @@
         </th>
 
         <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getExcludeTaxLabel()) ?>">
-            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingExcludeTax()) ?>
+            <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingExcludeTax()) ?>
         </td>
     </tr>
     <tr class="totals shipping incl">
@@ -33,7 +32,7 @@
             <?= $block->escapeHtml($block->getIncludeTaxLabel()) ?>
         </th>
         <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getIncludeTaxLabel()) ?>">
-            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingIncludeTax()) ?>
+            <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingIncludeTax()) ?>
         </td>
     </tr>
     <?php elseif ($block->displayIncludeTax()): ?>
@@ -42,7 +41,7 @@
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
         </th>
         <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingIncludeTax()) ?>
+            <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingIncludeTax()) ?>
         </td>
     </tr>
     <?php else: ?>
@@ -51,7 +50,7 @@
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
         </th>
         <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-            <?= /* @noEscape */ $jsonHelper->formatPrice($block->getShippingExcludeTax()) ?>
+            <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingExcludeTax()) ?>
         </td>
     </tr>
     <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
index 091303cbedb38..88d4721b1aa47 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
@@ -13,7 +13,8 @@
 <?php
 $style = $block->escapeHtmlAttr($block->getStyle());
 $colspan = (int) $block->getColspan();
-$jsonHelper = $block->getData('jsonHelper');
+/** @var \Magento\Checkout\Helper\Data $checkoutHelper */
+$checkoutHelper = $block->getData('checkoutHelper');
 ?>
 <?php if ($block->displayBoth()): ?>
 <tr class="totals sub excl">
@@ -21,7 +22,7 @@ $jsonHelper = $block->getData('jsonHelper');
         <?= $block->escapeHtml(__('Subtotal (Excl. Tax)')) ?>
     </th>
     <tdclass="amount" data-th="<?= $block->escapeHtmlAttr(__('Subtotal (Excl. Tax)')) ?>">
-        <?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValueExclTax()) ?>
+        <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValueExclTax()) ?>
     </td>
 </tr>
 <tr class="totals sub incl">
@@ -29,7 +30,7 @@ $jsonHelper = $block->getData('jsonHelper');
         <?= $block->escapeHtml(__('Subtotal (Incl. Tax)')) ?>
     </th>
     <td class="amount" data-th="<?= $block->escapeHtmlAttr(__('Subtotal (Incl. Tax)')) ?>">
-        <?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValueInclTax()) ?>
+        <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValueInclTax()) ?>
     </td>
 </tr>
 <?php else: ?>
@@ -38,7 +39,7 @@ $jsonHelper = $block->getData('jsonHelper');
         <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
     </th>
     <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-        <?= /* @noEscape */ $jsonHelper->formatPrice($block->getTotal()->getValue()) ?>
+        <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValue()) ?>
     </td>
 </tr>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
index d1b31bdf7861b..28767bb3d4cbb 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
@@ -13,10 +13,11 @@
 <?php
     $_value = $block->getTotal()->getValue();
     $_style = $block->escapeHtmlAttr($block->getTotal()->getStyle());
-    $jsonHelper = $block->getData('jsonHelper');
+    /** @var \Magento\Checkout\Helper\Data $checkoutHelper */
+    $checkoutHelper = $block->getData('checkoutHelper');
     $attributes = 'class="totals-tax"';
 
-if ($jsonHelper->displayFullSummary() && $_value != 0) {
+if ($checkoutHelper->displayFullSummary() && $_value != 0) {
     $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown",
      "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\'';
 }
@@ -24,20 +25,20 @@ if ($jsonHelper->displayFullSummary() && $_value != 0) {
 
 <tr <?= /* @noEscape */ $attributes ?>>
     <th class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
-        <?php if ($jsonHelper->displayFullSummary()): ?>
+        <?php if ($checkoutHelper->displayFullSummary()): ?>
             <span class="detailed"><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></span>
         <?php else: ?>
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
         <?php endif; ?>
     </th>
     <td class="amount" data-th="<?= $block->escapeHtmlAttr($block->getTotal()->getTitle()) ?>">
-        <?= /* @noEscape */ $jsonHelper->formatPrice($_value) ?>
+        <?= /* @noEscape */ $checkoutHelper->formatPrice($_value) ?>
     </td>
 </tr>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax th.mark') ?>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax td.amount') ?>
 
-<?php if ($jsonHelper->displayFullSummary() && $_value != 0): ?>
+<?php if ($checkoutHelper->displayFullSummary() && $_value != 0): ?>
     <?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
         <?php if (isset($info['hidden']) && $info['hidden']) { continue; } ?>
         <?php $percent = $info['percent']; ?>
@@ -57,7 +58,7 @@ if ($jsonHelper->displayFullSummary() && $_value != 0) {
                     <td class="amount" rowspan="<?= count($rates) ?>"
                        data-th="<?= $block->escapeHtmlAttr($rate['title']) ?>
                         <?php if ($rate['percent'] !== null): ?>(<?= (float) $rate['percent'] ?>%)<?php endif; ?>">
-                        <?= /* @noEscape */ $jsonHelper->formatPrice($amount) ?>
+                        <?= /* @noEscape */ $checkoutHelper->formatPrice($amount) ?>
                     </td>
                 <?php endif; ?>
             </tr>
diff --git a/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php b/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php
index 94540b13f13c6..77e8c2a4b10e2 100644
--- a/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php
+++ b/app/code/Magento/Ups/Block/Backend/System/CarrierConfig.php
@@ -37,16 +37,18 @@ class CarrierConfig extends Template
      * @param \Magento\Ups\Helper\Config $carrierConfig
      * @param \Magento\Store\Model\Website $websiteModel
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         TemplateContext $context,
         ConfigHelper $carrierConfig,
         Website $websiteModel,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->carrierConfig = $carrierConfig;
         $this->_websiteModel = $websiteModel;
-        $data['jsonHelper'] = ObjectManager::getInstance()->get(JsonHelper::class);
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
index 8ebb1155c9f51..d0b6443994aa6 100644
--- a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
+++ b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
@@ -4,8 +4,6 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-
 /** @var $upsModel \Magento\Ups\Helper\Config */
 /** @var $block \Magento\Ups\Block\Backend\System\CarrierConfig */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
@@ -17,7 +15,7 @@ $defShipArr = $upsCarrierConfig->getCode('method');
 $sectionCode = $block->getRequest()->getParam('section');
 $websiteCode = $block->getRequest()->getParam('website');
 $storeCode = $block->getRequest()->getParam('store');
-
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
 $jsonHelper = $block->getData('jsonHelper');
 
 if (!$storeCode && $websiteCode) {

From 9465779f53fcea77ee7a38c6cd0f4447e2cbd79e Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Fri, 24 Apr 2020 13:28:55 +0300
Subject: [PATCH 112/307] MC-29421: Remove event handlers

---
 .../Magento_CatalogPermissions/web/css/source/_module.less    | 2 +-
 .../Magento/luma/Magento_Rma/web/css/source/_module.less      | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
index 1a673e881fb6a..d78bfea5f1e6b 100644
--- a/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
+++ b/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
@@ -19,5 +19,5 @@
 }
 
 .warning-enable-permissions {
-    color: red;
+    color: #ff0000;
 }
diff --git a/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less b/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
index dda1bad1e8366..104dd6c4d5b92 100644
--- a/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
+++ b/app/design/frontend/Magento/luma/Magento_Rma/web/css/source/_module.less
@@ -200,7 +200,9 @@
         .control {
             table {
                 .col.qty {
-                    .input-qty {display: none;}
+                    .input-qty {
+                        display: none;
+                    }
                 }
             }
         }

From 8f0859f2cc0a3d077240fe5b201466082f791217 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Fri, 24 Apr 2020 15:15:20 +0300
Subject: [PATCH 113/307] MC-29421: Remove event handlers

---
 .../Magento_CatalogPermissions/web/css/source/_module.less      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less b/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
index d78bfea5f1e6b..f0c98c891b5ba 100644
--- a/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
+++ b/app/design/adminhtml/Magento/backend/Magento_CatalogPermissions/web/css/source/_module.less
@@ -19,5 +19,5 @@
 }
 
 .warning-enable-permissions {
-    color: #ff0000;
+    color: #f00;
 }

From 896f0d66acc8cabdb6c3ed4f342456ba4dc084d7 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Mon, 27 Apr 2020 19:37:57 +0300
Subject: [PATCH 114/307] MC-29420: Remove event handlers from CE

---
 .../templates/dashboard/store/switcher.phtml  |   2 +-
 .../adminhtml/templates/store/switcher.phtml  |   4 +-
 .../templates/system/cache/edit.phtml         |   2 +-
 .../Adminhtml/Product/Helper/Form/Config.php  |  21 ++-
 .../Adminhtml/Product/Helper/Form/Image.php   |  23 +++-
 .../product/image_with_borders.phtml          |   2 +-
 .../Form/Field/Select/Allowspecific.php       |  41 +++++-
 .../system/config/form/field/array.phtml      |  29 ++++-
 .../templates/system/config/validatevat.phtml |   2 +-
 .../activate/permissions/tab/webapi.phtml     |  21 ++-
 .../integration/popup_container.phtml         |  38 +++---
 .../adminhtml/templates/resourcetree.phtml    |  11 +-
 .../base/templates/product/price/msrp.phtml   |  40 ++++--
 .../render/item/price_msrp_item.phtml         |  24 ++--
 .../Multishipping/Block/Checkout/Overview.php |   9 +-
 .../frontend/templates/checkout/billing.phtml |  70 +++++-----
 .../templates/checkout/overview.phtml         |  42 +++---
 .../templates/preview/iframeswitcher.phtml    |  29 +++--
 .../adminhtml/templates/preview/store.phtml   |  27 ++--
 .../adminhtml/templates/problem/list.phtml    |  16 ++-
 .../view/adminhtml/templates/queue/edit.phtml |  18 ++-
 .../adminhtml/templates/subscriber/list.phtml |  25 +++-
 .../adminhtml/templates/template/edit.phtml   |  33 +++--
 .../templates/form/banktransfer.phtml         |   9 +-
 .../templates/form/cashondelivery.phtml       |   9 +-
 .../adminhtml/templates/form/checkmo.phtml    |  14 +-
 .../templates/form/purchaseorder.phtml        |  14 +-
 .../templates/form/banktransfer.phtml         |  10 +-
 .../templates/form/cashondelivery.phtml       |  10 +-
 .../frontend/templates/form/checkmo.phtml     |  13 +-
 .../templates/form/purchaseorder.phtml        |  11 +-
 .../multishipping/checkmo_form.phtml          |   9 +-
 .../Payment/Block/Transparent/Iframe.php      |   8 +-
 .../view/adminhtml/templates/form/cc.phtml    |  26 ++--
 .../templates/transparent/form.phtml          |  44 ++++---
 .../templates/transparent/iframe.phtml        |  41 ++++--
 .../templates/transparent/info.phtml          |   7 +-
 .../view/frontend/templates/form/cc.phtml     |  30 +++--
 .../frontend/templates/transparent/form.phtml |  26 ++--
 .../templates/transparent/iframe.phtml        |  48 +++++--
 .../frontend/templates/transparent/info.phtml |   7 +-
 .../Adminhtml/System/Config/Field/Hidden.php  |  27 +++-
 .../System/Config/Fieldset/Payment.php        |  35 +++--
 .../Block/Express/InContext/Component.php     |  23 +++-
 .../templates/billing/agreement/form.phtml    |  13 +-
 .../payment/form/billing/agreement.phtml      |  14 +-
 .../templates/system/config/api_wizard.phtml  |  10 +-
 .../system/config/bml_api_wizard.phtml        |  19 ++-
 .../templates/transparent/form.phtml          |  50 +++++---
 .../express/in-context/component.phtml        |  17 ++-
 .../frontend/templates/express/review.phtml   |  34 +++--
 .../express/review/shipping/method.phtml      |  33 +++--
 .../view/frontend/templates/hss/form.phtml    |   7 +-
 .../view/frontend/templates/hss/info.phtml    |   8 +-
 .../frontend/templates/partner/logo.phtml     |  15 ++-
 .../templates/payflowadvanced/form.phtml      |   7 +-
 .../templates/payflowadvanced/info.phtml      |   7 +-
 .../frontend/templates/payflowlink/form.phtml |   7 +-
 .../frontend/templates/payflowlink/info.phtml |   8 +-
 .../templates/payflowlink/redirect.phtml      |  15 ++-
 .../payment/form/billing/agreement.phtml      |   6 +-
 .../frontend/templates/payment/mark.phtml     |  24 ++--
 .../frontend/templates/payment/redirect.phtml |  10 +-
 .../adminhtml/templates/helper/gallery.phtml  |  49 ++++---
 .../templates/product/edit/base_image.phtml   |  14 +-
 .../product/edit/slideout/form.phtml          |  11 +-
 .../Block/Adminhtml/Items/Column/Name.php     |  24 ++++
 .../Adminhtml/Order/Create/Giftmessage.php    |   1 +
 .../Adminhtml/Order/Create/Items/Grid.php     |   7 +-
 .../Order/Create/Shipping/Method/Form.php     |   1 +
 .../templates/items/column/name.phtml         |  57 ++++++---
 .../templates/order/comments/view.phtml       |  36 ++++--
 .../order/create/billing/method/form.phtml    |  39 ++++--
 .../templates/order/create/comment.phtml      |  15 ++-
 .../templates/order/create/coupons/form.phtml |  27 ++--
 .../templates/order/create/data.phtml         |  43 +++++--
 .../templates/order/create/form.phtml         |  23 +++-
 .../templates/order/create/form/account.phtml |  12 +-
 .../templates/order/create/form/address.phtml | 102 ++++++++++-----
 .../templates/order/create/giftmessage.phtml  |  30 +++--
 .../templates/order/create/items/grid.phtml   | 120 ++++++++++++------
 .../adminhtml/templates/order/create/js.phtml |  15 ++-
 .../order/create/shipping/method/form.phtml   | 111 +++++++++++-----
 .../templates/order/create/sidebar.phtml      |  25 ++--
 .../templates/order/create/totals.phtml       |  23 +++-
 85 files changed, 1433 insertions(+), 606 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
index b99051f33fe3a..7cc9b781f579e 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/dashboard/store/switcher.phtml
@@ -42,7 +42,7 @@
 </select>
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onchange',
-    "return switchStore($('select#store_switcher');",
+    'return switchStore(this);',
     'select#store_switcher'
 ) ?>
 </p>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
index e067a4dd27a77..c6fcaff9cd877 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml
@@ -17,7 +17,7 @@
                <?= /* @noEscape */ $block->getUiId() ?> />
         <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
             'onchange',
-            "switchScope($('#store_switcher'));",
+            'switchScope(this);',
             '#store_switcher'
         ) ?>
         <input type="hidden" name="store_group_switcher" id="store_group_switcher"
@@ -181,7 +181,7 @@ script;
                         reload();
                     },
                     cancel: function() {
-                        obj.value = \'' . $block->escapeHtml($block->getStoreId()) . '\';
+                        obj.value = \'' . $block->escapeJs($block->getStoreId()) . '\';
                     }
                 }
             });
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
index 5255fe4de8737..753cc7ceee356 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/system/cache/edit.phtml
@@ -70,7 +70,7 @@ script;
                                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                         'onclick',
                                         /* @noEscape */ $clickAction,
-                                        '#' . $block->escapeHtmlAttr($_button['name'])
+                                        '#' . $block->escapeJs($_button['name'])
                                     ) ?>
                                 <?php endif; ?>
                                 <?php if (isset($_button['comment'])): ?> <br />
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
index 541d0f79f4da6..16c00aee6beaa 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Config.php
@@ -11,10 +11,10 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\CollectionFactory;
 use Magento\Framework\Data\Form\Element\Factory;
 use Magento\Framework\Escaper;
-use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class Config extends \Magento\Framework\Data\Form\Element\Select
@@ -24,6 +24,25 @@ class Config extends \Magento\Framework\Data\Form\Element\Select
      */
     private $secureRenderer;
 
+    /**
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
+     * @param Escaper $escaper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
+        Escaper $escaper,
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
+    ) {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer);
+        $this->secureRenderer = $secureRenderer;
+    }
+
     /**
      * Retrieve element html
      *
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
index a873d1465af21..57e82581d83b2 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Image.php
@@ -11,9 +11,9 @@
  */
 namespace Magento\Catalog\Block\Adminhtml\Product\Helper\Form;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Data\Form\Element\CollectionFactory;
 use Magento\Framework\Data\Form\Element\Factory;
-use Magento\Framework\Math\Random;
 use Magento\Framework\UrlInterface;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
@@ -24,6 +24,27 @@ class Image extends \Magento\Framework\Data\Form\Element\Image
      */
     private $secureRenderer;
 
+    /**
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
+     * @param \Magento\Framework\Escaper $escaper
+     * @param UrlInterface $urlBuilder
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
+        \Magento\Framework\Escaper $escaper,
+        UrlInterface $urlBuilder,
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
+    ) {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $urlBuilder, $data, $secureRenderer);
+        $this->secureRenderer = $secureRenderer;
+    }
+
     /**
      * Return generated url.
      *
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index 9aaee9727b68f..dce1a51a57c63 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -23,7 +23,7 @@
             alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
 </span>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'width:' . (int)$escaper->escapeHtmlAttr($block->getWidth()) . 'px;',
+    'width:' . (int)$block->getWidth() . 'px;',
     'span.product-image-container'
 ) ?>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Field/Select/Allowspecific.php b/app/code/Magento/Config/Block/System/Config/Form/Field/Select/Allowspecific.php
index b62584537e2b3..9a0bc416d4d46 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Field/Select/Allowspecific.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Field/Select/Allowspecific.php
@@ -11,8 +11,40 @@
  */
 namespace Magento\Config\Block\System\Config\Form\Field\Select;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Data\Form\Element\CollectionFactory;
+use Magento\Framework\Data\Form\Element\Factory;
+use Magento\Framework\Escaper;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class Allowspecific extends \Magento\Framework\Data\Form\Element\Select
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * Allowspecific constructor.
+     * @param Factory $factoryElement
+     * @param CollectionFactory $factoryCollection
+     * @param Escaper $escaper
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(
+        Factory $factoryElement,
+        CollectionFactory $factoryCollection,
+        Escaper $escaper,
+        $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
+    ) {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($factoryElement, $factoryCollection, $escaper, $data, $secureRenderer);
+        $this->secureRenderer = $secureRenderer;
+    }
+
     /**
      * Add additional Javascript code
      *
@@ -25,7 +57,6 @@ public function getAfterElementHtml()
         $useDefaultElementId = $countryListId . '_inherit';
 
         $elementJavaScript = <<<HTML
-<script type="text/javascript">
 //<![CDATA[
 document.getElementById('{$elementId}').addEventListener('change', function(event) {
     var isCountrySpecific = event.target.value == 1,
@@ -42,13 +73,15 @@ public function getAfterElementHtml()
     }
 });
 //]]>
-</script>
 HTML;
 
-        return $elementJavaScript . parent::getAfterElementHtml();
+        return $this->secureRenderer->renderTag('script', [], $elementJavaScript, false) .
+            parent::getAfterElementHtml();
     }
 
     /**
+     * Return generated html.
+     *
      * @return string
      */
     public function getHtml()
@@ -61,6 +94,8 @@ public function getHtml()
     }
 
     /**
+     * Return country specific element id.
+     *
      * @return string
      */
     protected function _getSpecificCountryElementId()
diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml
index 24024f62c7d6d..f08cc77249582 100644
--- a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml
+++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml
@@ -54,6 +54,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1;
 script;
     foreach ($block->getColumns() as $columnName => $column):
         $scriptString .= <<<script
+
                         + '<td>'
                         + '{$block->escapeJs($block->renderCellTemplate($columnName))}'
                         + '<\/td>'
@@ -62,17 +63,29 @@ script;
 
     if ($block->isAddAfter()):
         $scriptString .= <<<script
+
                         + '<td><button class="action-add" type="button" id="addAfterBtn<%- _id %>"><span>'
                         + '{$block->escapeJs(__('Add after'))}'
                         + '<\/span><\/button><\/td>'
 script;
     endif;
     $scriptString .= <<<script
+
                     + '<td class="col-actions"><button '
-                    + 'onclick="arrayRow{$block->escapeJs($_htmlId)}.del(\'<%- _id %>\')" '
                     + 'class="action-delete" type="button">'
                     + '<span>{$block->escapeJs(__('Delete'))}<\/span><\/button><\/td>'
                     + '<\/tr>'
+
+script;
+    $scriptString1 = /* $noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        "arrayRow" . $block->escapeJs($_htmlId) . ".del('<%- _id %>')",
+        "tr#<%- _id %> button.action-delete"
+    );
+
+    $scriptString .= " + '" . $block->escapeJs($scriptString1) . "'" . PHP_EOL;
+
+    $scriptString .= <<<script
             ),
 
             add: function(rowData, insertAfterId) {
@@ -88,11 +101,13 @@ script;
 script;
     foreach ($block->getColumns() as $columnName => $column):
         $scriptString .= <<<script
+
                             {$block->escapeJs($columnName)}: '',
                                 'option_extra_attrs': {},
 script;
     endforeach;
     $scriptString .= <<<script
+
                         _id: '_' + d.getTime() + '_' + d.getMilliseconds()
                 };
             }
@@ -115,13 +130,17 @@ script;
             }
 
             // Add event for {addAfterBtn} button
+
 script;
     if ($block->isAddAfter()):
         $scriptString .= <<<script
+
             Event.observe('addAfterBtn' + templateValues._id, 'click', this.add.bind(this, false, templateValues._id));
+
 script;
     endif;
     $scriptString .= <<<script
+
             },
 
             del: function(rowId) {
@@ -138,19 +157,25 @@ script;
         );
 
         // add existing rows
+
 script;
+
     foreach ($block->getArrayRows() as $_rowId => $_row) {
-        echo /** @noEscape */ "arrayRow{$block->escapeJs($_htmlId)}.add(" . /** @noEscape */ $_row->toJson() . ");\n";
+        $scriptString .= /** @noEscape */ " arrayRow" .$block->escapeJs($_htmlId) .
+            ".add(" . /** @noEscape */ $_row->toJson() . ");\n";
     }
     $scriptString .= <<<script
+
         // Toggle the grid availability, if element is disabled (depending on scope)
 script;
     if ($block->getElement()->getDisabled()):
         $scriptString .= <<<script
+
         toggleValueElements({checked: true}, $('grid{$block->escapeJs($_htmlId)}').parentNode);
 script;
     endif;
     $scriptString .= <<<script
+
         });
 script;
     ?>
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
index 3824a759dfb97..222317559e246 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
@@ -68,5 +68,5 @@ script;
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
     'javascript:validateVat(); return false;',
-    '#' . $htmlId
+    '#' . /* @noEscape */ $block->getHtmlId()
 ); ?>
diff --git a/app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml
index 1730509a65910..6dd7d1b4a2421 100644
--- a/app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml
+++ b/app/code/Magento/Integration/view/adminhtml/templates/integration/activate/permissions/tab/webapi.phtml
@@ -7,11 +7,13 @@
  *
  * @var \Magento\Integration\Block\Adminhtml\Integration\Activate\Permissions\Tab\Webapi $block
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <fieldset class="admin__fieldset form-inline entry-edit">
-    <?php if ($block->isTreeEmpty()) : ?>
+    <?php if ($block->isTreeEmpty()): ?>
         <p class="empty"><?= $block->escapeHtml(__('No permissions requested')) ?></p>
-    <?php else : ?>
+    <?php else: ?>
         <div class="field" data-role="tree-resources-container">
             <div class="control">
                 <div id="resource-tree" class="tree x-tree" data-role="resource-tree"></div>
@@ -19,8 +21,11 @@
         </div>
     <?php endif ?>
 </fieldset>
-<?php if (!$block->isTreeEmpty()) : ?>
-    <script>
+<?php
+if (!$block->isTreeEmpty()):
+    $treeJson = /* @noEscape */ $block->getResourcesTreeJson();
+    $selectedJson = /* @noEscape */ $block->getSelectedResourcesJson();
+    $scriptString = <<<script
         require(["jquery", "Magento_User/js/roles-tree"], function($){
             $.widget('mage.rolesTree', $.mage.rolesTree, {
                 _checkNode: function(event) {},
@@ -32,9 +37,11 @@
             });
 
             $('[data-role="resource-tree"]').rolesTree({
-                'treeInitData': <?= /* @noEscape */ $block->getResourcesTreeJson() ?>,
-                'treeInitSelectedData': <?= /* @noEscape */ $block->getSelectedResourcesJson() ?>
+                'treeInitData': {$treeJson},
+                'treeInitSelectedData': {$selectedJson}
             });
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif ?>
diff --git a/app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml b/app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml
index ef0a667d2de47..b56ad208071d8 100644
--- a/app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml
+++ b/app/code/Magento/Integration/view/adminhtml/templates/integration/popup_container.phtml
@@ -7,8 +7,12 @@
  *
  * @var \Magento\Backend\Block\Template $block
  */
+
+/** @var \Magento\Backend\Block\Template $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
     require([
         "jquery",
         'Magento_Ui/js/modal/confirm',
@@ -18,34 +22,34 @@
     ], function ($, Confirm) {
 
         window.integration = new Integration(
-            '<?= $block->escapeUrl(
+            '{$block->escapeJs(
                 $block->getUrl(
                     '*/*/permissionsDialog',
                     ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]
                 )
-            ) ?>',
-            '<?= $block->escapeUrl(
+            )}',
+            '{$block->escapeJs(
                 $block->getUrl(
                     '*/*/tokensDialog',
                     ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]
                 )
-            ) ?>',
-            '<?= $block->escapeUrl(
+            )}',
+            '{$block->escapeJs(
                 $block->getUrl(
                     '*/*/tokensExchange',
                     ['id' => ':id', 'reauthorize' => ':isReauthorize', '_escape_params' => false]
                 )
-            ) ?>',
-            '<?= $block->escapeUrl(
+            )}',
+            '{$block->escapeJs(
                 $block->getUrl(
                     '*/*'
                 )
-            ) ?>',
-            '<?= $block->escapeUrl(
+            )}',
+            '{$block->escapeJs(
                 $block->getUrl(
                     '*/*/loginSuccessCallback'
                 )
-            ) ?>'
+            )}'
         );
 
         /**
@@ -55,8 +59,9 @@
             $('div#integrationGrid').on('click', 'button#delete', function (e) {
 
                 new Confirm({
-                    title: '<?= $block->escapeHtml(__('Are you sure?')) ?>',
-                    content: "<?= $block->escapeHtml(__("Are you sure you want to delete this integration? You can't undo this action.")) ?>",
+                    title: '{$block->escapeJs(__('Are you sure?'))}',
+                    content: "{$block->escapeJs(__("Are you sure you want to delete this integration? " .
+                                                     "You can't undo this action."))}",
                     actions: {
                         confirm: function () {
                             $.mage.dataPost().postData({action: $(e.target).data('url'), data: {}});
@@ -67,6 +72,9 @@
             });
         });
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
-<div id="integration-popup-container" style="display: none;"></div>
+<div id="integration-popup-container"></div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", '#integration-popup-container') ?>
diff --git a/app/code/Magento/Integration/view/adminhtml/templates/resourcetree.phtml b/app/code/Magento/Integration/view/adminhtml/templates/resourcetree.phtml
index 1737f66ce4a1b..25caf5060cb5f 100644
--- a/app/code/Magento/Integration/view/adminhtml/templates/resourcetree.phtml
+++ b/app/code/Magento/Integration/view/adminhtml/templates/resourcetree.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\Integration\Block\Adminhtml\Integration\Edit\Tab\Webapi */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?= $block->getChildHtml() ?>
@@ -18,8 +19,7 @@
         <label class="label" for="all_resources"><span><?= $block->escapeHtml(__('Resource Access')) ?></span></label>
 
         <div class="control">
-            <select id="all_resources" name="all_resources"
-                    onchange="jQuery('[data-role=tree-resources-container]').toggle()" class="select">
+            <select id="all_resources" name="all_resources" class="select">
                 <option value="0" <?= ($block->isEverythingAllowed() ? '' : 'selected="selected"') ?>>
                     <?= $block->escapeHtml(__('Custom')) ?>
                 </option>
@@ -27,11 +27,16 @@
                     <?= $block->escapeHtml(__('All')) ?>
                 </option>
             </select>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onchange',
+                "jQuery('[data-role=tree-resources-container]').toggle()",
+                'select#all_resources'
+            ) ?>
         </div>
     </div>
 
     <div class="field
-        <?php if ($block->isEverythingAllowed()) :?>
+        <?php if ($block->isEverythingAllowed()):?>
             no-display
         <?php endif ?>"
          data-role="tree-resources-container">
diff --git a/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml b/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml
index b062e911876c3..4e011df66974c 100644
--- a/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml
+++ b/app/code/Magento/Msrp/view/base/templates/product/price/msrp.phtml
@@ -8,6 +8,7 @@
  * Template for displaying product price at product view page, gift registry and wish-list
  *
  * @var $block \Magento\Msrp\Pricing\Render\PriceBox
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php
@@ -32,18 +33,20 @@ $msrpPrice = $block->renderAmount(
 $priceElementIdPrefix = $block->getPriceElementIdPrefix() ? $block->getPriceElementIdPrefix() : 'product-price-';
 ?>
 
-<?php if ($amount) : ?>
+<?php if ($amount): ?>
     <span class="old-price map-old-price"><?= /* @noEscape */ $msrpPrice ?></span>
     <span class="map-fallback-price normal-price"><?= /* @noEscape */ $msrpPrice ?></span>
 <?php endif; ?>
 
-<?php if ($priceType->isShowPriceOnGesture()) : ?>
+<?php if ($priceType->isShowPriceOnGesture()): ?>
     <?php
 
     $addToCartUrl = '';
     if ($product->isSaleable()) {
         /** @var Magento\Catalog\Block\Product\AbstractProduct $addToCartUrlGenerator */
-        $addToCartUrlGenerator = $block->getLayout()->getBlockSingleton(\Magento\Catalog\Block\Product\AbstractProduct::class);
+        $addToCartUrlGenerator = $block->getLayout()->getBlockSingleton(
+            \Magento\Catalog\Block\Product\AbstractProduct::class
+        );
         // phpcs:disable
         $addToCartUrl = $addToCartUrlGenerator->getAddToCartUrl(
             $product,
@@ -86,29 +89,40 @@ $priceElementIdPrefix = $block->getPriceElementIdPrefix() ? $block->getPriceElem
         );
     }
     ?>
-    <span id="<?= $block->escapeHtmlAttr($block->getPriceId() ? $block->getPriceId() : $priceElementId) ?>" style="display:none"></span>
-    <a href="javascript:void(0);"
+    <?php $priceId = $block->escapeHtmlAttr($block->getPriceId() ? $block->getPriceId() : $priceElementId); ?>
+    <span id="s_<?= /* @noEscape*/ $priceId ?>"></span>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none", 'span#s_' . $priceId) ?>
+    <a href="#"
        id="<?= /* @noEscape */ ($popupId) ?>"
        class="action map-show-info"
-       <?php //phpcs:disable ?>
-       data-mage-init='{"addToCart":<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($data) ?>}'>
-        <?php //phpcs:enable ?>
+       data-mage-init='{"addToCart":<?= /* @noEscape */ $block->jsonEncode($data) ?>}'>
         <?= $block->escapeHtml(__('Click for price')) ?>
     </a>
-<?php else : ?>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        'event.preventDefault()',
+        'a#' . /* @noEscape */ ($popupId)
+    ) ?>
+<?php else: ?>
     <span class="msrp-message">
      <?= $block->escapeHtml($priceType->getMsrpPriceMessage()) ?>
     </span>
 <?php endif; ?>
 
-<?php if ($block->getZone() == \Magento\Framework\Pricing\Render::ZONE_ITEM_VIEW) : ?>
+<?php if ($block->getZone() == \Magento\Framework\Pricing\Render::ZONE_ITEM_VIEW): ?>
     <?php $helpLinkId = 'msrp-help-' . $productId . $block->getRandomString(20); ?>
-    <a href="javascript:void(0);"
+    <a href="#"
        id="<?= /* @noEscape */ $helpLinkId ?>"
        class="action map-show-info"
        data-mage-init='{"addToCart":{"origin": "info",
                                      "helpLinkId": "#<?= /* @noEscape */ $helpLinkId ?>",
-                                     "productName": "<?= $block->escapeJs($block->escapeHtml($product->getName())) ?>",
-                                     "closeButtonId": "#map-popup-close"}}'><span><?= $block->escapeHtml(__("What's this?")) ?></span>
+                                     "productName": "<?= $block->escapeJs($product->getName()) ?>",
+                                     "closeButtonId": "#map-popup-close"}}'>
+        <span><?= $block->escapeHtml(__("What's this?")) ?></span>
     </a>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        'event.preventDefault()',
+        'a#' . /* @noEscape */ $helpLinkId
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
index dfb66e4cc47b2..63f3d6e995d5e 100644
--- a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
+++ b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
@@ -10,8 +10,10 @@
  * Template for displaying product price at product view page, gift registry and wishlist
  *
  * @var $block \Magento\Catalog\Block\Product\Price
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
+
 <?php
     //phpcs:disable
     /** @var $pricingHelper \Magento\Framework\Pricing\Helper\Data */
@@ -26,31 +28,37 @@
     $_msrpPrice = '';
 ?>
 <div class="price-box msrp">
-    <?php if ($_product->getMsrp()) : ?>
+    <?php if ($_product->getMsrp()): ?>
         <?php $_msrpPrice = $pricingHelper->currency($_product->getMsrp(), true, false) ?>
         <span class="old-price"><?= /* @noEscape */ $_msrpPrice ?></span>
     <?php endif; ?>
-    <?php if ($_catalogHelper->isShowPriceOnGesture($_product)) : ?>
+    <?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?>
         <?php $priceElementId = 'product-price-' . $_id . $block->getIdSuffix(); ?>
-        <span id="<?= /* @noEscape */ $priceElementId ?>" style="display: none"></span>
+        <span id="<?= /* @noEscape */ $priceElementId ?>"/>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none", '#'. $priceElementId) ?>
+
         <?php $popupId = 'msrp-popup-' . $_id . $block->getRandomString(20); ?>
-        <a href="javascript:void(0);"
+        <a href="#"
            id="<?= /* @noEscape */ ($popupId) ?>"
            data-mage-init='{"addToCart":{"popupId": "#<?= /* @noEscape */ ($popupId) ?>",
-                                         "productName": "<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($_product->getName())) ?>",
+                                         "productName": "<?= /* @noEscape */ $block->escapeJs($_product->getName()) ?>",
                                          "realPrice": <?= /* @noEscape */ $block->getRealPriceJs($_product) ?>,
                                          "msrpPrice": "<?= /* @noEscape */ $_msrpPrice ?>",
                                          "priceElementId":"<?= /* @noEscape */ $priceElementId ?>",
                                          "popupCartButtonId": "#map-popup-button",
-                                         "cartForm": "#wishlist-view-form"}}'><?= $block->escapeHtml(__('Click for price')) ?>
+                                         "cartForm": "#wishlist-view-form"}}'>
+            <?= $block->escapeHtml(__('Click for price')) ?>
         </a>
-    <?php else : ?>
+    <?php else: ?>
         <span class="msrp-message">
             <?= $block->escapeHtml($_catalogHelper->getMsrpPriceMessage($_product)) ?>
         </span>
     <?php endif; ?>
     <?php $helpLinkId = 'msrp-help-' . $_id . $block->getRandomString(20); ?>
-    <a href="javascript:void(0);" id="<?= /* @noEscape */ ($helpLinkId) ?>" data-mage-init='{"addToCart":{"helpLinkId": "#<?= /* @noEscape */ ($helpLinkId) ?>", "productName": "<?= /* @noEscape */$block->escapeJs($block->escapeHtml($_product->getName())) ?>"}}' class="link tip">
+    <a href="#" id="<?= /* @noEscape */ ($helpLinkId) ?>"
+       data-mage-init='{"addToCart":{"helpLinkId": "#<?= /* @noEscape */ ($helpLinkId) ?>",
+                                     "productName": "<?= /* @noEscape */$block->escapeJs($_product->getName()) ?>"}}'
+       class="link tip">
         <?= $block->escapeHtml(__("What's this?")) ?>
     </a>
 </div>
diff --git a/app/code/Magento/Multishipping/Block/Checkout/Overview.php b/app/code/Magento/Multishipping/Block/Checkout/Overview.php
index d17da90c58bef..0251732a15732 100644
--- a/app/code/Magento/Multishipping/Block/Checkout/Overview.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Overview.php
@@ -8,6 +8,8 @@
 
 use Magento\Framework\Pricing\PriceCurrencyInterface;
 use Magento\Quote\Model\Quote\Address;
+use Magento\Checkout\Helper\Data as CheckoutHelper;
+use Magento\Framework\App\ObjectManager;
 
 /**
  * Multishipping checkout overview information
@@ -15,6 +17,7 @@
  * @api
  * @author Magento Core Team <core@magentocommerce.com>
  * @since  100.0.2
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Overview extends \Magento\Sales\Block\Items\AbstractItems
 {
@@ -56,6 +59,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
      * @param \Magento\Quote\Model\Quote\TotalsCollector               $totalsCollector
      * @param \Magento\Quote\Model\Quote\TotalsReader                  $totalsReader
      * @param array                                                    $data
+     * @param CheckoutHelper|null                                      $checkoutHelper
      */
     public function __construct(
         \Magento\Framework\View\Element\Template\Context $context,
@@ -64,11 +68,14 @@ public function __construct(
         PriceCurrencyInterface $priceCurrency,
         \Magento\Quote\Model\Quote\TotalsCollector $totalsCollector,
         \Magento\Quote\Model\Quote\TotalsReader $totalsReader,
-        array $data = []
+        array $data = [],
+        ?CheckoutHelper $checkoutHelper = null
     ) {
         $this->_taxHelper = $taxHelper;
         $this->_multishipping = $multishipping;
         $this->priceCurrency = $priceCurrency;
+        $data['taxHelper'] = $this->_taxHelper;
+        $data['checkoutHelper'] = $checkoutHelper ?? ObjectManager::getInstance()->get(CheckoutHelper::class);
         parent::__construct($context, $data);
         $this->_isScopePrivate = true;
         $this->totalsCollector = $totalsCollector;
diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml
index 761c1f1a78423..6d35363529ddc 100644
--- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml
@@ -8,20 +8,24 @@
  * Multishipping checkout billing information
  *
  * @var $block \Magento\Multishipping\Block\Checkout\Billing
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"billingLoader": {}}'>
     <div class="loader">
         <img src="<?= $block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')); ?>"
-             alt="<?= $block->escapeHtml(__('Loading...')); ?>"
-             style="position: absolute;">
+             alt="<?= $block->escapeHtml(__('Loading...')); ?>">
     </div>
 </div>
-<script>
-    window.checkoutConfig = <?= /* @noEscape */ $block->getCheckoutData()->getSerializedCheckoutConfigs(); ?>;
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('position: absolute;', 'div#checkout-loader .loader image') ?>
+<?php $checkoutConfig = /* @noEscape */ $block->getCheckoutData()->getSerializedCheckoutConfigs();
+$scriptString = <<<script
+    window.checkoutConfig = {$checkoutConfig};
     window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
     window.customerData = window.checkoutConfig.customerData;
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <div id="checkout" data-bind="scope:'checkoutMessages'">
     <!-- ko template: getTemplate() --><!-- /ko -->
     <script type="text/x-magento-init">
@@ -72,7 +76,7 @@
                             $methodsCount = count($methods);
                             $methodsForms = $block->hasFormTemplates() ? $block->getFormTemplates(): [];
 
-                            foreach ($methods as $_method) :
+                            foreach ($methods as $_method):
                                     $code = $_method->getCode();
                                     $checked = $block->getSelectedMethodCode() === $code;
 
@@ -82,7 +86,7 @@
                                 ?>
                                 <div data-bind="scope: 'payment_method_<?= $block->escapeHtml($code);?>'">
                                     <dt class="item-title">
-                                        <?php if ($methodsCount > 1) : ?>
+                                        <?php if ($methodsCount > 1): ?>
                                             <input type="radio"
                                                    id="p_method_<?= $block->escapeHtml($code); ?>"
                                                    value="<?= $block->escapeHtml($code); ?>"
@@ -93,11 +97,11 @@
                                                        checked: isChecked,
                                                        click: selectPaymentMethod,
                                                        visible: isRadioButtonVisible()"
-                                                <?php if ($checked) : ?>
+                                                <?php if ($checked): ?>
                                                     checked="checked"
                                                 <?php endif; ?>
                                                    class="radio"/>
-                                        <?php else : ?>
+                                        <?php else: ?>
                                             <input type="radio"
                                                    id="p_method_<?= $block->escapeHtml($code); ?>"
                                                    value="<?= $block->escapeHtml($code); ?>"
@@ -112,7 +116,7 @@
                                             <?= $block->escapeHtml($_method->getTitle()) ?>
                                         </label>
                                     </dt>
-                                    <?php if ($html = $block->getChildHtml('payment.method.' . $code)) : ?>
+                                    <?php if ($html = $block->getChildHtml('payment.method.' . $code)): ?>
                                         <dd class="item-content <?= $checked ? '' : 'no-display'; ?>">
                                             <?= /* @noEscape */ $html; ?>
                                         </dd>
@@ -142,12 +146,13 @@
         </div>
     </div>
 </form>
-<script>
+<?php $quoteBaseGrandTotal = (float)$block->getQuoteBaseGrandTotal();
+$scriptString = <<<script
     require(['jquery', 'mage/mage'], function(jQuery) {
         var addtocartForm = jQuery('#multishipping-billing-form');
 
         addtocartForm.mage('payment', {
-            checkoutPrice: <?= (float)$block->getQuoteBaseGrandTotal() ?>
+            checkoutPrice: {$quoteBaseGrandTotal}
         });
 
         addtocartForm.mage('validation', {
@@ -160,9 +165,11 @@
             }
         });
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
-<script>
+<?php $scriptString = <<<script
     //<![CDATA[
     require(
         [
@@ -171,21 +178,26 @@
             'domReady!'
         ], function(quote, $) {
             quote.billingAddress({
-                    city: '<?= /* @noEscape */ $block->getAddress()->getCity() ?>',
-                    company: '<?= /* @noEscape */ $block->getAddress()->getCompany(); ?>',
-                    countryId: '<?= /* @noEscape */ $block->getAddress()->getCountryId(); ?>',
-                    customerAddressId: '<?= /* @noEscape */ $block->getAddress()->getCustomerAddressId(); ?>',
-                    customerId: '<?= /* @noEscape */ $block->getAddress()->getCustomerId(); ?>',
-                    fax: '<?= /* @noEscape */ $block->getAddress()->getFax(); ?>',
-                    firstname: '<?= /* @noEscape */ $block->getAddress()->getFirstname(); ?>',
-                    lastname: '<?= /* @noEscape */ $block->getAddress()->getLastname(); ?>',
-                    postcode: '<?= /* @noEscape */ $block->getAddress()->getPostcode(); ?>',
-                    regionId: '<?= /* @noEscape */ $block->getAddress()->getRegionId(); ?>',
-                    regionCode: '<?= /* @noEscape */ $block->getAddress()->getRegionCode() ?>',
-                    region: '<?= /* @noEscape */ $block->getAddress()->getRegion(); ?>',
-                    street: <?= /* @noEscape */ json_encode($block->getAddress()->getStreet()); ?>,
-                    telephone: '<?= /* @noEscape */ $block->getAddress()->getTelephone(); ?>'
+
+script;
+$scriptString .= "city: '" . /* @noEscape */ $block->getAddress()->getCity() . "'," . PHP_EOL;
+$scriptString .= "company: '" . /* @noEscape */ $block->getAddress()->getCompany() . "'," . PHP_EOL;
+$scriptString .= "countryId: '" . /* @noEscape */ $block->getAddress()->getCountryId() . "'," . PHP_EOL;
+$scriptString .= "customerAddressId: '" . /* @noEscape */ $block->getAddress()->getCustomerAddressId() . "'," . PHP_EOL;
+$scriptString .= "customerId: '" . /* @noEscape */ $block->getAddress()->getCustomerId() . "'," . PHP_EOL;
+$scriptString .= "fax: '" . /* @noEscape */ $block->getAddress()->getFax() . "'," . PHP_EOL;
+$scriptString .= "firstname: '" . /* @noEscape */ $block->getAddress()->getFirstname() . "'," . PHP_EOL;
+$scriptString .= "lastname: '" . /* @noEscape */ $block->getAddress()->getLastname() . "'," . PHP_EOL;
+$scriptString .= "postcode: '" . /* @noEscape */ $block->getAddress()->getPostcode() . "'," . PHP_EOL;
+$scriptString .= "regionId: '" . /* @noEscape */ $block->getAddress()->getRegionId() . "'," . PHP_EOL;
+$scriptString .= "regionCode: '" . /* @noEscape */ $block->getAddress()->getRegionCode() . "'," . PHP_EOL;
+$scriptString .= "region: '" . /* @noEscape */ $block->getAddress()->getRegion() . "'," . PHP_EOL;
+$scriptString .= "street: " . /* @noEscape */ json_encode($block->getAddress()->getStreet()) . "," . PHP_EOL;
+$scriptString .= "telephone: '" . /* @noEscape */ $block->getAddress()->getTelephone() . "'" . PHP_EOL;
+$scriptString .= <<<script
             });
         });
     //]]>
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml
index 5fff0d72e8000..3b72679bfc34e 100644
--- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/overview.phtml
@@ -4,12 +4,18 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /** @var \Magento\Multishipping\Block\Checkout\Overview $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
+
+<?php
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
+/** @var \Magento\Checkout\Helper\Data $checkoutHelper */
+$checkoutHelper = $block->getData('checkoutHelper');
 ?>
 <?php $errors = $block->getCheckoutData()->getAddressErrors(); ?>
-<?php foreach ($errors as $addressId => $error) : ?>
+<?php foreach ($errors as $addressId => $error): ?>
     <div class="message message-error error">
         <?= $block->escapeHtml($error); ?>
         <?= $block->escapeHtml(__('Please see')); ?>
@@ -59,8 +65,8 @@
     </div>
     <div class="block block-shipping">
         <div class="block-title"><strong><?= $block->escapeHtml(__('Shipping Information')); ?></strong></div>
-        <?php $mergedCells = ($this->helper(Magento\Tax\Helper\Data::class)->displayCartBothPrices() ? 2 : 1); ?>
-        <?php foreach ($block->getShippingAddresses() as $index => $address) : ?>
+        <?php $mergedCells = ($taxHelper->displayCartBothPrices() ? 2 : 1); ?>
+        <?php foreach ($block->getShippingAddresses() as $index => $address): ?>
             <div class="block-content">
                 <a name="<?= $block->escapeHtml($block->getCheckoutData()
                     ->getAddressAnchorName($address->getId())); ?>"></a>
@@ -72,7 +78,7 @@
                         </span>
                     </strong>
                 </div>
-                <?php if ($error = $block->getCheckoutData()->getAddressError($address)) : ?>
+                <?php if ($error = $block->getCheckoutData()->getAddressError($address)): ?>
                     <div class="error-description"><?= $block->escapeHtml($error); ?></div>
                 <?php endif;?>
                 <div class="box box-shipping-address">
@@ -93,17 +99,16 @@
                         <a href="<?= $block->escapeUrl($block->getEditShippingUrl()); ?>"
                            class="action edit"><span><?= $block->escapeHtml(__('Change')); ?></span></a>
                     </strong>
-                    <?php if ($_rate = $block->getShippingAddressRate($address)) : ?>
+                    <?php if ($_rate = $block->getShippingAddressRate($address)): ?>
                         <div class="box-content">
                             <?= $block->escapeHtml($_rate->getCarrierTitle()) ?>
                             (<?= $block->escapeHtml($_rate->getMethodTitle()) ?>)
                             <?php
                             $exclTax = $block->getShippingPriceExclTax($address);
                             $inclTax = $block->getShippingPriceInclTax($address);
-                            $displayBothPrices = $this->helper(Magento\Tax\Helper\Data::class)
-                                ->displayShippingBothPrices() && $inclTax !== $exclTax;
+                            $displayBothPrices = $taxHelper->displayShippingBothPrices() && $inclTax !== $exclTax;
                             ?>
-                            <?php if ($displayBothPrices) : ?>
+                            <?php if ($displayBothPrices): ?>
                                 <span class="price-including-tax"
                                       data-label="<?= $block->escapeHtml(__('Incl. Tax')); ?>">
                                     <?= /* @noEscape */ $inclTax ?>
@@ -112,7 +117,7 @@
                                       data-label="<?= $block->escapeHtml(__('Excl. Tax')); ?>">
                                     <?= /* @noEscape */ $exclTax; ?>
                                 </span>
-                            <?php else : ?>
+                            <?php else: ?>
                                 <?= /* @noEscape */ $inclTax ?>
                             <?php  endif; ?>
                         </div>
@@ -138,7 +143,7 @@
                                 </tr>
                                 </thead>
                                 <tbody>
-                                <?php foreach ($block->getShippingAddressItems($address) as $item) : ?>
+                                <?php foreach ($block->getShippingAddressItems($address) as $item): ?>
                                     <?= /* @noEscape */ $block->getRowItemHtml($item) ?>
                                 <?php endforeach; ?>
                                 </tbody>
@@ -155,13 +160,13 @@
         <?php endforeach; ?>
     </div>
 
-    <?php if ($block->getQuote()->hasVirtualItems()) : ?>
+    <?php if ($block->getQuote()->hasVirtualItems()): ?>
     <div class="block block-other">
         <?php $billingAddress = $block->getQuote()->getBillingAddress(); ?>
         <a name="<?= $block->escapeHtml($block->getCheckoutData()
             ->getAddressAnchorName($billingAddress->getId())); ?>"></a>
         <div class="block-title"><strong><?= $block->escapeHtml(__('Other items in your order')); ?></strong></div>
-        <?php if ($error = $block->getCheckoutData()->getAddressError($billingAddress)) :?>
+        <?php if ($error = $block->getCheckoutData()->getAddressError($billingAddress)): ?>
                 <div class="error-description"><?= $block->escapeHtml($error); ?></div>
         <?php endif;?>
         <div class="block-content">
@@ -170,7 +175,7 @@
                 <a href="<?= $block->escapeUrl($block->getVirtualProductEditUrl()); ?>"
                    class="action edit"><span><?= $block->escapeHtml(__('Edit Items')); ?></span></a>
             </strong>
-            <?php $mergedCells = ($this->helper(Magento\Tax\Helper\Data::class)->displayCartBothPrices() ? 2 : 1); ?>
+            <?php $mergedCells = ($taxHelper->displayCartBothPrices() ? 2 : 1); ?>
             <div class="order-review-wrapper table-wrapper">
                 <table class="items data table table-order-review" id="virtual-overview-table">
                     <caption class="table-caption"><?= $block->escapeHtml(__('Items')); ?></caption>
@@ -183,7 +188,7 @@
                         </tr>
                     </thead>
                     <tbody>
-                        <?php foreach ($block->getVirtualItems() as $_item) : ?>
+                        <?php foreach ($block->getVirtualItems() as $_item): ?>
                             <?= /* @noEscape */ $block->getRowItemHtml($_item) ?>
                         <?php endforeach; ?>
                     </tbody>
@@ -203,8 +208,7 @@
         <div class="grand totals">
             <strong class="mark"><?= $block->escapeHtml(__('Grand Total:')); ?></strong>
             <strong class="amount">
-                <?= /* @noEscape */ $this->helper(Magento\Checkout\Helper\Data::class)
-                    ->formatPrice($block->getTotal()); ?>
+                <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()); ?>
             </strong>
         </div>
         <div class="actions-toolbar" id="review-buttons-container">
@@ -221,10 +225,10 @@
             </div>
             <span id="review-please-wait"
                   class="please-wait load indicator"
-                  style="display: none;"
                   data-text="<?= $block->escapeHtml(__('Submitting order information...')); ?>">
                 <span><?= $block->escapeHtml(__('Submitting order information...')); ?></span>
             </span>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'span#review-please-wait') ?>
         </div>
     </div>
 </form>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml
index 20ff63a60a263..62b368b8911f8 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/iframeswitcher.phtml
@@ -5,30 +5,31 @@
  */
 
 /** @var \Magento\Backend\Block\Page $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div id="preview" class="cms-revision-preview">
     <div class="toolbar">
-        <?php if (!$block->isSingleStoreMode()) :?>
-        <div class="store-switcher">
-            <?= $block->getChildHtml('store_switcher') ?>
-        </div>
+        <?php if (!$block->isSingleStoreMode()):?>
+            <div class="store-switcher">
+                <?= $block->getChildHtml('store_switcher') ?>
+            </div>
         <?php endif;?>
     </div>
     <iframe
-            name="preview_iframe"
-            id="preview_iframe"
-            class="preview_iframe"
-            frameborder="0"
-            title="<?= $block->escapeHtmlAttr(__('Preview')) ?>"
-            width="100%"
-            sandbox="allow-forms allow-pointer-lock"
+        name="preview_iframe"
+        id="preview_iframe"
+        class="preview_iframe"
+        frameborder="0"
+        title="<?= $block->escapeHtmlAttr(__('Preview')) ?>"
+        width="100%"
+        sandbox="allow-forms allow-pointer-lock"
     >
 
     </iframe>
     <?= $block->getChildHtml('preview_form') ?>
 </div>
 
-<script>
+<?php $scriptString = <<<script
 require(['jquery', 'loadingPopup', 'prototype'], function(jQuery){
 
 //<![CDATA[
@@ -61,4 +62,6 @@ jQuery("#preview_iframe").load(function() {
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml
index d5a24fad2ac91..896b8ce773c2d 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/preview/store.phtml
@@ -3,9 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php if ($websites = $block->getWebsites()) : ?>
+<?php if ($websites = $block->getWebsites()): ?>
 <div class="field field-store-switcher">
     <label class="label" for="store_switcher"><?= $block->escapeHtml(__('Choose Store View:')) ?></label>
     <div class="control">
@@ -13,22 +15,25 @@
             id="store_switcher"
             class="admin__control-select"
             name="store_switcher">
-            <?php foreach ($websites as $website) : ?>
+            <?php foreach ($websites as $website): ?>
                 <?php $showWebsite = false; ?>
-                <?php foreach ($website->getGroups() as $group) : ?>
+                <?php foreach ($website->getGroups() as $group): ?>
                     <?php $showGroup = false; ?>
-                    <?php foreach ($block->getStores($group) as $store) : ?>
-                        <?php if ($showWebsite == false) : ?>
+                    <?php foreach ($block->getStores($group) as $store): ?>
+                        <?php if ($showWebsite == false): ?>
                             <?php $showWebsite = true; ?>
                             <optgroup label="<?= $block->escapeHtmlAttr($website->getName()) ?>"></optgroup>
                         <?php endif; ?>
-                        <?php if ($showGroup == false) : ?>
+                        <?php if ($showGroup == false): ?>
                             <?php $showGroup = true; ?>
                             <optgroup label="   <?= $block->escapeHtmlAttr($group->getName()) ?>">
                         <?php endif; ?>
-                        <option value="<?= $block->escapeHtmlAttr($store->getId()) ?>"<?php if ($block->getStoreId() == $store->getId()) : ?> selected="selected"<?php endif; ?>>    <?= $block->escapeHtml($store->getName()) ?></option>
+                        <option value="<?= $block->escapeHtmlAttr($store->getId()) ?>"
+                            <?php if ($block->getStoreId() == $store->getId()): ?> selected="selected"<?php endif; ?>>
+                                <?= $block->escapeHtml($store->getName()) ?>
+                        </option>
                     <?php endforeach; ?>
-                    <?php if ($showGroup) : ?>
+                    <?php if ($showGroup): ?>
                         </optgroup>
                     <?php endif; ?>
                 <?php endforeach; ?>
@@ -37,7 +42,7 @@
     </div>
     <?= $block->getHintHtml() ?>
 </div>
-<script>
+    <?php $scriptString= <<<script
 require(['prototype'], function(){
 
 //<![CDATA[
@@ -48,5 +53,7 @@ Event.observe($('store_switcher'), 'change', function(event) {
 //]]>
 
 });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml
index b697be4cf753a..8148af3221922 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/problem/list.phtml
@@ -3,21 +3,23 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?= $block->getChildHtml('grid') ?>
 
-<?php if ($block->getShowButtons()) : ?>
+<?php if ($block->getShowButtons()): ?>
 <div class="form-buttons">
     <?= $block->getUnsubscribeButtonHtml() ?>
     <?= $block->getDeleteButtonHtml() ?>
 </div>
 <?php endif ?>
-<script>
+<?php $scriptString = <<<script
 require(["prototype", "mage/adminhtml/events"], function(){
 
     problemController = {
         checkCheckboxes:function (controlCheckbox) {
-            var elements = $$('input.problemCheckbox');
+            var elements = \$$('input.problemCheckbox');
             if (elements && elements.length) {
                 elements.each(function (obj) {
                     obj.checked = controlCheckbox.checked;
@@ -35,7 +37,7 @@ require(["prototype", "mage/adminhtml/events"], function(){
         },
 
         unsubscribe:function () {
-            var elements = $$('input.problemCheckbox');
+            var elements = \$$('input.problemCheckbox');
             var serializedElements = Form.serializeElements(elements, true);
             serializedElements._unsubscribe = '1';
             serializedElements.form_key = FORM_KEY;
@@ -48,7 +50,7 @@ require(["prototype", "mage/adminhtml/events"], function(){
         },
 
         deleteSelected:function () {
-            var elements = $$('input.problemCheckbox');
+            var elements = \$$('input.problemCheckbox');
             var serializedElements = Form.serializeElements(elements, true);
             serializedElements._delete = '1';
             serializedElements.form_key = FORM_KEY;
@@ -65,4 +67,6 @@ require(["prototype", "mage/adminhtml/events"], function(){
     //-->
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml
index 3d52cc0dee777..eb2e3f2b399f2 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/queue/edit.phtml
@@ -5,16 +5,16 @@
  */
 
 /* @var $block \Magento\Newsletter\Block\Adminhtml\Queue\Edit */
-
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
     <?= $block->getBackButtonHtml() ?>
     <?= $block->getPreviewButtonHtml() ?>
-    <?php if (!$block->getIsPreview()) : ?>
+    <?php if (!$block->getIsPreview()): ?>
         <?= $block->getResetButtonHtml() ?>
         <?= $block->getSaveButtonHtml() ?>
     <?php endif ?>
-    <?php if ($block->getCanResume()) : ?>
+    <?php if ($block->getCanResume()): ?>
         <?= $block->getResumeButtonHtml() ?>
     <?php endif ?>
 </div>
@@ -23,16 +23,18 @@
     <?= $block->getBlockHtml('formkey') ?>
     <?= $block->getChildHtml('form') ?>
 </form>
-<form action="<?= $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="newsletter_queue_preview_form" target="_blank">
+<form action="<?= $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="newsletter_queue_preview_form"
+      target="_blank">
     <?= $block->getBlockHtml('formkey') ?>
     <div class="no-display">
-        <input type="hidden" id="preview_type" name="type" value="<?= /* @noEscape */ $block->getIsTextType() ? 1 : 2 ?>" />
+        <input type="hidden" id="preview_type" name="type"
+               value="<?= /* @noEscape */ $block->getIsTextType() ? 1 : 2 ?>" />
         <input type="hidden" id="preview_text" name="text" value="" />
         <input type="hidden" id="preview_styles" name="styles" value="" />
         <input type="hidden" id="preview_id" name="id" value="" />
     </div>
 </form>
-<script>
+<?php $scriptString= <<<script
 require([
     'jquery',
     'wysiwygAdapter',
@@ -71,4 +73,6 @@ queueControl = {
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml
index 13bd5d5118be0..b69a89fc296dc 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/subscriber/list.phtml
@@ -5,20 +5,29 @@
  */
 
 /** @var \Magento\Newsletter\Block\Adminhtml\Subscriber $block */
-
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?= $block->getChildHtml('grid') ?>
-<?php if (count($block->getQueueAsOptions())>0 && $block->getShowQueueAdd()) : ?>
+<?php if (count($block->getQueueAsOptions())>0 && $block->getShowQueueAdd()): ?>
 <div class="form-buttons">
     <select id="queueList" name="queue">
-    <?php foreach ($block->getQueueAsOptions() as $_queue) : ?>
-        <option value="<?= $block->escapeHtmlAttr($_queue['value']) ?>"><?= $block->escapeHtml($_queue['label']) ?> #<?= $block->escapeHtml($_queue['value']) ?></option>
+    <?php foreach ($block->getQueueAsOptions() as $_queue): ?>
+        <option value="<?= $block->escapeHtmlAttr($_queue['value']) ?>">
+            <?= $block->escapeHtml($_queue['label']) ?> #<?= $block->escapeHtml($_queue['value']) ?>
+        </option>
     <?php endforeach; ?>
     </select>
-    <button type="button" class="scalable" onclick="subscriberController.addToQueue();"><span><span><span><?= $block->escapeHtml(__('Add to Queue')) ?></span></span></span></button>
+    <button type="button" class="scalable" id="addToQueue">
+        <span><span><span><?= $block->escapeHtml(__('Add to Queue')) ?></span></span></span>
+    </button>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        'subscriberController.addToQueue();',
+        'button#addToQueue'
+    ) ?>
 </div>
 <?php endif ?>
-<script>
+<?php $scriptString= <<<script
 require(["prototype", "mage/adminhtml/events"], function(){
     subscriberController = {
         checkCheckboxes: function(controlCheckbox) {
@@ -53,4 +62,6 @@ require(["prototype", "mage/adminhtml/events"], function(){
 
     varienGlobalEvents.attachEventHandler('gridRowClick', subscriberController.rowClick.bind(subscriberController));
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml
index abc56070b6892..29555130de1ae 100644
--- a/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml
+++ b/app/code/Magento/Newsletter/view/adminhtml/templates/template/edit.phtml
@@ -7,26 +7,29 @@
 use Magento\Framework\App\TemplateTypesInterface;
 
 /* @var $block \Magento\Newsletter\Block\Adminhtml\Template\Edit */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 ?>
 <form action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="newsletter_template_edit_form">
     <?= $block->getBlockHtml('formkey') ?>
     <div class="no-display">
         <input type="hidden" id="change_flag_element" name="_change_type_flag" value="" />
-        <input type="hidden" id="save_as_flag" name="_save_as_flag" value="<?= $block->escapeHtmlAttr($block->getSaveAsFlag()) ?>" />
+        <input type="hidden" id="save_as_flag" name="_save_as_flag"
+               value="<?= $block->escapeHtmlAttr($block->getSaveAsFlag()) ?>" />
     </div>
     <?= /* @noEscape */ $block->getForm() ?>
 </form>
-<form action="<?= $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="newsletter_template_preview_form" target="_blank">
+<form action="<?= $block->escapeUrl($block->getPreviewUrl()) ?>" method="post" id="newsletter_template_preview_form"
+      target="_blank">
     <div class="no-display">
-        <input type="hidden" id="preview_type" name="type" value="<?= /* @noEscape */ $block->isTextType() ? 1 : 2 ?>" />
+        <input type="hidden" id="preview_type" name="type" value="<?= /* @noEscape */ $block->isTextType() ? 1 : 2 ?>"/>
         <input type="hidden" id="preview_text" name="text" value="" />
         <input type="hidden" id="preview_styles" name="styles" value="" />
         <input type="hidden" id="preview_id" name="id" value="" />
         <input type="hidden" name="form_key" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" >
     </div>
 </form>
-<script>
+<?php $scriptString = <<<script
 require([
     'jquery',
     'wysiwygAdapter',
@@ -91,7 +94,7 @@ require([
             var self = this;
 
             confirm({
-                content: "<?= $block->escapeJs($block->escapeHtml(__('Are you sure that you want to strip all tags?'))) ?>",
+                content: "{$block->escapeJs(__('Are you sure that you want to strip all tags?'))}",
                 actions: {
                     confirm: function () {
                         if (wysiwyg.activeEditor()) {
@@ -140,10 +143,10 @@ require([
                 $('change_flag_element').value = '1';
             }
 
-            if ($F('code').blank() || $F('code') == templateControl.templateName) {
+            if (\$F('code').blank() || \$F('code') == templateControl.templateName) {
                 prompt({
-                    content: '<?= $block->escapeJs($block->escapeHtml(__('Please enter a new template name.'))) ?>',
-                    value: templateControl.templateName + '<?= $block->escapeJs(__(' Copy')) ?>',
+                    content: '{$block->escapeJs(__('Please enter a new template name.'))}',
+                    value: templateControl.templateName + '{$block->escapeJs(__(' Copy'))}',
                     actions: {
                         confirm: function (value) {
                             $('code').value = value;
@@ -174,9 +177,9 @@ require([
 
         preview: function () {
             if (this.typeChange) {
-                $('preview_type').value = <?= $block->escapeJs(TemplateTypesInterface::TYPE_TEXT) ?>;
+                $('preview_type').value = {$block->escapeJs(TemplateTypesInterface::TYPE_TEXT)};
             } else {
-                $('preview_type').value = <?= $block->escapeJs($block->getTemplateType()) ?>;
+                $('preview_type').value = {$block->escapeJs($block->getTemplateType())};
             }
 
             if (wysiwyg.activeEditor()) {
@@ -200,10 +203,10 @@ require([
 
         deleteTemplate: function () {
             confirm({
-                content: "<?= $block->escapeJs($block->escapeHtml(__('Are you sure you want to delete this template?'))) ?>",
+                content: "{$block->escapeJs(__('Are you sure you want to delete this template?'))}",
                 actions: {
                     confirm: function () {
-                        window.location.href = '<?= $block->escapeUrl($block->getDeleteUrl()) ?>';
+                        window.location.href = '{$block->escapeJs($block->getDeleteUrl())}';
                     }
                 }
             });
@@ -211,8 +214,10 @@ require([
     };
 
     templateControl.init();
-    templateControl.templateName = "<?= $block->escapeJs($block->getJsTemplateName()) ?>";
+    templateControl.templateName = "{$block->escapeJs($block->getJsTemplateName())}";
 //]]>
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml
index a251c609ea324..01ed26d5e57a6 100644
--- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml
+++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/banktransfer.phtml
@@ -6,16 +6,21 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Banktransfer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $instructions = $block->getInstructions();
 ?>
-<?php if ($instructions) : ?>
+<?php if ($instructions): ?>
     <?php $methodCode = $block->escapeHtml($block->getMethodCode());?>
-    <ul class="form-list checkout-agreements" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display:none;">
+    <ul class="form-list checkout-agreements" id="payment_form_<?= /* @noEscape */ $methodCode ?>">
         <li>
             <div class="<?= /* @noEscape */ $methodCode ?>-instructions-content checkout-agreement-item-content">
                 <?= /* @noEscape */ nl2br($block->escapeHtml($instructions)) ?>
             </div>
         </li>
     </ul>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "display:none",
+        'ul#payment_form_' . /* @noEscape */ $methodCode
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml
index 8e8730640a8a7..c1b07f08d4ce3 100644
--- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml
+++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/cashondelivery.phtml
@@ -6,16 +6,21 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Cashondelivery
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $instructions = $block->getInstructions();
 ?>
-<?php if ($instructions) : ?>
+<?php if ($instructions): ?>
     <?php $methodCode = $block->escapeHtml($block->getMethodCode());?>
-    <ul class="form-list checkout-agreements" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display:none;">
+    <ul class="form-list checkout-agreements" id="payment_form_<?= /* @noEscape */ $methodCode ?>">
         <li>
             <div class="<?= /* @noEscape */ $methodCode ?>-instructions-content checkout-agreement-item-content">
                 <?= /* @noEscape */ nl2br($block->escapeHtml($instructions)) ?>
             </div>
         </li>
     </ul>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "display:none",
+        'ul#payment_form_' . /* @noEscape */ $methodCode
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml
index db1d7c87ada0e..958406bb297e1 100644
--- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml
+++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml
@@ -6,13 +6,15 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Checkmo
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<fieldset class="admin__fieldset payment-method" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" style="display:none">
-    <?php if ($block->getMethod()->getPayableTo()) : ?>
-        <label class="label"><span><?= $block->escapeHtml(__('Make Check payable to:')) ?></span></label> <?= $block->escapeHtml($block->getMethod()->getPayableTo()) ?>
+<fieldset class="admin__fieldset payment-method" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" >
+    <?php if ($block->getMethod()->getPayableTo()): ?>
+        <label class="label"><span><?= $block->escapeHtml(__('Make Check payable to:')) ?></span></label>
+        <?= $block->escapeHtml($block->getMethod()->getPayableTo()) ?>
     <?php endif; ?>
-    <?php if ($block->getMethod()->getMailingAddress()) : ?>
+    <?php if ($block->getMethod()->getMailingAddress()): ?>
         <div class="admin__field">
             <label class="admin__field-label"><span><?= $block->escapeHtml(__('Send Check to:')) ?></span></label>
             <div class="admin__field-control checkmo-mailing-address">
@@ -21,3 +23,7 @@
         </div>
     <?php endif; ?>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml
index c115765697fc5..03dd859666f59 100644
--- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml
+++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml
@@ -6,15 +6,23 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Purchaseorder
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<fieldset class="admin__fieldset payment-method" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" style="display: none">
+<fieldset class="admin__fieldset payment-method" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>">
     <div class="admin__field _required">
-        <label for="po_number" class="admin__field-label"><span><?= $block->escapeHtml(__('Purchase Order Number')) ?></span></label>
+        <label for="po_number" class="admin__field-label">
+            <span><?= $block->escapeHtml(__('Purchase Order Number')) ?></span>
+        </label>
         <div class="admin__field-control">
             <input type="text" id="po_number" name="payment[po_number]"
-                   title="<?= $block->escapeHtml(__("Purchase Order Number")) ?>" class="required-entry admin__control-text"
+                   title="<?= $block->escapeHtml(__("Purchase Order Number")) ?>"
+                   class="required-entry admin__control-text"
                    value="<?= /* @noEscape */ $block->getInfoData('po_number') ?>"/>
         </div>
     </div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml
index 568ef7c3f69f2..97288194342ba 100644
--- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml
+++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/banktransfer.phtml
@@ -6,12 +6,18 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Banktransfer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $instructions = $block->getInstructions();
 ?>
-<?php if ($instructions) : ?>
+<?php if ($instructions): ?>
     <?php $methodCode = $block->escapeHtml($block->getMethodCode());?>
-    <div class="items <?= /* @noEscape */ $methodCode ?> instructions agreement checkout-agreement-item-content" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display: none;">
+    <div class="items <?= /* @noEscape */ $methodCode ?> instructions agreement checkout-agreement-item-content"
+         id="payment_form_<?= /* @noEscape */ $methodCode ?>">
         <?= /* @noEscape */ nl2br($block->escapeHtml($instructions)) ?>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "display:none",
+        'div#payment_form_' . /* @noEscape */ $methodCode
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml
index 2943f59be4ab3..160c1d27052f0 100644
--- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml
+++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/cashondelivery.phtml
@@ -6,12 +6,18 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Cashondelivery
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $instructions = $block->getInstructions();
 ?>
-<?php if ($instructions) : ?>
+<?php if ($instructions): ?>
     <?php $methodCode = $block->escapeHtml($block->getMethodCode());?>
-    <div class="items <?= /* @noEscape */ $methodCode ?> instructions agreement" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display: none;">
+    <div class="items <?= /* @noEscape */ $methodCode ?> instructions agreement"
+         id="payment_form_<?= /* @noEscape */ $methodCode ?>">
         <?= /* @noEscape */ nl2br($block->escapeHtml($instructions)) ?>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "display:none",
+        'div#payment_form_' . /* @noEscape */ $methodCode
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml
index 36f58fc155a18..5d584ff724618 100644
--- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml
+++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml
@@ -6,15 +6,16 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Checkmo
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<?php if ($block->getMethod()->getMailingAddress() || $block->getMethod()->getPayableTo()) : ?>
-    <dl class="items check payable" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" style="display:none;">
-        <?php if ($block->getMethod()->getPayableTo()) : ?>
+<?php if ($block->getMethod()->getMailingAddress() || $block->getMethod()->getPayableTo()): ?>
+    <dl class="items check payable" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>">
+        <?php if ($block->getMethod()->getPayableTo()): ?>
             <dt class="title"><?= $block->escapeHtml(__('Make Check payable to:')) ?></dt>
             <dd class="content"><?= $block->escapeHtml($block->getMethod()->getPayableTo()) ?></dd>
         <?php endif; ?>
-        <?php if ($block->getMethod()->getMailingAddress()) : ?>
+        <?php if ($block->getMethod()->getMailingAddress()): ?>
             <dt class="title"><?= $block->escapeHtml(__('Send Check to:')) ?></dt>
             <dd class="content">
                 <address class="checkmo mailing address">
@@ -23,4 +24,8 @@
             </dd>
         <?php endif; ?>
     </dl>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "display:none",
+        'dl#payment_form_' . $block->escapeHtml($block->getMethodCode())
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml
index 52b7df9fb9187..35ef5d9db8616 100644
--- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml
+++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/purchaseorder.phtml
@@ -6,16 +6,23 @@
 
 /**
  * @var $block \Magento\OfflinePayments\Block\Form\Purchaseorder
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $methodCode = $block->escapeHtml($block->getMethodCode());
 ?>
-<fieldset class="fieldset items <?= /* @noEscape */ $methodCode ?>" id="payment_form_<?= /* @noEscape */ $methodCode ?>" style="display: none">
+<fieldset class="fieldset items <?= /* @noEscape */ $methodCode ?>"
+          id="payment_form_<?= /* @noEscape */ $methodCode ?>">
     <div class="field number required">
         <label for="po_number" class="label"><span><?= $block->escapeHtml(__('Purchase Order Number')) ?></span></label>
         <div class="control">
-            <input type="text" id="po_number" name="payment[po_number]" title="<?= $block->escapeHtml(__('Purchase Order Number')) ?>"
+            <input type="text" id="po_number" name="payment[po_number]"
+                   title="<?= $block->escapeHtml(__('Purchase Order Number')) ?>"
                    class="input-text required-entry"
                    value="<?= $block->escapeHtml($block->getInfoData('po_number')) ?>" />
         </div>
     </div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . /* @noEscape */ $methodCode
+) ?>
diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/multishipping/checkmo_form.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/multishipping/checkmo_form.phtml
index b96918243a7a7..730976a15be5d 100644
--- a/app/code/Magento/OfflinePayments/view/frontend/templates/multishipping/checkmo_form.phtml
+++ b/app/code/Magento/OfflinePayments/view/frontend/templates/multishipping/checkmo_form.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
     require([
         'uiLayout',
         'jquery'
@@ -25,4 +28,6 @@
             $('body').trigger('contentUpdated');
         })
     })
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Payment/Block/Transparent/Iframe.php b/app/code/Magento/Payment/Block/Transparent/Iframe.php
index 672db1b065b74..6999a722dbeda 100644
--- a/app/code/Magento/Payment/Block/Transparent/Iframe.php
+++ b/app/code/Magento/Payment/Block/Transparent/Iframe.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Payment\Block\Transparent;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
+
 /**
  * Iframe block for register specific params in layout
  *
@@ -28,13 +31,16 @@ class Iframe extends \Magento\Framework\View\Element\Template
      * @param \Magento\Framework\View\Element\Template\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         \Magento\Framework\View\Element\Template\Context $context,
         \Magento\Framework\Registry $registry,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
         $this->coreRegistry = $registry;
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml
index 678bde815d370..2ff4df6e4885a 100644
--- a/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml
+++ b/app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml
@@ -6,14 +6,14 @@
 
 /**
  * @var \Magento\Payment\Block\Adminhtml\Transparent\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $code = $block->escapeHtml($block->getMethodCode());
 $ccType = $block->getInfoData('cc_type');
 $ccExpMonth = $block->getInfoData('cc_exp_month');
 $ccExpYear = $block->getInfoData('cc_exp_year');
 ?>
-<fieldset class="admin__fieldset payment-method" id="payment_form_<?= /* @noEscape */ $code ?>"
-          style="display:none">
+<fieldset class="admin__fieldset payment-method" id="payment_form_<?= /* @noEscape */ $code ?>">
     <div class="field-type admin__field _required">
         <label class="admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_type">
             <span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
@@ -22,8 +22,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
             <select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
                     class="required-entry validate-cc-type-select admin__control-select">
                 <option value=""></option>
-                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
-                    <option value="<?= $block->escapeHtml($typeCode) ?>" <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif ?>>
+                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
+                    <option value="<?= $block->escapeHtml($typeCode) ?>"
+                            <?php if ($typeCode == $ccType): ?>selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($typeName) ?>
                     </option>
                 <?php endforeach ?>
@@ -36,7 +37,8 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         </label>
         <div class="admin__field-control">
             <input type="text" id="<?= /* @noEscape */ $code ?>_cc_number" name="payment[cc_number]"
-                   title="<?= $block->escapeHtml(__('Credit Card Number')) ?>" class="admin__control-text validate-cc-number"
+                   title="<?= $block->escapeHtml(__('Credit Card Number')) ?>"
+                   class="admin__control-text validate-cc-number"
                    value="<?= /* @noEscape */ $block->getInfoData('cc_number') ?>"/>
         </div>
     </div>
@@ -47,18 +49,18 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         <div class="admin__field-control">
             <select id="<?= /* @noEscape */ $code ?>_expiration" name="payment[cc_exp_month]"
                     class="admin__control-select admin__control-select-month validate-cc-exp required-entry">
-                <?php foreach ($block->getCcMonths() as $k => $v) : ?>
+                <?php foreach ($block->getCcMonths() as $k => $v): ?>
                     <option value="<?= $block->escapeHtml($k) ?>"
-                            <?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif ?>>
+                            <?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach; ?>
             </select>
             <select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
                     class="admin__control-select admin__control-select-year required-entry">
-                <?php foreach ($block->getCcYears() as $k => $v) : ?>
+                <?php foreach ($block->getCcYears() as $k => $v): ?>
                     <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                            <?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif ?>>
+                            <?php if ($k == $ccExpYear): ?>selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach ?>
@@ -66,7 +68,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         </div>
     </div>
 
-    <?php if ($block->hasVerification()) : ?>
+    <?php if ($block->hasVerification()): ?>
         <div class="field-number required admin__field _required">
             <label class="admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_cid">
                 <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
@@ -80,3 +82,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         </div>
     <?php endif; ?>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . /* @noEscape */ $code
+) ?>
diff --git a/app/code/Magento/Payment/view/adminhtml/templates/transparent/form.phtml b/app/code/Magento/Payment/view/adminhtml/templates/transparent/form.phtml
index 36b8c978c339f..60fbeed2c542f 100644
--- a/app/code/Magento/Payment/view/adminhtml/templates/transparent/form.phtml
+++ b/app/code/Magento/Payment/view/adminhtml/templates/transparent/form.phtml
@@ -5,6 +5,8 @@
  */
 
 /** @var \Magento\Payment\Block\Transparent\Form $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $code = $block->escapeHtml($block->getMethodCode());
 $ccType = $block->getInfoData('cc_type');
 $ccExpYear = $block->getInfoData('cc_exp_year');
@@ -17,8 +19,11 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
         allowtransparency="true"
         frameborder="0"
         name="iframeTransparent"
-        style="display: none; width: 100%; background-color: transparent;"
         src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>"></iframe>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display: none; width: 100%; background-color: transparent;",
+    'iframe#' . /* @noEscape */ $code . '-transparent-iframe'
+) ?>
 <fieldset
     id="payment_form_<?= /* @noEscape */ $code ?>"
     class="admin__fieldset"
@@ -31,9 +36,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
         "orderSaveUrl":"<?= $block->escapeUrl($block->getOrderUrl()) ?>",
         "cgiUrl":"<?= $block->escapeUrl($block->getCgiUrl()) ?>",
         "expireYearLength":"<?= $block->escapeHtml($block->getMethodConfigData('cc_year_length')) ?>",
-        "nativeAction":"<?= $block->escapeUrl($block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()])) ?>"
-      }, "validation":[]}'
-    style="display: none;">
+        "nativeAction":"<?= $block->escapeUrl(
+            $block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()])
+        ) ?>"
+      }, "validation":[]}'>
     <div class="admin__field _required">
         <label for="<?= /* @noEscape */ $code ?>_cc_type" class="admin__field-label">
             <span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
@@ -46,9 +52,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
                     data-validate='{required:true, "validate-cc-type-select":"#<?= /* @noEscape */ $code ?>_cc_number"}'
                     class="admin__control-select">
                 <option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
-                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
+                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
                     <option
-                        value="<?= $block->escapeHtml($typeCode) ?>"<?php if ($typeCode == $ccType) : ?> selected="selected"<?php endif ?>>
+                        value="<?= $block->escapeHtml($typeCode) ?>"
+                        <?php if ($typeCode == $ccType): ?> selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($typeName) ?>
                     </option>
                 <?php endforeach ?>
@@ -86,10 +93,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
                     data-container="<?= /* @noEscape */ $code ?>-cc-month"
                     class="admin__control-select admin__control-select-month"
                     data-validate='{required:true, "validate-cc-exp":"#<?= /* @noEscape */ $code ?>_expiration_yr"}'>
-                <?php foreach ($block->getCcMonths() as $k => $v) : ?>
+                <?php foreach ($block->getCcMonths() as $k => $v): ?>
                     <option
                         value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                        <?php if ($k == $ccExpMonth) : ?> selected="selected"<?php endif; ?>>
+                        <?php if ($k == $ccExpMonth): ?> selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach ?>
@@ -98,17 +105,17 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
             <select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
                     class="admin__control-select admin__control-select-year"
                     data-container="<?= /* @noEscape */ $code ?>-cc-year" data-validate='{required:true}'>
-                <?php foreach ($block->getCcYears() as $k => $v) : ?>
+                <?php foreach ($block->getCcYears() as $k => $v): ?>
                     <option
                         value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                        <?php if ($k == $ccExpYear) : ?> selected="selected"<?php endif ?>>
+                        <?php if ($k == $ccExpYear): ?> selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach ?>
             </select>
         </div>
     </div>
-    <?php if ($block->hasVerification()) : ?>
+    <?php if ($block->hasVerification()): ?>
         <div class="admin__field _required field-cvv" id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
             <label for="<?= /* @noEscape */ $code ?>_cc_cid" class="admin__field-label">
                 <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
@@ -120,19 +127,24 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
                        class="admin__control-text cvv"
                        id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]"
                        value=""
-                       data-validate='{"required-number":true, "validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"}'
+                       data-validate='{"required-number":true, "validate-cc-cvn":"#<?=/* @noEscape */ $code?>_cc_type"}'
                        autocomplete="off"/>
             </div>
         </div>
     <?php endif; ?>
     <?= $block->getChildHtml() ?>
 </fieldset>
-
-<script>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . /* @noEscape */ $code
+) ?>
+<?php $scriptString = <<<script
     /**
      * Disable card server validation in admin
      */
     require(["Magento_Sales/order/create/form"], function () {
-        order.addExcludedPaymentMethod('<?= /* @noEscape */ $code ?>');
+        order.addExcludedPaymentMethod('{$code}');
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Payment/view/adminhtml/templates/transparent/iframe.phtml b/app/code/Magento/Payment/view/adminhtml/templates/transparent/iframe.phtml
index ece7106e91236..77d881257f10a 100644
--- a/app/code/Magento/Payment/view/adminhtml/templates/transparent/iframe.phtml
+++ b/app/code/Magento/Payment/view/adminhtml/templates/transparent/iframe.phtml
@@ -6,22 +6,39 @@
 
 /**
  * @var \Magento\Payment\Block\Transparent\Iframe $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $params = $block->getParams();
 
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 <html>
 <head>
-<script>
-<?php if (isset($params['redirect'])) : ?>
-    window.location="<?= $block->escapeUrl($params['redirect']) ?>";
-<?php elseif (isset($params['redirect_parent'])) : ?>
-    window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
-<?php elseif (isset($params['error_msg'])) : ?>
-    window.top.alert(<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($params['error_msg']) ?>);
-<?php elseif (isset($params['order_success'])) : ?>
-    window.top.location = "<?= $block->escapeUrl($params['order_success']) ?>";
-<?php else : ?>
+    <?php $scriptString = '' ?>
+<?php if (isset($params['redirect'])): ?>
+    <?php $scriptString .= <<<script
+    window.location="{$block->escapeJs($params['redirect'])}";
+script;
+    ?>
+<?php elseif (isset($params['redirect_parent'])): ?>
+    <?php $scriptString .= <<<script
+    window.top.location="{$block->escapeJs($params['redirect_parent'])}";
+script;
+    ?>
+<?php elseif (isset($params['error_msg'])): ?>
+    <?php $encodedErrorMsg = /* @noEscape */ $jsonHelper->jsonEncode($params['error_msg']);
+    $scriptString .= <<<script
+    window.top.alert({$encodedErrorMsg});
+script;
+    ?>
+<?php elseif (isset($params['order_success'])): ?>
+    <?php $scriptString .= <<<script
+    window.top.location = "{$block->escapeJs($params['order_success'])}";
+script;
+    ?>
+<?php else: ?>
+    <?php $scriptString .= <<<script
     var require = window.top.require;
     require(['jquery'], function($) {
         $('#edit_form').trigger('processStop');
@@ -34,8 +51,10 @@ $params = $block->getParams();
 
         $('#edit_form').trigger('realOrder');
     });
+script;
+    ?>
 <?php endif; ?>
-</script>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </head>
 <body>
 </body>
diff --git a/app/code/Magento/Payment/view/adminhtml/templates/transparent/info.phtml b/app/code/Magento/Payment/view/adminhtml/templates/transparent/info.phtml
index fb06f1a4dbf33..5997648ed5582 100644
--- a/app/code/Magento/Payment/view/adminhtml/templates/transparent/info.phtml
+++ b/app/code/Magento/Payment/view/adminhtml/templates/transparent/info.phtml
@@ -6,9 +6,14 @@
 
 /**
  * @var \Magento\Payment\Block\Transparent\Info $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Payment\Block\Transparent\Info
  */
 ?>
-<fieldset id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" style="display:none" class="fieldset items redirect">
+<fieldset id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" class="fieldset items redirect">
     <div><?= $block->escapeHtml(__('We\'ll ask for your payment details before you place an order.')) ?></div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml
index 5f61a3ee1d400..7ddc89aac4f6c 100644
--- a/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml
+++ b/app/code/Magento/Payment/view/frontend/templates/form/cc.phtml
@@ -6,6 +6,7 @@
 
 /**
  * @var \Magento\Payment\Block\Transparent\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $code = $block->escapeHtml($block->getMethodCode());
 $ccType = $block->getInfoData('cc_type');
@@ -13,7 +14,7 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
 $ccExpYear = $block->getInfoData('cc_exp_year');
 ?>
 <fieldset class="fieldset payment items ccard <?= /* @noEscape */ $code ?>"
-          id="payment_form_<?= /* @noEscape */ $code ?>" style="display: none;">
+          id="payment_form_<?= /* @noEscape */ $code ?>">
     <div class="field type required">
         <label for="<?= /* @noEscape */ $code ?>_cc_type" class="label">
             <span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
@@ -29,9 +30,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
                     }'
                     class="select">
                 <option value=""><?= $block->escapeHtml(__('--Please Select--')) ?></option>
-            <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
+            <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
                 <option value="<?= $block->escapeHtml($typeCode) ?>"
-                    <?php if ($typeCode == $ccType) : ?> selected="selected"<?php endif; ?>>
+                    <?php if ($typeCode == $ccType): ?> selected="selected"<?php endif; ?>>
                     <?= $block->escapeHtml($typeName) ?>
                 </option>
             <?php endforeach; ?>
@@ -60,11 +61,14 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
             <div class="fields group group-2">
                 <div class="field no-label month">
                     <div class="control">
-                        <select id="<?= /* @noEscape */ $code ?>_expiration" name="payment[cc_exp_month]" class="select month"
-                                data-validate='{required:true, "validate-cc-exp":"#<?= /* @noEscape */ $code ?>_expiration_yr"}'>
-                            <?php foreach ($block->getCcMonths() as $k => $v) : ?>
+                        <select id="<?= /* @noEscape */ $code ?>_expiration"
+                                name="payment[cc_exp_month]"
+                                class="select month"
+                                data-validate='{required:true, "validate-cc-exp":"#<?= /* @noEscape */ $code
+                                ?>_expiration_yr"}'>
+                            <?php foreach ($block->getCcMonths() as $k => $v): ?>
                                 <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                                    <?php if ($k == $ccExpMonth) : ?> selected="selected"<?php endif; ?>>
+                                    <?php if ($k == $ccExpMonth): ?> selected="selected"<?php endif; ?>>
                                     <?= $block->escapeHtml($v) ?>
                                 </option>
                             <?php endforeach; ?>
@@ -75,9 +79,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
                     <div class="control">
                         <select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
                                 class="select year" data-validate='{required:true}'>
-                            <?php foreach ($block->getCcYears() as $k => $v) : ?>
+                            <?php foreach ($block->getCcYears() as $k => $v): ?>
                                 <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>
-                                "<?php if ($k == $ccExpYear) : ?> selected="selected"<?php endif; ?>>
+                                "<?php if ($k == $ccExpYear): ?> selected="selected"<?php endif; ?>>
                                     <?= $block->escapeHtml($v) ?>
                                 </option>
                             <?php endforeach; ?>
@@ -87,7 +91,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
             </div>
         </div>
     </div>
-    <?php if ($block->hasVerification()) : ?>
+    <?php if ($block->hasVerification()): ?>
     <div class="field cvv required" id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
         <label for="<?= /* @noEscape */ $code ?>_cc_cid" class="label">
             <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
@@ -95,7 +99,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
         <div class="control">
             <input type="number" title="<?= $block->escapeHtml(__('Card Verification Number')) ?>"
                    class="input-text cvv" id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]" value=""
-                   data-validate='{"required-number":true, "validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"}' />
+                   data-validate='{"required-number":true, "validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"}'/>
             <?php $content = '<img src=\"' . $block->getViewFileUrl('Magento_Checkout::cvv.png') . '\" alt=\"' .
                 $block->escapeHtml(__('Card Verification Number Visual Reference')) .
                 '\" title=\"' . $block->escapeHtml(__('Card Verification Number Visual Reference')) . '\" />'; ?>
@@ -110,3 +114,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
     <?php endif; ?>
     <?= $block->getChildHtml() ?>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . /* @noEscape */ $code
+) ?>
diff --git a/app/code/Magento/Payment/view/frontend/templates/transparent/form.phtml b/app/code/Magento/Payment/view/frontend/templates/transparent/form.phtml
index 290c8384537fb..b8c2c083a7e98 100644
--- a/app/code/Magento/Payment/view/frontend/templates/transparent/form.phtml
+++ b/app/code/Magento/Payment/view/frontend/templates/transparent/form.phtml
@@ -5,6 +5,8 @@
  */
 
 /** @var \Magento\Payment\Block\Transparent\Form $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $code = $block->escapeHtml($block->getMethodCode());
 $ccExpMonth = $block->getInfoData('cc_exp_month');
 $ccExpYear = $block->getInfoData('cc_exp_year');
@@ -17,8 +19,12 @@ $content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Che
 <!-- IFRAME for request to Payment Gateway -->
 <iframe width="0" height="0" id="<?= /* @noEscape */ $code ?>-transparent-iframe"
         data-container="<?= /* @noEscape */ $code ?>-transparent-iframe" allowtransparency="true"
-        frameborder="0"  name="iframeTransparent" style="display:none;width:100%;background-color:transparent"
+        frameborder="0"  name="iframeTransparent"
         src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>"></iframe>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display: none; width: 100%; background-color: transparent;",
+    'iframe#' . /* @noEscape */ $code . '-transparent-iframe'
+) ?>
 <form class="form" id="co-transparent-form" action="#" method="post" data-mage-init='{
     "transparent":{
         "controller":"<?= $block->escapeHtml($block->getRequest()->getControllerName()) ?>",
@@ -27,7 +33,9 @@ $content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Che
         "cgiUrl":"<?= $block->escapeUrl($block->getCgiUrl()) ?>",
         "dateDelim":"<?= $block->escapeHtml($block->getDateDelim()) ?>",
         "cardFieldsMap":<?= $block->escapeHtml($block->getCardFieldsMap()) ?>,
-        "nativeAction":"<?= $block->escapeUrl($block->getUrl('checkout/onepage/saveOrder', ['_secure' => $block->getRequest()->isSecure()])) ?>"
+        "nativeAction":"<?= $block->escapeUrl(
+            $block->getUrl('checkout/onepage/saveOrder', ['_secure' => $block->getRequest()->isSecure()])
+        ) ?>"
     }, "validation":[]}'>
     <fieldset class="fieldset ccard <?= /* @noEscape */ $code ?>" id="payment_form_<?= /* @noEscape */ $code ?>">
         <legend class="legend">
@@ -45,9 +53,9 @@ $content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Che
                             "validate-cc-type-select":"#<?= /* @noEscape */ $code ?>_cc_number"
                         }'>
                     <option value=""><?= $block->escapeHtml(__('--Please Select--')) ?></option>
-                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
+                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
                     <option value="<?= $block->escapeHtml($typeCode) ?>"
-                        <?php if ($typeCode == $ccType) : ?> selected="selected"<?php endif; ?>>
+                        <?php if ($typeCode == $ccType): ?> selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($typeName) ?></option>
                 <?php endforeach ?>
                 </select>
@@ -83,9 +91,9 @@ $content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Che
                                         required:true,
                                         "validate-cc-exp":"#<?= /* @noEscape */ $code ?>_expiration_yr"
                                     }'>
-                            <?php foreach ($block->getCcMonths() as $k => $v) : ?>
+                            <?php foreach ($block->getCcMonths() as $k => $v): ?>
                                 <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                                    <?php if ($k == $ccExpMonth) : ?> selected="selected"<?php endif; ?>>
+                                    <?php if ($k == $ccExpMonth): ?> selected="selected"<?php endif; ?>>
                                     <?= $block->escapeHtml($v) ?>
                                 </option>
                             <?php endforeach ?>
@@ -97,9 +105,9 @@ $content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Che
                             <select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
                                     class="year" data-container="<?= /* @noEscape */ $code ?>-cc-year"
                                     data-validate='{required:true}'>
-                            <?php foreach ($block->getCcYears() as $k => $v) : ?>
+                            <?php foreach ($block->getCcYears() as $k => $v): ?>
                                 <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                                    <?php if ($k == $ccExpYear) : ?> selected="selected"<?php endif; ?>>
+                                    <?php if ($k == $ccExpYear): ?> selected="selected"<?php endif; ?>>
                                     <?= $block->escapeHtml($v) ?>
                                 </option>
                             <?php endforeach ?>
@@ -109,7 +117,7 @@ $content = '<img src=\"' . $block->escapeUrl($block->getViewFileUrl('Magento_Che
                 </div>
             </div>
         </div>
-        <?php if ($block->hasVerification()) : ?>
+        <?php if ($block->hasVerification()): ?>
         <div class="field required cvv" id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
             <label for="<?= /* @noEscape */ $code ?>_cc_cid" class="label">
                 <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
diff --git a/app/code/Magento/Payment/view/frontend/templates/transparent/iframe.phtml b/app/code/Magento/Payment/view/frontend/templates/transparent/iframe.phtml
index d45f014de08a6..233d932e5f642 100644
--- a/app/code/Magento/Payment/view/frontend/templates/transparent/iframe.phtml
+++ b/app/code/Magento/Payment/view/frontend/templates/transparent/iframe.phtml
@@ -5,14 +5,20 @@
  */
 
 /** @var \Magento\Payment\Block\Transparent\Iframe $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 $params = $block->getParams();
 ?>
 <html>
     <head>
-        <script>
-        <?php if (isset($params['redirect'])) : ?>
-            window.location="<?= $block->escapeUrl($params['redirect']) ?>";
-        <?php elseif (isset($params['redirect_parent'])) : ?>
+        <?php $scriptString = '' ?>
+        <?php if (isset($params['redirect'])): ?>
+            <?php $scriptString .= <<<script
+            window.location="{$block->escapeJs($params['redirect'])}";
+script;
+            ?>
+        <?php elseif (isset($params['redirect_parent'])): ?>
+            <?php $scriptString .= <<<script
             var require = window.parent.require;
             require(
                 [
@@ -21,10 +27,15 @@ $params = $block->getParams();
                 function($) {
                     var parent = window.parent;
                     $(parent).trigger('clearTimeout');
-                    parent.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
+                    parent.location="{$block->escapeJs($params['redirect_parent'])}";
                 }
             );
-        <?php elseif (isset($params['error_msg'])) : ?>
+script;
+            ?>
+        <?php elseif (isset($params['error_msg'])): ?>
+            <?php
+            $encodedMsg = /* @noEscape */ json_encode($params['error_msg']);
+            $scriptString .= <<<script
             var require = window.parent.require;
             require(
                 [
@@ -33,16 +44,19 @@ $params = $block->getParams();
                     'mage/translate',
                     'Magento_Checkout/js/model/full-screen-loader'
                 ],
-                function($, globalMessageList, $t, fullScreenLoader) {
+                function($, globalMessageList, \$t, fullScreenLoader) {
                     var parent = window.parent;
                     $(parent).trigger('clearTimeout');
                     fullScreenLoader.stopLoader();
                     globalMessageList.addErrorMessage({
-                        message: $t(<?= /* @noEscape */ json_encode($params['error_msg'])?>)
+                        message: \$t({$encodedMsg})
                     });
                 }
             );
-        <?php elseif (isset($params['multishipping'])) : ?>
+script;
+            ?>
+        <?php elseif (isset($params['multishipping'])): ?>
+            <?php $scriptString .= <<<script
             var require = window.parent.require;
             require(
                 [
@@ -54,9 +68,15 @@ $params = $block->getParams();
                     $(parent.document).find('#multishipping-billing-form').submit();
                 }
             );
-        <?php elseif (isset($params['order_success'])) : ?>
-            window.parent.location = "<?= $block->escapeUrl($params['order_success']) ?>";
-        <?php else : ?>
+script;
+            ?>
+        <?php elseif (isset($params['order_success'])): ?>
+            <?php $scriptString .= <<<script
+            window.parent.location = "{$block->escapeJs($params['order_success'])}";
+script;
+            ?>
+        <?php else: ?>
+            <?php $scriptString .= <<<script
             var require = window.parent.require;
             require(
                 [
@@ -85,8 +105,10 @@ $params = $block->getParams();
                     );
                 }
             );
+script;
+            ?>
         <?php endif; ?>
-        </script>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </head>
     <body></body>
 </html>
diff --git a/app/code/Magento/Payment/view/frontend/templates/transparent/info.phtml b/app/code/Magento/Payment/view/frontend/templates/transparent/info.phtml
index 084e1e0ebf329..49c35e844c39a 100644
--- a/app/code/Magento/Payment/view/frontend/templates/transparent/info.phtml
+++ b/app/code/Magento/Payment/view/frontend/templates/transparent/info.phtml
@@ -6,11 +6,16 @@
 
 /**
  * @var \Magento\Payment\Block\Transparent\Info $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Payment\Block\Transparent\Info
  */
 ?>
-<fieldset id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" style="display:none" class="fieldset items redirect">
+<fieldset id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" class="fieldset items redirect">
     <div>
         <?= $block->escapeHtml(__('We\'ll ask for your payment details before you place an order.')) ?>
     </div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none",
+    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php
index 656d9049b5a40..bf8c563d6ce1d 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Hidden.php
@@ -9,8 +9,29 @@
  */
 namespace Magento\Paypal\Block\Adminhtml\System\Config\Field;
 
+use Magento\Backend\Block\Template\Context;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class Hidden extends \Magento\Config\Block\System\Config\Form\Field
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(Context $context, array $data = [], ?SecureHtmlRenderer $secureRenderer = null)
+    {
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($context, $data, $secureRenderer);
+        $this->secureRenderer = $secureRenderer;
+    }
+
     /**
      * Decorate field row html to be invisible
      *
@@ -20,6 +41,10 @@ class Hidden extends \Magento\Config\Block\System\Config\Form\Field
      */
     protected function _decorateRowHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element, $html)
     {
-        return '<tr id="row_' . $element->getHtmlId() . '" style="display: none;">' . $html . '</tr>';
+        return '<tr id="row_' . $element->getHtmlId() . '" >' . $html . '</tr>' .
+            /* @noEscape */ $this->secureRenderer->renderStyleAsTag(
+                "display: none;",
+                'tr#row_' . $element->getHtmlId()
+            );
     }
 }
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
index b3a575cc8ea9f..24d7db0058045 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Paypal\Block\Adminhtml\System\Config\Fieldset;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Fieldset renderer for PayPal solution
  */
@@ -15,22 +18,31 @@ class Payment extends \Magento\Config\Block\System\Config\Form\Fieldset
      */
     protected $_backendConfig;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
      * @param \Magento\Framework\View\Helper\Js $jsHelper
      * @param \Magento\Config\Model\Config $backendConfig
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Backend\Model\Auth\Session $authSession,
         \Magento\Framework\View\Helper\Js $jsHelper,
         \Magento\Config\Model\Config $backendConfig,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_backendConfig = $backendConfig;
-        parent::__construct($context, $authSession, $jsHelper, $data);
+        $secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($context, $authSession, $jsHelper, $data, $secureRenderer);
+        $this->secureRenderer = $secureRenderer;
     }
 
     /**
@@ -90,19 +102,20 @@ protected function _getHeaderTitleHtml($element)
             ' class="button action-configure' .
             (empty($groupConfig['paypal_ec_separate']) ? '' : ' paypal-ec-separate') .
             $disabledClassString .
-            '" id="' .
-            $htmlId .
-            '-head" onclick="paypalToggleSolution.call(this, \'' .
-            $htmlId .
-            "', '" .
-            $this->getUrl(
-                'adminhtml/*/state'
-            ) . '\'); return false;"><span class="state-closed">' . __(
+            '" id="' . $htmlId . '-head" >' .
+            '<span class="state-closed">' . __(
                 'Configure'
             ) . '</span><span class="state-opened">' . __(
                 'Close'
             ) . '</span></button>';
 
+        $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "paypalToggleSolution.call(this, '" . $htmlId . "', '" . $this->getUrl('adminhtml/*/state') .
+            "'); return false;",
+            'button#' . $htmlId . '-head'
+        );
+
         if (!empty($groupConfig['more_url'])) {
             $html .= '<a class="link-more" href="' . $groupConfig['more_url'] . '" target="_blank">' . __(
                 'Learn More'
@@ -151,6 +164,8 @@ protected function _isCollapseState($element)
     }
 
     /**
+     * Return extra Js.
+     *
      * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
      * @return string
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
diff --git a/app/code/Magento/Paypal/Block/Express/InContext/Component.php b/app/code/Magento/Paypal/Block/Express/InContext/Component.php
index bb5c17a18fe95..d1adf058e3b4f 100644
--- a/app/code/Magento/Paypal/Block/Express/InContext/Component.php
+++ b/app/code/Magento/Paypal/Block/Express/InContext/Component.php
@@ -5,14 +5,16 @@
  */
 namespace Magento\Paypal\Block\Express\InContext;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Paypal\Model\Config;
 use Magento\Paypal\Model\ConfigFactory;
 use Magento\Framework\View\Element\Template;
 use Magento\Framework\Locale\ResolverInterface;
 use Magento\Framework\View\Element\Template\Context;
+use Magento\Framework\Json\Helper\Data as JsonHelper;
 
 /**
- * Class Component
+ * Paypal Express InContext Component.
  *
  * @api
  * @since 100.1.0
@@ -32,15 +34,20 @@ class Component extends Template
     private $config;
 
     /**
-     * @inheritdoc
+     * @param Context $context
      * @param ResolverInterface $localeResolver
+     * @param ConfigFactory $configFactory
+     * @param array $data
+     * @param JsonHelper|null $jsonHelper
      */
     public function __construct(
         Context $context,
         ResolverInterface $localeResolver,
         ConfigFactory $configFactory,
-        array $data = []
+        array $data = [],
+        ?JsonHelper $jsonHelper = null
     ) {
+        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
         parent::__construct($context, $data);
         $this->localeResolver = $localeResolver;
         $this->config = $configFactory->create();
@@ -62,6 +69,8 @@ protected function _toHtml()
     }
 
     /**
+     * Check if is in Context.
+     *
      * @return bool
      */
     private function isInContext()
@@ -70,6 +79,8 @@ private function isInContext()
     }
 
     /**
+     * Return environment.
+     *
      * @return string
      * @since 100.1.0
      */
@@ -79,6 +90,8 @@ public function getEnvironment()
     }
 
     /**
+     * Return locale.
+     *
      * @return string
      * @since 100.1.0
      */
@@ -88,6 +101,8 @@ public function getLocale()
     }
 
     /**
+     * Return merchant id.
+     *
      * @return string
      * @since 100.1.0
      */
@@ -97,6 +112,8 @@ public function getMerchantId()
     }
 
     /**
+     * Check if button is in context.
+     *
      * @return bool
      * @since 100.1.0
      */
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/form.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/form.phtml
index 19cebe863b7ef..7413c29fdd59e 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/form.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/billing/agreement/form.phtml
@@ -4,10 +4,13 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Paypal\Block\Adminhtml\Billing\Agreement\View\Form $block */
+/**
+ * @var \Magento\Paypal\Block\Adminhtml\Billing\Agreement\View\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <?php $code = $block->escapeHtml($block->getMethodCode()) ?>
-<fieldset class="form-list" id="payment_form_<?= /* @noEscape */ $code ?>" style="display:none;">
+<fieldset class="form-list" id="payment_form_<?= /* @noEscape */ $code ?>">
     <div class="admin__field _required">
         <label for="<?= /* @noEscape */ $code ?>_ba_agreement_id" class="admin__field-label">
             <span><?= $block->escapeHtml(__('Billing Agreement')) ?></span>
@@ -17,7 +20,7 @@
                     name="payment[<?= $block->escapeHtml($block->getTransportBAId()) ?>]"
                     class="required-entry admin__control-select">
                 <option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
-                <?php foreach ($block->getBillingAgreements() as $id => $referenceId) : ?>
+                <?php foreach ($block->getBillingAgreements() as $id => $referenceId): ?>
                     <option value="<?= $block->escapeHtml($id) ?>">
                         <?= $block->escapeHtml($referenceId) ?>
                     </option>
@@ -26,3 +29,7 @@
         </div>
     </div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'fieldset#payment_form_' . /* @noEscape */ $code
+) ?>
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/payment/form/billing/agreement.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/payment/form/billing/agreement.phtml
index a4e7b6974c737..b37bd261ce1a5 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/payment/form/billing/agreement.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/payment/form/billing/agreement.phtml
@@ -4,11 +4,13 @@
  * See COPYING.txt for license details.
  */
 
-/* @var $block \Magento\Paypal\Block\Payment\Form\Billing\Agreement */
+/**
+ * @var $block \Magento\Paypal\Block\Payment\Form\Billing\Agreement
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <?php $code = $block->escapeHtml($block->getMethodCode()) ?>
-<fieldset class="admin__fieldset payment-method form-list"
-          id="payment_form_<?= /* @noEscape */ $code ?>" style="display:none;">
+<fieldset class="admin__fieldset payment-method form-list" id="payment_form_<?= /* @noEscape */ $code ?>">
     <div class="admin__field _required">
         <label class="admin__field-label"
                for="<?= /* @noEscape */ $code ?>_ba_agreement_id">
@@ -19,7 +21,7 @@
                     name="payment[<?= $block->escapeHtml($block->getTransportName()) ?>]"
                     class="required-entry admin__control-select">
                 <option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
-                <?php foreach ($block->getBillingAgreements() as $id => $referenceId) : ?>
+                <?php foreach ($block->getBillingAgreements() as $id => $referenceId): ?>
                     <option value="<?= $block->escapeHtml($id) ?>"
                         <?= ($id == $block->getInfoData($block->getTransportName())) ?
                             ' selected="selected"' : '';
@@ -31,3 +33,7 @@
         </div>
     </div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'fieldset#payment_form_' . /* @noEscape */ $code
+) ?>
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/api_wizard.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/api_wizard.phtml
index f906a08425aa4..0268ab4f4c482 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/api_wizard.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/api_wizard.phtml
@@ -7,11 +7,12 @@
 /**
  * @see \Magento\Paypal\Block\Adminhtml\System\Config\ApiWizard
  * @var \Magento\Paypal\Block\Adminhtml\System\Config\ApiWizard $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <div class="pp-buttons-container">
-    <div dir="ltr" style="text-align: left;" trbidi="on">
-        <script>
+    <div id="paypal_api_config" dir="ltr" trbidi="on">
+        <?php $scriptString = <<<script
             (function(d, s, id){
                 var js, ref = d.getElementsByTagName(s)[0];
                 if (!d.getElementById(id)){
@@ -19,7 +20,9 @@
                     js.src = "https://www.paypal.com/webapps/merchantboarding/js/lib/lightbox/partner.js";
                     ref.parentNode.insertBefore(js, ref); }
             }(document, "script", "paypal-js"));
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
         <a class="action-default"
            data-paypal-button="true"
@@ -32,3 +35,4 @@
            target="PPFrame"><?= $block->escapeHtml($block->getSandboxButtonLabel()) ?></a>
     </div>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("text-align: left;", 'div#paypal_api_config') ?>
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml
index 72b7ac86ee056..5b8d12ac20a67 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml
@@ -7,16 +7,21 @@
 /**
  * @see \Magento\Paypal\Block\Adminhtml\System\Config\BmlApiWizard
  * @var \Magento\Paypal\Block\Adminhtml\System\Config\BmlApiWizard $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <div class="pp-buttons-container">
-    <button onclick="javascript:window.open(
-            '<?= $block->escapeUrl($block->getButtonUrl()) ?>',
-            'bmlapiwizard',
-            'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
-            'left=100, top=100, width=550, height=550'
-        ); return false;"
-            class="scalable" type="button" id="<?= $block->escapeHtml($block->getHtmlId()) ?>">
+    <button class="scalable" type="button" id="<?= $block->escapeHtml($block->getHtmlId()) ?>">
         <span><span><span><?= $block->escapeHtml($block->getButtonLabel()) ?></span></span></span>
     </button>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    "javascript:window.open(
+            '" . $block->escapeUrl($block->getButtonUrl()) . "',
+            'bmlapiwizard',
+            'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
+            'left=100, top=100, width=550, height=550'
+        ); return false;",
+    'button#' . $block->escapeHtml($block->getHtmlId())
+) ?>
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml
index f4318b40fef1c..98e59f3a066c3 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Paypal\Block\Adminhtml\Payflowpro\CcForm $block */
+/**
+ * @var \Magento\Paypal\Block\Adminhtml\Payflowpro\CcForm $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 $code = $block->escapeHtml($block->getMethodCode());
 $ccType = $block->getInfoData('cc_type');
 $ccExpYear = $block->getInfoData('cc_exp_year');
@@ -17,8 +20,11 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
         allowtransparency="true"
         frameborder="0"
         name="iframeTransparent"
-        style="display: none; width: 100%; background-color: transparent;"
         src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>"></iframe>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display: none; width: 100%; background-color: transparent;",
+    "iframe#" . /* @noEscape */ $code . "-transparent-iframe"
+) ?>
 <fieldset
     id="payment_form_<?= /* @noEscape */ $code ?>"
     class="admin__fieldset"
@@ -31,9 +37,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
         "orderSaveUrl":"<?= $block->escapeUrl($block->getOrderUrl()) ?>",
         "cgiUrl":"<?= $block->escapeUrl($block->getCgiUrl()) ?>",
         "expireYearLength":"<?= $block->escapeHtml($block->getMethodConfigData('cc_year_length')) ?>",
-        "nativeAction":"<?= $block->escapeUrl($block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()])) ?>"
-      }, "validation":[]}'
-    style="display: none;">
+        "nativeAction":"<?= $block->escapeUrl(
+            $block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()])
+        ) ?>"
+      }, "validation":[]}'>
     <div class="admin__field _required">
         <label for="<?= /* @noEscape */ $code ?>_cc_type" class="admin__field-label">
             <span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
@@ -46,9 +53,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
                     data-validate='{required:true, "validate-cc-type-select":"#<?= /* @noEscape */ $code ?>_cc_number"}'
                     class="admin__control-select">
                 <option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
-                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
+                <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
                     <option
-                        value="<?= $block->escapeHtml($typeCode) ?>"<?php if ($typeCode == $ccType) : ?> selected="selected"<?php endif ?>>
+                        value="<?= $block->escapeHtml($typeCode) ?>"
+                        <?php if ($typeCode == $ccType): ?> selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($typeName) ?>
                     </option>
                 <?php endforeach ?>
@@ -86,10 +94,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
                     data-container="<?= /* @noEscape */ $code ?>-cc-month"
                     class="admin__control-select admin__control-select-month"
                     data-validate='{required:true, "validate-cc-exp":"#<?= /* @noEscape */ $code ?>_expiration_yr"}'>
-                <?php foreach ($block->getCcMonths() as $k => $v) : ?>
+                <?php foreach ($block->getCcMonths() as $k => $v): ?>
                     <option
                         value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                        <?php if ($k == $ccExpMonth) : ?> selected="selected"<?php endif; ?>>
+                        <?php if ($k == $ccExpMonth): ?> selected="selected"<?php endif; ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach ?>
@@ -98,17 +106,17 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
             <select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
                     class="admin__control-select admin__control-select-year"
                     data-container="<?= /* @noEscape */ $code ?>-cc-year" data-validate='{required:true}'>
-                <?php foreach ($block->getCcYears() as $k => $v) : ?>
+                <?php foreach ($block->getCcYears() as $k => $v): ?>
                     <option
                         value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
-                        <?php if ($k == $ccExpYear) : ?> selected="selected"<?php endif ?>>
+                        <?php if ($k == $ccExpYear): ?> selected="selected"<?php endif ?>>
                         <?= $block->escapeHtml($v) ?>
                     </option>
                 <?php endforeach ?>
             </select>
         </div>
     </div>
-    <?php if ($block->hasVerification()) : ?>
+    <?php if ($block->hasVerification()): ?>
         <div class="admin__field _required field-cvv" id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
             <label for="<?= /* @noEscape */ $code ?>_cc_cid" class="admin__field-label">
                 <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
@@ -120,13 +128,13 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
                        class="admin__control-text cvv"
                        id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]"
                        value=""
-                       data-validate='{"required-number":true, "validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"}'
+                       data-validate='{"required-number":true, "validate-cc-cvn":"#<?=/* @noEscape */ $code?>_cc_type"}'
                        autocomplete="off"/>
             </div>
         </div>
     <?php endif; ?>
 
-    <?php if ($block->isVaultEnabled()) : ?>
+    <?php if ($block->isVaultEnabled()): ?>
         <div class="admin__field admin__field-option field-tooltip-content">
             <input type="checkbox"
                    id="<?= /* @noEscape */ $code ?>_vault"
@@ -142,12 +150,18 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
 
     <?= $block->getChildHtml() ?>
 </fieldset>
-
-<script>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display: none;",
+    "fieldset#payment_form_" . /* @noEscape */ $code
+) ?>
+<?php $codeNoEscaped = /* @noEscape */ $code;
+$scriptString = <<<script
     /**
      * Disable card server validation in admin
      */
     require(["Magento_Sales/order/create/form"], function () {
-        order.addExcludedPaymentMethod('<?= /* @noEscape */ $code ?>');
+        order.addExcludedPaymentMethod('{$codeNoEscaped}');
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml
index c102b21830de8..8a0412af40b8b 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/express/in-context/component.phtml
@@ -5,7 +5,10 @@
  */
 use Magento\Paypal\Block\Express\InContext\Minicart\SmartButton;
 
-/** @var \Magento\Paypal\Block\Express\InContext\Component $block */
+/**
+ * @var \Magento\Paypal\Block\Express\InContext\Component $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 $configuration = [
     'id' => SmartButton::PAYPAL_BUTTON_ID,
@@ -27,12 +30,20 @@ $configuration = [
 ];
 
 ?>
-<div style="display: none;" id="<?= /* @noEscape */ SmartButton::PAYPAL_BUTTON_ID ?>"></div>
+<div id="<?= /* @noEscape */ SmartButton::PAYPAL_BUTTON_ID ?>"></div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display: none;",
+    'div#' . /* @noEscape */ SmartButton::PAYPAL_BUTTON_ID
+) ?>
+
+<?php /** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
+?>
 <script type="text/x-magento-init">
     {
         "*": {
             "Magento_Paypal/js/in-context/express-checkout":
-            <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($configuration) ?>
+            <?= /* @noEscape */ $jsonHelper->jsonEncode($configuration) ?>
         }
     }
 </script>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/express/review.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/review.phtml
index 8e222ca7eb04d..69c7c8179850a 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/express/review.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/express/review.phtml
@@ -6,12 +6,13 @@
 
 /**
  * @var \Magento\Paypal\Block\Express\Review $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <div class="paypal-review view">
     <div class="block block-order-details-view">
         <div class="block-content">
-            <?php if ($block->getShippingAddress()) : ?>
+            <?php if ($block->getShippingAddress()): ?>
                 <div class="box box-order-shipping-method">
                     <strong class="box-title">
                         <span><?= $block->escapeHtml(__('Shipping Method')) ?></span>
@@ -20,17 +21,20 @@
                         <form method="post" id="shipping-method-form"
                               action="<?= $block->escapeUrl($block->getShippingMethodSubmitUrl()) ?>"
                               class="form">
-                            <?php if ($block->canEditShippingMethod()) : ?>
-                                <?php if ($groups = $block->getShippingRateGroups()) : ?>
+                            <?php if ($block->canEditShippingMethod()): ?>
+                                <?php if ($groups = $block->getShippingRateGroups()): ?>
                                     <?php $currentRate = $block->getCurrentShippingRate(); ?>
                                     <div class="field shipping required">
                                         <select name="shipping_method" id="shipping-method" class="select">
-                                            <?php if (!$currentRate) : ?>
-                                                <option value=""><?= $block->escapeHtml(__('Please select a shipping method...')); ?></option>
+                                            <?php if (!$currentRate): ?>
+                                                <option value="">
+                                                    <?= $block->escapeHtml(__('Please select a shipping method...')); ?>
+                                                </option>
                                             <?php endif; ?>
-                                            <?php foreach ($groups as $code => $rates) : ?>
-                                                <optgroup label="<?= $block->escapeHtml($block->getCarrierName($code)); ?>">
-                                                    <?php foreach ($rates as $rate) : ?>
+                                            <?php foreach ($groups as $code => $rates): ?>
+                                                <optgroup label="<?= $block->escapeHtml($block->getCarrierName($code));
+                                                ?>">
+                                                    <?php foreach ($rates as $rate): ?>
                                                         <option value="<?=
                                                                         $block->escapeHtml(
                                                                             $block->renderShippingRateValue($rate)
@@ -39,7 +43,8 @@
                                                             <?= ($currentRate === $rate) ?
                                                                 ' selected="selected"' : '';
                                                             ?>>
-                                                            <?= /* @noEscape */ $block->renderShippingRateOption($rate); ?>
+                                                            <?= /* @noEscape */ $block->renderShippingRateOption($rate);
+                                                            ?>
                                                         </option>
                                                     <?php endforeach; ?>
                                                 </optgroup>
@@ -56,14 +61,14 @@
                                             </button>
                                         </div>
                                     </div>
-                                <?php else : ?>
+                                <?php else: ?>
                                     <p>
                                         <?= $block->escapeHtml(__(
                                             'Sorry, no quotes are available for this order right now.'
                                         )); ?>
                                     </p>
                                 <?php endif; ?>
-                            <?php else : ?>
+                            <?php else: ?>
                                 <p>
                                     <?= /* @noEscape */ $block->renderShippingRateOption(
                                         $block->getCurrentShippingRate()
@@ -85,7 +90,7 @@
                             );?>
                         </address>
                     </div>
-                    <?php if ($block->getCanEditShippingAddress()) : ?>
+                    <?php if ($block->getCanEditShippingAddress()): ?>
                         <div class="box-actions">
                             <a href="<?= $block->escapeUrl($block->getEditUrl()) ?>" class="action edit">
                                 <span><?= $block->escapeHtml(__('Edit')) ?></span>
@@ -102,7 +107,7 @@
                     <img src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/pp-acceptance-medium.png"
                          alt="<?= $block->escapeHtml(__('Buy now with PayPal')) ?>"/>
                 </div>
-            <?php if ($block->getEditUrl()) : ?>
+            <?php if ($block->getEditUrl()): ?>
                 <div class="box-actions">
                     <a href="<?= $block->escapeUrl($block->getEditUrl()) ?>" class="action edit">
                         <span><?= $block->escapeHtml(__('Edit Payment Information')) ?></span>
@@ -137,10 +142,11 @@
                         <span><?= $block->escapeHtml(__('Place Order')) ?></span>
                     </button>
                 </div>
-                <span class="please-wait load indicator" id="review-please-wait" style="display: none;"
+                <span class="please-wait load indicator" id="review-please-wait"
                       data-text="<?= $block->escapeHtml(__('Submitting order information...')) ?>">
                    <span><?= $block->escapeHtml(__('Submitting order information...')) ?></span>
                 </span>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'span#review-please-wait')?>
             </div>
         </form>
     </div>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/express/review/shipping/method.phtml b/app/code/Magento/Paypal/view/frontend/templates/express/review/shipping/method.phtml
index 839d278ed227c..826628c5cbc63 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/express/review/shipping/method.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/express/review/shipping/method.phtml
@@ -4,22 +4,25 @@
  * See COPYING.txt for license details.
  */
 
-/** @var $block \Magento\Paypal\Block\Express\Review */
+/**
+ * @var $block \Magento\Paypal\Block\Express\Review
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <div id="shipping-method-container">
-    <?php if ($block->getCanEditShippingMethod() || !$block->getCurrentShippingRate()) : ?>
-        <?php if ($groups = $block->getShippingRateGroups()) : ?>
+    <?php if ($block->getCanEditShippingMethod() || !$block->getCurrentShippingRate()): ?>
+        <?php if ($groups = $block->getShippingRateGroups()): ?>
             <?php $currentRate = $block->getCurrentShippingRate(); ?>
             <select name="shipping_method" id="shipping_method" class="required-entry">
-                <?php if (!$currentRate) : ?>
+                <?php if (!$currentRate): ?>
                     <option value="">
                         <?= $block->escapeHtml(__('Please select a shipping method...')) ?>
                     </option>
                 <?php endif; ?>
-                <?php foreach ($groups as $code => $rates) : ?>
-                    <optgroup label="<?= $block->escapeHtml($block->getCarrierName($code)) ?>"
-                              style="font-style:normal;">
-                        <?php foreach ($rates as $rate) : ?>
+                <?php foreach ($groups as $code => $rates): ?>
+                    <optgroup id="group_<?= /* @noEscape */ $code ?>"
+                              label="<?= $block->escapeHtml($block->getCarrierName($code)) ?>">
+                        <?php foreach ($rates as $rate): ?>
                             <option
                                 value="<?= $block->escapeHtml($block->renderShippingRateValue($rate)) ?>"
                                     <?= ($currentRate === $rate) ? ' selected="selected"' : '' ?>>
@@ -27,16 +30,20 @@
                             </option>
                         <?php endforeach; ?>
                     </optgroup>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                        'font-style:normal;',
+                        'optgroup#group_' . /* @noEscape */ $code
+                    ) ?>
                 <?php endforeach; ?>
             </select>
-        <?php else : ?>
+        <?php else: ?>
             <p>
                 <strong>
                     <?= $block->escapeHtml(__('Sorry, no quotes are available for this order right now.')) ?>
                 </strong>
             </p>
         <?php endif; ?>
-    <?php else : ?>
+    <?php else: ?>
         <p>
             <strong>
                 <?= /* @noEscape */ $block->renderShippingRateOption($block->getCurrentShippingRate()) ?>
@@ -44,6 +51,10 @@
         </p>
     <?php endif; ?>
 </div>
-<div style="display: none" id="shipping_method_update">
+<div id="shipping_method_update">
     <p><?= $block->escapeHtml(__('Please update order data to get shipping methods and rates')) ?></p>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'div#shipping_method_update'
+) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/hss/form.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/form.phtml
index ec6f7b4ad985e..036ebb49d4eff 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/hss/form.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/hss/form.phtml
@@ -8,6 +8,7 @@
 
 /**
  * @var \Magento\Paypal\Block\Payflow\Link\Iframe $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Paypal\Block\Payflow\Link\Iframe
  */
 ?>
@@ -20,8 +21,10 @@
     <input type="hidden" name="SECURETOKENID" value="<?= $block->escapeHtml($block->getSecureTokenId()) ?>"/>
     <input type="hidden" name="MODE" value="<?= /* @noEscape */ $block->isTestMode() ? 'TEST' : 'LIVE' ?>"/>
 </form>
-<script>
+<?php $scriptString = <<<script
     document.getElementById('token_form').submit();
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </body>
 </html>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/hss/info.phtml b/app/code/Magento/Paypal/view/frontend/templates/hss/info.phtml
index c2339f85b7ca5..d8bdf9b183b68 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/hss/info.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/hss/info.phtml
@@ -6,11 +6,15 @@
 
 /**
  * @var \Magento\Paypal\Block\Payment\Info $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<div id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>"
-     style="display:none" class="hss items">
+<div id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" class="hss items">
     <?= $block->escapeHtml(__(
         'You will be required to enter your payment details after you place an order.'
     )); ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'div#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
index f0f672492270a..8502fb02deb8b 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
@@ -7,6 +7,7 @@
 
 /**
  * @var \Magento\Paypal\Block\Logo $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Paypal\Block\Logo
  */
 ?>
@@ -14,11 +15,6 @@
 <div class="block paypal acceptance">
     <div class="block-content">
         <a href="#" title="<?= $block->escapeHtml(__('Additional Options')) ?>"
-           onclick="javascript:window.open(
-               '<?= $block->escapeUrl($block->getAboutPaypalPageUrl()) ?>',
-               'paypal',
-               'width=600,height=350,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'
-               ); return false;"
            class="action paypal additional">
             <img src="<?= $block->escapeUrl($block->getLogoImageUrl()) ?>"
                  alt="<?= $block->escapeHtml(__('Additional Options')) ?>"
@@ -26,3 +22,12 @@
         </a>
     </div>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    "javascript:window.open(
+               '" . $block->escapeUrl($block->getAboutPaypalPageUrl()) . "',
+               'paypal',
+               'width=600,height=350,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'
+               ); return false;",
+    'div.block.paypal.acceptance div.block-content a.action.paypal.additional'
+) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/form.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/form.phtml
index e643acac297e9..4491b8c09603e 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/form.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/form.phtml
@@ -6,6 +6,7 @@
 
 /**
  * @var \Magento\Paypal\Block\Payflow\Advanced\Iframe $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <html>
@@ -17,8 +18,10 @@
     <input type="hidden" name="SECURETOKENID" value="<?= $block->escapeHtml($block->getSecureTokenId()) ?>"/>
     <input type="hidden" name="MODE" value="<?= /* @noEscape */ $block->isTestMode() ? 'TEST' : 'LIVE' ?>"/>
 </form>
-<script>
+<?php $scriptString = <<<script
     document.getElementById('token_form').submit();
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </body>
 </html>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/info.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/info.phtml
index d5944a6f22f5f..8e11186d43e6c 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/info.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payflowadvanced/info.phtml
@@ -6,11 +6,16 @@
 
 /**
  * @var \Magento\Paypal\Block\Payflow\Advanced\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<fieldset id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>" style="display:none"
+<fieldset id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>"
           class="fieldset payflowadvanced items redirect">
     <div>
         <?= $block->escapeHtml(__('You will be required to enter your payment details after you place an order.')) ?>
     </div>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/form.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/form.phtml
index cef3e2f0565ba..839ded13ae680 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/form.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/form.phtml
@@ -8,6 +8,7 @@
 
 /**
  * @var \Magento\Paypal\Block\Payflow\Link\Iframe $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Paypal\Block\Payflow\Link\Iframe
  */
 ?>
@@ -20,8 +21,10 @@
     <input type="hidden" name="SECURETOKENID" value="<?= $block->escapeHtml($block->getSecureTokenId()) ?>"/>
     <input type="hidden" name="MODE" value="<?= /* @noEscape */ $block->isTestMode() ? 'TEST' : 'LIVE' ?>"/>
 </form>
-<script>
+<?php $scriptString = <<<script
     document.getElementById('token_form').submit();
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </body>
 </html>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/info.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/info.phtml
index cbd4a8ba715e7..3d17b24f53e61 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/info.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/info.phtml
@@ -6,9 +6,13 @@
 
 /**
  * @var \Magento\Paypal\Block\Payflow\Link\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<div class="payflowlink items" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>"
-     style="display:none">
+<div class="payflowlink items" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>">
     <?= $block->escapeHtml(__('You will be required to enter your payment details after you place an order.')) ?>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'div#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml
index 75cc2a09e9444..30eeb7ca082e3 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml
@@ -8,13 +8,14 @@
 
 /**
  * @var \Magento\Paypal\Block\Payflow\Link\Iframe $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <html>
 <head>
 </head>
 <body>
-<script>
+<?php $scriptString= <<<script
     (function() {
         'use strict';
 
@@ -29,13 +30,13 @@
             }
         }
 
-        var cartUrl = '<?= $block->escapeUrl($block->getUrl('checkout/cart')) ?>',
-            successUrl = '<?= $block->escapeUrl($block->getUrl('checkout/onepage/success')) ?>',
-            goToSuccessPage = '<?= $block->escapeUrl($block->getGotoSuccessPage()) ?>',
+        var cartUrl = '{$block->escapeJs($block->getUrl('checkout/cart'))}',
+            successUrl = '{$block->escapeJs($block->getUrl('checkout/onepage/success'))}',
+            goToSuccessPage = '{$block->escapeUrl($block->getGotoSuccessPage())}',
             require = window.top.require,
             windowContext = window,
             errorMessage = {
-                message: '<?= $block->escapeHtml($block->getErrorMsg()) ?>'
+                message: '{$block->escapeJs($block->getErrorMsg())}'
             };
 
         if(typeof(require) == "undefined") {
@@ -51,6 +52,8 @@
 
 
     })();
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </body>
 </html>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payment/form/billing/agreement.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/form/billing/agreement.phtml
index 75ee08111bd7a..85f627ad5509b 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payment/form/billing/agreement.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payment/form/billing/agreement.phtml
@@ -6,10 +6,11 @@
 
 /**
  * @var \Magento\Paypal\Block\Payment\Form\Billing\Agreement $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $code = $block->escapeHtml($block->getMethodCode());
 ?>
-<div class="field items required" id="payment_form_<?= /* @noEscape */ $code ?>" style="display:none;">
+<div class="field items required" id="payment_form_<?= /* @noEscape */ $code ?>">
     <label for="<?= /* @noEscape */ $code ?>_ba_agreement_id" class="label">
         <span><?= $block->escapeHtml(__('Billing Agreement')) ?></span>
     </label>
@@ -17,7 +18,7 @@ $code = $block->escapeHtml($block->getMethodCode());
         <select id="<?= /* @noEscape */ $code ?>_ba_agreement_id"
                 name="payment[<?= $block->escapeHtml($block->getTransportName()) ?>]" class="select">
             <option value=""><?= $block->escapeHtml(__('-- Please Select Billing Agreement--')) ?></option>
-            <?php foreach ($block->getBillingAgreements() as $id => $referenceId) : ?>
+            <?php foreach ($block->getBillingAgreements() as $id => $referenceId): ?>
                 <option value="<?= $block->escapeHtml($id) ?>">
                     <?= $block->escapeHtml($referenceId) ?>
                 </option>
@@ -25,3 +26,4 @@ $code = $block->escapeHtml($block->getMethodCode());
         </select>
     </div>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'div#payment_form_' . /* @noEscape */ $code) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
index d9fb5fb43bcc7..5da5d7156baba 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
@@ -7,6 +7,7 @@
 /**
  * Note: This mark is a requirement of PayPal
  * @var \Magento\Paypal\Block\Express\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Paypal\Block\Express\Form
  */
 $url = $block->escapeUrl($block->getPaymentAcceptanceMarkHref());
@@ -14,18 +15,21 @@ $url = $block->escapeUrl($block->getPaymentAcceptanceMarkHref());
 <!-- PayPal Logo -->
 <img src="<?= $block->escapeUrl($block->getPaymentAcceptanceMarkSrc()) ?>"
      alt="<?= $block->escapeHtml(__('Acceptance Mark')) ?>" class="paypal icon"/>
-<a href="<?= /* @noEscape */ $url ?>"
-   onclick="javascript:window.open(
-           '<?= /* @noEscape */ $url ?>',
-           'olcwhatispaypal',
-           'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
-           'left=0, top=0, width=400, height=350'
-       ); return false;"
-   class="action paypal about">
+<a href="<?= /* @noEscape */ $url ?>" class="action paypal about">
     <?php if ($block->getPaymentWhatIs()) {
         echo $block->escapeHtml(__($block->getPaymentWhatIs()));
-} else {
+    } else {
         echo $block->escapeHtml(__('What is PayPal?'));
-} ?>
+    } ?>
 </a>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    "javascript:window.open(
+           '" . /* @noEscape */ $url . "',
+           'olcwhatispaypal',
+           'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
+           'left=0, top=0, width=400, height=350'
+       ); return false;",
+    'a.action.paypal.about'
+) ?>
 <!-- PayPal Logo -->
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payment/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/redirect.phtml
index 683153b12db7a..a123f9b9ed7dc 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payment/redirect.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payment/redirect.phtml
@@ -6,15 +6,15 @@
 
 /**
  * @var \Magento\PayPal\Block\Express\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\PayPal\Block\Express\Form
  */
 $code = $block->escapeHtml($block->getBillingAgreementCode());
 ?>
-<fieldset class="fieldset paypal items redirect" style="display:none;"
-          id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>">
+<fieldset class="fieldset paypal items redirect" id="payment_form_<?= $block->escapeHtml($block->getMethodCode()) ?>">
     <div><?= $block->escapeHtml($block->getRedirectMessage()) ?></div>
     <?php  ?>
-    <?php if ($code) : ?>
+    <?php if ($code): ?>
         <input type="checkbox" id="<?= /* @noEscape */ $code ?>" value="1" class="checkbox"
                name="payment[<?= /* @noEscape */ $code ?>]">
         <label for="<?= /* @noEscape */ $code ?>" class="label">
@@ -24,3 +24,7 @@ $code = $block->escapeHtml($block->getBillingAgreementCode());
         </label>
     <?php endif; ?>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+) ?>
diff --git a/app/code/Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml b/app/code/Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml
index 1548770d4032f..b729eadf122c5 100644
--- a/app/code/Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml
+++ b/app/code/Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml
@@ -4,12 +4,15 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Files.LineLength
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
-/** @var $block \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content */
+/**
+ * @var $block \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 $elementNameEscaped = $block->escapeHtmlAttr($block->getElement()->getName()) . '[images]';
 $formNameEscaped = $block->escapeHtmlAttr($block->getFormName());
+
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 
 <div class="row">
@@ -28,16 +31,17 @@ $formNameEscaped = $block->escapeHtmlAttr($block->getFormName());
 <?php
 /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery\Content */
 $element = $block->getElement();
-$elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'toggleValueElements(this, this.parentNode.parentNode.parentNode)';
+$elementToggleCode = $element->getToggleCode() ? $element->getToggleCode():
+    'toggleValueElements(this, this.parentNode.parentNode.parentNode)';
 ?>
 <div id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>"
      class="gallery"
      data-mage-init='{"openVideoModal":{}}'
      data-parent-component="<?= $block->escapeHtml($block->getData('config/parentComponent')) ?>"
      data-images="<?= $block->escapeHtmlAttr($block->getImagesJson()) ?>"
-     data-types='<?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getImageTypes()) ?>'
+     data-types='<?= /* @noEscape */ $jsonHelper->jsonEncode($block->getImageTypes()) ?>'
 >
-    <?php if (!$block->getElement()->getReadonly()) : ?>
+    <?php if (!$block->getElement()->getReadonly()): ?>
         <div class="image image-placeholder">
             <?= $block->getUploaderHtml(); ?>
             <div class="product-image-wrapper">
@@ -48,15 +52,17 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
         </div>
         <?= $block->getChildHtml('additional_buttons') ?>
     <?php endif; ?>
-    <?php foreach ($block->getImageTypes() as $typeData) : ?>
+    <?php foreach ($block->getImageTypes() as $typeData): ?>
         <input name="<?= $block->escapeHtmlAttr($typeData['name']) ?>"
                data-form-part="<?= /* @noEscape */ $formNameEscaped ?>"
                class="image-<?= $block->escapeHtmlAttr($typeData['code']) ?>"
                type="hidden"
                value="<?= $block->escapeHtmlAttr($typeData['value']) ?>"/>
     <?php endforeach; ?>
-    <script id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>-template" data-template="image" type="text/x-magento-template">
-        <div class="image item <% if (data.disabled == 1) { %>hidden-for-front<% } %>  <% if (data.video_url) { %>video-item<% } %>"
+    <script id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>-template" data-template="image"
+            type="text/x-magento-template">
+        <div class="image item <% if (data.disabled == 1) { %>hidden-for-front<% } %>
+                <% if (data.video_url) { %>video-item<% } %>"
              data-role="image">
             <input type="hidden"
                    name="<?= /* @noEscape */ $elementNameEscaped ?>[<%- data.file_id %>][position]"
@@ -164,8 +170,9 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
             </div>
 
             <ul class="item-roles" data-role="roles-labels">
-                <?php foreach ($block->getImageTypes() as $typeData) : ?>
-                    <li data-role-code="<?= $block->escapeHtmlAttr($typeData['code']) ?>" class="item-role item-role-<?= $block->escapeHtmlAttr($typeData['code']) ?>">
+                <?php foreach ($block->getImageTypes() as $typeData): ?>
+                    <li data-role-code="<?= $block->escapeHtmlAttr($typeData['code']) ?>"
+                        class="item-role item-role-<?= $block->escapeHtmlAttr($typeData['code']) ?>">
                         <?= $block->escapeHtml($typeData['label']) ?>
                     </li>
                 <?php endforeach; ?>
@@ -195,7 +202,8 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
                             <textarea data-role="image-description"
                                       rows="3"
                                       class="admin__control-textarea"
-                                      name="<?= /* @noEscape */ $elementNameEscaped ?>[<%- data.file_id %>][label]"><%- data.label %></textarea>
+                                      name="<?= /* @noEscape */ $elementNameEscaped
+                                        ?>[<%- data.file_id %>][label]"><%- data.label %></textarea>
                     </div>
                 </div>
 
@@ -206,7 +214,7 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
                     <div class="admin__field-control">
                         <ul class="multiselect-alt">
                             <?php
-                            foreach ($block->getMediaAttributes() as $attribute) :
+                            foreach ($block->getMediaAttributes() as $attribute):
                                 ?>
                                 <li class="item">
                                     <label>
@@ -235,7 +243,8 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
                     <label class="admin__field-label">
                         <span><?= $block->escapeHtml(__('Image Resolution')) ?></span>
                     </label>
-                    <div class="admin__field-value" data-message="<?= $block->escapeHtmlAttr(__('{width}^{height} px')) ?>"></div>
+                    <div class="admin__field-value" data-message="<?= $block->escapeHtmlAttr(__('{width}^{height} px'))
+                    ?>"></div>
                 </div>
 
                 <div class="admin__field field-image-hide">
@@ -259,7 +268,7 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
             </fieldset>
         </div>
     </script>
-    <div id="<?= /* @noEscape */ $block->getNewVideoBlockName() ?>" style="display:none">
+    <div id="new_video_<?= /* @noEscape */ $block->getNewVideoBlockName() ?>">
         <?= $block->getFormHtml() ?>
         <div id="video-player-preview-location" class="video-player-sidebar">
             <div class="video-player-container"></div>
@@ -277,9 +286,11 @@ $elementToggleCode = $element->getToggleCode() ? $element->getToggleCode() : 'to
             </div>
         </div>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display:none',
+        'div#new_video_' . /* @noEscape */ $block->getNewVideoBlockName()
+    ) ?>
 
     <?= $block->getChildHtml('new-video') ?>
 </div>
-<script>
-    jQuery('body').trigger('contentUpdated');
-</script>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], "jQuery('body').trigger('contentUpdated');", false) ?>
diff --git a/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/base_image.phtml b/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/base_image.phtml
index e1dcab9e8b2d4..8c40c174c9787 100644
--- a/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/base_image.phtml
+++ b/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/base_image.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="row">
     <div class="add-video-button-container">
@@ -11,10 +13,14 @@
             title="<?= $block->escapeHtmlAttr($addVideoTitle) ?>"
             type="button"
             class="action-secondary"
-            onclick="jQuery('#new-video').modal('openModal'); jQuery('#new_video_form')[0].reset();"
             data-ui-id="widget-button-1">
             <span><?= $block->escapeHtml(__('Add Video')) ?></span>
         </button>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "jQuery('#new-video').modal('openModal'); jQuery('#new_video_form')[0].reset();",
+            'button#add_video_button'
+        ) ?>
     </div>
 </div>
 <div id="<?= $block->escapeHtmlAttr($htmlId) ?>-container"
@@ -62,7 +68,7 @@
 <span class="action-manage-images" data-activate-tab="image-management">
     <span><?= $block->escapeHtml($imageManagementText) ?></span>
 </span>
-<script>
+<?php $scriptString = <<<script
     require([
         'jquery'
     ],function($){
@@ -74,4 +80,6 @@
                 $('#product_info_tabs_image-management').trigger('click');
             });
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml b/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml
index 7de3042b56ab5..05b274d56402d 100644
--- a/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml
+++ b/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml
@@ -3,9 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-/* @var Magento\ProductVideo\Block\Adminhtml\Product\Edit\NewVideo $block */
+/**
+ * @var Magento\ProductVideo\Block\Adminhtml\Product\Edit\NewVideo $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<div id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>" style="display:none"
+<div id="video_name_<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>"
     data-modal-info='<?= /* @noEscape */ $block->getWidgetOptions() ?>'
 >
     <?= $block->getFormHtml() ?>
@@ -25,3 +28,7 @@
         </div>
     </div>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderTag(
+    'display:none',
+    'div#video_name_' . $block->escapeHtmlAttr($block->getNameInLayout())
+) ?>
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php
index 87c15e474d11f..10d58e1f312c4 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Items/Column/Name.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Items\Column;
 
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Filter\TruncateFilter\Result;
+use Magento\Catalog\Helper\Data as CatalogHelper;
 
 /**
  * Sales Order items name column renderer
@@ -15,6 +17,28 @@
  */
 class Name extends \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn
 {
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry
+     * @param \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Catalog\Model\Product\OptionFactory $optionFactory
+     * @param array $data
+     * @param CatalogHelper|null $catalogHelper
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry,
+        \Magento\CatalogInventory\Api\StockConfigurationInterface $stockConfiguration,
+        \Magento\Framework\Registry $registry,
+        \Magento\Catalog\Model\Product\OptionFactory $optionFactory,
+        array $data = [],
+        ?CatalogHelper $catalogHelper = null
+    ) {
+        $data['catalogHelper'] = $catalogHelper ?? ObjectManager::getInstance()->get(CatalogHelper::class);
+        parent::__construct($context, $stockRegistry, $stockConfiguration, $registry, $optionFactory, $data);
+    }
+
     /**
      * @var Result
      */
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php
index b314ee24c3e27..6a1c16cd5d73a 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage.php
@@ -50,6 +50,7 @@ public function __construct(
     ) {
         $this->_messageHelper = $messageHelper;
         $this->_giftMessageSave = $giftMessageSave;
+        $data['giftMessageHelper'] = $messageHelper;
         parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
     }
 
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php
index 8a427a30a6c7a..9adfd0407a9ba 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php
@@ -8,9 +8,11 @@
 use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
 use Magento\CatalogInventory\Api\StockRegistryInterface;
 use Magento\CatalogInventory\Api\StockStateInterface;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Pricing\PriceCurrencyInterface;
 use Magento\Framework\Session\SessionManagerInterface;
 use Magento\Quote\Model\Quote\Item;
+use Magento\Catalog\Helper\Data as CatalogHelper;
 
 /**
  * Adminhtml sales order create items grid block
@@ -85,6 +87,7 @@ class Grid extends \Magento\Sales\Block\Adminhtml\Order\Create\AbstractCreate
      * @param StockRegistryInterface $stockRegistry
      * @param StockStateInterface $stockState
      * @param array $data
+     * @param CatalogHelper|null $catalogHelper
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -99,7 +102,8 @@ public function __construct(
         \Magento\GiftMessage\Helper\Message $messageHelper,
         StockRegistryInterface $stockRegistry,
         StockStateInterface $stockState,
-        array $data = []
+        array $data = [],
+        ?CatalogHelper $catalogHelper = null
     ) {
         $this->_messageHelper = $messageHelper;
         $this->_wishlistFactory = $wishlistFactory;
@@ -108,6 +112,7 @@ public function __construct(
         $this->_taxData = $taxData;
         $this->stockRegistry = $stockRegistry;
         $this->stockState = $stockState;
+        $data['catalogHelper'] = $catalogHelper ?? ObjectManager::getInstance()->get(CatalogHelper::class);
         parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
     }
 
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php
index 1fd1c28c20727..0b926e8415e41 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Shipping/Method/Form.php
@@ -52,6 +52,7 @@ public function __construct(
         array $data = []
     ) {
         $this->_taxData = $taxData;
+        $data['taxHelper'] = $this->_taxData;
         parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $data);
     }
 
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml b/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml
index c9b2f7c8de254..a3904ac09c6b4 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml
@@ -4,41 +4,64 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
 ?>
 <?php
-/* @var $block \Magento\Sales\Block\Adminhtml\Items\Column\Name */
+/**
+ * @var $block \Magento\Sales\Block\Adminhtml\Items\Column\Name
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+?>
+
+<?php
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
-<?php if ($_item = $block->getItem()) : ?>
+<?php if ($_item = $block->getItem()): ?>
     <div id="order_item_<?= (int) $_item->getId() ?>_title"
          class="product-title">
         <?= $block->escapeHtml($_item->getName()) ?>
     </div>
     <div class="product-sku-block">
-        <span><?= $block->escapeHtml(__('SKU'))?>:</span> <?= /* @noEscape */ implode('<br />', $this->helper(\Magento\Catalog\Helper\Data::class)->splitSku($block->escapeHtml($block->getSku()))) ?>
+        <span><?= $block->escapeHtml(__('SKU'))?>:</span>
+        <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($block->escapeHtml($block->getSku()))) ?>
     </div>
 
-    <?php if ($block->getOrderOptions()) : ?>
+    <?php if ($block->getOrderOptions()): ?>
         <dl class="item-options">
-            <?php foreach ($block->getOrderOptions() as $_option) : ?>
+            <?php foreach ($block->getOrderOptions() as $_option): ?>
                 <dt><?= $block->escapeHtml($_option['label']) ?>:</dt>
                 <dd>
-                    <?php if (isset($_option['custom_view']) && $_option['custom_view']) : ?>
+                    <?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
                         <?= /* @noEscape */ $block->getCustomizedOptionValue($_option) ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?php $_option = $block->getFormattedOption($_option['value']); ?>
                         <?php $dots = 'dots' . uniqid(); ?>
                         <?php $id = 'id' . uniqid(); ?>
-                        <?= $block->escapeHtml($_option['value'], ['a', 'br']) ?><?php if (isset($_option['remainder']) && $_option['remainder']) : ?><span id="<?= /* @noEscape */ $dots; ?>"> ...</span><span id="<?= /* @noEscape */ $id; ?>"><?= $block->escapeHtml($_option['remainder'], ['a']) ?></span>
-                            <script>
+                        <?= $block->escapeHtml($_option['value'], ['a', 'br']) ?>
+                        <?php if (isset($_option['remainder']) && $_option['remainder']): ?>
+                            <span id="<?= /* @noEscape */ $dots; ?>"> ...</span>
+                            <span id="<?= /* @noEscape */ $id; ?>">
+                                <?= $block->escapeHtml($_option['remainder'], ['a']) ?>
+                            </span>
+                            <?php $scriptString = <<<script
                                 require(['prototype'], function() {
-                                    $('<?= /* @noEscape */ $id; ?>').hide();
-                                    $('<?= /* @noEscape */ $id; ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $id; ?>').show();});
-                                    $('<?= /* @noEscape */ $id; ?>').up().observe('mouseover', function(){$('<?= /* @noEscape */ $dots; ?>').hide();});
-                                    $('<?= /* @noEscape */ $id; ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $id; ?>').hide();});
-                                    $('<?= /* @noEscape */ $id; ?>').up().observe('mouseout',  function(){$('<?= /* @noEscape */ $dots; ?>').show();});
-                                });
-                            </script>
+
+script;
+                            $scriptString .= "$('" . /* @noEscape */ $id . "').hide();" . PHP_EOL;
+                            $scriptString .= "$('" . /* @noEscape */ $id .
+                             "').up().observe('mouseover', function(){ $('" . /* @noEscape */ $id . "').show();});" .
+                              PHP_EOL;
+                            $scriptString .= "$('" . /* @noEscape */ $id .
+                                "').up().observe('mouseover', function(){ $('" . /* @noEscape */ $dots .
+                                 "').hide();});" . PHP_EOL;
+                            $scriptString .= "$('" . /* @noEscape */ $id .
+                                "').up().observe('mouseout',  function(){ $('" . /* @noEscape */ $id .
+                                 "').hide();});" . PHP_EOL;
+                            $scriptString .= "$('" . /* @noEscape */ $id .
+                                "').up().observe('mouseout',  function(){ $('" . /* @noEscape */ $dots .
+                                 "').show();});" . PHP_EOL . "});" . PHP_EOL;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         <?php endif; ?>
                     <?php endif; ?>
                 </dd>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml
index 05e753c78f4a3..c3a7321a3052f 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/comments/view.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($_entity = $block->getEntity()) : ?>
+<?php if ($_entity = $block->getEntity()): ?>
 <div id="comments_block" class="edit-order-comments">
     <div class="order-history-block">
         <div class="admin__field field-row">
@@ -20,7 +22,7 @@
         </div>
         <div class="admin__field">
             <div class="order-history-comments-options">
-                <?php if ($block->canSendCommentEmail()) : ?>
+                <?php if ($block->canSendCommentEmail()): ?>
                     <div class="admin__field admin__field-option">
                         <input name="comment[is_customer_notified]"
                                type="checkbox"
@@ -48,31 +50,41 @@
     </div>
 
     <ul class="note-list">
-        <?php foreach ($_entity->getCommentsCollection(true) as $_comment) : ?>
+        <?php foreach ($_entity->getCommentsCollection(true) as $_comment): ?>
             <li>
-                <span class="note-list-date"><?= /* @noEscape */ $block->formatDate($_comment->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?></span>
-                <span class="note-list-time"><?= /* @noEscape */ $block->formatTime($_comment->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?></span>
+                <span class="note-list-date">
+                    <?= /* @noEscape */ $block->formatDate($_comment->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?>
+                </span>
+                <span class="note-list-time">
+                    <?= /* @noEscape */ $block->formatTime($_comment->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?>
+                </span>
                 <span class="note-list-customer">
                     <?= $block->escapeHtml(__('Customer')) ?>
-                    <?php if ($_comment->getIsCustomerNotified()) : ?>
+                    <?php if ($_comment->getIsCustomerNotified()): ?>
                         <span class="note-list-customer-notified"><?= $block->escapeHtml(__('Notified')) ?></span>
-                    <?php else : ?>
-                        <span class="note-list-customer-not-notified"><?= $block->escapeHtml(__('Not Notified')) ?></span>
+                    <?php else: ?>
+                        <span class="note-list-customer-not-notified">
+                            <?= $block->escapeHtml(__('Not Notified')) ?>
+                        </span>
                     <?php endif; ?>
                 </span>
-                <div class="note-list-comment"><?= $block->escapeHtml($_comment->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?></div>
+                <div class="note-list-comment">
+                    <?= $block->escapeHtml($_comment->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?>
+                </div>
             </li>
         <?php endforeach; ?>
     </ul>
 </div>
-<script>
+    <?php $scriptString = <<<script
 require(['prototype'], function(){
     submitComment = function() {
-        submitAndReloadArea($('comments_block').parentNode, '<?= $block->escapeUrl($block->getSubmitUrl()) ?>')
+        submitAndReloadArea($('comments_block').parentNode, '{$block->escapeJs($block->getSubmitUrl())}')
     };
     if ($('submit_comment_button')) {
         $('submit_comment_button').observe('click', submitComment);
     }
 });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml
index e29c1d2db01ce..017cae0b95f93 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($block->hasMethods()) : ?>
+<?php if ($block->hasMethods()): ?>
 <div id="order-billing_method_form">
     <dl class="admin__payment-methods control">
     <?php
@@ -13,23 +15,23 @@
         $_counter = 0;
         $currentSelectedMethod = $block->getSelectedMethodCode();
     ?>
-    <?php foreach ($_methods as $_method) :
+    <?php foreach ($_methods as $_method):
         $_code = $_method->getCode();
         $_counter++;
         ?>
         <dt class="admin__field-option">
-        <?php if ($_methodsCount > 1) : ?>
+        <?php if ($_methodsCount > 1): ?>
             <input id="p_method_<?= $block->escapeHtmlAttr($_code); ?>"
                    value="<?= $block->escapeHtmlAttr($_code); ?>"
                    type="radio" name="payment[method]"
                    title="<?= $block->escapeHtmlAttr($_method->getTitle()); ?>"
                    onclick="payment.switchMethod('<?= $block->escapeJs($_code); ?>')"
-                    <?php if ($currentSelectedMethod == $_code) : ?>
+                    <?php if ($currentSelectedMethod == $_code): ?>
                     checked="checked"
                     <?php endif; ?>
                    data-validate="{'validate-one-required-by-name':true}"
                    class="admin__control-radio"/>
-        <?php else :?>
+        <?php else:?>
             <span class="no-display">
                 <input id="p_method_<?= $block->escapeHtmlAttr($_code); ?>"
                        value="<?= $block->escapeHtmlAttr($_code); ?>"
@@ -49,19 +51,30 @@
     <?php endforeach; ?>
     </dl>
 </div>
-    <script>
+    <?php $scriptString = <<<script
         require([
             'mage/apply/main',
             'Magento_Sales/order/create/form'
         ], function(mage) {
             mage.apply();
-        <?php if ($_methodsCount !== 1) : ?>
-            order.setPaymentMethod('<?= $block->escapeJs($currentSelectedMethod); ?>');
-        <?php else : ?>
-            payment.switchMethod('<?= $block->escapeJs($currentSelectedMethod); ?>');
-        <?php endif; ?>
+
+script;
+    if ($_methodsCount !== 1):
+        $scriptString .= <<<script
+            order.setPaymentMethod('{$block->escapeJs($currentSelectedMethod)}');
+script;
+    else:
+        $scriptString .= <<<script
+            payment.switchMethod('{$block->escapeJs($currentSelectedMethod)}');
+script;
+    endif;
+    $scriptString .= <<<script
+
         });
-    </script>
-<?php else : ?>
+
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+<?php else: ?>
     <div class="admin__message-empty"><?= $block->escapeHtml(__('No Payment Methods')); ?></div>
 <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml
index dfa6b5e6fff79..ae3d8831d276f 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml
@@ -4,11 +4,16 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Sales\Block\Adminhtml\Order\Create\Comment $block */
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Comment $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 
 <div class="admin__field field-comment">
-    <label for="order-comment" class="admin__field-label"><span><?= $block->escapeHtml(__('Order Comments')) ?></span></label>
+    <label for="order-comment" class="admin__field-label">
+        <span><?= $block->escapeHtml(__('Order Comments')) ?></span>
+    </label>
     <div class="admin__field-control">
         <textarea
             id="order-comment"
@@ -16,8 +21,10 @@
             class="admin__control-textarea"><?= $block->escapeHtml($block->getCommentNote()) ?></textarea>
     </div>
 </div>
-<script>
+<?php $scriptString = <<<script
     require(["Magento_Sales/order/create/form"], function(){
         order.commentFieldsBind('order-comment')
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml
index 87ef29c7d42ed..156ee072c762d 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml
@@ -5,31 +5,40 @@
  */
 ?>
 <?php
-/* @var \Magento\Sales\Block\Adminhtml\Order\Create\Coupons $block */
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Coupons $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <div class="admin__field field-apply-coupon-code">
     <label class="admin__field-label"><span><?= $block->escapeHtml(__('Apply Coupon Code')) ?></span></label>
     <div class="admin__field-control">
-        <?php if (!$block->getCouponCode()) : ?>
+        <?php if (!$block->getCouponCode()): ?>
         <input type="text" class="admin__control-text" id="coupons:code" value="" name="coupon_code" />
             <?= $block->getButtonHtml(__('Apply'), 'order.handleOnclickCoupon($F(\'coupons:code\'))') ?>
         <?php endif; ?>
-        <?php if ($block->getCouponCode()) : ?>
+        <?php if ($block->getCouponCode()): ?>
         <p class="added-coupon-code">
             <span><?= $block->escapeHtml($block->getCouponCode()) ?></span>
-            <a href="#" onclick="order.applyCoupon(''); return false;" title="<?= $block->escapeHtmlAttr(__('Remove Coupon Code')) ?>"
+            <a href="#" title="<?= $block->escapeHtmlAttr(__('Remove Coupon Code')) ?>"
                class="action-remove"><span><?= $block->escapeHtml(__('Remove')) ?></span></a>
         </p>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "order.applyCoupon(''); return false;",
+                'p.added-coupon-code a.action-remove'
+            ) ?>
         <?php endif; ?>
-        <script>
+        <?php $isVirtual = ($block->getQuote()->isVirtual() ? 'false' : 'true');
+        $scriptString = <<<script
             require([
                 "jquery",
                 'Magento_Ui/js/modal/alert',
                 'mage/translate',
                 "Magento_Sales/order/create/form"
             ], function($, alert) {
-                order.overlay('shipping-method-overlay', <?php if ($block->getQuote()->isVirtual()) : ?>false<?php else : ?>true<?php endif; ?>);
-                order.overlay('address-shipping-overlay', <?php if ($block->getQuote()->isVirtual()) : ?>false<?php else : ?>true<?php endif; ?>);
+                order.overlay('shipping-method-overlay', {$isVirtual});
+                order.overlay('address-shipping-overlay', {$isVirtual});
                 order.handleOnclickCoupon = function (code) {
                     if (!code) {
                         alert({
@@ -40,6 +49,8 @@
                     }
                 };
             });
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
 </div>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
index f5edf0949374b..1ee83cdd62db9 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
@@ -5,22 +5,33 @@
  */
 
 /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Data $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="page-create-order">
-    <script>
+    <?php $scriptString = <<<script
     require(["Magento_Sales/order/create/form"], function(){
-        order.setCurrencySymbol('<?= $block->escapeJs($block->getCurrencySymbol($block->getCurrentCurrencyCode())) ?>')
+        order.setCurrencySymbol('{$block->escapeJs($block->getCurrencySymbol($block->getCurrentCurrencyCode()))}')
     });
-</script>
-    <div class="order-details<?php if ($block->getCustomerId()) : ?> order-details-existing-customer<?php endif; ?>">
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+    <div class="order-details<?php if ($block->getCustomerId()): ?> order-details-existing-customer<?php endif; ?>">
 
-        <div id="order-additional_area" style="display: none" class="admin__page-section order-additional-area">
+        <div id="order-additional_area" class="admin__page-section order-additional-area">
             <?= $block->getChildHtml('additional_area') ?>
         </div>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display:none',
+            'div#order-additional_area'
+        ) ?>
 
-        <div id="order-search" style="display: none" class="admin__page-section order-search-items">
+        <div id="order-search" class="admin__page-section order-search-items">
             <?= $block->getChildHtml('search') ?>
         </div>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display:none',
+            'div#order-search'
+        ) ?>
 
         <section id="order-items" class="admin__page-section order-items" data-mage-init='{"loader": {}}'>
             <?= $block->getChildHtml('items') ?>
@@ -60,7 +71,7 @@
             </div>
         </section>
 
-        <?php if ($block->getChildBlock('card_validation')) : ?>
+        <?php if ($block->getChildBlock('card_validation')): ?>
         <section id="order-card_validation" class="admin__page-section order-card-validation">
             <?= $block->getChildHtml('card_validation') ?>
         </section>
@@ -85,7 +96,7 @@
         </section>
     </div>
 
-    <?php if ($block->getCustomerId()) : ?>
+    <?php if ($block->getCustomerId()): ?>
         <div class="order-sidebar">
             <div class="store-switcher order-currency">
                 <label class="admin__field-label" for="currency_switcher">
@@ -93,14 +104,22 @@
                 </label>
                 <select id="currency_switcher"
                         class="admin__control-select"
-                        name="order[currency]"
-                        onchange="order.setCurrencyId(this.value); order.setCurrencySymbol(this.options[this.selectedIndex].getAttribute('symbol'));">
-                    <?php foreach ($block->getAvailableCurrencies() as $_code) : ?>
-                        <option value="<?= $block->escapeHtmlAttr($_code) ?>"<?php if ($_code == $block->getCurrentCurrencyCode()) : ?> selected="selected"<?php endif; ?> symbol="<?= $block->escapeHtmlAttr($block->getCurrencySymbol($_code)) ?>">
+                        name="order[currency]">
+                    <?php foreach ($block->getAvailableCurrencies() as $_code): ?>
+                        <option value="<?= $block->escapeHtmlAttr($_code) ?>"
+                            <?php if ($_code == $block->getCurrentCurrencyCode()): ?> selected="selected"<?php endif; ?>
+                                symbol="<?= $block->escapeHtmlAttr($block->getCurrencySymbol($_code)) ?>">
                             <?= $block->escapeHtml($block->getCurrencyName($_code)) ?>
                         </option>
                     <?php endforeach; ?>
                 </select>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onchange',
+                    "order.setCurrencyId(this.value);
+                     order.setCurrencySymbol(this.options[this.selectedIndex].getAttribute('symbol'));",
+                    'select#currency_switcher'
+                ) ?>
+
             </div>
             <div class="customer-current-activity" id="order-sidebar">
                 <?= $block->getChildHtml('sidebar') ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
index c38acb9b79e47..4f1ee1f93c02c 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
@@ -5,19 +5,34 @@
  */
 
 /** @var \Magento\Sales\Block\Adminhtml\Order\Create\Form $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<form id="edit_form" data-order-config='<?= $block->escapeHtml($block->getOrderDataJson()) ?>' data-load-base-url="<?= $block->escapeUrl($block->getLoadBlockUrl()) ?>" action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" enctype="multipart/form-data">
+<form id="edit_form" data-order-config='<?= $block->escapeHtml($block->getOrderDataJson()) ?>'
+      data-load-base-url="<?= $block->escapeUrl($block->getLoadBlockUrl()) ?>"
+      action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" enctype="multipart/form-data">
     <?= $block->getBlockHtml('formkey') ?>
     <div id="order-message">
         <?= $block->getChildHtml('message') ?>
     </div>
-    <div id="order-customer-selector" class="fieldset-wrapper order-customer-selector" style="display:<?= /* @noEscape */ $block->getCustomerSelectorDisplay() ?>">
+    <div id="order-customer-selector" class="fieldset-wrapper order-customer-selector">
         <?= $block->getChildHtml('customer.grid.container') ?>
     </div>
-    <div id="order-store-selector" class="fieldset-wrapper" style="display:<?= /* @noEscape */ $block->getStoreSelectorDisplay() ?>">
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display:' . /* @noEscape */ $block->getCustomerSelectorDisplay(),
+        'div#order-customer-selector'
+    ) ?>
+    <div id="order-store-selector" class="fieldset-wrapper">
         <?= $block->getChildHtml('store') ?>
     </div>
-    <div id="order-data" style="display:<?= /* @noEscape */ $block->getDataSelectorDisplay() ?>">
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display:' . /* @noEscape */ $block->getStoreSelectorDisplay(),
+        'div#order-store-selector'
+    ) ?>
+    <div id="order-data">
         <?= $block->getChildHtml('data') ?>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display:' . /* @noEscape */ $block->getDataSelectorDisplay(),
+        'div#order-data'
+    ) ?>
 </form>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/account.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/account.phtml
index 85ca9c8159bcc..39303568f8899 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/account.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/account.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Form\Account */
+/**
+ * @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Form\Account
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 
 <div class="admin__page-section-title <?= $block->escapeHtmlAttr($block->getHeaderCssClass()) ?>">
@@ -14,9 +17,10 @@
 <div id="customer_account_fields" class="admin__page-section-content">
     <?= $block->getForm()->getHtml() ?>
 </div>
-
-<script>
+<?php $scriptString = <<<script
     require(["prototype", "Magento_Sales/order/create/form"], function(){
         order.accountFieldsBind($('customer_account_fields'));
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml
index 5ce001474f5f5..936c8ec41337d 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address $block */
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 /**
  * @var \Magento\Customer\Model\ResourceModel\Address\Collection $addressCollection
@@ -12,7 +15,7 @@
 $addressCollection = $block->getData('customerAddressCollection');
 
 $addressArray = [];
-if ($block->getCustomerId()) :
+if ($block->getCustomerId()):
     $addressArray = $addressCollection->setCustomerFilter([$block->getCustomerId()])->toArray();
 endif;
 
@@ -22,28 +25,34 @@ endif;
 $customerAddressFormatter = $block->getData('customerAddressFormatter');
 
 /**
- * @var \Magento\Sales\Block\Adminhtml\Order\Create\Billing\Address|\Magento\Sales\Block\Adminhtml\Order\Create\Shipping\Address $block
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Billing\Address|
+ * \Magento\Sales\Block\Adminhtml\Order\Create\Shipping\Address $block
  */
-if ($block->getIsShipping()) :
+if ($block->getIsShipping()):
     $_fieldsContainerId = 'order-shipping_address_fields';
     $_addressChoiceContainerId = 'order-shipping_address_choice';
-    ?>
-    <script>
+
+    $addressCollectionJson = /* @noEscape  */ $block->getAddressCollectionJson();
+    $scriptString= <<<script
     require(["Magento_Sales/order/create/form"], function(){
-        order.shippingAddressContainer = '<?= $block->escapeJs($_fieldsContainerId) ?>';
-        order.setAddresses(<?= /* @noEscape  */ $block->getAddressCollectionJson() ?>);
+        order.shippingAddressContainer = '{$block->escapeJs($_fieldsContainerId)}';
+        order.setAddresses({$addressCollectionJson});
     });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     <?php
-else :
+else:
     $_fieldsContainerId = 'order-billing_address_fields';
     $_addressChoiceContainerId = 'order-billing_address_choice';
     ?>
-    <script>
+    <?php $scriptString = <<<script
         require(["Magento_Sales/order/create/form"], function(){
-            order.billingAddressContainer = '<?= $block->escapeJs($_fieldsContainerId) ?>';
+            order.billingAddressContainer = '{$block->escapeJs($_fieldsContainerId)}';
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     <?php
 endif; ?>
 
@@ -52,33 +61,47 @@ endif; ?>
         <span><?= $block->escapeHtml($block->getHeaderText()) ?></span>
     </legend><br>
 
-    <fieldset id="<?= $block->escapeHtmlAttr($_addressChoiceContainerId) ?>" class="admin__fieldset order-choose-address">
-    <?php if ($block->getIsShipping()) : ?>
+    <fieldset id="<?= $block->escapeHtmlAttr($_addressChoiceContainerId) ?>"
+              class="admin__fieldset order-choose-address">
+    <?php if ($block->getIsShipping()): ?>
         <div class="admin__field admin__field-option admin__field-shipping-same-as-billing">
             <input type="checkbox" id="order-shipping_same_as_billing" name="shipping_same_as_billing"
-                   onclick="order.setShippingAsBilling(this.checked)" class="admin__control-checkbox"
-                   <?php if ($block->getIsAsBilling()) : ?>checked<?php endif; ?> />
+                   class="admin__control-checkbox"
+                   <?php if ($block->getIsAsBilling()): ?>checked<?php endif; ?> />
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "order.setShippingAsBilling(this.checked)",
+                'input#order-shipping_same_as_billing'
+            ) ?>
             <label for="order-shipping_same_as_billing" class="admin__field-label">
                 <?= $block->escapeHtml(__('Same As Billing Address')) ?>
             </label>
         </div>
     <?php endif; ?>
         <div class="admin__field admin__field-select-from-existing-address">
-            <label class="admin__field-label"><?= $block->escapeHtml(__('Select from existing customer addresses:')) ?></label>
+            <label class="admin__field-label">
+                <?= $block->escapeHtml(__('Select from existing customer addresses:')) ?>
+            </label>
             <?php $_id = $block->getForm()->getHtmlIdPrefix() . 'customer_address_id' ?>
             <div class="admin__field-control">
                 <select id="<?= $block->escapeHtmlAttr($_id) ?>"
-                        name="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlNamePrefix()) ?>[customer_address_id]"
-                        onchange="order.selectAddress(this, '<?= $block->escapeJs($_fieldsContainerId) ?>')"
+                        name="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlNamePrefix())
+                        ?>[customer_address_id]"
                         class="admin__control-select">
                     <option value=""><?= $block->escapeHtml(__('Add New Address')) ?></option>
-                    <?php foreach ($addressArray as $addressId => $address) : ?>
+                    <?php foreach ($addressArray as $addressId => $address): ?>
                         <option
-                            value="<?= $block->escapeHtmlAttr($addressId) ?>"<?php if ($addressId == $block->getAddressId()) : ?> selected="selected"<?php endif; ?>>
+                            value="<?= $block->escapeHtmlAttr($addressId) ?>"
+                            <?php if ($addressId == $block->getAddressId()): ?> selected="selected"<?php endif; ?>>
                             <?= $block->escapeHtml($customerAddressFormatter->getAddressAsString($address)) ?>
                         </option>
                     <?php endforeach; ?>
                 </select>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onchange',
+                    "order.selectAddress(this, '" . $block->escapeJs($_fieldsContainerId) . "')",
+                    'select#' . $block->escapeHtmlAttr($_id)
+                ) ?>
             </div>
         </div>
     </fieldset>
@@ -87,23 +110,40 @@ endif; ?>
         <?= $block->getForm()->toHtml() ?>
 
         <div class="admin__field admin__field-option order-save-in-address-book">
-            <input name="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlNamePrefix()) ?>[save_in_address_book]" type="checkbox" id="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlIdPrefix()) ?>save_in_address_book" value="1"<?php if (!$block->getDontSaveInAddressBook()) : ?> checked="checked"<?php endif; ?> class="admin__control-checkbox"/>
+            <input name="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlNamePrefix()) ?>[save_in_address_book]"
+                   type="checkbox"
+                   id="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlIdPrefix()) ?>save_in_address_book"
+                   value="1"
+                <?php if (!$block->getDontSaveInAddressBook()): ?> checked="checked"<?php endif; ?>
+                   class="admin__control-checkbox"/>
             <label for="<?= $block->escapeHtmlAttr($block->getForm()->getHtmlIdPrefix()) ?>save_in_address_book"
                    class="admin__field-label"><?= $block->escapeHtml(__('Save in address book')) ?></label>
         </div>
     </div>
     <?php $hideElement = 'address-' . ($block->getIsShipping() ? 'shipping' : 'billing') . '-overlay'; ?>
-    <div style="display: none;" id="<?= /* @noEscape */ $hideElement ?>" class="order-methods-overlay">
+    <div id="<?= /* @noEscape */ $hideElement ?>" class="order-methods-overlay">
         <span><?= $block->escapeHtml(__('You don\'t need to select a shipping address.')) ?></span>
     </div>
-
-    <script>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "display: none;",
+        'div#' . /* @noEscape */ $hideElement
+    ) ?>
+    <?php $scriptString = <<<script
         require(["Magento_Sales/order/create/form"], function(){
-            order.bindAddressFields('<?= $block->escapeJs($_fieldsContainerId) ?>');
-            order.bindAddressFields('<?= $block->escapeJs($_addressChoiceContainerId) ?>');
-            <?php if ($block->getIsShipping() && $block->getIsAsBilling()) : ?>
+            order.bindAddressFields('{$block->escapeJs($_fieldsContainerId)}');
+            order.bindAddressFields('{$block->escapeJs($_addressChoiceContainerId)}');
+
+script;
+    if ($block->getIsShipping() && $block->getIsAsBilling()):
+                $scriptString .= <<<script
             order.disableShippingAddress(true);
-            <?php endif; ?>
+
+script;
+            endif;
+            $scriptString .= <<<script
         });
-    </script>
+
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </fieldset>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml
index d27782fd20b15..baf283e673e40 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml
@@ -4,25 +4,37 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
-/** @var \Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage $block */
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Giftmessage $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+?>
+<?php /** @var \Magento\GiftMessage\Helper\Message $giftMessageHelper */
+$giftMessageHelper = $block->getData('giftMessageHelper');
 ?>
-<?php if ($this->helper(\Magento\GiftMessage\Helper\Message::class)->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())) : ?>
+<?php if ($giftMessageHelper->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())): ?>
     <?php $_items = $block->getItems(); ?>
     <div id="order-giftmessage" class="giftmessage-order-create">
         <fieldset class="admin__fieldset">
-            <legend class="admin__legend"><span><?= $block->escapeHtml(__('Gift Message for the Entire Order')) ?></span></legend>
+            <legend class="admin__legend">
+                <span><?= $block->escapeHtml(__('Gift Message for the Entire Order')) ?></span>
+            </legend>
             <br>
-            <?php if ($this->helper(\Magento\GiftMessage\Helper\Message::class)->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())) : ?>
-                <p><?= $block->escapeHtml(__('Leave this box blank if you don\'t want to leave a gift message for the entire order.')) ?></p>
+            <?php if ($giftMessageHelper->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())): ?>
+                <p>
+                    <?= $block->escapeHtml(
+                        __('Leave this box blank if you don\'t want to leave a gift message for the entire order.')
+                    ) ?>
+                </p>
                 <?= $block->getFormHtml($block->getQuote(), 'main') ?>
             <?php endif; ?>
         </fieldset>
-        <script>
+        <?php $scriptString = <<<script
         require(['Magento_Sales/order/create/form'], function(){
             order.giftmessageFieldsBind('order-giftmessage');
         });
-        </script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
 <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
index eee167dde50d6..c942d9dd96fe1 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
@@ -4,16 +4,19 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
 ?>
 <?php
 /**
  * @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
+
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper =$block->getData('catalogHelper');
 ?>
 
 <?php $_items = $block->getItems() ?>
-<?php if (empty($_items)) : ?>
+<?php if (empty($_items)): ?>
     <div id="order-items_grid">
         <div class="admin__table-wrapper">
             <table class="data-table admin__table-primary order-tables">
@@ -36,9 +39,9 @@
             </table>
         </div>
     </div>
-<?php else : ?>
+<?php else: ?>
     <div class="admin__table-wrapper" id="order-items_grid">
-    <?php if (count($_items) > 10) : ?>
+    <?php if (count($_items) > 10): ?>
         <div class="actions update actions-update">
             <?= $block->getButtonHtml(__('Update Items and Quantities'), 'order.itemsUpdate()', 'action-secondary') ?>
         </div>
@@ -59,21 +62,32 @@
                 <tr>
                     <td class="col-total"><?= $block->escapeHtml(__('Total %1 product(s)', count($_items))) ?></td>
                     <td colspan="2" class="col-subtotal"><?= $block->escapeHtml(__('Subtotal:')) ?></td>
-                    <td class="col-price"><strong><?= /* @noEscape */ $block->formatPrice($block->getSubtotal()) ?></strong></td>
-                    <td class="col-price"><strong><?= /* @noEscape */ $block->formatPrice($block->getDiscountAmount()) ?></strong></td>
-                    <td class="col-price"><strong><?= /* @noEscape */ $block->formatPrice($block->getSubtotalWithDiscount()); ?></strong></td>
+                    <td class="col-price">
+                        <strong><?= /* @noEscape */ $block->formatPrice($block->getSubtotal()) ?></strong>
+                    </td>
+                    <td class="col-price">
+                        <strong><?= /* @noEscape */ $block->formatPrice($block->getDiscountAmount()) ?></strong>
+                    </td>
+                    <td class="col-price">
+                        <strong><?= /* @noEscape */ $block->formatPrice($block->getSubtotalWithDiscount()); ?></strong>
+                    </td>
                     <td colspan="2"> </td>
                 </tr>
             </tfoot>
                 <?php $i = 0 ?>
-                <?php foreach ($_items as $_item) : $i++ ?>
+                <?php foreach ($_items as $_item): $i++ ?>
                 <tbody class="<?= /* @noEscape */ ($i%2) ? 'even' : 'odd' ?>">
                     <tr>
                         <td class="col-product">
-                            <span id="order_item_<?= (int) $_item->getId() ?>_title"><?= $block->escapeHtml($_item->getName()) ?></span>
+                            <span id="order_item_<?= (int) $_item->getId() ?>_title">
+                                <?= $block->escapeHtml($_item->getName()) ?>
+                            </span>
                             <div class="product-sku-block">
                                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                                <?= /* @noEscape */ implode('<br />', $this->helper(\Magento\Catalog\Helper\Data::class)->splitSku($block->escapeHtml($_item->getSku()))) ?>
+                                <?= /* @noEscape */ implode(
+                                    '<br />',
+                                    $catalogHelper->splitSku($block->escapeHtml($_item->getSku()))
+                                ) ?>
                             </div>
                             <div class="product-configure-block">
                                 <?= $block->getConfigureButtonHtml($_item) ?>
@@ -84,19 +98,39 @@
                             <?= $block->getItemUnitPriceHtml($_item) ?>
 
                             <?php $_isCustomPrice = $block->usedCustomPriceForItem($_item) ?>
-                            <?php if ($_tier = $block->getTierHtml($_item)) : ?>
-                            <div id="item_tier_block_<?= (int) $_item->getId() ?>"<?php if ($_isCustomPrice) : ?> style="display:none"<?php endif; ?>>
-                                <a href="#" onclick="$('item_tier_<?= (int) $_item->getId() ?>').toggle();return false;"><?= $block->escapeHtml(__('Tier Pricing')) ?></a>
-                                <div style="display:none" id="item_tier_<?= (int) $_item->getId() ?>"><?= /* @noEscape */ $_tier ?></div>
+                            <?php if ($_tier = $block->getTierHtml($_item)): ?>
+                            <div id="item_tier_block_<?= (int) $_item->getId() ?>">
+                                <a href="#"><?= $block->escapeHtml(__('Tier Pricing')) ?></a>
+                                <div id="item_tier_<?= (int) $_item->getId() ?>"><?= /* @noEscape */ $_tier ?></div>
+                                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                    "display:none",
+                                    'div#item_tier_' . (int) $_item->getId()
+                                ) ?>
                             </div>
+                                <?php if ($_isCustomPrice): ?>
+                                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                        "display:none",
+                                        'div#item_tier_block_' . (int) $_item->getId()
+                                    ) ?>
+                                <?php endif; ?>
+                                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                    'onclick',
+                                    "$('item_tier_<?= (int) $_item->getId() ?>').toggle();return false;",
+                                    'div#item_tier_block_' . (int) $_item->getId() . ' a'
+                                ) ?>
                             <?php endif; ?>
-                            <?php if ($block->canApplyCustomPrice($_item)) : ?>
+                            <?php if ($block->canApplyCustomPrice($_item)): ?>
                                 <div class="custom-price-block">
                                     <input type="checkbox"
                                            class="admin__control-checkbox"
                                            id="item_use_custom_price_<?= (int) $_item->getId() ?>"
-                                           <?php if ($_isCustomPrice) : ?> checked="checked"<?php endif; ?>
-                                           onclick="order.toggleCustomPrice(this, 'item_custom_price_<?= (int) $_item->getId() ?>', 'item_tier_block_<?= (int) $_item->getId() ?>');"/>
+                                           <?php if ($_isCustomPrice): ?> checked="checked"<?php endif; ?> />
+                                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                        'onclick',
+                                        "order.toggleCustomPrice(this, 'item_custom_price_" . (int) $_item->getId() .
+                                        "', 'item_tier_block_" . (int) $_item->getId() . "');",
+                                        'input#item_use_custom_price_' . (int) $_item->getId()
+                                    ) ?>
                                     <label
                                         class="normal admin__field-label"
                                         for="item_use_custom_price_<?= (int) $_item->getId() ?>">
@@ -106,11 +140,14 @@
                             <input id="item_custom_price_<?= (int) $_item->getId() ?>"
                                 name="item[<?= (int) $_item->getId() ?>][custom_price]"
                                 value="<?= /* @noEscape */ sprintf("%.2f", $block->getOriginalEditablePrice($_item)) ?>"
-                                <?php if (!$_isCustomPrice) : ?>
-                                style="display:none"
+                                <?php if (!$_isCustomPrice): ?>
                                 disabled="disabled"
                                 <?php endif; ?>
                                 class="input-text item-price admin__control-text"/>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                "display:none",
+                                'input#item_custom_price_' . (int) $_item->getId()
+                            ) ?>
                         </td>
                         <td class="col-qty">
                             <input name="item[<?= (int) $_item->getId() ?>][qty]"
@@ -127,7 +164,7 @@
                                 <input id="item_use_discount_<?= (int) $_item->getId() ?>"
                                        class="admin__control-checkbox"
                                        name="item[<?= (int) $_item->getId() ?>][use_discount]"
-                                       <?php if (!$_item->getNoDiscount()) : ?>checked="checked"<?php endif; ?>
+                                       <?php if (!$_item->getNoDiscount()): ?>checked="checked"<?php endif; ?>
                                        value="1"
                                        type="checkbox" />
                                 <label
@@ -144,16 +181,19 @@
                             <select class="admin__control-select" name="item[<?= (int) $_item->getId() ?>][action]">
                                 <option value=""><?= $block->escapeHtml(__('Please select')) ?></option>
                                 <option value="remove"><?= $block->escapeHtml(__('Remove')) ?></option>
-                                <?php if ($block->getCustomerId() && $block->getMoveToCustomerStorage()) : ?>
+                                <?php if ($block->getCustomerId() && $block->getMoveToCustomerStorage()): ?>
                                     <option value="cart"><?= $block->escapeHtml(__('Move to Shopping Cart')) ?></option>
-                                    <?php if ($block->isMoveToWishlistAllowed($_item)) : ?>
+                                    <?php if ($block->isMoveToWishlistAllowed($_item)): ?>
                                         <?php $wishlists = $block->getCustomerWishlists();?>
-                                        <?php if (count($wishlists) <= 1) : ?>
-                                            <option value="wishlist"><?= $block->escapeHtml(__('Move to Wish List')) ?></option>
-                                        <?php else : ?>
+                                        <?php if (count($wishlists) <= 1): ?>
+                                            <option value="wishlist"><?= $block->escapeHtml(__('Move to Wish List')) ?>
+                                            </option>
+                                        <?php else: ?>
                                             <optgroup label="<?= $block->escapeHtml(__('Move to Wish List')) ?>">
-                                                <?php foreach ($wishlists as $wishlist) :?>
-                                                    <option value="wishlist_<?= (int) $wishlist->getId() ?>"><?= $block->escapeHtml($wishlist->getName()) ?></option>
+                                                <?php foreach ($wishlists as $wishlist):?>
+                                                    <option value="wishlist_<?= (int) $wishlist->getId() ?>">
+                                                        <?= $block->escapeHtml($wishlist->getName()) ?>
+                                                    </option>
                                                 <?php endforeach;?>
                                             </optgroup>
                                         <?php endif; ?>
@@ -164,21 +204,22 @@
                     </tr>
 
                     <?php $hasMessageError = false; ?>
-                    <?php foreach ($_item->getMessage(false) as $messageError) : ?>
-                        <?php if (!empty($messageError)) :
+                    <?php foreach ($_item->getMessage(false) as $messageError): ?>
+                        <?php if (!empty($messageError)):
                             $hasMessageError = true;
                         endif; ?>
                     <?php endforeach; ?>
 
-                    <?php if ($hasMessageError) : ?>
+                    <?php if ($hasMessageError): ?>
                         <tr class="row-messages-error">
                             <td colspan="100"> <!-- ToDo UI: remove the 100 -->
-                                <?php foreach ($_item->getMessage(false) as $message) :
+                                <?php foreach ($_item->getMessage(false) as $message):
                                     if (empty($message)) {
                                         continue;
                                     }
                                     ?>
-                                    <div class="message <?php if ($_item->getHasError()) : ?>message-error<?php else : ?>message-notice<?php endif; ?>">
+                                    <div class="message <?php if ($_item->getHasError()): ?>message-error<?php else:
+                                        ?>message-notice<?php endif; ?>">
                                         <?= $block->escapeHtml($message) ?>
                                     </div>
                                 <?php endforeach; ?>
@@ -198,15 +239,17 @@
         <div id="order-coupons" class="order-coupons"><?= $block->getChildHtml() ?></div>
     </div>
 
-    <script>
+    <?php $scriptString = <<<script
         require([
             'Magento_Sales/order/create/form'
         ], function(){
             order.itemsOnchangeBind()
         });
-    </script>
-    <?php if ($block->isGiftMessagesAvailable()) : ?>
-        <script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+    <?php if ($block->isGiftMessagesAvailable()): ?>
+        <?php $scriptString = <<<script
         require([
             "prototype",
             "Magento_Sales/order/giftoptions_tooltip"
@@ -241,6 +284,9 @@
         //]]>
 
         });
-        </script>
+
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     <?php endif; ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/js.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/js.phtml
index eb39f71265cd6..0eb3caac12318 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/js.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/js.phtml
@@ -3,8 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
+
 require([
     "prototype",
     "Magento_Sales/order/create/form",
@@ -14,11 +18,14 @@ require([
     order.sidebarHide();
     if (window.productConfigure) {
         productConfigure.addListType('product_to_add', {
-            urlFetch: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('sales/order_create/configureProductToAdd'))) ?>'
+            urlFetch: '{$block->escapeJs($block->getUrl('sales/order_create/configureProductToAdd'))}'
         });
         productConfigure.addListType('quote_items', {
-            urlFetch: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('sales/order_create/configureQuoteItems'))) ?>'
+            urlFetch: '{$block->escapeJs($block->getUrl('sales/order_create/configureQuoteItems'))}'
         });
     }
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
index baaf4c078f2c7..d55b75103c7e3 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
@@ -4,40 +4,57 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
+/**
+ * @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Shipping\Method\Form
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+?>
+<?php
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
 ?>
-<?php /** @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Shipping\Method\Form */ ?>
 <?php $_shippingRateGroups = $block->getShippingRates(); ?>
-<?php if ($_shippingRateGroups) : ?>
-    <div id="order-shipping-method-choose" class="control" style="display:none">
+<?php if ($_shippingRateGroups): ?>
+    <div id="order-shipping-method-choose" class="control">
         <dl class="admin__order-shipment-methods">
-        <?php foreach ($_shippingRateGroups as $code => $_rates) : ?>
-            <dt class="admin__order-shipment-methods-title"><?= $block->escapeHtml($block->getCarrierName($code)) ?></dt>
+        <?php foreach ($_shippingRateGroups as $code => $_rates): ?>
+            <dt class="admin__order-shipment-methods-title"><?= $block->escapeHtml($block->getCarrierName($code)) ?>
+            </dt>
             <dd class="admin__order-shipment-methods-options">
                 <ul class="admin__order-shipment-methods-options-list">
-                <?php foreach ($_rates as $_rate) : ?>
-                    <?php $_radioProperty = 'name="order[shipping_method]" type="radio" onclick="order.setShippingMethod(this.value)"' ?>
+                <?php foreach ($_rates as $_rate): ?>
+                    <?php $_radioProperty = 'name="order[shipping_method]" type="radio"' ?>
                     <?php $_code = $_rate->getCode() ?>
                     <li class="admin__field-option">
-                        <?php if ($_rate->getErrorMessage()) : ?>
+                        <?php if ($_rate->getErrorMessage()): ?>
                             <div class="messages">
                                <div class="message message-error error">
                                    <div><?= $block->escapeHtml($_rate->getErrorMessage()) ?></div>
                                </div>
                             </div>
-                        <?php else : ?>
+                        <?php else: ?>
                             <?php $_checked = $block->isMethodActive($_code) ? 'checked="checked"' : '' ?>
-                            <input <?= /* @noEscape */ $_radioProperty ?> value="<?= $block->escapeHtmlAttr($_code) ?>"
-                                                                 id="s_method_<?= $block->escapeHtmlAttr($_code) ?>" <?= /* @noEscape */ $_checked ?>
-                                                                 class="admin__control-radio required-entry"/>
+                            <input <?= /* @noEscape */ $_radioProperty ?>
+                                value="<?= $block->escapeHtmlAttr($_code) ?>"
+                                id="s_method_<?= $block->escapeHtmlAttr($_code) ?>" <?= /* @noEscape */ $_checked ?>
+                                class="admin__control-radio required-entry"/>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                "order.setShippingMethod(this.value)",
+                                'input#s_method_' . $block->escapeHtmlAttr($_code)
+                            ) ?>
                             <label class="admin__field-label" for="s_method_<?= $block->escapeHtmlAttr($_code) ?>">
-                                <?= $block->escapeHtml($_rate->getMethodTitle() ? $_rate->getMethodTitle() : $_rate->getMethodDescription()) ?> -
+                                <?= $block->escapeHtml($_rate->getMethodTitle() ?
+                                    $_rate->getMethodTitle() : $_rate->getMethodDescription()) ?> -
                                 <strong>
-                                    <?php $_excl = $block->getShippingPrice($_rate->getPrice(), $this->helper(\Magento\Tax\Helper\Data::class)->displayShippingPriceIncludingTax()); ?>
+                                    <?php $_excl = $block->getShippingPrice(
+                                        $_rate->getPrice(),
+                                        $taxHelper->displayShippingPriceIncludingTax()
+                                    ); ?>
                                     <?php $_incl = $block->getShippingPrice($_rate->getPrice(), true); ?>
 
                                     <?= /* @noEscape */ $_excl ?>
-                                    <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayShippingBothPrices() && $_incl != $_excl) : ?>
+                                    <?php if ($taxHelper->displayShippingBothPrices() && $_incl != $_excl): ?>
                                         (<?= $block->escapeHtml(__('Incl. Tax')) ?> <?= /* @noEscape */ $_incl ?>)
                                     <?php endif; ?>
                                 </strong>
@@ -50,57 +67,83 @@
         <?php endforeach; ?>
         </dl>
     </div>
-    <?php if ($_rate = $block->getActiveMethodRate()) : ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none", 'div#order-shipping-method-choose') ?>
+    <?php if ($_rate = $block->getActiveMethodRate()): ?>
         <div id="order-shipping-method-info" class="order-shipping-method-info">
             <dl class="admin__order-shipment-methods">
                 <dt class="admin__order-shipment-methods-title">
                     <?= $block->escapeHtml($block->getCarrierName($_rate->getCarrier())) ?>
                 </dt>
                 <dd class="admin__order-shipment-methods-options">
-                    <?= $block->escapeHtml($_rate->getMethodTitle() ? $_rate->getMethodTitle() : $_rate->getMethodDescription()) ?> -
+                    <?= $block->escapeHtml($_rate->getMethodTitle() ?
+                        $_rate->getMethodTitle() : $_rate->getMethodDescription()) ?> -
                     <strong>
-                        <?php $_excl = $block->getShippingPrice($_rate->getPrice(), $this->helper(\Magento\Tax\Helper\Data::class)->displayShippingPriceIncludingTax()); ?>
+                        <?php $_excl = $block->getShippingPrice(
+                            $_rate->getPrice(),
+                            $taxHelper->displayShippingPriceIncludingTax()
+                        ); ?>
                         <?php $_incl = $block->getShippingPrice($_rate->getPrice(), true); ?>
 
                         <?= /* @noEscape */ $_excl ?>
-                        <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayShippingBothPrices() && $_incl != $_excl) : ?>
+                        <?php if ($taxHelper->displayShippingBothPrices() && $_incl != $_excl): ?>
                             (<?= $block->escapeHtml(__('Incl. Tax')) ?> <?= /* @noEscape */ $_incl ?>)
                         <?php endif; ?>
                     </strong>
                 </dd>
             </dl>
             <a href="#"
-               onclick="$('order-shipping-method-info').hide();$('order-shipping-method-choose').show();return false"
                class="action-default">
                 <span><?= $block->escapeHtml(__('Click to change shipping method')) ?></span>
             </a>
         </div>
-    <?php else : ?>
-        <script>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "$('order-shipping-method-info').hide();$('order-shipping-method-choose').show();return false",
+            'div#order-shipping-method-info a.action-default'
+        ) ?>
+    <?php else: ?>
+        <?php $scriptString = <<<script
 require(['prototype'], function(){
     $('order-shipping-method-choose').show();
 });
-</script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     <?php endif; ?>
-<?php elseif ($block->getIsRateRequest()) : ?>
+<?php elseif ($block->getIsRateRequest()): ?>
     <div class="order-shipping-method-summary">
-        <strong class="order-shipping-method-not-available"><?= $block->escapeHtml(__('Sorry, no quotes are available for this order.')) ?></strong>
+        <strong class="order-shipping-method-not-available">
+            <?= $block->escapeHtml(__('Sorry, no quotes are available for this order.')) ?>
+        </strong>
     </div>
-<?php else : ?>
+<?php else: ?>
     <div id="order-shipping-method-summary" class="order-shipping-method-summary">
-        <a href="#" onclick="order.loadShippingRates();return false" class="action-default">
+        <a href="#" class="action-default">
             <span><?= $block->escapeHtml(__('Get shipping methods and rates')) ?></span>
         </a>
         <input type="hidden" name="order[has_shipping]" value="" class="required-entry" />
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        "order.loadShippingRates();return false",
+        'div#order-shipping-method-summary a.action-default'
+    ) ?>
 <?php endif; ?>
-<div style="display: none;" id="shipping-method-overlay" class="order-methods-overlay">
+<div id="shipping-method-overlay" class="order-methods-overlay">
     <span><?= $block->escapeHtml(__('You don\'t need to select a shipping method.')) ?></span>
 </div>
-<script>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#shipping-method-overlay') ?>
+<?php $scriptString = <<<script
     require(["Magento_Sales/order/create/form"], function(){
-        order.overlay('shipping-method-overlay', <?php if ($block->getQuote()->isVirtual()) : ?>false<?php else : ?>true<?php endif; ?>);
-        order.overlay('address-shipping-overlay', <?php if ($block->getQuote()->isVirtual()) : ?>false<?php else : ?>true<?php endif; ?>);
-        order.isOnlyVirtualProduct = <?= /* @noEscape */ $block->getQuote()->isVirtual() ? 'true' : 'false'; ?>;
+
+script;
+$scriptString .= "order.overlay('shipping-method-overlay', " . ($block->getQuote()->isVirtual() ? 'false' : 'true') .
+    ');' . PHP_EOL;
+$scriptString .= "order.overlay('address-shipping-overlay', " . ($block->getQuote()->isVirtual() ? 'false' : 'true') .
+ ');' . PHP_EOL;
+$scriptString .= "order.isOnlyVirtualProduct = " . ($block->getQuote()->isVirtual() ? 'true' : 'false') . ';' . PHP_EOL;
+$scriptString .= <<<script
     });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml
index d4dea4eb85a57..fe8910dc3e956 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar.phtml
@@ -4,15 +4,18 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar $block */
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <div class="customer-current-activity-inner">
     <h4 class="customer-activity-title"><?= $block->escapeHtml(__('Customer\'s Activities')) ?></h4>
     <div class="create-order-sidebar-container">
     <?= $block->getChildHtml('top_button') ?>
-    <?php foreach ($block->getLayout()->getChildBlocks($block->getNameInLayout()) as $_alias => $_child) : ?>
-        <?php if ($_alias != 'top_button' && $_alias != 'bottom_button') : ?>
-            <?php if ($block->canDisplay($_child)) : ?>
+    <?php foreach ($block->getLayout()->getChildBlocks($block->getNameInLayout()) as $_alias => $_child): ?>
+        <?php if ($_alias != 'top_button' && $_alias != 'bottom_button'): ?>
+            <?php if ($block->canDisplay($_child)): ?>
                 <div class="order-sidebar-block" id="order-sidebar_<?= $block->escapeHtmlAttr($_alias) ?>">
                     <?= $block->getChildHtml($_alias) ?>
                 </div>
@@ -22,7 +25,7 @@
     <?= $block->getChildHtml('bottom_button') ?>
     </div>
 </div>
-<script>
+<?php $scriptString = <<<script
 require([
     "prototype",
     "Magento_Catalog/catalog/product/composite/configure"
@@ -30,12 +33,12 @@ require([
 
     function addSidebarCompositeListType() {
         productConfigure.addListType('sidebar', {
-            urlFetch: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('sales/order_create/configureProductToAdd'))) ?>',
-            urlConfirm: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('sales/order_create/addConfigured'))) ?>'
+            urlFetch: '{$block->escapeJs($block->getUrl('sales/order_create/configureProductToAdd'))}',
+            urlConfirm: '{$block->escapeJs($block->getUrl('sales/order_create/addConfigured'))}'
         });
         productConfigure.addListType('sidebar_wishlist', {
-            urlFetch: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('customer/wishlist_product_composite_wishlist/configure'))) ?>',
-            urlConfirm: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('sales/order_create/addConfigured'))) ?>'
+            urlFetch: '{$block->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/configure'))}',
+            urlConfirm: '{$block->escapeJs($block->getUrl('sales/order_create/addConfigured'))}'
         });
     }
 
@@ -55,4 +58,6 @@ require([
 
     window.addSidebarCompositeListType = addSidebarCompositeListType;
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml
index 9a901d99ae8f8..73f53c2eba03e 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Sales\Block\Adminhtml\Order\Create\Totals $block */
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Totals $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <legend class="admin__legend"><span><?= $block->escapeHtml(__('Order Totals')) ?></span></legend>
 <br>
@@ -19,15 +22,19 @@
 <div class="order-totals-actions">
     <div class="admin__field admin__field-option field-append-comments">
         <input type="checkbox" id="notify_customer" name="order[comment][customer_note_notify]"
-               value="1"<?php if ($block->getNoteNotify()) : ?> checked="checked"<?php endif; ?>
+               value="1"<?php if ($block->getNoteNotify()): ?> checked="checked"<?php endif; ?>
                class="admin__control-checkbox"/>
-        <label for="notify_customer" class="admin__field-label"><?= $block->escapeHtml(__('Append Comments')) ?></label>
+        <label for="notify_customer" class="admin__field-label">
+            <?= $block->escapeHtml(__('Append Comments')) ?>
+        </label>
     </div>
-    <?php if ($block->canSendNewOrderConfirmationEmail()) : ?>
+    <?php if ($block->canSendNewOrderConfirmationEmail()): ?>
     <div class="admin__field admin__field-option field-email-order-confirmation">
         <input type="checkbox" id="send_confirmation" name="order[send_confirmation]" value="1" checked="checked"
                class="admin__control-checkbox"/>
-        <label for="send_confirmation" class="admin__field-label"><?= $block->escapeHtml(__('Email Order Confirmation')) ?></label>
+        <label for="send_confirmation" class="admin__field-label">
+            <?= $block->escapeHtml(__('Email Order Confirmation')) ?>
+        </label>
     </div>
     <?php endif; ?>
     <div class="actions">
@@ -35,7 +42,7 @@
     </div>
 </div>
 
-<script>
+<?php $scriptString = <<<script
 require(['prototype'], function(){
 
 //<![CDATA[
@@ -58,4 +65,6 @@ window.notifyCustomerUpdate = notifyCustomerUpdate;
 window.sendEmailCheckbox = sendEmailCheckbox;
 
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

From bc1c08857ba84d025239ead5205460f97d454d2d Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Wed, 29 Apr 2020 13:17:16 +0300
Subject: [PATCH 115/307] MC-33719: [2.4.0][Integration] Test
 Magento.CatalogImportExport.Model.ProductStagingTest.testImportExport with
 data set "simple-product-related" fails on Jenkins

---
 .../Model/AbstractProductExportImportTestCase.php    | 12 ++++++++++++
 .../_files/product_configurable.php                  |  2 +-
 .../_files/product_configurable_12345.php            |  4 ++--
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php
index eecdcdf038cf8..4d4861b4e4eaf 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/AbstractProductExportImportTestCase.php
@@ -68,6 +68,11 @@ abstract class AbstractProductExportImportTestCase extends \PHPUnit\Framework\Te
      */
     private $writer;
 
+    /**
+     * @var string
+     */
+    private $csvFile;
+
     /**
      * @inheritdoc
      */
@@ -87,6 +92,11 @@ protected function setUp()
     protected function tearDown()
     {
         $this->executeFixtures($this->fixtures, true);
+
+        if ($this->csvFile !== null) {
+            $directoryWrite = $this->fileSystem->getDirectoryWrite(DirectoryList::VAR_DIR);
+            $directoryWrite->delete($this->csvFile);
+        }
     }
 
     /**
@@ -104,6 +114,7 @@ protected function tearDown()
      */
     public function testImportExport(array $fixtures, array $skus, array $skippedAttributes = []): void
     {
+        $this->csvFile = null;
         $this->fixtures = $fixtures;
         $this->executeFixtures($fixtures);
         $this->modifyData($skus);
@@ -378,6 +389,7 @@ protected function executeImportReplaceTest(
     private function exportProducts(\Magento\CatalogImportExport\Model\Export\Product $exportProduct = null)
     {
         $csvfile = uniqid('importexport_') . '.csv';
+        $this->csvFile = $csvfile;
 
         $exportProduct = $exportProduct ?: $this->objectManager->create(
             \Magento\CatalogImportExport\Model\Export\Product::class
diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable.php
index 07ecfb5469eb7..4726734712289 100644
--- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable.php
+++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable.php
@@ -21,7 +21,7 @@
 
 /** @var ProductRepositoryInterface $productRepository */
 $productRepository = Bootstrap::getObjectManager()
-    ->create(ProductRepositoryInterface::class);
+    ->get(ProductRepositoryInterface::class);
 
 /** @var $installer CategorySetup */
 $installer = Bootstrap::getObjectManager()->create(CategorySetup::class);
diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_12345.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_12345.php
index 70aa7c07ed536..b16a312488131 100644
--- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_12345.php
+++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_12345.php
@@ -21,7 +21,7 @@
 
 /** @var ProductRepositoryInterface $productRepository */
 $productRepository = Bootstrap::getObjectManager()
-    ->create(ProductRepositoryInterface::class);
+    ->get(ProductRepositoryInterface::class);
 
 /** @var $installer CategorySetup */
 $installer = Bootstrap::getObjectManager()->create(CategorySetup::class);
@@ -105,7 +105,7 @@
 $registry->unregister('isSecureArea');
 $registry->register('isSecureArea', true);
 try {
-    $productToDelete = $productRepository->getById(11);
+    $productToDelete = $productRepository->getById(111);
     $productRepository->delete($productToDelete);
 
     /** @var \Magento\Quote\Model\ResourceModel\Quote\Item $itemResource */

From 70ede03e5c2dc9e2c3bb23d0fc5c29cb03cbe7dd Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 30 Apr 2020 18:50:30 +0300
Subject: [PATCH 116/307] MC-29420: Remove event handlers from CE

---
 .../Backend/Block/Widget/Form/Container.php   |  41 ++++-
 .../templates/widget/form/container.phtml     |   2 +
 .../adminhtml/templates/widget/grid.phtml     |   5 +-
 .../templates/widget/grid/extended.phtml      |   6 +-
 .../render/item/price_msrp_item.phtml         |  10 ++
 .../frontend/templates/checkout/billing.phtml |   6 +-
 .../adminhtml/templates/form/checkmo.phtml    |   2 +-
 .../templates/form/purchaseorder.phtml        |   2 +-
 .../frontend/templates/form/checkmo.phtml     |   2 +-
 .../frontend/templates/partner/logo.phtml     |   2 +-
 .../templates/payflowlink/redirect.phtml      |   5 +-
 .../frontend/templates/payment/mark.phtml     |   2 +-
 .../product/edit/slideout/form.phtml          |   6 +-
 .../view/adminhtml/templates/grid.phtml       | 113 ++++++++----
 .../templates/report/grid/container.phtml     |  12 +-
 .../Review/Block/Customer/ListCustomer.php    |   8 +-
 .../Review/view/adminhtml/templates/add.phtml |  10 +-
 .../adminhtml/templates/rating/detailed.phtml |  32 +++-
 .../templates/rating/stars/summary.phtml      |  16 +-
 .../frontend/templates/customer/list.phtml    |  41 +++--
 .../frontend/templates/customer/recent.phtml  |  29 ++-
 .../frontend/templates/customer/view.phtml    |  36 ++--
 .../view/frontend/templates/detailed.phtml    |  17 +-
 .../frontend/templates/helper/summary.phtml   |  31 +++-
 .../Review/view/frontend/templates/view.phtml |  33 ++--
 .../Block/Adminhtml/Order/AbstractOrder.php   |  11 +-
 .../Adminhtml/Order/Create/Totals/Tax.php     |  28 +++
 .../Sales/Block/Adminhtml/Order/Details.php   |  21 ++-
 .../Block/Adminhtml/Order/Totals/Tax.php      |   1 +
 .../order/create/billing/method/form.phtml    |   6 +-
 .../templates/order/create/form/address.phtml |   2 +-
 .../order/create/newsletter/form.phtml        |   9 +-
 .../order/create/sidebar/items.phtml          |  77 +++++---
 .../templates/order/create/store/select.phtml |  34 ++--
 .../order/create/totals/default.phtml         |  26 ++-
 .../order/create/totals/grandtotal.phtml      |  53 ++++--
 .../order/create/totals/shipping.phtml        |  71 ++++++--
 .../order/create/totals/subtotal.phtml        |  53 ++++--
 .../templates/order/create/totals/tax.phtml   |  75 +++++---
 .../adminhtml/templates/order/details.phtml   | 166 +++++++++++++-----
 .../templates/order/invoice/create/form.phtml |   2 -
 .../templates/order/totals/due.phtml          |  13 +-
 .../templates/order/totals/grand.phtml        |  20 ++-
 .../templates/order/totals/tax.phtml          |  71 +++++---
 .../view/frontend/templates/guest/form.phtml  |  12 +-
 .../templates/widget/guest/form.phtml         |  24 ++-
 .../Search/view/frontend/templates/term.phtml |  20 ++-
 .../view/frontend/templates/send.phtml        |  31 ++--
 .../Shipping/Block/Adminhtml/Create/Form.php  |  29 +++
 .../Block/Adminhtml/Order/Tracking/View.php   |   8 +-
 .../Shipping/Block/Adminhtml/View/Form.php    |  12 +-
 .../adminhtml/templates/create/form.phtml     |  30 +++-
 .../adminhtml/templates/create/items.phtml    |  34 ++--
 .../templates/order/packaging/grid.phtml      |  44 +++--
 .../templates/order/packaging/packed.phtml    |  80 +++++----
 .../templates/order/packaging/popup.phtml     |  35 ++--
 .../order/packaging/popup_content.phtml       | 157 ++++++++++++-----
 .../adminhtml/templates/order/tracking.phtml  |  26 ++-
 .../templates/order/tracking/view.phtml       |  69 +++++---
 .../adminhtml/templates/order/view/info.phtml |  39 ++--
 .../view/adminhtml/templates/view/form.phtml  |  47 +++--
 .../frontend/templates/tracking/popup.phtml   |  57 +++---
 .../adminhtml/templates/importExport.phtml    |  26 ++-
 .../templates/browser/content/uploader.phtml  |  20 ++-
 .../view/adminhtml/templates/tabs/css.phtml   |  15 +-
 .../templates/tabs/fieldset/js.phtml          |  26 ++-
 .../view/adminhtml/templates/tabs/js.phtml    |  15 +-
 .../templates/html/main_css_preloader.phtml   |   9 +-
 .../frontend/templates/html/notices.phtml     |  32 +++-
 .../view/frontend/templates/html/print.phtml  |  11 +-
 .../templates/js/css_rel_preload.phtml        |  24 ++-
 .../templates/translate_inline.phtml          |  28 ++-
 .../view/adminhtml/templates/selector.phtml   |  18 +-
 .../view/adminhtml/templates/role/edit.phtml  |  15 +-
 .../view/adminhtml/templates/role/info.phtml  |  10 +-
 .../templates/role/users_grid_js.phtml        |  51 ++++--
 .../templates/user/roles_grid_js.phtml        |  44 +++--
 .../templates/system/variable/js.phtml        |  11 +-
 .../view/adminhtml/templates/form/vault.phtml |  14 +-
 .../Weee/Block/Item/Price/Renderer.php        |   1 +
 .../adminhtml/templates/renderer/tax.phtml    |  51 ++++--
 .../review/item/price/row_excl_tax.phtml      |  36 ++--
 .../review/item/price/row_incl_tax.phtml      |  37 ++--
 .../review/item/price/unit_excl_tax.phtml     |  36 ++--
 .../review/item/price/unit_incl_tax.phtml     |  37 ++--
 .../frontend/templates/item/price/row.phtml   |  53 +++---
 .../frontend/templates/item/price/unit.phtml  |  48 +++--
 87 files changed, 1882 insertions(+), 748 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Form/Container.php b/app/code/Magento/Backend/Block/Widget/Form/Container.php
index febaae3861688..6d92d2bfb0396 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Container.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Container.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Backend\Block\Widget\Form;
 
+use Magento\Backend\Block\Widget\Context;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Backend form container block
  *
@@ -39,7 +43,7 @@ class Container extends \Magento\Backend\Block\Widget\Container
      * @var string
      */
     protected $_blockGroup = 'Magento_Backend';
-    
+
     /**
      *  @var string
      */
@@ -55,6 +59,25 @@ class Container extends \Magento\Backend\Block\Widget\Container
      */
     protected $_template = 'Magento_Backend::widget/form/container.phtml';
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(
+        Context $context,
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
+    ) {
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+        parent::__construct($context, $data);
+    }
+
     /**
      * Initialize form.
      *
@@ -205,8 +228,14 @@ public function getFormHtml()
     public function getFormInitScripts()
     {
         if (!empty($this->_formInitScripts) && is_array($this->_formInitScripts)) {
-            return '<script>' . implode("\n", $this->_formInitScripts) . '</script>';
+            return $this->secureRenderer->renderTag(
+                'script',
+                [],
+                implode("\n", $this->_formInitScripts),
+                false
+            );
         }
+
         return '';
     }
 
@@ -218,8 +247,14 @@ public function getFormInitScripts()
     public function getFormScripts()
     {
         if (!empty($this->_formScripts) && is_array($this->_formScripts)) {
-            return '<script>' . implode("\n", $this->_formScripts) . '</script>';
+            return $this->secureRenderer->renderTag(
+                'script',
+                [],
+                implode("\n", $this->_formScripts),
+                false
+            );
         }
+
         return '';
     }
 
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml
index 21843215758d5..08ec331e37b7d 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/container.phtml
@@ -29,6 +29,7 @@
     </div>
 <?php endif; ?>
 <?php $scriptString = <<<script
+
 require([
     'jquery',
     'mage/backend/form',
@@ -51,6 +52,7 @@ require([
         });
 
 });
+
 script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index 79c9ce1f4cefd..abbe74ece1fe5 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -3,6 +3,7 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
 ?>
 <?php
 /**
@@ -230,10 +231,10 @@ require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'
 
         if ($block->getChildBlock('grid.massaction') &&
             $block->getChildBlock('grid.massaction')->isAvailable()) {
-            $scriptString .= /* @noEscape */ $block->getChildBlock('grid.massaction')->getJavaScript();
+            $scriptString .= /* @noEscape */ $block->getChildBlock('grid.massaction')->getJavaScript() . PHP_EOL;
         }
 
-        $scriptString .= /* @noEscape */ $block->getAdditionalJavaScript();
+        $scriptString .= /* @noEscape */ $block->getAdditionalJavaScript() . PHP_EOL;
 
         if ($block->getDependencyJsObject()) {
             $scriptString .=  '});' . PHP_EOL;
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 59fe83013b1a7..7730dd4c339cb 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -150,7 +150,7 @@ $numColumns = count($block->getColumns());
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                 /* @noEscape */ ($_curPage + 1) . '\');return false;',
-                                '. admin__data-grid-pager button.action-next'
+                                '.admin__data-grid-pager button.action-next'
                             ) ?>
                         <?php else: ?>
                             <button type="button" class="action-next disabled">
@@ -290,16 +290,19 @@ $numColumns = count($block->getColumns());
     $jsonHelper = $block->getData('jsonHelper');
     if ($block->canDisplayContainer()):
         $scriptString = <<<script
+
     var deps = [];
 script;
         if ($block->getDependencyJsObject()):
             $scriptString .= <<<script
+
     deps.push('uiRegistry');
 script;
         endif;
 
         if (strpos($block->getRowClickCallback(), 'order.') !== false):
             $scriptString .= <<<script
+
     deps.push('Magento_Sales/order/create/form')
 script;
         endif;
@@ -310,6 +313,7 @@ script;
         if (is_array($block->getRequireJsDependencies())):
             foreach ($block->getRequireJsDependencies() as $dependency):
                 $scriptString .= <<<script
+
             deps.push('{$block->escapeJs($dependency)}');
 script;
             endforeach;
diff --git a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
index 63f3d6e995d5e..fd0f2a45e1771 100644
--- a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
+++ b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
@@ -49,6 +49,11 @@
                                          "cartForm": "#wishlist-view-form"}}'>
             <?= $block->escapeHtml(__('Click for price')) ?>
         </a>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            'e.preventDefault()',
+            'a#' . /* @noEscape */ ($popupId)
+        ) ?>
     <?php else: ?>
         <span class="msrp-message">
             <?= $block->escapeHtml($_catalogHelper->getMsrpPriceMessage($_product)) ?>
@@ -61,4 +66,9 @@
        class="link tip">
         <?= $block->escapeHtml(__("What's this?")) ?>
     </a>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        'e.preventDefault()',
+        'a#' . /* @noEscape */ ($helpLinkId)
+    ) ?>
 </div>
diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml
index 6d35363529ddc..c9ee0a8b12ce3 100644
--- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/billing.phtml
@@ -17,7 +17,7 @@
              alt="<?= $block->escapeHtml(__('Loading...')); ?>">
     </div>
 </div>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('position: absolute;', 'div#checkout-loader .loader image') ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('position: absolute;', 'div#checkout-loader .loader img') ?>
 <?php $checkoutConfig = /* @noEscape */ $block->getCheckoutData()->getSerializedCheckoutConfigs();
 $scriptString = <<<script
     window.checkoutConfig = {$checkoutConfig};
@@ -148,6 +148,7 @@ script;
 </form>
 <?php $quoteBaseGrandTotal = (float)$block->getQuoteBaseGrandTotal();
 $scriptString = <<<script
+
     require(['jquery', 'mage/mage'], function(jQuery) {
         var addtocartForm = jQuery('#multishipping-billing-form');
 
@@ -165,11 +166,13 @@ $scriptString = <<<script
             }
         });
     });
+
 script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <?php $scriptString = <<<script
+
     //<![CDATA[
     require(
         [
@@ -198,6 +201,7 @@ $scriptString .= <<<script
             });
         });
     //]]>
+
 script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml
index 958406bb297e1..789a3921b2c21 100644
--- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml
+++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/checkmo.phtml
@@ -25,5 +25,5 @@
 </fieldset>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     "display:none",
-    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+    'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode())
 ) ?>
diff --git a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml
index 03dd859666f59..a1e3da2713811 100644
--- a/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml
+++ b/app/code/Magento/OfflinePayments/view/adminhtml/templates/form/purchaseorder.phtml
@@ -24,5 +24,5 @@
 </fieldset>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     "display:none",
-    'fieldset#payment_form_' . $block->escapeHtml($block->getMethodCode())
+    'fieldset#payment_form_' . $block->escapeJs($block->getMethodCode())
 ) ?>
diff --git a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml
index 5d584ff724618..3b381bbf72f4f 100644
--- a/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml
+++ b/app/code/Magento/OfflinePayments/view/frontend/templates/form/checkmo.phtml
@@ -26,6 +26,6 @@
     </dl>
     <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
         "display:none",
-        'dl#payment_form_' . $block->escapeHtml($block->getMethodCode())
+        'dl#payment_form_' . $block->escapeJs($block->getMethodCode())
     ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
index 8502fb02deb8b..a26d00cc2e9b2 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
@@ -25,7 +25,7 @@
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
     "javascript:window.open(
-               '" . $block->escapeUrl($block->getAboutPaypalPageUrl()) . "',
+               '" . $block->escapeJs($block->getAboutPaypalPageUrl()) . "',
                'paypal',
                'width=600,height=350,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'
                ); return false;",
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml
index 30eeb7ca082e3..35b678a8853b1 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payflowlink/redirect.phtml
@@ -16,6 +16,7 @@
 </head>
 <body>
 <?php $scriptString= <<<script
+
     (function() {
         'use strict';
 
@@ -32,7 +33,7 @@
 
         var cartUrl = '{$block->escapeJs($block->getUrl('checkout/cart'))}',
             successUrl = '{$block->escapeJs($block->getUrl('checkout/onepage/success'))}',
-            goToSuccessPage = '{$block->escapeUrl($block->getGotoSuccessPage())}',
+            goToSuccessPage = '{$block->escapeJs($block->getGotoSuccessPage())}',
             require = window.top.require,
             windowContext = window,
             errorMessage = {
@@ -50,8 +51,8 @@
             })
         }
 
-
     })();
+
 script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
index 5da5d7156baba..dae8cb94cb110 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
@@ -25,7 +25,7 @@ $url = $block->escapeUrl($block->getPaymentAcceptanceMarkHref());
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
     "javascript:window.open(
-           '" . /* @noEscape */ $url . "',
+           '" . /* @noEscape */ $block->escapeJs($block->getPaymentAcceptanceMarkHref()) . "',
            'olcwhatispaypal',
            'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
            'left=0, top=0, width=400, height=350'
diff --git a/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml b/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml
index 05b274d56402d..bf46bd1411e84 100644
--- a/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml
+++ b/app/code/Magento/ProductVideo/view/adminhtml/templates/product/edit/slideout/form.phtml
@@ -8,7 +8,7 @@
  * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<div id="video_name_<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>"
+<div id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>"
     data-modal-info='<?= /* @noEscape */ $block->getWidgetOptions() ?>'
 >
     <?= $block->getFormHtml() ?>
@@ -28,7 +28,7 @@
         </div>
     </div>
 </div>
-<?= /* @noEscape */ $secureRenderer->renderTag(
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     'display:none',
-    'div#video_name_' . $block->escapeHtmlAttr($block->getNameInLayout())
+    'div#' . $block->escapeJs($block->getNameInLayout())
 ) ?>
diff --git a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
index 81453a5a17ad2..53473cb671e7c 100644
--- a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
+++ b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
@@ -5,19 +5,23 @@
  */
 ?>
 <?php
-/** @var $block \Magento\Reports\Block\Adminhtml\Grid */
+/**
+ * @var $block \Magento\Reports\Block\Adminhtml\Grid
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if ($block->getCollection()) : ?>
-    <?php if ($block->canDisplayContainer()) : ?>
+<?php if ($block->getCollection()): ?>
+    <?php if ($block->canDisplayContainer()): ?>
     <div id="<?= $block->escapeHtmlAttr($block->getId()) ?>">
-        <?php else : ?>
+        <?php else: ?>
             <?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
         <?php endif; ?>
-        <?php if ($block->getStoreSwitcherVisibility() || $block->getDateFilterVisibility()) : ?>
+        <?php if ($block->getStoreSwitcherVisibility() || $block->getDateFilterVisibility()): ?>
             <div class="admin__data-grid-header admin__data-grid-toolbar">
                 <div class="admin__data-grid-header-row">
-                    <?php if ($block->getDateFilterVisibility()) : ?>
-                        <div class="admin__filter-actions" data-role="filter-form" id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_range')) ?>">
+                    <?php if ($block->getDateFilterVisibility()): ?>
+                        <div class="admin__filter-actions" data-role="filter-form"
+                             id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_range')) ?>">
                             <span class="field-row">
                                 <label for="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_from')) ?>"
                                        class="admin__control-support-text">
@@ -28,7 +32,8 @@
                                        id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_from')) ?>"
                                        name="report_from"
                                        value="<?= $block->escapeHtmlAttr($block->getFilter('report_from')) ?>">
-                                <span id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_from_advice')) ?>"></span>
+                                <span id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_from_advice'))?>">
+                                </span>
                             </span>
 
                             <span class="field-row">
@@ -41,7 +46,8 @@
                                        id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_to')) ?>"
                                        name="report_to"
                                        value="<?= $block->escapeHtmlAttr($block->getFilter('report_to')) ?>"/>
-                                <span id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_to_advice')) ?>"></span>
+                                <span id="<?= $block->escapeHtmlAttr($block->getSuffixId('period_date_to_advice')) ?>">
+                                </span>
                             </span>
 
                             <span class="field-row admin__control-filter">
@@ -49,34 +55,43 @@
                                         class="admin__control-support-text">
                                      <span><?= $block->escapeHtml(__('Show By')) ?>:</span>
                                  </label>
-                                <select name="report_period" id="<?= $block->escapeHtmlAttr($block->getSuffixId('report_period')) ?>" class="admin__control-select">
-                                    <?php foreach ($block->getPeriods() as $_value => $_label) : ?>
-                                        <option value="<?= $block->escapeHtmlAttr($_value) ?>" <?php if ($block->getFilter('report_period') == $_value) : ?> selected<?php endif; ?>><?= $block->escapeHtml($_label) ?></option>
+                                <select name="report_period"
+                                        id="<?= $block->escapeHtmlAttr($block->getSuffixId('report_period')) ?>"
+                                        class="admin__control-select">
+                                    <?php foreach ($block->getPeriods() as $_value => $_label): ?>
+                                        <option value="<?= $block->escapeHtmlAttr($_value) ?>"
+                                            <?php if ($block->getFilter('report_period') == $_value):
+                                                ?> selected<?php endif; ?>><?= $block->escapeHtml($_label) ?>
+                                        </option>
                                     <?php endforeach; ?>
                                 </select>
                                 <?= $block->getRefreshButtonHtml() ?>
                             </span>
-                            <script>
+                            <?php $scriptString = <<<script
+
                                 require([
                                     "jquery",
                                     "mage/calendar"
                                 ], function($){
 
-                                    $("#<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_range'))) ?>").dateRange({
-                                        dateFormat:"<?= $block->escapeJs($block->escapeHtml($block->getDateFormat())) ?>",
-                                        buttonText:"<?= $block->escapeJs($block->escapeHtml(__('Select Date'))) ?>",
+                                    $("#{$block->escapeJs($block->getSuffixId('period_date_range'))}").dateRange({
+                                        dateFormat:"{$block->escapeJs($block->getDateFormat())}",
+                                        buttonText:"{$block->escapeJs(__('Select Date'))}",
                                         from:{
-                                            id:"<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_from'))) ?>"
+                                            id:"{$block->escapeJs($block->getSuffixId('period_date_from'))}"
                                         },
                                         to:{
-                                            id:"<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_to'))) ?>"
+                                            id:"{$block->escapeJs($block->getSuffixId('period_date_to'))}"
                                         }
                                     });
                                 });
-                            </script>
+
+script;
+                            ?>
+                            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
                         </div>
                     <?php endif; ?>
-                    <?php if ($block->getChildBlock('grid.export')) : ?>
+                    <?php if ($block->getChildBlock('grid.export')): ?>
                         <?= $block->getChildHtml('grid.export') ?>
                     <?php endif; ?>
                 </div>
@@ -88,8 +103,9 @@
             </table>
         </div>
     </div>
-    <?php if ($block->canDisplayContainer()) : ?>
-        <script>
+    <?php if ($block->canDisplayContainer()): ?>
+        <?php $scriptString = <<<script
+
             require([
                 "jquery",
                 "validation",
@@ -98,16 +114,25 @@
             ], function(jQuery){
 
                 //<![CDATA[
-                <?= $block->escapeJs($block->escapeHtml($block->getJsObjectName())) ?> = new varienGrid('<?= $block->escapeJs($block->escapeHtml($block->getId())) ?>', '<?= $block->escapeJs($block->escapeUrl($block->getGridUrl())) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getVarNamePage())) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getVarNameSort())) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getVarNameDir())) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getVarNameFilter())) ?>');
-                <?= $block->escapeJs($block->escapeHtml($block->getJsObjectName())) ?>.useAjax = '<?php if ($block->getUseAjax()) :
-                        echo $block->escapeJs($block->escapeHtml($block->getUseAjax()));
-                    endif; ?>';
-                <?php if ($block->getDateFilterVisibility()) : ?>
-                    <?= $block->escapeJs($block->escapeHtml($block->getJsObjectName())) ?>.doFilterCallback = validateFilterDate;
-                    var period_date_from = $('<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_from'))) ?>');
-                    var period_date_to = $('<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_to'))) ?>');
-                    period_date_from.adviceContainer = $('<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_from_advice'))) ?>');
-                    period_date_to.adviceContainer = $('<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_to_advice'))) ?>');
+                {$block->escapeJs($block->getJsObjectName())} = new varienGrid('{$block->escapeJs($block->getId())}',
+                 '{$block->escapeJs($block->getGridUrl())}', '{$block->escapeJs($block->getVarNamePage())}',
+                 '{$block->escapeJs($block->getVarNameSort())}', '{$block->escapeJs($block->getVarNameDir())}',
+                 '{$block->escapeJs($block->getVarNameFilter())}');
+                {$block->escapeJs($block->getJsObjectName())}.useAjax =
+                 '{($block->getUseAjax() ? 'true' : 'false')}';
+
+script;
+        ?>
+                <?php if ($block->getDateFilterVisibility()): ?>
+                    <?php $scriptString .= <<<script
+
+                    {$block->escapeJs($block->getJsObjectName())}.doFilterCallback = validateFilterDate;
+                    var period_date_from = $('{$block->escapeJs($block->getSuffixId('period_date_from'))}');
+                    var period_date_to = $('{$block->escapeJs($block->getSuffixId('period_date_to'))}');
+                    period_date_from.adviceContainer =
+                     $('{$block->escapeJs($block->getSuffixId('period_date_from_advice'))}');
+                    period_date_to.adviceContainer =
+                     $('{$block->escapeJs($block->getSuffixId('period_date_to_advice'))}');
 
                     var validateFilterDate = function() {
                         if (period_date_from && period_date_to) {
@@ -121,8 +146,13 @@
                             return true;
                         }
                     }
+
+script;
+                    ?>
                 <?php endif;?>
-                <?php if ($block->getStoreSwitcherVisibility()) : ?>
+                <?php if ($block->getStoreSwitcherVisibility()): ?>
+                    <?php $scriptString .= <<<script
+
                 /* Overwrite function from switcher.phtml widget*/
                 switchStore = function(obj) {
                     if (obj.options[obj.selectedIndex].getAttribute('website') == 'true') {
@@ -136,9 +166,12 @@
                     if (obj.switchParams) {
                         storeParam += obj.switchParams;
                     }
-                    var formParam = new Array('<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_from'))) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('period_date_to'))) ?>', '<?= $block->escapeJs($block->escapeHtml($block->getSuffixId('report_period'))) ?>');
+                    var formParam = new Array('{$block->escapeJs($block->getSuffixId('period_date_from'))}',
+                     '{$block->escapeJs($block->getSuffixId('period_date_to'))}',
+                     '{$block->escapeJs($block->getSuffixId('report_period'))}');
                     var paramURL = '';
-                    var switchURL = '<?= $block->escapeUrl($block->getAbsoluteGridUrl(['_current' => false])) ?>'.replace(/(store|group|website)\/\d+\//, '');
+                    var switchURL = '{$block->escapeJs($block->getAbsoluteGridUrl(['_current' => false]))}'
+                    .replace(/(store|group|website)\/\d+\//, '');
 
                     for (var i = 0; i < formParam.length; i++) {
                         if ($(formParam[i]).value && $(formParam[i]).name) {
@@ -147,10 +180,18 @@
                     }
                     setLocation(switchURL + storeParam + '?' + paramURL);
                 }
+
+script;
+                    ?>
                 <?php endif; ?>
+        <?php $scriptString .= <<<script
+
                 //]]>
 
             });
-        </script>
+
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     <?php endif; ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml
index 85145454428e2..2ff540486d3c5 100644
--- a/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml
+++ b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div class="reports-content">
@@ -11,7 +13,8 @@
 
 <?= $block->getGridHtml() ?>
 
-<script>
+<?php $scriptString = <<<script
+
 require([
     'jquery',
     'mage/backend/validation',
@@ -31,7 +34,7 @@ require([
         }
 
         if (jQuery('#filter_form').valid()) {
-            setLocation('<?= $block->escapeJs($block->escapeUrl($block->getFilterUrl())) ?>filter/'+
+            setLocation('{$block->escapeJs($block->getFilterUrl())}filter/'+
                 Base64.encode(Form.serializeElements(elements))+'/'
             );
         }
@@ -39,4 +42,7 @@ require([
 //]]>
     window.filterFormSubmit = filterFormSubmit;
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Review/Block/Customer/ListCustomer.php b/app/code/Magento/Review/Block/Customer/ListCustomer.php
index eb67af5780ddb..282421401b674 100644
--- a/app/code/Magento/Review/Block/Customer/ListCustomer.php
+++ b/app/code/Magento/Review/Block/Customer/ListCustomer.php
@@ -7,12 +7,15 @@
 
 use Magento\Customer\Api\AccountManagementInterface;
 use Magento\Customer\Api\CustomerRepositoryInterface;
+use Magento\Framework\App\ObjectManager;
+use Magento\Review\Helper\Data as ReviewHelper;
 
 /**
  * Customer Reviews list block
  *
  * @api
  * @since 100.0.2
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class ListCustomer extends \Magento\Customer\Block\Account\Dashboard
 {
@@ -44,6 +47,7 @@ class ListCustomer extends \Magento\Customer\Block\Account\Dashboard
      * @param \Magento\Review\Model\ResourceModel\Review\Product\CollectionFactory $collectionFactory
      * @param \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer
      * @param array $data
+     * @param ReviewHelper|null $reviewHelper
      */
     public function __construct(
         \Magento\Framework\View\Element\Template\Context $context,
@@ -53,9 +57,11 @@ public function __construct(
         AccountManagementInterface $customerAccountManagement,
         \Magento\Review\Model\ResourceModel\Review\Product\CollectionFactory $collectionFactory,
         \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
-        array $data = []
+        array $data = [],
+        ?ReviewHelper $reviewHelper = null
     ) {
         $this->_collectionFactory = $collectionFactory;
+        $data['reviewHelper'] = $reviewHelper ?? ObjectManager::getInstance()->get(ReviewHelper::class);
         parent::__construct(
             $context,
             $customerSession,
diff --git a/app/code/Magento/Review/view/adminhtml/templates/add.phtml b/app/code/Magento/Review/view/adminhtml/templates/add.phtml
index 83017eec57013..ec017fa36a33c 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/add.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/add.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-mage-init='{"floatingHeader": {}}' class="page-actions">
     <?= $block->getBackButtonHtml() ?>
@@ -14,7 +16,8 @@
 <div class="hidden" id="formContainer">
     <?= $block->getFormHtml() ?>
 </div>
-<script>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "mage/mage",
@@ -25,4 +28,7 @@ require([
    $('#edit_form').mage('form').mage('validation');
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml
index bf0cab4c621f5..8bacccef869e2 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rating/detailed.phtml
@@ -4,26 +4,37 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Adminhtml\Rating\Detailed $block */
+/**
+ * @var \Magento\Review\Block\Adminhtml\Rating\Detailed $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 ?>
-<?php if ($block->getRating() && $block->getRating()->getSize()) : ?>
-    <?php foreach ($block->getRating() as $_rating) : ?>
+<?php if ($block->getRating() && $block->getRating()->getSize()): ?>
+    <?php foreach ($block->getRating() as $_rating): ?>
     <div class="admin__field admin__field-rating">
         <label class="admin__field-label"><span><?= $block->escapeHtml($_rating->getRatingCode()) ?></span></label>
         <?php $_iterator = 1; ?>
         <?php $_options = ($_rating->getRatingOptions()) ? $_rating->getRatingOptions() : $_rating->getOptions() ?>
         <div class="admin__field-control" data-widget="ratingControl">
-        <?php foreach (array_reverse($_options) as $_option) : ?>
-            <input type="radio" name="ratings[<?= $block->escapeHtmlAttr($_rating->getVoteId() ? $_rating->getVoteId() : $_rating->getId()) ?>]" id="<?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>" value="<?= $block->escapeHtmlAttr($_option->getId()) ?>" <?php if ($block->isSelected($_option, $_rating)) : ?>checked="checked"<?php endif; ?> />
-            <label for="<?= $block->escapeHtmlAttr($_rating->getRatingCode()) ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>">★</label>
+        <?php foreach (array_reverse($_options) as $_option): ?>
+            <input type="radio"
+                   name="ratings[<?= $block->escapeHtmlAttr($_rating->getVoteId() ? $_rating->getVoteId() :
+                       $_rating->getId()) ?>]"
+                   id="<?= $block->escapeHtmlAttr($_rating->getRatingCode())
+                    ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>"
+                   value="<?= $block->escapeHtmlAttr($_option->getId()) ?>"
+                   <?php if ($block->isSelected($_option, $_rating)): ?>checked="checked"<?php endif; ?> />
+            <label for="<?= $block->escapeHtmlAttr($_rating->getRatingCode())
+            ?>_<?= $block->escapeHtmlAttr($_option->getValue()) ?>">★</label>
             <?php $_iterator++ ?>
         <?php endforeach; ?>
         </div>
     </div>
     <?php endforeach; ?>
     <input type="hidden" name="validate_rating" class="validate-rating" value="" />
-<script>
+    <?php $scriptString = <<<script
+
 require([
     "jquery",
     "mage/mage",
@@ -33,7 +44,10 @@ require([
 
     $('[data-widget=ratingControl]').ratingControl();
 });
-</script>
-<?php else : ?>
+
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+<?php else: ?>
     <?= $block->escapeHtml(__("Rating isn't Available")) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml
index 1f27db795f8c9..cc33ab639191f 100644
--- a/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml
+++ b/app/code/Magento/Review/view/adminhtml/templates/rating/stars/summary.phtml
@@ -4,12 +4,20 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Adminhtml\Rating\Summary $block */
+/**
+ * @var \Magento\Review\Block\Adminhtml\Rating\Summary $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if ($block->getRatingSummary()->getCount()) : ?>
+<?php if ($block->getRatingSummary()->getCount()): ?>
     <div class="rating-box">
-        <div class="rating" style="width:<?= /* @noEscape */ ceil($block->getRatingSummary()->getSum() / ($block->getRatingSummary()->getCount())) ?>%;"></div>
+        <div class="rating"/>
     </div>
-<?php else : ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "width:" . /* @noEscape */ ceil($block->getRatingSummary()->getSum() /
+            ($block->getRatingSummary()->getCount())) . "%;",
+        'div.rating-box div.rating'
+    ) ?>
+<?php else: ?>
     <?= $block->escapeHtml(__("Rating isn't Available")) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
index 11ea987b74cec..0e9a717a5f53c 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
@@ -4,9 +4,15 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Customer\ListCustomer $block */
+/**
+ * @var \Magento\Review\Block\Customer\ListCustomer $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+
+/** @var \Magento\Review\Helper\Data $reviewHelper */
+$reviewHelper = $block->getData('reviewHelper');
 ?>
-<?php if ($block->getReviews() && count($block->getReviews())) : ?>
+<?php if ($block->getReviews() && count($block->getReviews())): ?>
     <div class="table-wrapper reviews">
         <table class="data table table-reviews" id="my-reviews-table">
             <caption class="table-caption"><?= $block->escapeHtml(__('Product Reviews')) ?></caption>
@@ -20,26 +26,39 @@
                 </tr>
             </thead>
             <tbody>
-                <?php foreach ($block->getReviews() as $review) : ?>
+                <?php foreach ($block->getReviews() as $review): ?>
                 <tr>
-                    <td data-th="<?= $block->escapeHtml(__('Created')) ?>" class="col date"><?= $block->escapeHtml($block->dateFormat($review->getReviewCreatedAt())) ?></td>
+                    <td data-th="<?= $block->escapeHtml(__('Created')) ?>"
+                        class="col date"><?= $block->escapeHtml($block->dateFormat($review->getReviewCreatedAt())) ?>
+                    </td>
                     <td data-th="<?= $block->escapeHtml(__('Product Name')) ?>" class="col item">
                         <strong class="product-name">
-                            <a href="<?= $block->escapeUrl($block->getProductUrl($review)) ?>"><?= $block->escapeHtml($review->getName()) ?></a>
+                            <a href="<?= $block->escapeUrl($block->getProductUrl($review)) ?>">
+                                <?= $block->escapeHtml($review->getName()) ?>
+                            </a>
                         </strong>
                     </td>
                     <td data-th="<?= $block->escapeHtml(__('Rating')) ?>" class="col summary">
-                    <?php if ($review->getSum()) : ?>
+                    <?php if ($review->getSum()): ?>
                         <div class="rating-summary">
                             <span class="label"><span><?= $block->escapeHtml(__('Rating')) ?>:</span></span>
-                            <div class="rating-result" title="<?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%">
-                                <span style="width:<?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%;"><span><?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%</span></span>
+                            <div class="rating-result"
+                                 title="<?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%">
+                                <span>
+                                    <span>
+                                        <?= /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) ?>%
+                                    </span>
+                                </span>
                             </div>
                         </div>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                            "width:" . /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) . "%;",
+                            'div.rating-summary div.rating-result span'
+                        ) ?>
                     <?php endif; ?>
                     </td>
                     <td data-th="<?= $block->escapeHtmlAttr(__('Review')) ?>" class="col description">
-                        <?= $this->helper(\Magento\Review\Helper\Data::class)->getDetailHtml($review->getDetail()) ?>
+                        <?= $reviewHelper->getDetailHtml($review->getDetail()) ?>
                     </td>
                     <td data-th="<?= $block->escapeHtmlAttr(__('Actions')) ?>" class="col actions">
                         <a href="<?= $block->escapeUrl($block->getReviewUrl($review)) ?>" class="action more">
@@ -51,12 +70,12 @@
             </tbody>
         </table>
     </div>
-    <?php if ($block->getToolbarHtml()) : ?>
+    <?php if ($block->getToolbarHtml()): ?>
         <div class="toolbar products-reviews-toolbar bottom">
             <?= $block->getToolbarHtml() ?>
         </div>
     <?php endif; ?>
-<?php else : ?>
+<?php else: ?>
     <div class="message info empty"><span><?= $block->escapeHtml(__('You have submitted no reviews.')) ?></span></div>
 <?php endif; ?>
 <div class="actions-toolbar">
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
index 5cd81a2f17cbc..4900d48d0829c 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
@@ -4,26 +4,41 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Customer\Recent $block */
+/**
+ * @var \Magento\Review\Block\Customer\Recent $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if ($block->getReviews() && count($block->getReviews())) : ?>
+<?php if ($block->getReviews() && count($block->getReviews())): ?>
 <div class="block block-reviews-dashboard">
     <div class="block-title">
         <strong><?= $block->escapeHtml(__('My Recent Reviews')) ?></strong>
-        <a class="action view" href="<?= $block->escapeUrl($block->getAllReviewsUrl()) ?>"><span><?= $block->escapeHtml(__('View All')) ?></span></a>
+        <a class="action view" href="<?= $block->escapeUrl($block->getAllReviewsUrl()) ?>">
+            <span><?= $block->escapeHtml(__('View All')) ?></span>
+        </a>
     </div>
     <div class="block-content">
         <ol class="items">
-        <?php foreach ($block->getReviews() as $_review) : ?>
+        <?php foreach ($block->getReviews() as $_review): ?>
             <li class="item">
-                <strong class="product-name"><a href="<?= $block->escapeUrl($block->getReviewUrl($_review->getReviewId())) ?>"><?= $block->escapeHtml($_review->getName()) ?></a></strong>
-                <?php if ($_review->getSum()) : ?>
+                <strong class="product-name">
+                    <a href="<?= $block->escapeUrl($block->getReviewUrl($_review->getReviewId())) ?>">
+                        <?= $block->escapeHtml($_review->getName()) ?>
+                    </a>
+                </strong>
+                <?php if ($_review->getSum()): ?>
                     <?php $rating = $_review->getSum() / $_review->getCount() ?>
                     <div class="rating-summary">
                          <span class="label"><span><?= $block->escapeHtml(__('Rating')) ?>:</span></span>
                          <div class="rating-result" title="<?= $block->escapeHtmlAttr($rating) ?>%">
-                             <span style="width:<?= $block->escapeHtmlAttr($rating) ?>%"><span><?= $block->escapeHtml($rating) ?>%</span></span>
+                             <span>
+                                 <span><?= $block->escapeHtml($rating) ?>%</span>
+                             </span>
                          </div>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                            "width:". $block->escapeHtmlAttr($rating) . "%",
+                            'div.rating-result span'
+                        ) ?>
                      </div>
                 <?php endif; ?>
             </li>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
index f92282848b1b7..415645eb8e73e 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
@@ -4,11 +4,14 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Customer\View $block */
+/**
+ * @var \Magento\Review\Block\Customer\View $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 $product = $block->getProductData();
 ?>
-<?php if ($product->getId()) : ?>
+<?php if ($product->getId()): ?>
 <div class="customer-review view">
     <div class="product-details">
         <div class="product-media">
@@ -19,7 +22,7 @@ $product = $block->getProductData();
         </div>
         <div class="product-info">
             <h2 class="product-name"><?= $block->escapeHtml($product->getName()) ?></h2>
-            <?php if ($block->getRating() && $block->getRating()->getSize()) : ?>
+            <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
                 <span class="rating-average-label"><?= $block->escapeHtml(__('Average Customer Rating:')) ?></span>
                 <?= $block->getReviewsSummaryHtml($product) ?>
             <?php endif; ?>
@@ -27,21 +30,27 @@ $product = $block->getProductData();
     </div>
 
     <div class="review-details">
-        <?php if ($block->getRating() && $block->getRating()->getSize()) : ?>
+        <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
             <div class="title">
                 <strong><?= $block->escapeHtml(__('Your Review')) ?></strong>
             </div>
             <div class="customer-review-rating">
-                <?php foreach ($block->getRating() as $_rating) : ?>
-                    <?php if ($_rating->getPercent()) : ?>
+                <?php foreach ($block->getRating() as $_rating): ?>
+                    <?php if ($_rating->getPercent()): ?>
                         <?php $rating = ceil($_rating->getPercent()) ?>
                         <div class="rating-summary item">
-                            <span class="rating-label"><span><?= $block->escapeHtml($_rating->getRatingCode()) ?></span></span>
+                            <span class="rating-label">
+                                <span><?= $block->escapeHtml($_rating->getRatingCode()) ?></span>
+                            </span>
                             <div class="rating-result" title="<?= /* @noEscape */ $rating ?>%">
-                                <span style="width:<?= /* @noEscape */ $rating ?>%">
+                                <span>
                                     <span><?= /* @noEscape */ $rating ?>%</span>
                                 </span>
                             </div>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                "width:" . /* @noEscape */ $rating . "%",
+                                'div.rating-result span'
+                            ) ?>
                         </div>
                     <?php endif; ?>
                 <?php endforeach; ?>
@@ -49,15 +58,20 @@ $product = $block->getProductData();
         <?php endif; ?>
 
         <div class="review-title"><?= $block->escapeHtml($block->getReviewData()->getTitle()) ?></div>
-        <div class="review-content"><?= /* @noEscape */ nl2br($block->escapeHtml($block->getReviewData()->getDetail())) ?></div>
+        <div class="review-content">
+            <?= /* @noEscape */ nl2br($block->escapeHtml($block->getReviewData()->getDetail())) ?>
+        </div>
         <div class="review-date">
-            <?= $block->escapeHtml(__('Submitted on %1', '<time class="date">' . $block->dateFormat($block->getReviewData()->getCreatedAt()) . '</time>'), ['time']) ?>
+            <?= $block->escapeHtml(__('Submitted on %1', '<time class="date">' .
+                $block->dateFormat($block->getReviewData()->getCreatedAt()) . '</time>'), ['time']) ?>
         </div>
     </div>
 </div>
 <div class="actions-toolbar">
     <div class="secondary">
-        <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"><span><?= $block->escapeHtml(__('Back to My Reviews')) ?></span></a>
+        <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
+            <span><?= $block->escapeHtml(__('Back to My Reviews')) ?></span>
+        </a>
     </div>
 </div>
 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/detailed.phtml b/app/code/Magento/Review/view/frontend/templates/detailed.phtml
index 7b3b0e2dd6d02..1bd8138f9cdac 100644
--- a/app/code/Magento/Review/view/frontend/templates/detailed.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/detailed.phtml
@@ -4,21 +4,28 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Rating\Entity\Detailed $block */
+/**
+ * @var \Magento\Review\Block\Rating\Entity\Detailed $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if (!empty($collection) && $collection->getSize()) : ?>
+<?php if (!empty($collection) && $collection->getSize()): ?>
     <div class="table-wrapper">
         <table class="data table ratings review summary">
             <caption class="table-caption"><?= $block->escapeHtml(__('Ratings Review Summary')) ?></caption>
             <tbody>
-            <?php foreach ($collection as $_rating) : ?>
-                <?php if ($_rating->getSummary()) : ?>
+            <?php foreach ($collection as $_rating): ?>
+                <?php if ($_rating->getSummary()): ?>
                     <tr>
                         <th class="label" scope="row"><?= $block->escapeHtml(__($_rating->getRatingCode())) ?></th>
                         <td class="value">
                             <div class="rating box">
-                                <div class="rating" style="width:<?= /* @noEscape */ ceil($_rating->getSummary()) ?>%;"></div>
+                                <div class="rating"/>
                             </div>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                "width:" . /* @noEscape */ ceil($_rating->getSummary()) . "%;",
+                                'div.rating.box div.rating'
+                            ) ?>
                         </td>
                     </tr>
                 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
index b042b5e92cbac..b906456f16dc8 100644
--- a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
@@ -4,36 +4,49 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\Product\ReviewRenderer $block */
+/**
+ * @var \Magento\Review\Block\Product\ReviewRenderer $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 $url = $block->getReviewsUrl() . '#reviews';
 $urlForm = $block->getReviewsUrl() . '#review-form';
 ?>
-<?php if ($block->isReviewEnabled() && $block->getReviewsCount()) : ?>
+<?php if ($block->isReviewEnabled() && $block->getReviewsCount()): ?>
     <?php $rating = $block->getRatingSummary(); ?>
-    <div class="product-reviews-summary<?= !$rating ? ' no-rating' : '' ?>" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
-        <?php if ($rating) :?>
+    <div class="product-reviews-summary<?= !$rating ? ' no-rating' : '' ?>" itemprop="aggregateRating" itemscope
+         itemtype="http://schema.org/AggregateRating">
+        <?php if ($rating):?>
         <div class="rating-summary">
              <span class="label"><span><?= $block->escapeHtml(__('Rating')) ?>:</span></span>
              <div class="rating-result" title="<?= $block->escapeHtmlAttr($rating); ?>%">
-                 <span style="width:<?= $block->escapeHtmlAttr($rating); ?>%">
+                 <span>
                      <span>
-                         <span itemprop="ratingValue"><?= $block->escapeHtml($rating); ?></span>% of <span itemprop="bestRating">100</span>
+                         <span itemprop="ratingValue"><?= $block->escapeHtml($rating); ?>
+                         </span>% of <span itemprop="bestRating">100</span>
                      </span>
                  </span>
              </div>
          </div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                "width:" . $block->escapeHtmlAttr($rating) . "%",
+                'div.rating-summary div.rating-result span'
+            ) ?>
         <?php endif;?>
         <div class="reviews-actions">
             <a class="action view"
                href="<?= $block->escapeUrl($url) ?>">
                 <span itemprop="reviewCount"><?= $block->escapeHtml($block->getReviewsCount()) ?></span> 
-                <span><?= ($block->getReviewsCount() == 1) ? $block->escapeHtml(__('Review')) : $block->escapeHtml(__('Reviews')) ?></span>
+                <span><?= ($block->getReviewsCount() == 1) ? $block->escapeHtml(__('Review')) :
+                        $block->escapeHtml(__('Reviews')) ?>
+                </span>
+            </a>
+            <a class="action add" href="<?= $block->escapeUrl($urlForm) ?>">
+                <?= $block->escapeHtml(__('Add Your Review')) ?>
             </a>
-            <a class="action add" href="<?= $block->escapeUrl($urlForm) ?>"><?= $block->escapeHtml(__('Add Your Review')) ?></a>
         </div>
     </div>
-<?php elseif ($block->isReviewEnabled() && $block->getDisplayIfEmpty()) : ?>
+<?php elseif ($block->isReviewEnabled() && $block->getDisplayIfEmpty()): ?>
     <div class="product-reviews-summary empty">
         <div class="reviews-actions">
             <a class="action add" href="<?= $block->escapeUrl($urlForm) ?>">
diff --git a/app/code/Magento/Review/view/frontend/templates/view.phtml b/app/code/Magento/Review/view/frontend/templates/view.phtml
index 1c3d1942dd2e7..b51353b7df685 100644
--- a/app/code/Magento/Review/view/frontend/templates/view.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/view.phtml
@@ -4,44 +4,57 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Review\Block\View $block */
+/**
+ * @var \Magento\Review\Block\View $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if ($block->getProductData()->getId()) : ?>
+<?php if ($block->getProductData()->getId()): ?>
 <div class="product-review">
     <div class="page-title-wrapper">
         <h1><?= $block->escapeHtml(__('Review Details')) ?></h1>
     </div>
     <div class="product-img-box">
         <a href="<?= $block->escapeUrl($block->getProductData()->getProductUrl()) ?>">
-            <?= $block->getImage($block->getProductData(), 'product_base_image', ['class' => 'product-image'])->toHtml() ?>
+            <?= $block->getImage($block->getProductData(), 'product_base_image', ['class' => 'product-image'])->toHtml()
+            ?>
         </a>
-        <?php if ($block->getRating() && $block->getRating()->getSize()) : ?>
+        <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
             <p><?= $block->escapeHtml(__('Average Customer Rating')) ?>:</p>
             <?= $block->getReviewsSummaryHtml($block->getProductData()) ?>
         <?php endif; ?>
     </div>
     <div class="details">
         <h3 class="product-name"><?= $block->escapeHtml($block->getProductData()->getName()) ?></h3>
-        <?php if ($block->getRating() && $block->getRating()->getSize()) : ?>
+        <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
             <h4><?= $block->escapeHtml(__('Product Rating:')) ?></h4>
             <div class="table-wrapper">
                 <table class="data-table review-summary-table">
                     <caption class="table-caption"><?= $block->escapeHtml(__('Product Rating')) ?></caption>
-                    <?php foreach ($block->getRating() as $_rating) : ?>
-                        <?php if ($_rating->getPercent()) : ?>
+                    <?php foreach ($block->getRating() as $_rating): ?>
+                        <?php if ($_rating->getPercent()): ?>
                             <tr>
                                 <td class="label"><?= $block->escapeHtml(__($_rating->getRatingCode())) ?></td>
                                 <td class="value">
                                     <div class="rating-box">
-                                        <div class="rating" style="width:<?= /* @noEscape */ ceil($_rating->getPercent()) ?>%;"></div>
-                                    </div></td>
+                                        <div class="rating"/>
+                                    </div>
+                                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                        "width:" . /* @noEscape */ ceil($_rating->getPercent()) . "%;",
+                                        'div.rating-box div.rating'
+                                    ) ?>
+                                </td>
                             </tr>
                         <?php endif; ?>
                     <?php endforeach; ?>
                 </table>
             </div>
         <?php endif; ?>
-        <p class="date"><?= $block->escapeHtml(__('Product Review (submitted on %1):', $block->dateFormat($block->getReviewData()->getCreatedAt()))) ?></p>
+        <p class="date">
+            <?= $block->escapeHtml(
+                __('Product Review (submitted on %1):', $block->dateFormat($block->getReviewData()->getCreatedAt()))
+            ) ?>
+        </p>
         <p><?= /* @noEscape */ nl2br($block->escapeHtml($block->getReviewData()->getDetail())) ?></p>
     </div>
     <div class="actions">
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php b/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php
index b9aff07cc96fd..e45405714956f 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/AbstractOrder.php
@@ -6,6 +6,9 @@
 namespace Magento\Sales\Block\Adminhtml\Order;
 
 use Magento\Sales\Model\Order;
+use Magento\Framework\App\ObjectManager;
+use Magento\Shipping\Helper\Data as ShippingHelper;
+use Magento\Tax\Helper\Data as TaxHelper;
 
 /**
  * Adminhtml order abstract block
@@ -35,15 +38,21 @@ class AbstractOrder extends \Magento\Backend\Block\Widget
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Sales\Helper\Admin $adminHelper
      * @param array $data
+     * @param ShippingHelper|null $shippingHelper
+     * @param TaxHelper|null $taxHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Sales\Helper\Admin $adminHelper,
-        array $data = []
+        array $data = [],
+        ?ShippingHelper $shippingHelper = null,
+        ?TaxHelper $taxHelper = null
     ) {
         $this->_adminHelper = $adminHelper;
         $this->_coreRegistry = $registry;
+        $data['shippingHelper'] = $shippingHelper ?? ObjectManager::getInstance()->get(ShippingHelper::class);
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
         parent::__construct($context, $data);
     }
 
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php
index 207a4eca60213..165875955baa2 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Order\Create\Totals;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Pricing\PriceCurrencyInterface;
+use Magento\Tax\Helper\Data as TaxHelper;
+
 /**
  * Tax Total Row Renderer
  *
@@ -13,6 +17,30 @@
  */
 class Tax extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals
 {
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Backend\Model\Session\Quote $sessionQuote
+     * @param \Magento\Sales\Model\AdminOrder\Create $orderCreate
+     * @param PriceCurrencyInterface $priceCurrency
+     * @param \Magento\Sales\Helper\Data $salesData
+     * @param \Magento\Sales\Model\Config $salesConfig
+     * @param array $data
+     * @param TaxHelper|null $taxHelper
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Backend\Model\Session\Quote $sessionQuote,
+        \Magento\Sales\Model\AdminOrder\Create $orderCreate,
+        PriceCurrencyInterface $priceCurrency,
+        \Magento\Sales\Helper\Data $salesData,
+        \Magento\Sales\Model\Config $salesConfig,
+        array $data = [],
+        ?TaxHelper $taxHelper = null
+    ) {
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
+        parent::__construct($context, $sessionQuote, $orderCreate, $priceCurrency, $salesData, $salesConfig, $data);
+    }
+
     /**
      * Template
      *
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php
index 261f4b0cfd12a..51d2bfc6326ed 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php
@@ -5,12 +5,29 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Order;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Element\Template;
+use Magento\GiftMessage\Helper\Message as GiftMessageHelper;
+
 /**
- * Class Details
- * @package Magento\Sales\Block\Adminhtml\Order
+ * Order Details
  */
 class Details extends \Magento\Framework\View\Element\Template
 {
+    /**
+     * @param Template\Context $context
+     * @param array $data
+     * @param Message|null $giftMessageHelper
+     */
+    public function __construct(
+        Template\Context $context,
+        array $data = [],
+        ?GiftMessageHelper $giftMessageHelper = null
+    ) {
+        $data['giftMessageHelper'] = $giftMessageHelper ?? ObjectManager::getInstance()->get(GiftMessageHelper::class);
+        parent::__construct($context, $data);
+    }
+
     /**
      * @var string
      */
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
index 4b0969598fdcd..f145ef3625054 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
@@ -64,6 +64,7 @@ public function __construct(
         $this->_taxCalculation = $taxCalculation;
         $this->_taxOrderFactory = $taxOrderFactory;
         $this->_salesAdminHelper = $salesAdminHelper;
+        $data['taxHelper'] = $this->_taxHelper;
         parent::__construct($context, $taxConfig, $data);
     }
 
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml
index 017cae0b95f93..f1c8b249fe68a 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method/form.phtml
@@ -25,12 +25,16 @@
                    value="<?= $block->escapeHtmlAttr($_code); ?>"
                    type="radio" name="payment[method]"
                    title="<?= $block->escapeHtmlAttr($_method->getTitle()); ?>"
-                   onclick="payment.switchMethod('<?= $block->escapeJs($_code); ?>')"
                     <?php if ($currentSelectedMethod == $_code): ?>
                     checked="checked"
                     <?php endif; ?>
                    data-validate="{'validate-one-required-by-name':true}"
                    class="admin__control-radio"/>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "payment.switchMethod('" . $block->escapeJs($_code) . "')",
+                'input#p_method_' . $block->escapeJs($_code)
+            ) ?>
         <?php else:?>
             <span class="no-display">
                 <input id="p_method_<?= $block->escapeHtmlAttr($_code); ?>"
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml
index 936c8ec41337d..dc007e4801b41 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form/address.phtml
@@ -100,7 +100,7 @@ endif; ?>
                 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                     'onchange',
                     "order.selectAddress(this, '" . $block->escapeJs($_fieldsContainerId) . "')",
-                    'select#' . $block->escapeHtmlAttr($_id)
+                    'select#' . $block->escapeJs($_id)
                 ) ?>
             </div>
         </div>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml
index 1dcf57d879543..34f4bae1947e1 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/newsletter/form.phtml
@@ -3,5 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<input type="checkbox" name="newsletter:subscribe"> <label for="newsletter:subscribe" style="width: 90%; float: none;"><?= $block->escapeHtml(__('Subscribe to Newsletter')) ?></label><br/>
+<input type="checkbox" name="newsletter:subscribe">
+<label for="newsletter:subscribe">
+    <?= $block->escapeHtml(__('Subscribe to Newsletter')) ?>
+</label>
+<?=/* @noEscape */ $secureRenderer->renderStyleAsTag("width: 90%; float: none;", "label[for='newsletter:subscribe']") ?>
+<br/>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
index afb58a626ada8..aba788f6d5220 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
@@ -3,13 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /* @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Sidebar\AbstractSidebar */ ?>
 <div class="create-order-sidebar-block" id="sidebar_data_<?= $block->escapeHtmlAttr($block->getDataId()) ?>">
     <div class="head sidebar-title-block">
-        <a href="#" class="action-refresh"
-           title="<?= $block->escapeHtml(__('Refresh')) ?>"
-           onclick="order.loadArea('sidebar_<?= $block->escapeJs($block->getDataId()) ?>', 'sidebar_data_<?= $block->escapeJs($block->getDataId()) ?>');return false;">
+        <a href="#" class="action-refresh" title="<?= $block->escapeHtml(__('Refresh')) ?>">
             <span><?= $block->escapeHtml(__('Refresh')) ?></span>
         </a>
         <h5 class="create-order-sidebar-label">
@@ -17,23 +17,29 @@
             <span class="normal">(<?= $block->escapeHtml($block->getItemCount()) ?>)</span>
         </h5>
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        "event.preventDefault(); order.loadArea('sidebar_" . $block->escapeJs($block->getDataId()) .
+        "', 'sidebar_data_" . $block->escapeJs($block->getDataId()) . "');return false;",
+        'div.head.sidebar-title-block'
+    ) ?>
     <div class="content">
         <div class="auto-scroll">
-        <?php if ($block->getItemCount()) : ?>
+        <?php if ($block->getItemCount()): ?>
         <table class="admin__table-primary">
             <thead>
                 <tr>
                     <th class="col-item"><?= $block->escapeHtml(__('Item')) ?></th>
 
-                    <?php if ($block->canDisplayItemQty()) : ?>
+                    <?php if ($block->canDisplayItemQty()): ?>
                         <th class="col-qty"><?= $block->escapeHtml(__('Qty')) ?></th>
                     <?php endif; ?>
 
-                    <?php if ($block->canDisplayPrice()) : ?>
+                    <?php if ($block->canDisplayPrice()): ?>
                         <th class="col-price"><?= $block->escapeHtml(__('Price')) ?></th>
                     <?php endif; ?>
 
-                    <?php if ($block->canRemoveItems()) : ?>
+                    <?php if ($block->canRemoveItems()): ?>
                         <th class="col-remove">
                             <span title="<?= $block->escapeHtml(__('Remove')) ?>"
                                   class="icon icon-remove">
@@ -52,33 +58,37 @@
             </thead>
 
             <tbody>
-                <?php foreach ($block->getItems() as $_item) : ?>
+                <?php foreach ($block->getItems() as $_item): ?>
                     <tr>
                         <td class="col-item"><?= $block->escapeHtml($_item->getName()) ?></td>
 
-                        <?php if ($block->canDisplayItemQty()) : ?>
+                        <?php if ($block->canDisplayItemQty()): ?>
                             <td class="col-qty">
                                 <?= (float) $block->getItemQty($_item) ?>
                             </td>
                         <?php endif; ?>
 
-                        <?php if ($block->canDisplayPrice()) : ?>
+                        <?php if ($block->canDisplayPrice()): ?>
                             <td class="col-price">
                                 <?= /* @noEscape */ $block->getItemPrice($block->getProduct($_item)) ?>
                             </td>
                         <?php endif; ?>
 
-                        <?php if ($block->canRemoveItems()) : ?>
+                        <?php if ($block->canRemoveItems()): ?>
                             <td class="col-remove">
                                 <div class="admin__field-option">
-                                    <input id="sidebar-remove-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>-<?= (int) $block->getItemId($_item) ?>"
+                                    <input id="sidebar-remove-<?=
+                                    $block->escapeHtmlAttr($block->getSidebarStorageAction())
+                                    ?>-<?= (int) $block->getItemId($_item) ?>"
                                            type="checkbox"
                                            class="admin__control-checkbox"
                                            name="sidebar[remove][<?= (int) $block->getItemId($_item) ?>]"
                                            value="<?= $block->escapeHtmlAttr($block->getDataId()) ?>"
                                            title="<?= $block->escapeHtml(__('Remove')) ?>" />
                                     <label class="admin__field-label"
-                                           for="sidebar-remove-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>-<?= (int) $block->getItemId($_item) ?>">
+                                           for="sidebar-remove-<?=
+                                            $block->escapeHtmlAttr($block->getSidebarStorageAction())
+                                            ?>-<?= (int) $block->getItemId($_item) ?>">
                                     </label>
                                 </div>
                             </td>
@@ -86,29 +96,44 @@
 
                         <td class="col-add">
                             <div class="admin__field-option">
-                                <?php if ($block->isConfigurationRequired($_item->getTypeId()) && $block->getDataId() == 'wishlist') : ?>
+                                <?php if ($block->isConfigurationRequired($_item->getTypeId()) &&
+                                    $block->getDataId() == 'wishlist'): ?>
                                     <a href="#"
                                        class="icon icon-configure"
-                                       title="<?= $block->escapeHtml(__('Configure and Add to Order')) ?>"
-                                       onclick="order.sidebarConfigureProduct('sidebar_wishlist', <?= (int) $block->getProductId($_item) ?>, <?= (int) $block->getItemId($_item) ?>); return false;">
+                                       title="<?= $block->escapeHtml(__('Configure and Add to Order')) ?>">
                                         <span><?= $block->escapeHtml(__('Configure and Add to Order')) ?></span>
                                     </a>
-                                <?php elseif ($block->isConfigurationRequired($_item->getTypeId())) : ?>
+                                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                        'onclick',
+                                        "event.preventDefault(); order.sidebarConfigureProduct('sidebar_wishlist', " .
+                                        (int) $block->getProductId($_item) . ", " . (int) $block->getItemId($_item) .
+                                        "); return false;",
+                                        'a.icon.icon-configure'
+                                    ) ?>
+                                <?php elseif ($block->isConfigurationRequired($_item->getTypeId())): ?>
                                     <a href="#"
                                        class="icon icon-configure"
-                                       title="<?= $block->escapeHtml(__('Configure and Add to Order')) ?>"
-                                       onclick="order.sidebarConfigureProduct('sidebar', <?= (int) $block->getProductId($_item) ?>); return false;">
+                                       title="<?= $block->escapeHtml(__('Configure and Add to Order')) ?>">
                                         <span><?= $block->escapeHtml(__('Configure and Add to Order')) ?></span>
                                     </a>
-                                <?php else : ?>
-                                    <input id="sidebar-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>-<?= (int) $block->getIdentifierId($_item) ?>"
+                                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                        'onclick',
+                                        "event.preventDefault(); order.sidebarConfigureProduct('sidebar', " .
+                                        (int) $block->getProductId($_item) . "); return false;",
+                                        'a.icon.icon-configure'
+                                    ) ?>
+                                <?php else: ?>
+                                    <input id="sidebar-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction())
+                                    ?>-<?= (int) $block->getIdentifierId($_item) ?>"
                                            type="checkbox"
                                            class="admin__control-checkbox"
-                                           name="sidebar[<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>][<?= (int) $block->getIdentifierId($_item) ?>]"
+                                           name="sidebar[<?= $block->escapeHtmlAttr($block->getSidebarStorageAction())
+                                            ?>][<?= (int) $block->getIdentifierId($_item) ?>]"
                                            value="<?= $block->canDisplayItemQty() ? (float) $_item->getQty() : 1 ?>"
                                            title="<?= $block->escapeHtml(__('Add To Order')) ?>"/>
                                     <label class="admin__field-label"
-                                           for="sidebar-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction()) ?>-<?= (int) $block->getIdentifierId($_item) ?>">
+                                           for="sidebar-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction())
+                                            ?>-<?= (int) $block->getIdentifierId($_item) ?>">
                                     </label>
                                 <?php endif; ?>
                             </div>
@@ -117,11 +142,11 @@
                 <?php endforeach; ?>
             </tbody>
         </table>
-        <?php else : ?>
+        <?php else: ?>
             <span class="no-items"><?= $block->escapeHtml(__('No items')) ?></span>
         <?php endif ?>
         </div>
-        <?php if ($block->getItemCount() && $block->canRemoveItems()) : ?>
+        <?php if ($block->getItemCount() && $block->canRemoveItems()): ?>
             <?= $block->getChildHtml('empty_customer_cart_button') ?>
         <?php endif; ?>
     </div>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml
index 407bd0272e9fd..180486870446d 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml
@@ -3,17 +3,19 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/* @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Store\Select */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php /* @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Store\Select */ ?>
 <div class="store-scope form-inline">
     <div class="admin__fieldset tree-store-scope">
         <?php $showHelpHint = 0; ?>
-        <?php foreach ($block->getWebsiteCollection() as $_website) : ?>
+        <?php foreach ($block->getWebsiteCollection() as $_website): ?>
             <?php $showWebsite = false; ?>
-            <?php foreach ($block->getGroupCollection($_website) as $_group) : ?>
+            <?php foreach ($block->getGroupCollection($_website) as $_group): ?>
                 <?php $showGroup = false; ?>
-                <?php foreach ($block->getStoreCollection($_group) as $_store) : ?>
-                    <?php if ($showWebsite == false) : ?>
+                <?php foreach ($block->getStoreCollection($_group) as $_store): ?>
+                    <?php if ($showWebsite == false): ?>
                         <?php $showWebsite = true; ?>
                         <div class="admin__field field-website_label">
                             <label class="admin__field-label" for="">
@@ -21,7 +23,7 @@
                             </label>
                             <div class="admin__field-control">
                                 <div class="admin__field admin__field-option">
-                                    <?php if ($showHelpHint == 0) :
+                                    <?php if ($showHelpHint == 0):
                                         echo $block->getHintHtml();
                                         $showHelpHint = 1;
                                     endif; ?>
@@ -30,20 +32,30 @@
                         </div>
                     <?php endif; ?>
 
-                    <?php if ($showGroup == false) : ?>
+                    <?php if ($showGroup == false): ?>
                         <?php $showGroup = true; ?>
                         <div class="admin__field field-group_label">
-                            <label class="admin__field-label" for=""><span><?= $block->escapeHtml($_group->getName()) ?></span></label>
+                            <label class="admin__field-label" for="">
+                                <span><?= $block->escapeHtml($_group->getName()) ?></span>
+                            </label>
                             <div class="admin__field-control"></div>
                         </div>
                     <?php endif; ?>
 
                     <div class="admin__field field-store_label">
-                        <label class="admin__field-label" for=""><span><?= $block->escapeHtml($_group->getName()) ?></span></label>
+                        <label class="admin__field-label" for="">
+                            <span><?= $block->escapeHtml($_group->getName()) ?></span>
+                        </label>
                         <div class="admin__field-control">
                             <div class="nested">
                                 <div class="admin__field admin__field-option">
-                                    <input type="radio" id="store_<?= (int) $_store->getId() ?>" class="admin__control-radio" onclick="order.setStoreId('<?= (int) $_store->getId() ?>')"/>
+                                    <input type="radio"
+                                           id="store_<?= (int) $_store->getId() ?>" class="admin__control-radio"/>
+                                    <?= /* @noEscape*/ $secureRenderer->renderEventListenerAsTag(
+                                        'onclick',
+                                        "order.setStoreId('" .  (int)$_store->getId() . "')",
+                                        'input#store_' . (int)$_store->getId()
+                                    ) ?>
                                     <label class="admin__field-label" for="store_<?= (int) $_store->getId() ?>">
                                         <?= $block->escapeHtml($_store->getName()) ?>
                                     </label>
@@ -52,7 +64,7 @@
                         </div>
                     </div>
                 <?php endforeach; ?>
-                <?php if ($showGroup) : ?>
+                <?php if ($showGroup): ?>
                 <?php endif; ?>
             <?php endforeach; ?>
         <?php endforeach; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml
index 4a55eb609924f..7462e8ac1f87d 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/default.phtml
@@ -3,16 +3,28 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<tr class="<?= $block->escapeHtmlAttr($block->getTotal()->getCode()) ?> row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) : ?><strong><?php endif; ?>
+<tr id="totals-default" class="<?= $block->escapeHtmlAttr($block->getTotal()->getCode()) ?> row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()): ?><strong><?php endif; ?>
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) : ?></strong><?php endif; ?>
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()): ?></strong><?php endif; ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>" class="admin__total-amount">
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) : ?><strong><?php endif; ?>
+    <td class="admin__total-amount">
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()): ?><strong><?php endif; ?>
             <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValue()) ?>
-        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()) : ?></strong><?php endif; ?>
+        <?php if ($block->getRenderingArea() == $block->getTotal()->getArea()): ?></strong><?php endif; ?>
     </td>
 </tr>
+<?php if ($block->escapeHtmlAttr($block->getTotal()->getStyle())): ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+        'tr#totals-default td.admin__total-mark'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+        'tr#totals-default td.admin__total-amount'
+    ) ?>
+<?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml
index 4c4f94b5b3bb1..1ff1c68baaa52 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/grandtotal.phtml
@@ -6,34 +6,65 @@
 
 /**
  * @var $block \Magento\Tax\Block\Checkout\Grandtotal
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Tax\Block\Checkout\Grandtotal
  */
 ?>
-<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0) : ?>
-    <tr class="row-totals">
-        <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0): ?>
+    <tr id="grand-total-exclude-tax" class="row-totals">
+        <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
             <strong><?= $block->escapeHtml(__('Grand Total Excl. Tax')) ?></strong>
         </td>
-        <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+        <td class="admin__total-amount">
             <strong><?= /* @noEscape */ $block->formatPrice($block->getTotalExclTax()) ?></strong>
         </td>
     </tr>
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#grand-total-exclude-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#grand-total-exclude-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
     <?= /* @noEscape */ $block->renderTotals('taxes', $block->getColspan()) ?>
-    <tr class="row-totals">
-        <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <tr id="grand-total-include-tax" class="row-totals">
+        <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
             <strong><?= $block->escapeHtml(__('Grand Total Incl. Tax')) ?></strong>
         </td>
-        <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+        <td class="admin__total-amount">
             <strong><?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
-    <?php else : ?>
-    <tr class="row-totals">
-        <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#grand-total-include-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#grand-total-include-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+    <?php else: ?>
+    <tr id="grand-total" class="row-totals">
+        <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
             <strong><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></strong>
         </td>
-        <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+        <td class="admin__total-amount">
             <strong><?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
+        <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                $block->escapeHtmlAttr($block->getStyle()),
+                'tr#grand-total-include-tax td.admin__total-mark'
+            ) ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                $block->escapeHtmlAttr($block->getStyle()),
+                'tr#grand-total-include-tax td.admin__total-amount'
+            ) ?>
+    <?php endif; ?>
 <?php endif;?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml
index db204a46f1f94..c842901f7c16a 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/shipping.phtml
@@ -6,42 +6,83 @@
 
 /**
  * @var $block \Magento\Tax\Block\Checkout\Shipping
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Tax\Block\Checkout\Shipping
  */
 ?>
-<?php if ($block->displayBoth()) :?>
-<tr class="row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+<?php if ($block->displayBoth()):?>
+<tr id="shipping-exclude-tax" class="row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml($block->getExcludeTaxLabel()) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getShippingExcludeTax()) ?>
     </td>
 </tr>
-<tr class="row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-exclude-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-exclude-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+<tr id="shipping-include-tax" class="row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml($block->getIncludeTaxLabel()) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getShippingIncludeTax()) ?>
     </td>
 </tr>
-<?php elseif ($block->displayIncludeTax()) : ?>
-<tr>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-include-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-include-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+<?php elseif ($block->displayIncludeTax()): ?>
+<tr id="shipping-include-tax">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getShippingIncludeTax()) ?>
     </td>
 </tr>
-<?php else : ?>
-<tr class="row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-include-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-include-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+<?php else: ?>
+<tr id="shipping-exclude-tax" class="row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getShippingExcludeTax()) ?>
     </td>
 </tr>
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-exclude-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#shipping-exclude-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
 <?php endif;?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml
index a63458491baea..91ba11f90ba9a 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml
@@ -6,33 +6,64 @@
 
 /**
  * @var $block \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  * @see \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Subtotal
  */
 ?>
-<?php if ($block->displayBoth()) : ?>
-<tr class="row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+<?php if ($block->displayBoth()): ?>
+<tr id="subtotal-exclude-tax" class="row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml(__('Subtotal (Excl. Tax)')) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValueExclTax()) ?>
     </td>
 </tr>
-<tr class="row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#subtotal-exclude-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#subtotal-exclude-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+<tr id="subtotal-include-tax" class="row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml(__('Subtotal (Incl. Tax)')) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValueInclTax()) ?>
     </td>
 </tr>
-<?php else : ?>
-<tr class="row-totals">
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#subtotal-include-tax td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#subtotal-include-tax td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+<?php else: ?>
+<tr id="subtotal-total" class="row-totals">
+    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
         <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
     </td>
-    <td style="<?= $block->escapeHtmlAttr($block->getStyle()) ?>" class="admin__total-amount">
+    <td class="admin__total-amount">
         <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValue()) ?>
     </td>
 </tr>
+    <?php if ($block->escapeHtmlAttr($block->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#subtotal-total td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getStyle()),
+            'tr#subtotal-total td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
 <?php endif;?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml
index 042b2f5113cac..5c39449d79840 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/tax.phtml
@@ -4,56 +4,91 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
 // phpcs:disable Squiz.PHP.GlobalKeyword.NotAllowed
+/**
+ * @var \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Tax $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
-/** @var \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Tax $block */
-
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
 $taxAmount = $block->getTotal()->getValue();
 ?>
-<?php if (($taxAmount == 0 && $this->helper(\Magento\Tax\Helper\Data::class)->displayZeroTax()) || ($taxAmount > 0)) :
+<?php if (($taxAmount == 0 && $taxHelper->displayZeroTax()) || ($taxAmount > 0)):
     global $taxIter;
     $taxIter++;
     ?>
-    <?php $class = $block->escapeHtmlAttr("{$block->getTotal()->getCode()} " . ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary() ? 'summary-total' : '')); ?>
-    <tr<?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?>
-        onclick="expandDetails(this, '.summary-details-<?= $block->escapeJs($taxIter) ?>')"
-    <?php endif; ?>
+    <?php $class = $block->escapeHtmlAttr("{$block->getTotal()->getCode()} " . ($taxHelper->displayFullSummary() ?
+        'summary-total' : '')); ?>
+    <tr id="tax-summary-<?= $block->escapeHtmlAttr($taxIter) ?>"
         class="<?= /* @noEscape */ $class ?> row-totals">
-        <td style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>" class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
-            <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?>
+        <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
+            <?php if ($taxHelper->displayFullSummary()): ?>
                 <div class="summary-collapse"><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></div>
-            <?php else : ?>
+            <?php else: ?>
                 <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
             <?php endif;?>
         </td>
-        <td style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>" class="admin__total-amount">
+        <td class="admin__total-amount">
             <?= /* @noEscape */ $block->formatPrice($block->getTotal()->getValue()) ?>
         </td>
     </tr>
-    <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?>
+    <?php if ($taxHelper->displayFullSummary()): ?>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "expandDetails(this, '.summary-details-" . $block->escapeJs($taxIter) ."')",
+            'tr#tax-summary-' . $block->escapeHtmlAttr($taxIter)
+        ) ?>
+    <?php endif; ?>
+    <?php if ($block->escapeHtmlAttr($block->getTotal()->getStyle())): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+            'tr#tax-summary td.admin__total-mark'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+            'tr#tax-summary td.admin__total-amount'
+        ) ?>
+    <?php endif; ?>
+    <?php if ($taxHelper->displayFullSummary()): ?>
         <?php $isTop = 1; ?>
-        <?php foreach ($block->getTotal()->getFullInfo() as $info) : ?>
-            <?php if (isset($info['hidden']) && $info['hidden']) :
+        <?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
+            <?php if (isset($info['hidden']) && $info['hidden']):
                 continue;
             endif; ?>
             <?php $percent = $info['percent']; ?>
             <?php $amount = $info['amount']; ?>
             <?php $rates = $info['rates']; ?>
 
-            <?php foreach ($rates as $rate) : ?>
-                <tr class="summary-details-<?= $block->escapeHtmlAttr($taxIter) ?> summary-details<?= ($isTop ? ' summary-details-first' : '') ?>" style="display:none;">
-                    <td class="admin__total-mark" style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>" colspan="<?= (int) $block->getColspan() ?>">
+            <?php foreach ($rates as $rate): ?>
+                <tr id="tax-summary-details-<?= $block->escapeHtmlAttr($taxIter) ?>"
+                    class="summary-details-<?= $block->escapeHtmlAttr($taxIter) ?>
+                     summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
+                    <td class="admin__total-mark" colspan="<?= (int) $block->getColspan() ?>">
                         <?= $block->escapeHtml($rate['title']) ?>
-                        <?php if ($rate['percent'] !== null) : ?>
+                        <?php if ($rate['percent'] !== null): ?>
                             (<?= (float) $rate['percent'] ?>%)
                         <?php endif; ?>
                         <br />
                     </td>
-                    <td style="<?= $block->escapeHtmlAttr($block->getTotal()->getStyle()) ?>" class="admin__total-amount">
+                    <td class="admin__total-amount">
                         <?= /* @noEscape */ $block->formatPrice(($amount*(float)$rate['percent'])/$percent) ?>
                     </td>
                 </tr>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                    "display:none;",
+                    'tr#tax-summary-details-' . $block->escapeHtmlAttr($taxIter)
+                ) ?>
+                <?php if ($block->escapeHtmlAttr($block->getTotal()->getStyle())): ?>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                        $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+                        'tr#tax-summary-details-' . $block->escapeHtmlAttr($taxIter) . ' td.admin__total-mark'
+                    ) ?>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                        $block->escapeHtmlAttr($block->getTotal()->getStyle()),
+                        'tr#tax-summary-details-' . $block->escapeHtmlAttr($taxIter) . ' td.admin__total-amount'
+                    ) ?>
+                <?php endif; ?>
                 <?php $isTop = 0; ?>
             <?php endforeach; ?>
         <?php endforeach; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml
index 70373f177d8be..10c44cf99471b 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/details.phtml
@@ -4,85 +4,165 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
-/*
-store view name = $_order->getStore()->getName()
-web site name = $_order->getStore()->getWebsite()->getName()
-store name = $_order->getStore()->getGroup()->getName()
-*/
-
 /* @var \Magento\Sales\Block\Adminhtml\Order\Details $block */
-?>
-<?php
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
 /* @var \Magento\Sales\Model\Order $_order */
-$_order = $block->getOrder() ?>
+$_order = $block->getOrder();
+/** @var \Magento\GiftMessage\Helper\Message $giftMessageHelper */
+$giftMessageHelper = $block->getData('giftMessageHelper');
+?>
 <div>
-<?= $block->escapeHtml(__('Customer Name: %1', $_order->getCustomerFirstname() ? $_order->getCustomerName() : $_order->getBillingAddress()->getName())) ?><br />
+<?= $block->escapeHtml(__('Customer Name: %1', $_order->getCustomerFirstname() ? $_order->getCustomerName() :
+    $_order->getBillingAddress()->getName())) ?><br />
 <?= $block->escapeHtml(__('Purchased From: %1', $_order->getStore()->getGroup()->getName())) ?><br />
 </div>
-<table cellpadding="0" border="0" width="100%" style="border:1px solid #bebcb7; background:#f8f7f5;">
+<table id="order-details" cellpadding="0" border="0" width="100%">
     <thead>
         <tr>
-            <th align="left" bgcolor="#d9e5ee" style="padding:3px 9px">Item</th>
-            <th align="center" bgcolor="#d9e5ee" style="padding:3px 9px">Qty</th>
-            <th align="right" bgcolor="#d9e5ee" width="10%" style="padding:3px 9px">Subtotal</th>
+            <th align="left" bgcolor="#d9e5ee">Item</th>
+            <th align="center" bgcolor="#d9e5ee">Qty</th>
+            <th align="right" bgcolor="#d9e5ee" width="10%">Subtotal</th>
         </tr>
     </thead>
 
     <tbody>
-<?php $i = 0; foreach ($_order->getAllItems() as $_item) : $i++ ?>
-        <tr <?= $i%2 ? 'bgcolor="#eeeded"' : '' ?>>
-            <td align="left" valign="top" style="padding:3px 9px"><strong><?= $block->escapeHtml($_item->getName()) ?></strong>
-            <?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)->getGiftMessage($_item->getGiftMessageId())) : ?>
+<?php $i = 0; foreach ($_order->getAllItems() as $_item): $i++ ?>
+        <tr id="item-<?= /* @noEscape */ $i ?>" <?= $i%2 ? 'bgcolor="#eeeded"' : '' ?>>
+            <td align="left" valign="top"><strong><?= $block->escapeHtml($_item->getName()) ?></strong>
+            <?php if ($_item->getGiftMessageId() &&
+                $_giftMessage = $giftMessageHelper->getGiftMessage($_item->getGiftMessageId())): ?>
             <br /><strong><?= $block->escapeHtml(__('Gift Message')) ?></strong>
             <br /><?= $block->escapeHtml(__('From:')) ?> <?= $block->escapeHtml($_giftMessage->getSender()) ?>
             <br /><?= $block->escapeHtml(__('To:')) ?> <?= $block->escapeHtml($_giftMessage->getRecipient()) ?>
             <br /><?= $block->escapeHtml(__('Message:')) ?><br /> <?= $block->escapeHtml($_giftMessage->getMessage()) ?>
             <?php endif; ?>
             </td>
-            <td align="center" valign="top" style="padding:3px 9px"><?= (float) $_item->getQtyOrdered() ?></td>
-            <td align="right" valign="top" style="padding:3px 9px"><?= /* @noEscape */ $_order->formatPrice($_item->getRowTotal()) ?></td>
+            <td align="center" valign="top"><?= (float) $_item->getQtyOrdered() ?></td>
+            <td align="right" valign="top"><?= /* @noEscape */ $_order->formatPrice($_item->getRowTotal()) ?></td>
         </tr>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'tr#item-' . $i
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'tr#item-' . $i . ' td:nth-child(1)'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'tr#item-' . $i . ' td:nth-child(2)'
+    ) ?>
 <?php endforeach; ?>
     </tbody>
 
     <tfoot>
-    <?php if ($_order->getGiftMessageId() && $_giftMessage = $this->helper(\Magento\GiftMessage\Helper\Message::class)->getGiftMessage($_order->getGiftMessageId())) : ?>
-        <tr>
-            <td colspan="3" align="left" style="padding:3px 9px">
+    <?php if ($_order->getGiftMessageId() &&
+        $_giftMessage = $giftMessageHelper->getGiftMessage($_order->getGiftMessageId())): ?>
+        <tr id="gift-message">
+            <td colspan="3" align="left">
             <strong><?= $block->escapeHtml(__('Gift Message')) ?></strong>
             <br /><?= $block->escapeHtml(__('From:')) ?> <?= $block->escapeHtml($_giftMessage->getSender()) ?>
             <br /><?= $block->escapeHtml(__('To:')) ?> <?= $block->escapeHtml($_giftMessage->getRecipient()) ?>
             <br /><?= $block->escapeHtml(__('Message:')) ?><br /> <?= $block->escapeHtml($_giftMessage->getMessage()) ?>
             </td>
         </tr>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'padding:3px 9px',
+            'table#order-details tr#gift-message td'
+        ) ?>
     <?php endif; ?>
-        <tr>
-            <td colspan="2" align="right" style="padding:3px 9px"><?= $block->escapeHtml(__('Subtotal')) ?></td>
-            <td align="right" style="padding:3px 9px"><?= /* @noEscape */ $_order->formatPrice($_order->getSubtotal()) ?></td>
+        <tr id="subtotal">
+            <td colspan="2" align="right"><?= $block->escapeHtml(__('Subtotal')) ?></td>
+            <td align="right"><?= /* @noEscape */ $_order->formatPrice($_order->getSubtotal()) ?></td>
         </tr>
-        <?php if ($_order->getDiscountAmount() > 0) : ?>
-            <tr>
-                <td colspan="2" align="right" style="padding:3px 9px"><?= $block->escapeHtml((($_order->getCouponCode()) ? __('Discount (%1)', $_order->getCouponCode()) : __('Discount'))) ?></td>
-                <td align="right" style="padding:3px 9px"><?= /* @noEscape */ $_order->formatPrice(0.00 - $_order->getDiscountAmount()) ?></td>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'table#order-details tr#subtotal td:nth-child(0)'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'table#order-details tr#subtotal td:nth-child(1)'
+    ) ?>
+
+        <?php if ($_order->getDiscountAmount() > 0): ?>
+            <tr id="discount">
+                <td colspan="2" align="right"><?= $block->escapeHtml((($_order->getCouponCode()) ?
+                        __('Discount (%1)', $_order->getCouponCode()) : __('Discount'))) ?></td>
+                <td align="right"><?= /* @noEscape */ $_order->formatPrice(0.00 - $_order->getDiscountAmount()) ?></td>
             </tr>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'padding:3px 9px',
+                'table#order-details tr#discount td:nth-child(0)'
+            ) ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'padding:3px 9px',
+                'table#order-details tr#discount td:nth-child(1)'
+            ) ?>
         <?php endif; ?>
-        <?php if ($_order->getShippingAmount() || $_order->getShippingDescription()) : ?>
-            <tr>
-                <td colspan="2" align="right" style="padding:3px 9px"><?= $block->escapeHtml(__('Shipping & Handling')) ?></td>
-                <td align="right" style="padding:3px 9px"><?= /* @noEscape */ $_order->formatPrice($_order->getShippingAmount()) ?></td>
+        <?php if ($_order->getShippingAmount() || $_order->getShippingDescription()): ?>
+            <tr id="shipping">
+                <td colspan="2" align="right"><?= $block->escapeHtml(__('Shipping & Handling')) ?></td>
+                <td align="right"><?= /* @noEscape */ $_order->formatPrice($_order->getShippingAmount()) ?></td>
             </tr>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'padding:3px 9px',
+                'table#order-details tr#shipping td:nth-child(0)'
+            ) ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'padding:3px 9px',
+                'table#order-details tr#shipping td:nth-child(1)'
+            ) ?>
         <?php endif; ?>
-        <?php if ($_order->getTaxAmount() > 0) : ?>
-            <tr>
-                <td colspan="2" align="right" style="padding:3px 9px"><?= $block->escapeHtml(__('Tax')) ?></td>
-                <td align="right" style="padding:3px 9px"><?= /* @noEscape */ $_order->formatPrice($_order->getTaxAmount()) ?></td>
+        <?php if ($_order->getTaxAmount() > 0): ?>
+            <tr id="tax">
+                <td colspan="2" align="right"><?= $block->escapeHtml(__('Tax')) ?></td>
+                <td align="right"><?= /* @noEscape */ $_order->formatPrice($_order->getTaxAmount()) ?></td>
             </tr>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'padding:3px 9px',
+                'table#order-details tr#tax td:nth-child(0)'
+            ) ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'padding:3px 9px',
+                'table#order-details tr#tax td:nth-child(1)'
+            ) ?>
         <?php endif; ?>
-        <tr bgcolor="#DEE5E8">
-            <td colspan="2" align="right" style="padding:3px 9px"><strong style="font-size: larger"><?= $block->escapeHtml(__('Grand Total')) ?></strong></td>
-            <td align="right" style="padding:6px 9px"><strong style="font-size: larger"><?= /* @noEscape */ $_order->formatPrice($_order->getGrandTotal()) ?></strong></td>
+        <tr id="grand-total" bgcolor="#DEE5E8">
+            <td colspan="2" align="right"><strong><?= $block->escapeHtml(__('Grand Total')) ?></strong></td>
+            <td align="right"><strong><?= /* @noEscape */ $_order->formatPrice($_order->getGrandTotal())?></strong></td>
         </tr>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'table#order-details tr#grand-total td:nth-child(0)'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'font-size: larger',
+        'table#order-details tr#grand-total td:nth-child(0) strong'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'padding:3px 9px',
+        'table#order-details tr#grand-total td:nth-child(1)'
+    ) ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'font-size: larger',
+        'table#order-details tr#grand-total td:nth-child(1) strong'
+    ) ?>
     </tfoot>
 </table>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "border:1px solid #bebcb7; background:#f8f7f5;",
+    'table#order-details'
+) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'padding:3px 9px',
+    'table#order-details thead tr th:nth-child(0)'
+) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'padding:3px 9px',
+    'table#order-details thead tr th:nth-child(1)'
+) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'padding:3px 9px',
+    'table#order-details thead tr th:nth-child(2)'
+) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
index 6c04bc7ddd803..cf2311de5dbb0 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/form.phtml
@@ -4,8 +4,6 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
 /* @var \Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Form $block */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml
index f8e914a2c9b2f..7dc009a9bc662 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/due.phtml
@@ -3,10 +3,15 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<?php if ($block->getCanDisplayTotalDue()) : ?>
-<tr>
-    <td class="label"><strong style="font-size: larger"><?= $block->escapeHtml(__('Total Due')) ?></strong></td>
-    <td class="emph" style="font-size: larger"><?= /* @noEscape */ $block->displayPriceAttribute('total_due', true) ?></td>
+<?php if ($block->getCanDisplayTotalDue()): ?>
+<tr id="total-due">
+    <td class="label"><strong><?= $block->escapeHtml(__('Total Due')) ?></strong></td>
+
+    <td class="emph"><?= /* @noEscape */ $block->displayPriceAttribute('total_due', true) ?></td>
 </tr>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('font-size: larger', 'tr.total-due td.label strong') ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('font-size: larger', 'tr.total-due td.emph') ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml
index af5d58d47fce1..d501069f1d979 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/grand.phtml
@@ -3,19 +3,29 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $_source  = $block->getSource() ?>
 <?php $block->setPriceDataObject($_source) ?>
 
-<tr>
+<tr id="grand-totals">
     <td class="label">
-        <strong style="font-size: larger">
-        <?php if ($block->getGrandTotalTitle()) : ?>
+        <strong>
+        <?php if ($block->getGrandTotalTitle()): ?>
             <?= $block->escapeHtml($block->getGrandTotalTitle()) ?>
-        <?php else : ?>
+        <?php else: ?>
             <?= $block->escapeHtml(__('Grand Total')) ?>
         <?php endif; ?>
         </strong>
     </td>
-    <td class="emph" style="font-size: larger"><?= /* @noEscape */ $block->displayPriceAttribute('grand_total', true) ?></td>
+    <td class="emph"><?= /* @noEscape */ $block->displayPriceAttribute('grand_total', true) ?></td>
 </tr>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "font-size: larger",
+    'tr#grand-totals td.label strong'
+) ?>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "font-size: larger",
+    'tr#grand-totals td.emph'
+) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
index a68fb09fd2058..4f1b18f3fcda8 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
@@ -4,26 +4,30 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
-/** @var $block \Magento\Sales\Block\Adminhtml\Order\Totals\Tax */
+/**
+ * @var $block \Magento\Sales\Block\Adminhtml\Order\Totals\Tax
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 /** @var $_source \Magento\Sales\Model\Order\Invoice */
 $_source    = $block->getSource();
 $_order     = $block->getOrder();
 $_fullInfo  = $block->getFullTaxInfo();
+
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
 ?>
 
-<?php if ($block->displayFullSummary() && $_fullInfo) : ?>
-<tr class="summary-total" onclick="expandDetails(this, '.summary-details')">
-<?php else : ?>
+<?php if ($block->displayFullSummary() && $_fullInfo): ?>
+<tr class="summary-total">
+<?php else: ?>
 <tr>
-    <?php endif; ?>
+<?php endif; ?>
     <td class="label">
         <div class="summary-collapse" tabindex="0">
-            <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayFullSummary()) : ?>
+            <?php if ($taxHelper->displayFullSummary()): ?>
                 <?= $block->escapeHtml(__('Total Tax')) ?>
-            <?php else : ?>
+            <?php else: ?>
                 <?= $block->escapeHtml(__('Tax')) ?>
             <?php endif;?>
         </div>
@@ -32,11 +36,16 @@ $_fullInfo  = $block->getFullTaxInfo();
         <?= /* @noEscape */ $block->displayAmount($_source->getTaxAmount(), $_source->getBaseTaxAmount()) ?>
     </td>
 </tr>
-<?php if ($block->displayFullSummary()) : ?>
+<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+    'onclick',
+    "expandDetails(this, '.summary-details')",
+    'tr.summary-total'
+) ?>
+<?php if ($block->displayFullSummary()): ?>
     <?php $isTop = 1; ?>
-    <?php if (isset($_fullInfo[0]['rates'])) : ?>
-        <?php foreach ($_fullInfo as $info) : ?>
-            <?php if (isset($info['hidden']) && $info['hidden']) :
+    <?php if (isset($_fullInfo[0]['rates'])): ?>
+        <?php foreach ($_fullInfo as $info): ?>
+            <?php if (isset($info['hidden']) && $info['hidden']):
                 continue;
             endif; ?>
             <?php
@@ -47,39 +56,49 @@ $_fullInfo  = $block->getFullTaxInfo();
             $isFirst    = 1;
             ?>
 
-            <?php foreach ($rates as $rate) : ?>
-                <tr class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>" style="display:none;">
-                    <?php if ($rate['percent'] !== null) : ?>
-                        <td class="admin__total-mark"><?= $block->escapeHtml($rate['title']) ?> (<?= (float)$rate['percent'] ?>%)<br /></td>
-                    <?php else : ?>
+            <?php foreach ($rates as $rate): ?>
+                <tr id="rate-<?= /* @noEscape */ $rate->getId() ?>"
+                    class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
+                    <?php if ($rate['percent'] !== null): ?>
+                        <td class="admin__total-mark">
+                            <?= $block->escapeHtml($rate['title']) ?> (<?= (float)$rate['percent'] ?>%)<br />
+                        </td>
+                    <?php else: ?>
                         <td class="admin__total-mark"><?= $block->escapeHtml($rate['title']) ?><br /></td>
                     <?php endif; ?>
-                    <?php if ($isFirst) : ?>
-                        <td rowspan="<?= count($rates) ?>"><?= /* @noEscape */ $block->displayAmount($amount, $baseAmount) ?></td>
+                    <?php if ($isFirst): ?>
+                        <td rowspan="<?= count($rates) ?>">
+                            <?= /* @noEscape */ $block->displayAmount($amount, $baseAmount) ?>
+                        </td>
                     <?php endif; ?>
                 </tr>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#rate-' . $rate->getId()) ?>
                 <?php
                 $isFirst = 0;
                 $isTop = 0;
                 ?>
             <?php endforeach; ?>
         <?php endforeach; ?>
-    <?php else : ?>
-        <?php foreach ($_fullInfo as $info) : ?>
+    <?php else: ?>
+        <?php foreach ($_fullInfo as $info): ?>
             <?php
             $percent    = $info['percent'];
             $amount     = $info['tax_amount'];
             $baseAmount = $info['base_tax_amount'];
             $isFirst    = 1;
             ?>
-            <tr class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>" style="display:none;">
-                <?php if ($info['percent'] !== null) : ?>
-                    <td class="admin__total-mark"><?= $block->escapeHtml($info['title']) ?> (<?= (float)$info['percent'] ?>%)<br /></td>
-                <?php else : ?>
+            <tr id="info-<?= /* @noEscape */ $info->getCode() ?>"
+                class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
+                <?php if ($info['percent'] !== null): ?>
+                    <td class="admin__total-mark">
+                        <?= $block->escapeHtml($info['title']) ?> (<?= (float)$info['percent'] ?>%)<br />
+                    </td>
+                <?php else: ?>
                     <td class="admin__total-mark"><?= $block->escapeHtml($info['title']) ?><br /></td>
                 <?php endif; ?>
                     <td><?= /* @noEscape */ $block->displayAmount($amount, $baseAmount) ?></td>
             </tr>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#info-' . $info->getCode()) ?>
             <?php
             $isFirst = 0;
             $isTop = 0;
diff --git a/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml b/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml
index 0dff0710dd63a..39d6dafe57244 100644
--- a/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml
+++ b/app/code/Magento/Sales/view/frontend/templates/guest/form.phtml
@@ -4,6 +4,7 @@
  * See COPYING.txt for license details.
  */
 
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <form class="form form-orders-search"
       id="oar-widget-orders-and-returns-form"
@@ -23,7 +24,9 @@
             </div>
         </div>
         <div class="field lastname required">
-            <label class="label" for="oar-billing-lastname"><span><?= $block->escapeHtml(__('Billing Last Name')) ?></span></label>
+            <label class="label" for="oar-billing-lastname">
+                <span><?= $block->escapeHtml(__('Billing Last Name')) ?></span>
+            </label>
 
             <div class="control">
                 <input type="text" class="input-text" id="oar-billing-lastname" name="oar_billing_lastname"
@@ -31,7 +34,9 @@
             </div>
         </div>
         <div class="field find required">
-            <label class="label" for="quick-search-type-id"><span><?= $block->escapeHtml(__('Find Order By')) ?></span></label>
+            <label class="label" for="quick-search-type-id">
+                <span><?= $block->escapeHtml(__('Find Order By')) ?></span>
+            </label>
 
             <div class="control">
                 <select name="oar_type" id="quick-search-type-id" class="select">
@@ -48,13 +53,14 @@
                        data-validate="{required:true, 'validate-email':true}"/>
             </div>
         </div>
-        <div id="oar-zip" style="display: none;" class="field zip required">
+        <div id="oar-zip" class="field zip required">
             <label class="label" for="oar_zip"><span><?= $block->escapeHtml(__('Billing ZIP Code')) ?></span></label>
 
             <div class="control">
                 <input type="text" class="input-text" id="oar_zip" name="oar_zip" data-validate="{required:true}"/>
             </div>
         </div>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'div#oar-zip') ?>
     </fieldset>
     <div class="actions-toolbar">
         <div class="primary">
diff --git a/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml b/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml
index 25926688c6f47..7772e7b9680fd 100644
--- a/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml
+++ b/app/code/Magento/Sales/view/frontend/templates/widget/guest/form.phtml
@@ -4,15 +4,19 @@
  * See COPYING.txt for license details.
  */
 
-/** @var $block \Magento\Sales\Block\Widget\Guest\Form */
+/**
+ * @var $block \Magento\Sales\Block\Widget\Guest\Form
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if ($block->isEnable()) : ?>
+<?php if ($block->isEnable()): ?>
     <div class="widget block block-orders-returns">
         <div class="block-title">
             <strong role="heading" aria-level="2"><?= $block->escapeHtml(__('Orders and Returns')) ?></strong>
         </div>
         <div class="block-content">
-            <form id="oar-widget-orders-and-returns-form" data-mage-init='{"ordersReturns":{},"validation":{}}' action="<?= $block->escapeUrl($block->getActionUrl()) ?>" method="post"
+            <form id="oar-widget-orders-and-returns-form" data-mage-init='{"ordersReturns":{},"validation":{}}'
+                  action="<?= $block->escapeUrl($block->getActionUrl()) ?>" method="post"
                   class="form form-orders-search" name="guest_post">
                 <fieldset class="fieldset">
                     <div class="field find required">
@@ -26,10 +30,13 @@
                         </div>
                     </div>
                     <div class="field id required">
-                        <label for="oar-order-id" class="label"><span><?= $block->escapeHtml(__('Order ID')) ?></span></label>
+                        <label for="oar-order-id" class="label">
+                            <span><?= $block->escapeHtml(__('Order ID')) ?></span>
+                        </label>
 
                         <div class="control">
-                            <input type="text" class="input-text" id="oar-order-id" name="oar_order_id" autocomplete="off"
+                            <input type="text" class="input-text" id="oar-order-id" name="oar_order_id"
+                                   autocomplete="off"
                                    data-validate="{required:true}">
                         </div>
                     </div>
@@ -50,14 +57,17 @@
                                    data-validate="{required:true, 'validate-email':true}">
                         </div>
                     </div>
-                    <div id="oar-zip" style="display: none;" class="field zip required">
-                        <label for="oar_zip" class="label"><span><?= $block->escapeHtml(__('Billing ZIP Code')) ?></span></label>
+                    <div id="oar-zip" class="field zip required">
+                        <label for="oar_zip" class="label">
+                            <span><?= $block->escapeHtml(__('Billing ZIP Code')) ?></span>
+                        </label>
 
                         <div class="control">
                             <input type="text" class="input-text" id="oar_zip" name="oar_zip"
                                    data-validate="{required:true}"/>
                         </div>
                     </div>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#oar-zip') ?>
                 </fieldset>
                 <div class="actions-toolbar">
                     <div class="primary">
diff --git a/app/code/Magento/Search/view/frontend/templates/term.phtml b/app/code/Magento/Search/view/frontend/templates/term.phtml
index b06ebcfe66966..51f40e8247ccf 100644
--- a/app/code/Magento/Search/view/frontend/templates/term.phtml
+++ b/app/code/Magento/Search/view/frontend/templates/term.phtml
@@ -3,19 +3,27 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/**
+ * @var \Magento\Search\Block\Term $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php if (count($block->getTerms()) > 0) : ?>
+<?php if (count($block->getTerms()) > 0): ?>
     <ul class="search-terms">
-        <?php foreach ($block->getTerms() as $_term) : ?>
-            <li class="item">
-                <a href="<?= $block->escapeUrl($block->getSearchUrl($_term)) ?>"
-                   style="font-size:<?= /* @noEscape */ $_term->getRatio()*70+75 ?>%;">
+        <?php foreach ($block->getTerms() as $_term): ?>
+            <li id="term-<?= /* @noEscape */ $_term->getId() ?>" class="item">
+                <a href="<?= $block->escapeUrl($block->getSearchUrl($_term)) ?>">
                     <?= $block->escapeHtml($_term->getQueryText()) ?>
                 </a>
             </li>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                "font-size:" . ($_term->getRatio()*70+75) . "%;",
+                'li#term-' . $_term->getId()
+            ) ?>
         <?php endforeach; ?>
     </ul>
-<?php else : ?>
+<?php else: ?>
     <div class="message notice">
         <div><?= $block->escapeHtml(__('There are no search terms available.')) ?></div>
     </div>
diff --git a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml
index eb9318271c1d8..b1e3da8612f78 100644
--- a/app/code/Magento/SendFriend/view/frontend/templates/send.phtml
+++ b/app/code/Magento/SendFriend/view/frontend/templates/send.phtml
@@ -7,7 +7,10 @@
 /**
  * Send to friend form
  */
-/** @var \Magento\SendFriend\Block\Send $block */
+/**
+ * @var \Magento\SendFriend\Block\Send $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 ?>
 <script id="add-recipient-tmpl" type="text/x-magento-template">
@@ -21,15 +24,20 @@
     </div>
     <fieldset class="fieldset">
         <div class="field name required">
-            <label for="recipients-name<%- data._index_ %>" class="label"><span><?= $block->escapeHtml(__('Name')) ?></span></label>
+            <label for="recipients-name<%- data._index_ %>" class="label">
+                <span><?= $block->escapeHtml(__('Name')) ?></span>
+            </label>
             <div class="control">
-                <input name="recipients[name][<%- data._index_ %>]" type="text" title="<?= $block->escapeHtmlAttr(__('Name')) ?>" class="input-text"
+                <input name="recipients[name][<%- data._index_ %>]" type="text"
+                       title="<?= $block->escapeHtmlAttr(__('Name')) ?>" class="input-text"
                        id="recipients-name<%- data._index_ %>" data-validate="{required:true}"/>
             </div>
         </div>
 
         <div class="field email required">
-            <label for="recipients-email<%- data._index_ %>" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
+            <label for="recipients-email<%- data._index_ %>" class="label">
+                <span><?= $block->escapeHtml(__('Email')) ?></span>
+            </label>
             <div class="control">
                 <input name="recipients[email][<%- data._index_ %>]" title="<?= $block->escapeHtmlAttr(__('Email')) ?>"
                        id="recipients-email<%- data._index_ %>" type="email" class="input-text"
@@ -71,7 +79,8 @@
             <label for="sender-email" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
             <div class="control">
                 <input name="sender[email]" value="<?= $block->escapeHtmlAttr($block->getEmail()) ?>"
-                       title="<?= $block->escapeHtmlAttr(__('Email')) ?>" id="sender-email" type="email" class="input-text"
+                       title="<?= $block->escapeHtmlAttr(__('Email')) ?>" id="sender-email" type="email"
+                       class="input-text"
                        data-mage-init='{"mage/trim-input":{}}'
                        data-validate="{required:true, 'validate-email':true}"/>
             </div>
@@ -91,14 +100,16 @@
         <legend class="legend"><span><?= $block->escapeHtml(__('Invitee')) ?></span></legend>
         <br />
         <div id="recipients-options"></div>
-        <?php if ($block->getMaxRecipients()) : ?>
-            <div id="max-recipient-message" style="display: none;" class="message notice limit" role="alert">
-                <span><?= $block->escapeHtml(__('Maximum %1 email addresses allowed.', $block->getMaxRecipients())) ?></span>
+        <?php if ($block->getMaxRecipients()): ?>
+            <div id="max-recipient-message" class="message notice limit" role="alert">
+                <span><?= $block->escapeHtml(__('Maximum %1 email addresses allowed.', $block->getMaxRecipients())) ?>
+                </span>
             </div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#max-recipient-message') ?>
         <?php endif; ?>
         <div class="actions-toolbar">
             <div class="secondary">
-            <?php if (1 < $block->getMaxRecipients()) : ?>
+            <?php if (1 < $block->getMaxRecipients()): ?>
                 <button type="button" id="add-recipient-button" class="action add">
                     <span><?= $block->escapeHtml(__('Add Invitee')) ?></span></button>
             <?php endif; ?>
@@ -110,7 +121,7 @@
     <div class="actions-toolbar">
         <div class="primary">
             <button type="submit"
-                    class="action submit primary"<?php if (!$block->canSend()) : ?> disabled="disabled"<?php endif ?>>
+                    class="action submit primary"<?php if (!$block->canSend()): ?> disabled="disabled"<?php endif ?>>
                 <span><?= $block->escapeHtml(__('Send Email')) ?></span></button>
         </div>
         <div class="secondary">
diff --git a/app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php
index 17efc11856364..4869a685f3064 100644
--- a/app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Shipping\Block\Adminhtml\Create;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Tax\Helper\Data as TaxHelper;
+
 /**
  * Adminhtml shipment create form
  *
@@ -13,6 +16,24 @@
  */
 class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
 {
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Framework\Registry $registry
+     * @param \Magento\Sales\Helper\Admin $adminHelper
+     * @param array $data
+     * @param TaxHelper|null $taxHelper
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Framework\Registry $registry,
+        \Magento\Sales\Helper\Admin $adminHelper,
+        array $data = [],
+        ?TaxHelper $taxHelper = null
+    ) {
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
+        parent::__construct($context, $registry, $adminHelper, $data);
+    }
+
     /**
      * Retrieve invoice order
      *
@@ -44,6 +65,8 @@ public function getShipment()
     }
 
     /**
+     * Prepare layout.
+     *
      * @return \Magento\Framework\View\Element\AbstractBlock
      */
     protected function _prepareLayout()
@@ -53,6 +76,8 @@ protected function _prepareLayout()
     }
 
     /**
+     * Return payment html.
+     *
      * @return string
      */
     public function getPaymentHtml()
@@ -61,6 +86,8 @@ public function getPaymentHtml()
     }
 
     /**
+     * Return items html.
+     *
      * @return string
      */
     public function getItemsHtml()
@@ -69,6 +96,8 @@ public function getItemsHtml()
     }
 
     /**
+     * Generate save url.
+     *
      * @return string
      */
     public function getSaveUrl()
diff --git a/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php
index 55eecfa00d6da..5830160b60791 100644
--- a/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Shipping\Block\Adminhtml\Order\Tracking;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Shipping\Helper\Data as ShippingHelper;
+
 /**
  * Shipment tracking control form
  *
@@ -24,14 +27,17 @@ class View extends \Magento\Shipping\Block\Adminhtml\Order\Tracking
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
+     * @param ShippingHelper|null $shippingHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Framework\Registry $registry,
         \Magento\Shipping\Model\CarrierFactory $carrierFactory,
-        array $data = []
+        array $data = [],
+        ?ShippingHelper $shippingHelper = null
     ) {
+        $data['shippingHelper'] = $shippingHelper ?? ObjectManager::getInstance()->get(ShippingHelper::class);
         parent::__construct($context, $shippingConfig, $registry, $data);
         $this->_carrierFactory = $carrierFactory;
     }
diff --git a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php
index 409797780bcf6..8467a34ed0368 100644
--- a/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php
@@ -11,6 +11,10 @@
  */
 namespace Magento\Shipping\Block\Adminhtml\View;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Shipping\Helper\Data as ShippingHelper;
+use Magento\Tax\Helper\Data as TaxHelper;
+
 /**
  * @api
  * @since 100.0.2
@@ -28,15 +32,21 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
      * @param \Magento\Sales\Helper\Admin $adminHelper
      * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
+     * @param ShippingHelper|null $shippingHelper
+     * @param TaxHelper|null $taxHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Sales\Helper\Admin $adminHelper,
         \Magento\Shipping\Model\CarrierFactory $carrierFactory,
-        array $data = []
+        array $data = [],
+        ?ShippingHelper $shippingHelper = null,
+        ?TaxHelper $taxHelper = null
     ) {
         $this->_carrierFactory = $carrierFactory;
+        $data['shippingHelper'] = $shippingHelper ?? ObjectManager::getInstance()->get(ShippingHelper::class);
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
         parent::__construct($context, $registry, $adminHelper, $data);
     }
 
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml
index d539a44f58a63..7de40943878cf 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/form.phtml
@@ -3,8 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
+
+/**
+ * @var \Magento\Shipping\Block\Adminhtml\Create\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
 ?>
 <form id="edit_form" method="post" action="<?= $block->escapeUrl($block->getSaveUrl()) ?>">
     <?= $block->getBlockHtml('formkey') ?>
@@ -22,7 +28,9 @@
                 </div>
                 <div class="admin__page-section-item-content">
                     <div><?= $block->getPaymentHtml() ?></div>
-                    <div class="order-payment-currency"><?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?></div>
+                    <div class="order-payment-currency">
+                        <?= $block->escapeHtml(__('The order was placed using %1.', $_order->getOrderCurrencyCode())) ?>
+                    </div>
                 </div>
             </div>
             <div class="admin__page-section-item order-shipping-address">
@@ -37,15 +45,15 @@
                     <div class="shipping-description-content">
                         <?= $block->escapeHtml(__('Total Shipping Charges')) ?>:
 
-                        <?php if ($this->helper(Magento\Tax\Helper\Data::class)->displayShippingPriceIncludingTax()) : ?>
+                        <?php if ($taxHelper->displayShippingPriceIncludingTax()): ?>
                             <?php $_excl = $block->displayShippingPriceInclTax($_order); ?>
-                        <?php else : ?>
+                        <?php else: ?>
                             <?php $_excl = $block->displayPriceAttribute('shipping_amount', false, ' '); ?>
                         <?php endif; ?>
                         <?php $_incl = $block->displayShippingPriceInclTax($_order); ?>
                         <?= /** @noEscape */ $_excl ?>
-                        <?php if ($this->helper(Magento\Tax\Helper\Data::class)->displayShippingBothPrices()
-                            && $_incl != $_excl) : ?>
+                        <?php if ($taxHelper->displayShippingBothPrices()
+                            && $_incl != $_excl): ?>
                         (<?= $block->escapeHtml(__('Incl. Tax')) ?> <?= /** @noEscape */ $_incl ?>)
                         <?php endif; ?>
                     </div>
@@ -59,7 +67,8 @@
         <?= $block->getItemsHtml() ?>
     </div>
 </form>
-<script>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "mage/mage",
@@ -68,5 +77,8 @@ require([
     jQuery('#edit_form').mage('form').mage('validation');
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?= $block->getChildHtml('shipment_packaging');
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml
index ddb5dde5dfac7..54d7aaec21f9b 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml
@@ -3,8 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
-//phpcs:disable Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <section class="admin__page-section">
@@ -17,17 +17,17 @@
                 <tr class="headings">
                     <th class="col-product"><span><?= $block->escapeHtml(__('Product')) ?></span></th>
                     <th class="col-ordered-qty"><span><?= $block->escapeHtml(__('Qty')) ?></span></th>
-                    <th class="col-qty<?php if ($block->isShipmentRegular()) : ?> last<?php endif; ?>">
+                    <th class="col-qty<?php if ($block->isShipmentRegular()): ?> last<?php endif; ?>">
                         <span><?= $block->escapeHtml(__('Qty to Ship')) ?></span>
                     </th>
-                    <?php if (!$block->canShipPartiallyItem()) : ?>
+                    <?php if (!$block->canShipPartiallyItem()): ?>
                     <th class="col-ship last"><span><?= $block->escapeHtml(__('Ship')) ?></span></th>
                     <?php endif; ?>
                 </tr>
             </thead>
             <?php $_items = $block->getShipment()->getAllItems() ?>
-            <?php $_i = 0; foreach ($_items as $_item) :
-                if ($_item->getOrderItem()->getParentItem()) :
+            <?php $_i = 0; foreach ($_items as $_item):
+                if ($_item->getOrderItem()->getParentItem()):
                     continue;
                 endif;
                 $_i++ ?>
@@ -70,14 +70,18 @@
             <span class="title"><?= $block->escapeHtml(__('Shipment Options')) ?></span>
         </div>
         <div class="admin__page-section-item-content">
-            <?php if ($block->canCreateShippingLabel()) : ?>
+            <?php if ($block->canCreateShippingLabel()): ?>
                 <div class="field choice admin__field admin__field-option field-create">
                     <input id="create_shipping_label"
                            class="admin__control-checkbox"
                            name="shipment[create_shipping_label]"
                            value="1"
-                           type="checkbox"
-                           onclick="toggleCreateLabelCheckbox();"/>
+                           type="checkbox"/>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        'toggleCreateLabelCheckbox();',
+                        'input#create_shipping_label'
+                    ) ?>
                     <label class="admin__field-label"
                            for="create_shipping_label">
                         <span><?= $block->escapeHtml(__('Create Shipping Label')) ?></span></label>
@@ -95,7 +99,7 @@
                     <span><?=$block->escapeHtml(__('Append Comments')) ?></span></label>
             </div>
 
-            <?php if ($block->canSendShipmentEmail()) : ?>
+            <?php if ($block->canSendShipmentEmail()): ?>
                 <div class="field choice admin__field admin__field-option field-email">
                     <input id="send_email"
                            class="admin__control-checkbox"
@@ -115,7 +119,8 @@
         </div>
     </div>
 </section>
-<script>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "Magento_Ui/js/modal/alert",
@@ -150,7 +155,7 @@ window.toggleCreateLabelCheckbox = function() {
 window.submitShipment = function(btn) {
     if (!validQtyItems()) {
         alert({
-            content: '<?= $block->escapeJs($block->escapeHtml(__('Invalid value(s) for Qty to Ship'))) ?>'
+            content: '{$block->escapeJs(__('Invalid value(s) for Qty to Ship'))}'
         });
         return;
     }
@@ -186,4 +191,7 @@ window.sendEmailCheckbox = sendEmailCheckbox;
 //]]>
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml
index 22d546f4fb474..4ed817ddd7e0f 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml
@@ -3,10 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
-//phpcs:disable Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore
-//phpcs:disable Squiz.Operators.IncrementDecrementUsage.NotAllowed
 //phpcs:disable Squiz.PHP.NonExecutableCode.Unreachable
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="grid">
     <?php $randomId = rand(); ?>
@@ -18,24 +16,31 @@
                         <label class="data-grid-checkbox-cell-inner">
                             <input type="checkbox"
                                    id="select-items-<?= /* @noEscape */ $randomId ?>"
-                                   onchange="packaging.checkAllItems(this);"
                                    class="checkbox admin__control-checkbox"
                                    title="<?= $block->escapeHtmlAttr(__('Select All')) ?>">
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onchange',
+                                'packaging.checkAllItems(this);',
+                                'input#select-items-' . /* @noEscape */ $randomId
+                            ) ?>
                             <label for="select-items-<?= /* @noEscape */ $randomId ?>"></label>
                         </label>
                     </th>
                     <th class="data-grid-th"><?= $block->escapeHtml(__('Product Name')) ?></th>
                     <th class="data-grid-th"><?= $block->escapeHtml(__('Weight')) ?></th>
-                    <th class="data-grid-th" <?= $block->displayCustomsValue() ? '' : 'style="display: none;"' ?>>
+                    <th class="data-grid-th custom-value">
                         <?= $block->escapeHtml(__('Customs Value')) ?>
                     </th>
+                    <?php if (!$block->displayCustomsValue()): ?>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'th.custom-value') ?>
+                    <?php endif ?>
                     <th class="data-grid-th"><?= $block->escapeHtml(__('Qty Ordered')) ?></th>
                     <th class="data-grid-th"><?= $block->escapeHtml(__('Qty')) ?></th>
                 </tr>
             </thead>
             <tbody>
             <?php $i=0; ?>
-            <?php foreach ($block->getCollection() as $item) : ?>
+            <?php foreach ($block->getCollection() as $item): ?>
                 <?php
                     $_order = $block->getShipment()->getOrder();
                     $_orderItem = $_order->getItemById($item->getOrderItemId());
@@ -44,7 +49,7 @@
                     || ($_orderItem->isShipSeparately()
                         && !($_orderItem->getParentItemId() || $_orderItem->getParentItem()))
                     || (!$_orderItem->isShipSeparately()
-                        && ($_orderItem->getParentItemId() || $_orderItem->getParentItem()))) : ?>
+                        && ($_orderItem->getParentItemId() || $_orderItem->getParentItem()))): ?>
                     <?php continue; ?>
                 <?php endif; ?>
                 <tr class="data-grid-controls-row data-row <?= ($i++ % 2 != 0) ? '_odd-row' : '' ?>">
@@ -67,22 +72,25 @@
                     </td>
                     <?php
                     if ($block->displayCustomsValue()) {
-                        $customsValueDisplay = '';
                         $customsValueValidation = ' validate-zero-or-greater ';
                     } else {
-                        $customsValueDisplay = ' style="display: none;" ';
                         $customsValueValidation = '';
                     }
 
                     ?>
-                    <td <?= /* @noEscape */ $customsValueDisplay ?>>
+                    <td class="custom-value">
                         <input type="text"
                                name="customs_value"
                                class="input-text admin__control-text <?= /* @noEscape */ $customsValueValidation ?>"
                                value="<?= $block->escapeHtmlAttr($block->formatPrice($item->getPrice())) ?>"
-                               size="10"
-                               onblur="packaging.recalcContainerWeightAndCustomsValue(this);">
+                               size="10">
                     </td>
+                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'td.custom-value') ?>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onblur',
+                        'packaging.recalcContainerWeightAndCustomsValue(this);',
+                        'td.custom-value'
+                    ) ?>
                     <td>
                         <?= /* @noEscape */ $item->getOrderItem()->getQtyOrdered()*1 ?>
                     </td>
@@ -92,16 +100,20 @@
                                name="qty"
                                value="<?= /* @noEscape */ $item->getQty()*1 ?>"
                                class="input-text admin__control-text qty
-                            <?php if ($item->getOrderItem()->getIsQtyDecimal()) : ?>
+                            <?php if ($item->getOrderItem()->getIsQtyDecimal()): ?>
                                qty-decimal
                             <?php endif ?>"> 
                         <button type="button"
                                 class="action-delete"
-                                data-action="package-delete-item"
-                                onclick="packaging.deleteItem(this);"
-                                style="display:none;">
+                                data-action="package-delete-item">
                             <span><?= $block->escapeHtml(__('Delete')) ?></span>
                         </button>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', 'button.action-delete') ?>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onclick',
+                            'packaging.deleteItem(this);',
+                            'button.action-delete'
+                        ) ?>
                     </td>
                 </tr>
             <?php endforeach; ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml
index 8d47f533449a7..90ecfa3862000 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/packed.phtml
@@ -3,12 +3,15 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
-//phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+/** @var \Magento\Shipping\Helper\Carrier $carrierHelper */
+$carrierHelper = $block->getData('carrierHelper');
 ?>
 
 <div id="packed_window">
-<?php foreach ($block->getPackages() as $packageId => $package) : ?>
+<?php foreach ($block->getPackages() as $packageId => $package): ?>
     <?php $package = new \Magento\Framework\DataObject($package) ?>
     <?php $params = new \Magento\Framework\DataObject($package->getParams()) ?>
     <section class="admin__page-section">
@@ -27,15 +30,18 @@
                                 </td>
                             </tr>
                             <tr>
-                            <?php if ($block->displayCustomsValue()) : ?>
+                            <?php if ($block->displayCustomsValue()): ?>
                                 <th><?= $block->escapeHtml(__('Customs Value')) ?></th>
-                                <td><?= $block->escapeHtml($block->displayCustomsPrice($params->getCustomsValue())) ?></td>
-                            <?php else : ?>
+                                <td><?= $block->escapeHtml($block->displayCustomsPrice($params->getCustomsValue())) ?>
+                                </td>
+                            <?php else: ?>
                                 <th><?= $block->escapeHtml(__('Total Weight')) ?></th>
-                                <td><?= $block->escapeHtml($params->getWeight() . ' ' . $this->helper(Magento\Shipping\Helper\Carrier::class)->getMeasureWeightName($params->getWeightUnits())) ?></td>
+                                <td><?= $block->escapeHtml($params->getWeight() . ' ' .
+                                        $carrierHelper->getMeasureWeightName($params->getWeightUnits())) ?>
+                                </td>
                             <?php endif; ?>
                             </tr>
-                        <?php if ($params->getSize()) : ?>
+                        <?php if ($params->getSize()): ?>
                             <tr>
                                 <th><?= $block->escapeHtml(__('Size')) ?></th>
                                 <td><?= $block->escapeHtml(ucfirst(strtolower($params->getSize()))) ?></td>
@@ -50,9 +56,10 @@
                             <tr>
                                 <th><?= $block->escapeHtml(__('Length')) ?></th>
                                 <td>
-                                <?php if ($params->getLength() != null) : ?>
-                                    <?= $block->escapeHtml($params->getLength() . ' ' . $this->helper(Magento\Shipping\Helper\Carrier::class)->getMeasureDimensionName($params->getDimensionUnits())) ?>
-                                <?php else : ?>
+                                <?php if ($params->getLength() != null): ?>
+                                    <?= $block->escapeHtml($params->getLength() . ' ' .
+                                        $carrierHelper->getMeasureDimensionName($params->getDimensionUnits())) ?>
+                                <?php else: ?>
                                     --
                                 <?php endif; ?>
                                 </td>
@@ -60,9 +67,10 @@
                             <tr>
                                 <th><?= $block->escapeHtml(__('Width')) ?></th>
                                 <td>
-                                <?php if ($params->getWidth() != null) : ?>
-                                    <?= $block->escapeHtml($params->getWidth() . ' ' . $this->helper(Magento\Shipping\Helper\Carrier::class)->getMeasureDimensionName($params->getDimensionUnits())) ?>
-                                <?php else : ?>
+                                <?php if ($params->getWidth() != null): ?>
+                                    <?= $block->escapeHtml($params->getWidth() . ' ' .
+                                        $carrierHelper->getMeasureDimensionName($params->getDimensionUnits())) ?>
+                                <?php else: ?>
                                     --
                                 <?php endif; ?>
                                 </td>
@@ -70,9 +78,10 @@
                             <tr>
                                 <th><?= $block->escapeHtml(__('Height')) ?></th>
                                 <td>
-                                <?php if ($params->getHeight() != null) : ?>
-                                    <?= $block->escapeHtml($params->getHeight() . ' ' . $this->helper(Magento\Shipping\Helper\Carrier::class)->getMeasureDimensionName($params->getDimensionUnits())) ?>
-                                <?php else : ?>
+                                <?php if ($params->getHeight() != null): ?>
+                                    <?= $block->escapeHtml($params->getHeight() . ' ' .
+                                        $carrierHelper->getMeasureDimensionName($params->getDimensionUnits())) ?>
+                                <?php else: ?>
                                     --
                                 <?php endif; ?>
                                 </td>
@@ -83,26 +92,33 @@
                 <div class="col-m-4">
                     <table class="admin__table-secondary">
                         <tbody>
-                        <?php if ($params->getDeliveryConfirmation() != null) : ?>
+                        <?php if ($params->getDeliveryConfirmation() != null): ?>
                             <tr>
                                 <th><?= $block->escapeHtml(__('Signature Confirmation')) ?></th>
-                                <td><?= $block->escapeHtml($block->getDeliveryConfirmationTypeByCode($params->getDeliveryConfirmation())) ?></td>
+                                <td>
+                                    <?= $block->escapeHtml(
+                                        $block->getDeliveryConfirmationTypeByCode($params->getDeliveryConfirmation())
+                                    ) ?></td>
                             </tr>
                         <?php endif; ?>
-                        <?php if ($params->getContentType() != null) : ?>
+                        <?php if ($params->getContentType() != null): ?>
                             <tr>
                                 <th><?= $block->escapeHtml(__('Contents')) ?></th>
-                                <?php if ($params->getContentType() == 'OTHER') : ?>
+                                <?php if ($params->getContentType() == 'OTHER'): ?>
                                     <td><?= $block->escapeHtml($params->getContentTypeOther()) ?></td>
-                                <?php else : ?>
-                                    <td><?= $block->escapeHtml($block->getContentTypeByCode($params->getContentType())) ?></td>
+                                <?php else: ?>
+                                    <td>
+                                        <?= $block->escapeHtml($block->getContentTypeByCode($params->getContentType()))
+                                        ?></td>
                                 <?php endif; ?>
                             </tr>
                         <?php endif; ?>
-                        <?php if ($params->getGirth()) : ?>
+                        <?php if ($params->getGirth()): ?>
                             <tr>
                                 <th><?= $block->escapeHtml(__('Girth')) ?></th>
-                                <td><?= $block->escapeHtml($params->getGirth() . ' ' . $this->helper(Magento\Shipping\Helper\Carrier::class)->getMeasureDimensionName($params->getGirthDimensionUnits())) ?></td>
+                                <td><?= $block->escapeHtml($params->getGirth() . ' ' .
+                                        $carrierHelper->getMeasureDimensionName($params->getGirthDimensionUnits())) ?>
+                                </td>
                             </tr>
                         <?php endif; ?>
                         </tbody>
@@ -119,7 +135,7 @@
                 <tr class="headings">
                     <th class="col-product"><span><?= $block->escapeHtml(__('Product')) ?></span></th>
                     <th class="col-weight"><span><?= $block->escapeHtml(__('Weight')) ?></span></th>
-                    <?php if ($block->displayCustomsValue()) : ?>
+                    <?php if ($block->displayCustomsValue()): ?>
                         <th class="col-custom"><span><?= $block->escapeHtml(__('Customs Value')) ?></span></th>
                     <?php endif; ?>
                     <th class="col-qty"><span><?= $block->escapeHtml(__('Qty Ordered')) ?></span></th>
@@ -127,7 +143,7 @@
                 </tr>
                 </thead>
                 <tbody id="">
-                <?php foreach ($package->getItems() as $itemId => $item) : ?>
+                <?php foreach ($package->getItems() as $itemId => $item): ?>
                     <?php $item = new \Magento\Framework\DataObject($item) ?>
                     <tr title="#" id="">
                         <td class="col-product">
@@ -136,7 +152,7 @@
                         <td class="col-weight">
                             <?= $block->escapeHtml($item->getWeight()) ?>
                         </td>
-                        <?php if ($block->displayCustomsValue()) : ?>
+                        <?php if ($block->displayCustomsValue()): ?>
                             <td class="col-custom">
                                 <?= $block->escapeHtml($block->displayCustomsPrice($item->getCustomsValue())) ?>
                             </td>
@@ -155,11 +171,15 @@
     </section>
 <?php endforeach; ?>
 </div>
-<script>
+<?php $scriptString = <<<script
+
     function showPackedWindow() {
         jQuery('#packed_window').modal('openModal');
     }
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 
 <script type="text/x-magento-init">
     {
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml
index 28322d9534926..206deb0f5c795 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml
@@ -5,14 +5,20 @@
  */
 //phpcs:disable PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket
 //phpcs:disable Magento2.Security.IncludeFile.FoundIncludeFile
+
+/**
+ * @var $block \Magento\Shipping\Block\Adminhtml\Order\Packaging
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php /** @var $block \Magento\Shipping\Block\Adminhtml\Order\Packaging */ ?>
 <?php
 $shippingMethod = $block->getShipment()->getOrder()->getShippingMethod();
 $sizeSource = $block->getSourceSizeModel()->toOptionArray();
 $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 : 0;
 ?>
-<script>
+
+<?php $scriptString = <<<script
+
     require([
         "jquery",
         "prototype",
@@ -20,21 +26,21 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
         "Magento_Ui/js/modal/modal"
     ], function(jQuery){
 
-        window.packaging = new Packaging(<?= /* @noEscape */ $block->getConfigDataJson() ?>);
+        window.packaging = new Packaging({$block->getConfigDataJson()});
         packaging.changeContainerType($$('select[name=package_container]')[0]);
         packaging.checkSizeAndGirthParameter(
-            $$('select[name=package_container]')[0],
-            <?= /* @noEscape */ $girthEnabled ?>
+            \$$('select[name=package_container]')[0],
+            {$girthEnabled}
         );
         packaging.setConfirmPackagingCallback(function(){
             packaging.setParamsCreateLabelRequest($('edit_form').serialize(true));
             packaging.sendCreateLabelRequest();
         });
         packaging.setLabelCreatedCallback(function(response){
-            setLocation("<?= $block->escapeJs($block->escapeUrl($block->getUrl(
+            setLocation("{$block->escapeJs($block->getUrl(
                 'sales/order/view',
                 ['order_id' => $block->getShipment()->getOrderId()]
-            ))); ?>");
+            ))}");
         });
         packaging.setCancelCallback(function() {
             if ($('create_shipping_label')) {
@@ -51,23 +57,23 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
         });
         jQuery('#packaging_window').modal({
             type: 'slide',
-            title: '<?= $block->escapeJs($block->escapeHtml(__('Create Packages'))) ?>',
+            title: '{$block->escapeJs(__('Create Packages'))}',
             buttons: [{
-                text: '<?= $block->escapeJs($block->escapeHtml(__('Cancel'))) ?>',
+                text: '{$block->escapeJs(__('Cancel'))}',
                 'class': 'action-secondary',
                 click: function () {
                     packaging.cancelPackaging();
                     this.closeModal();
                     }
                 }, {
-                text: '<?= $block->escapeJs($block->escapeHtml(__('Save'))) ?>',
+                text: '{$block->escapeJs(__('Save'))}',
                 'attr': {'disabled':'disabled', 'data-action':'save-packages'},
                 'class': 'action-primary _disabled',
                 click: function () {
                     packaging.confirmPackaging();
                     }
                 }, {
-                    text: '<?= $block->escapeJs($block->escapeHtml(__('Add Package'))) ?>',
+                    text: '{$block->escapeJs(__('Add Package'))}',
                     'attr': {'data-action':'add-packages'},
                     'class': 'action-secondary',
                     click: function () {
@@ -78,5 +84,8 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
         jQuery(document).trigger('packaging:inited');
         jQuery(document).data('packagingInited', true);
     });
-</script>
-<?php include ($block->getTemplateFile('Magento_Shipping::order/packaging/popup_content.phtml')) ?>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+<?php include($block->getTemplateFile('Magento_Shipping::order/packaging/popup_content.phtml')) ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup_content.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup_content.phtml
index f91741f439d46..0093c46d211fe 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup_content.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup_content.phtml
@@ -3,12 +3,15 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
+
+/**
+ * @var $block \Magento\Shipping\Block\Adminhtml\Order\Packaging
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<?php /** @var $block \Magento\Shipping\Block\Adminhtml\Order\Packaging */ ?>
 <div id="packaging_window">
-    <div class="message message-warning" style="display: none"></div>
-    <section class="admin__page-section" id="package_template" style="display:none;">
+    <div class="message message-warning"></div>
+    <section class="admin__page-section" id="package_template">
         <div class="admin__page-section-title">
             <span class="title">
                 <?= $block->escapeHtml(__('Package')) ?> <span data-role="package-number"></span>
@@ -16,16 +19,24 @@
             <div class="actions _primary">
                 <button type="button"
                         class="action-secondary"
-                        data-action="package-save-items"
-                        onclick="packaging.packItems(this);">
+                        data-action="package-save-items">
                     <span><?= $block->escapeHtml(__('Add Selected Product(s) to Package')) ?></span>
                 </button>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    'packaging.packItems(this);',
+                    "button[data-action='package-save-items']"
+                ) ?>
                 <button type="button"
                         class="action-secondary"
-                        data-action="package-add-items"
-                        onclick="packaging.getItemsForPack(this);">
+                        data-action="package-add-items">
                     <span><?= $block->escapeHtml(__('Add Products to Package')) ?></span>
                 </button>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onclick',
+                    'packaging.getItemsForPack(this);',
+                    "button[data-action='package-add-items']"
+                ) ?>
             </div>
         </div>
         <div class="admin__control-table-wrapper admin__page-subsection">
@@ -33,56 +44,70 @@
                 <thead>
                     <tr>
                         <th class="col-type"><?= $block->escapeHtml(__('Type')) ?></th>
-                        <?php if ($girthEnabled == 1) : ?>
+                        <?php if ($girthEnabled == 1): ?>
                         <th class="col-size"><?= $block->escapeHtml(__('Size')) ?></th>
                         <th class="col-girth"><?= $block->escapeHtml(__('Girth')) ?></th>
                         <th> </th>
                         <?php endif; ?>
-                        <th class="col-custom" <?= $block->displayCustomsValue() ? '' : 'style="display: none;"' ?>>
+                        <th class="col-custom">
                             <?= $block->escapeHtml(__('Customs Value')) ?>
                         </th>
+                        <?php if (!$block->displayCustomsValue()): ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none', 'th.col-custom') ?>
+                        <?php endif ?>
                         <th class="col-total-weight"><?= $block->escapeHtml(__('Total Weight')) ?></th>
                         <th class="col-length"><?= $block->escapeHtml(__('Length')) ?></th>
                         <th class="col-width"><?= $block->escapeHtml(__('Width')) ?></th>
                         <th class="col-height"><?= $block->escapeHtml(__('Height')) ?></th>
                         <th> </th>
-                        <?php if ($block->getDeliveryConfirmationTypes()) : ?>
+                        <?php if ($block->getDeliveryConfirmationTypes()): ?>
                         <th class="col-signature"><?= $block->escapeHtml(__('Signature Confirmation')) ?></th>
                         <?php endif; ?>
                         <th class="col-actions"> </th>
                     </tr>
                 </thead>
+
                 <tbody>
                     <tr>
                         <td class="col-type">
                             <?php $containers = $block->getContainers(); ?>
                             <select name="package_container"
-                                    onchange="packaging.changeContainerType(this);packaging.checkSizeAndGirthParameter(this, <?= $block->escapeJs($girthEnabled) ?>);"
-                                    <?php if (empty($containers)) : ?>
-                                        title="<?= $block->escapeHtmlAttr(__('USPS domestic shipments don\'t use package types.')) ?>"
+                                    <?php if (empty($containers)): ?>
+                                        title="<?= $block->escapeHtmlAttr(__(
+                                            'USPS domestic shipments don\'t use package types.'
+                                        )) ?>"
                                         disabled=""
                                         class="admin__control-select disabled"
-                                    <?php else : ?>
+                                    <?php else: ?>
                                         class="admin__control-select"
                                     <?php endif; ?>>
-                                <?php foreach ($containers as $key => $value) : ?>
+                                <?php foreach ($containers as $key => $value): ?>
                                     <option value="<?= $block->escapeHtmlAttr($key) ?>" >
                                         <?= $block->escapeHtml($value) ?>
                                     </option>
                                 <?php endforeach; ?>
                             </select>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onchange',
+                                "packaging.changeContainerType(this);
+                                packaging.checkSizeAndGirthParameter(this, {$block->escapeJs($girthEnabled)});",
+                                "select[name='package_container']"
+                            ) ?>
                         </td>
-                        <?php if ($girthEnabled == 1 && !empty($sizeSource)) : ?>
+                        <?php if ($girthEnabled == 1 && !empty($sizeSource)): ?>
                         <td>
-                            <select name="package_size"
-                                    class="admin__control-select"
-                                    onchange="packaging.checkSizeAndGirthParameter(this, <?= $block->escapeJs($girthEnabled) ?>);">
-                                <?php foreach ($sizeSource as $key => $value) : ?>
+                            <select name="package_size" class="admin__control-select">
+                                <?php foreach ($sizeSource as $key => $value): ?>
                                 <option value="<?= $block->escapeHtmlAttr($sizeSource[$key]['value']) ?>">
                                     <?= $block->escapeHtml($sizeSource[$key]['label']) ?>
                                 </option>
                                 <?php endforeach; ?>
                             </select>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onchange',
+                                "packaging.checkSizeAndGirthParameter(this, {$block->escapeJs($girthEnabled)});",
+                                "select[name='package_size']"
+                            ) ?>
                         </td>
                         <td>
                             <input type="text"
@@ -91,26 +116,33 @@
                         </td>
                         <td>
                             <select name="container_girth_dimension_units"
-                                    class="options-units-dimensions measures admin__control-select"
-                                    onchange="packaging.changeMeasures(this);">
-                                <option value="<?= /* @noEscape */ Zend_Measure_Length::INCH ?>" selected="selected" ><?= $block->escapeHtml(__('in')) ?></option>
-                                <option value="<?= /* @noEscape */ Zend_Measure_Length::CENTIMETER ?>" ><?= $block->escapeHtml(__('cm')) ?></option>
+                                    class="options-units-dimensions measures admin__control-select">
+                                <option value="<?= /* @noEscape */ Zend_Measure_Length::INCH ?>" selected="selected" >
+                                    <?= $block->escapeHtml(__('in')) ?>
+                                </option>
+                                <option value="<?= /* @noEscape */ Zend_Measure_Length::CENTIMETER ?>" >
+                                    <?= $block->escapeHtml(__('cm')) ?>
+                                </option>
                             </select>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onchange',
+                                "packaging.changeMeasures(this);",
+                                "select[name='container_girth_dimension_units']"
+                            ) ?>
                         </td>
                         <?php endif; ?>
                         <?php
                         if ($block->displayCustomsValue()) {
-                            $customsValueDisplay = '';
                             $customsValueValidation = ' validate-zero-or-greater ';
                         } else {
-                            $customsValueDisplay = ' style="display: none;" ';
                             $customsValueValidation = '';
                         }
                         ?>
-                        <td class="col-custom" <?= /* @noEscape */ $customsValueDisplay ?>>
+                        <td class="col-custom">
                             <div class="admin__control-addon">
                                 <input type="text"
-                                       class="customs-value input-text admin__control-text <?= /* @noEscape */ $customsValueValidation ?>"
+                                       class="customs-value input-text admin__control-text <?=
+                                       /* @noEscape */ $customsValueValidation ?>"
                                        name="package_customs_value" />
                                 <span class="admin__addon-suffix">
                                     <span class="customs-value-currency">
@@ -119,17 +151,29 @@
                                 </span>
                             </div>
                         </td>
+                        <?php if (!$block->displayCustomsValue()): ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none', 'td.col-custom') ?>
+                        <?php endif ?>
                         <td class="col-total-weight">
                             <div class="admin__control-addon">
                             <input type="text"
-                                   class="options-weight input-text admin__control-text required-entry validate-greater-than-zero"
+                                   class="options-weight input-text admin__control-text required-entry
+                                    validate-greater-than-zero"
                                    name="container_weight" />
                                     <select name="container_weight_units"
-                                            class="options-units-weight measures admin__control-select"
-                                            onchange="packaging.changeMeasures(this);">
-                                        <option value="<?= /* @noEscape */ Zend_Measure_Weight::POUND ?>" selected="selected"  ><?= $block->escapeHtml(__('lb')) ?></option>
-                                        <option value="<?= /* @noEscape */ Zend_Measure_Weight::KILOGRAM ?>" ><?= $block->escapeHtml(__('kg')) ?></option>
+                                            class="options-units-weight measures admin__control-select">
+                                        <option value="<?= /* @noEscape */ Zend_Measure_Weight::POUND
+                                        ?>" selected="selected"  ><?= $block->escapeHtml(__('lb')) ?>
+                                        </option>
+                                        <option value="<?= /* @noEscape */ Zend_Measure_Weight::KILOGRAM ?>" >
+                                            <?= $block->escapeHtml(__('kg')) ?>
+                                        </option>
                                     </select>
+                                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                        'onchange',
+                                        "packaging.changeMeasures(this);",
+                                        "select[name='container_weight_units']"
+                                    ) ?>
                                 <span class="admin__addon-prefix"></span>
                             </div>
                         </td>
@@ -150,16 +194,24 @@
                         </td>
                         <td class="col-measure">
                             <select name="container_dimension_units"
-                                    class="options-units-dimensions measures admin__control-select"
-                                    onchange="packaging.changeMeasures(this);">
-                                <option value="<?= /* @noEscape */ Zend_Measure_Length::INCH ?>" selected="selected" ><?= $block->escapeHtml(__('in')) ?></option>
-                                <option value="<?= /* @noEscape */ Zend_Measure_Length::CENTIMETER ?>" ><?= $block->escapeHtml(__('cm')) ?></option>
+                                    class="options-units-dimensions measures admin__control-select">
+                                <option value="<?= /* @noEscape */ Zend_Measure_Length::INCH ?>" selected="selected" >
+                                    <?= $block->escapeHtml(__('in')) ?>
+                                </option>
+                                <option value="<?= /* @noEscape */ Zend_Measure_Length::CENTIMETER ?>" >
+                                    <?= $block->escapeHtml(__('cm')) ?>
+                                </option>
                             </select>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onchange',
+                                "packaging.changeMeasures(this);",
+                                "select[name='container_dimension_units']"
+                            ) ?>
                         </td>
-                        <?php if ($block->getDeliveryConfirmationTypes()) : ?>
+                        <?php if ($block->getDeliveryConfirmationTypes()): ?>
                         <td>
                             <select name="delivery_confirmation_types" class="admin__control-select">
-                                <?php foreach ($block->getDeliveryConfirmationTypes() as $key => $value) : ?>
+                                <?php foreach ($block->getDeliveryConfirmationTypes() as $key => $value): ?>
                                 <option value="<?= $block->escapeHtmlAttr($key) ?>" >
                                     <?= $block->escapeHtml($value) ?>
                                 </option>
@@ -169,15 +221,19 @@
                         <?php endif; ?>
                         <td class="col-actions">
                             <button type="button"
-                                    class="action-delete DeletePackageBtn"
-                                    onclick="packaging.deletePackage(this);">
+                                    class="action-delete DeletePackageBtn">
                                 <span><?= $block->escapeHtml(__('Delete Package')) ?></span>
                             </button>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                'packaging.deletePackage(this);',
+                                "button.action-delete.DeletePackageBtn"
+                            ) ?>
                         </td>
                     </tr>
                 </tbody>
             </table>
-            <?php if ($block->getContentTypes()) : ?>
+            <?php if ($block->getContentTypes()): ?>
                 <table class="data-table admin__control-table" cellspacing="0">
                     <thead>
                         <tr>
@@ -189,14 +245,18 @@
                     <tr>
                         <td>
                             <select name="content_type"
-                                    class="admin__control-select"
-                                    onchange="packaging.changeContentTypes(this);">
-                                <?php foreach ($block->getContentTypes() as $key => $value) : ?>
+                                    class="admin__control-select">
+                                <?php foreach ($block->getContentTypes() as $key => $value): ?>
                                     <option value="<?= $block->escapeHtmlAttr($key) ?>" >
                                         <?= $block->escapeHtml($value) ?>
                                     </option>
                                 <?php endforeach; ?>
                             </select>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onchange',
+                                "packaging.changeContentTypes(this);",
+                                "select[name='content_type']"
+                            ) ?>
                         </td>
                         <td>
                             <input name="content_type_other"
@@ -213,5 +273,10 @@
             <div class="grid_prepare admin__page-subsection"></div>
         </div>
     </section>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'div#package_template') ?>
     <div id="packages_content"></div>
 </div>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    "display:none;",
+    'div#packaging_window div.message message-warning'
+) ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml
index d65fa819eaeed..1dcc7439532b6 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml
@@ -4,8 +4,14 @@
  * See COPYING.txt for license details.
  */
 ?>
-<?php /** @var $block Magento\Shipping\Block\Adminhtml\Order\Tracking */?>
-<script>
+<?php
+/**
+ * @var $block Magento\Shipping\Block\Adminhtml\Order\Tracking
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+?>
+<?php $scriptString = <<<script
+
 require(['prototype'], function(){
 
     //<![CDATA[
@@ -57,7 +63,11 @@ require(['prototype'], function(){
     //]]>
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+
 <script id="track_row_template" type="text/x-magento-template">
     <tr>
         <td class="col-carrier">
@@ -65,7 +75,7 @@ require(['prototype'], function(){
                     id="trackingC<%- data.index %>"
                     class="select admin__control-select carrier"
                     disabled="disabled">
-                <?php foreach ($block->getCarriers() as $_code => $_name) : ?>
+                <?php foreach ($block->getCarriers() as $_code => $_name): ?>
                     <option value="<?= $block->escapeHtmlAttr($_code) ?>"><?= $block->escapeHtml($_name) ?></option>
                 <?php endforeach; ?>
             </select>
@@ -116,7 +126,8 @@ require(['prototype'], function(){
         </tbody>
     </table>
 </div>
-<script>
+<?php $scriptString = <<<script
+
 require([
     'mage/template',
     'prototype'
@@ -127,4 +138,7 @@ require([
     //]]>
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml
index a013abfd65f87..d2eb927fd8278 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml
@@ -3,11 +3,15 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
-//phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
+
+/**
+ * @var $block Magento\Shipping\Block\Adminhtml\Order\Tracking\View
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+
+/** @var \Magento\Shipping\Helper\Data $shippingHelper */
+$shippingHelper = $block->getData('shippingHelper');
 ?>
-<?php /** @var $block Magento\Shipping\Block\Adminhtml\Order\Tracking\View */ ?>
 <div class="admin__control-table-wrapper">
     <form id="tracking-shipping-form" data-mage-init='{"validation": {}}'>
         <table class="data-table admin__control-table" id="shipment_tracking_info">
@@ -22,13 +26,17 @@
             <tfoot>
                 <tr>
                     <td class="col-carrier">
-                        <select name="carrier"
-                                class="select admin__control-select"
-                                onchange="selectCarrier(this)">
-                            <?php foreach ($block->getCarriers() as $_code => $_name) : ?>
-                            <option value="<?= $block->escapeHtmlAttr($_code) ?>"><?= $block->escapeHtml($_name) ?></option>
+                        <select name="carrier" class="select admin__control-select">
+                            <?php foreach ($block->getCarriers() as $_code => $_name): ?>
+                            <option value="<?= $block->escapeHtmlAttr($_code) ?>">
+                                <?= $block->escapeHtml($_name) ?></option>
                             <?php endforeach; ?>
                         </select>
+                        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                            'onchange',
+                            'selectCarrier(this)',
+                            "select[name='carrier']"
+                        ) ?>
                     </td>
                     <td class="col-title">
                         <input class="input-text admin__control-text"
@@ -47,23 +55,41 @@
                     <td class="col-delete last"><?= $block->getSaveButtonHtml() ?></td>
                 </tr>
             </tfoot>
-        <?php if ($_tracks = $block->getShipment()->getAllTracks()) : ?>
+        <?php if ($_tracks = $block->getShipment()->getAllTracks()): ?>
             <tbody>
-            <?php $i = 0; foreach ($_tracks as $_track) :$i++ ?>
+            <?php $i = 0; foreach ($_tracks as $_track): $i++ ?>
                 <tr class="<?= /* @noEscape */ ($i%2 == 0) ? 'even' : 'odd' ?>">
                     <td class="col-carrier">
                         <?= $block->escapeHtml($block->getCarrierTitle($_track->getCarrierCode())) ?>
                     </td>
                     <td class="col-title"><?= $block->escapeHtml($_track->getTitle()) ?></td>
                     <td class="col-number">
-                        <?php if ($_track->isCustom()) : ?>
+                        <?php if ($_track->isCustom()): ?>
                             <?= $block->escapeHtml($_track->getNumber()) ?>
-                        <?php else : ?>
-                        <a href="#" onclick="popWin('<?= $block->escapeJs($block->escapeUrl($this->helper(Magento\Shipping\Helper\Data::class)->getTrackingPopupUrlBySalesModel($_track))) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')"><?= $block->escapeHtml($_track->getNumber()) ?></a>
+                        <?php else: ?>
+                        <a id="col-track-<?= (int) $_track->getId() ?>" href="#">
+                            <?= $block->escapeHtml($_track->getNumber()) ?>
+                         </a>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                "event.preventDefault();
+                                popWin('{$block->escapeJs($shippingHelper->getTrackingPopupUrlBySalesModel($_track))}',
+                                'trackorder','width=800,height=600,resizable=yes,scrollbars=yes')",
+                                'a#col-track-' .  (int) $_track->getId()
+                            ) ?>
                         <div id="shipment_tracking_info_response_<?= (int) $_track->getId() ?>"></div>
                         <?php endif; ?>
                     </td>
-                    <td class="col-delete last"><button class="action-delete" type="button" onclick="deleteTrackingNumber('<?= $block->escapeJs($block->escapeUrl($block->getRemoveUrl($_track))) ?>'); return false;"><span><?= $block->escapeHtml(__('Delete')) ?></span></button></td>
+                    <td class="col-delete last">
+                        <button class="action-delete" type="button" id="del-track-<?= (int) $_track->getId() ?>">
+                            <span><?= $block->escapeHtml(__('Delete')) ?></span>
+                        </button>
+                    </td>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        "deleteTrackingNumber('{$block->escapeJs($block->getRemoveUrl($_track))}'); return false;",
+                        '#del-track-' . (int) $_track->getId()
+                    ) ?>
                 </tr>
             <?php endforeach; ?>
             </tbody>
@@ -71,9 +97,9 @@
         </table>
     </form>
 </div>
+<?php $scriptString = <<<script
 
-<script>
-require(['prototype', 'jquery', 'Magento_Ui/js/modal/confirm'], function(prototype, $j, confirm) {
+require(['prototype', 'jquery', 'Magento_Ui/js/modal/confirm'], function(prototype, \$j, confirm) {
 //<![CDATA[
 function selectCarrier(elem) {
     var option = elem.options[elem.selectedIndex];
@@ -81,7 +107,7 @@ function selectCarrier(elem) {
 }
 
 function saveTrackingInfo(node, url) {
-    var form = $j('#tracking-shipping-form');
+    var form = \$j('#tracking-shipping-form');
 
     if (form.validation() && form.validation('isValid')) {
         submitAndReloadArea(node, url);
@@ -90,7 +116,7 @@ function saveTrackingInfo(node, url) {
 
 function deleteTrackingNumber(url) {
     confirm({
-        content: '<?= $block->escapeJs($block->escapeHtml(__('Are you sure?'))) ?>',
+        content: '{$block->escapeJs(__('Are you sure?'))}',
         actions: {
             /**
              * Confirm action.
@@ -108,4 +134,7 @@ window.saveTrackingInfo = saveTrackingInfo;
 //]]>
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml
index 720b34983551d..002a960f3b38a 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/view/info.phtml
@@ -3,11 +3,19 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-//phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
+
+/**
+ * @var $block \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+
+/** @var \Magento\Shipping\Helper\Data $shippingHelper */
+$shippingHelper = $block->getData('shippingHelper');
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
 ?>
-<?php /** @var $block \Magento\Shipping\Block\Adminhtml\View */ ?>
 <?php $order = $block->getOrder() ?>
-<?php if ($order->getIsVirtual()) :
+<?php if ($order->getIsVirtual()):
     return '';
 endif; ?>
 
@@ -17,25 +25,34 @@ endif; ?>
         <span class="title"><?= $block->escapeHtml(__('Shipping & Handling Information')) ?></span>
     </div>
     <div class="admin__page-section-item-content">
-        <?php  if ($order->getTracksCollection()->count()) : ?>
-            <p><a href="#" id="linkId" onclick="popWin('<?= $block->escapeJs($block->escapeUrl($this->helper(Magento\Shipping\Helper\Data::class)->getTrackingPopupUrlBySalesModel($order))) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?= $block->escapeHtmlAttr(__('Track Order')) ?>"><?= $block->escapeHtml(__('Track Order')) ?></a></p>
+        <?php  if ($order->getTracksCollection()->count()): ?>
+            <p>
+                <a href="#" id="linkId" title="<?= $block->escapeHtmlAttr(__('Track Order')) ?>">
+                    <?= $block->escapeHtml(__('Track Order')) ?>
+                </a>
+            </p>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onclick',
+                "popWin('" . $block->escapeJs($shippingHelper->getTrackingPopupUrlBySalesModel($order)) .
+                "','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')",
+                'a#linkId'
+            ) ?>
         <?php endif; ?>
-        <?php if ($order->getShippingDescription()) : ?>
+        <?php if ($order->getShippingDescription()): ?>
             <strong><?= $block->escapeHtml($order->getShippingDescription()) ?></strong>
 
-            <?php if ($this->helper(Magento\Tax\Helper\Data::class)->displayShippingPriceIncludingTax()) : ?>
+            <?php if ($taxHelper->displayShippingPriceIncludingTax()): ?>
                 <?php $_excl = $block->displayShippingPriceInclTax($order); ?>
-            <?php else : ?>
+            <?php else: ?>
                 <?php $_excl = $block->displayPriceAttribute('shipping_amount', false, ' '); ?>
             <?php endif; ?>
             <?php $_incl = $block->displayShippingPriceInclTax($order); ?>
 
             <?= /** @noEscape */ $_excl ?>
-            <?php if ($this->helper(Magento\Tax\Helper\Data::class)->displayShippingBothPrices()
-                && $_incl != $_excl) : ?>
+            <?php if ($taxHelper->displayShippingBothPrices() && $_incl != $_excl): ?>
                 (<?= $block->escapeHtml(__('Incl. Tax')) ?> <?= /** @noEscape */ $_incl ?>)
             <?php endif; ?>
-        <?php else : ?>
+        <?php else: ?>
             <?= $block->escapeHtml(__('No shipping information available')) ?>
         <?php endif; ?>
     </div>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml
index 44fe4b9ccd353..d023f614f55aa 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml
@@ -5,9 +5,14 @@
  */
 /**
  * @var \Magento\Shipping\Block\Adminhtml\View\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
-//phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
+
+/** @var \Magento\Shipping\Helper\Data $shippingHelper */
+$shippingHelper = $block->getData('shippingHelper');
+/** @var \Magento\Tax\Helper\Data $taxHelper */
+$taxHelper = $block->getData('taxHelper');
+/** @var \Magento\Sales\Model\Order $order */
 $order = $block->getShipment()->getOrder();
 ?>
 <?= $block->getChildHtml('order_info'); ?>
@@ -34,12 +39,19 @@ $order = $block->getShipment()->getOrder();
             </div>
             <div class="admin__page-section-item-content">
                 <div class="shipping-description-wrapper">
-                    <?php if ($block->getShipment()->getTracksCollection()->count()) : ?>
+                    <?php if ($block->getShipment()->getTracksCollection()->count()): ?>
                         <p>
-                            <a href="#" id="linkId" onclick="popWin('<?= $block->escapeUrl($this->helper(\Magento\Shipping\Helper\Data::class)->getTrackingPopupUrlBySalesModel($block->getShipment())); ?>','trackshipment','width=800,height=600,resizable=yes,scrollbars=yes')"
-                               title="<?= $block->escapeHtml(__('Track this shipment')); ?>">
+                            <a href="#" id="linkId" title="<?= $block->escapeHtml(__('Track this shipment')); ?>">
                                 <?= $block->escapeHtml(__('Track this shipment')); ?>
                             </a>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                'event.preventDefault();' .
+                                "popWin('{$block->escapeJs($shippingHelper->getTrackingPopupUrlBySalesModel(
+                                    $block->getShipment()
+                                    ))}','trackshipment','width=800,height=600,resizable=yes,scrollbars=yes')",
+                                'a#linkId'
+                            ) ?>
                         </p>
                     <?php endif; ?>
                     <div class="shipping-description-title">
@@ -48,34 +60,35 @@ $order = $block->getShipment()->getOrder();
 
                     <?= $block->escapeHtml(__('Total Shipping Charges')); ?>:
 
-                    <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayShippingPriceIncludingTax()) : ?>
+                    <?php if ($taxHelper->displayShippingPriceIncludingTax()): ?>
                         <?php $excl = $block->displayShippingPriceInclTax($order); ?>
-                    <?php else : ?>
+                    <?php else: ?>
                         <?php $excl = $block->displayPriceAttribute('shipping_amount', false, ' '); ?>
                     <?php endif; ?>
                     <?php $incl = $block->displayShippingPriceInclTax($order); ?>
 
                     <?= /* @noEscape */ $excl; ?>
-                    <?php if ($this->helper(\Magento\Tax\Helper\Data::class)->displayShippingBothPrices() && $incl != $excl) : ?>
+                    <?php if ($taxHelper->displayShippingBothPrices() && $incl != $excl): ?>
                         (<?= $block->escapeHtml(__('Incl. Tax')); ?> <?= /* @noEscape */ $incl; ?>)
                     <?php endif; ?>
                 </div>
 
                 <p>
-                    <?php if ($block->canCreateShippingLabel()) : ?>
+                    <?php if ($block->canCreateShippingLabel()): ?>
                         <?= /* @noEscape */ $block->getCreateLabelButton(); ?>
                     <?php endif ?>
-                    <?php if ($block->getShipment()->getShippingLabel()) : ?>
+                    <?php if ($block->getShipment()->getShippingLabel()): ?>
                         <?= /* @noEscape */ $block->getPrintLabelButton(); ?>
                     <?php endif ?>
-                    <?php if ($block->getShipment()->getPackages()) : ?>
+                    <?php if ($block->getShipment()->getPackages()): ?>
                         <?= /* @noEscape */ $block->getShowPackagesButton(); ?>
                     <?php endif ?>
                 </p>
                 <?= $block->getChildHtml('shipment_tracking'); ?>
 
                 <?= $block->getChildHtml('shipment_packaging'); ?>
-                <script>
+                <?php $scriptString = <<<script
+
                     require([
                         'jquery',
                         'prototype'
@@ -85,7 +98,10 @@ $order = $block->getShipment()->getOrder();
                                 window.packaging.sendCreateLabelRequest();
                             });
                             window.packaging.setLabelCreatedCallback(function () {
-                                setLocation("<?= $block->escapeUrl($block->getUrl('adminhtml/order_shipment/view', ['shipment_id' => $block->getShipment()->getId()])); ?>");
+                                setLocation("{$block->escapeJs($block->getUrl(
+                                        'adminhtml/order_shipment/view',
+                                        ['shipment_id' => $block->getShipment()->getId()]
+                                    ))}");
                             });
                         };
 
@@ -95,7 +111,10 @@ $order = $block->getShipment()->getOrder();
                             jQuery(document).on('packaging:inited', setCallbacks);
                         }
                     });
-                </script>
+
+script;
+                ?>
+                <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
             </div>
         </div>
     </div>
diff --git a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml
index 1e8760b3afd6d..925dbd03db8e0 100644
--- a/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml
+++ b/app/code/Magento/Shipping/view/frontend/templates/tracking/popup.phtml
@@ -6,19 +6,23 @@
 
 use Magento\Framework\View\Element\Template;
 
-/** @var $block \Magento\Shipping\Block\Tracking\Popup */
-//phpcs:disable Magento2.Files.LineLength.MaxExceeded
+/**
+ * @var $block \Magento\Shipping\Block\Tracking\Popup
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 $results = $block->getTrackingInfo();
 ?>
 <div class="page tracking">
-    <?php if (!empty($results)) : ?>
-        <?php foreach ($results as $shipId => $result) : ?>
-            <?php if ($shipId) : ?>
-                <div class="order subtitle caption"><?= /* @noEscape */ $block->escapeHtml(__('Shipment #')) . $shipId ?></div>
+    <?php if (!empty($results)): ?>
+        <?php foreach ($results as $shipId => $result): ?>
+            <?php if ($shipId): ?>
+                <div class="order subtitle caption">
+                    <?= /* @noEscape */ $block->escapeHtml(__('Shipment #')) . $shipId ?>
+                </div>
             <?php endif; ?>
-            <?php if (!empty($result)) : ?>
-                <?php foreach ($result as $counter => $track) : ?>
+            <?php if (!empty($result)): ?>
+                <?php foreach ($result as $counter => $track): ?>
                     <div class="table-wrapper">
                         <?php
                             $shipmentBlockIdentifier = $shipId . '.' . $counter;
@@ -28,25 +32,28 @@ $results = $block->getTrackingInfo();
                                 'storeSupportEmail' => $block->getStoreSupportEmail()
                             ]);
                         ?>
-                        <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.details.' . $shipmentBlockIdentifier) ?>
+                        <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.details.' .
+                            $shipmentBlockIdentifier) ?>
                     </div>
-                    <?php if (is_object($track) && !empty($track->getProgressdetail())) : ?>
+                    <?php if (is_object($track) && !empty($track->getProgressdetail())): ?>
                         <?php
-                            $block->addChild('shipping.tracking.progress.' . $shipmentBlockIdentifier, Template::class, [
-                                'track' => $track,
-                                'template' => 'Magento_Shipping::tracking/progress.phtml'
-                            ]);
+                            $block->addChild(
+                                'shipping.tracking.progress.' . $shipmentBlockIdentifier,
+                                Template::class,
+                                ['track' => $track, 'template' => 'Magento_Shipping::tracking/progress.phtml']
+                            );
                         ?>
-                        <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.progress.' . $shipmentBlockIdentifier) ?>
+                        <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.progress.' .
+                            $shipmentBlockIdentifier) ?>
                     <?php endif; ?>
                 <?php endforeach; ?>
-            <?php else : ?>
+            <?php else: ?>
                 <div class="message info empty">
                     <div><?= $block->escapeHtml(__('There is no tracking available for this shipment.')) ?></div>
                 </div>
             <?php endif; ?>
         <?php endforeach; ?>
-    <?php else : ?>
+    <?php else: ?>
         <div class="message info empty">
             <div><?= $block->escapeHtml(__('There is no tracking available.')) ?></div>
         </div>
@@ -54,13 +61,18 @@ $results = $block->getTrackingInfo();
     <div class="actions">
         <button type="button"
                 title="<?= $block->escapeHtml(__('Close Window')) ?>"
-                class="action close"
-                onclick="window.close(); window.opener.focus();">
+                class="action close">
             <span><?= $block->escapeHtml(__('Close Window')) ?></span>
         </button>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "window.close(); window.opener.focus();",
+            'button.action.close'
+        ) ?>
     </div>
 </div>
-<script>
+<?php $scriptString = <<<script
+
     require([
         'jquery'
     ], function (jQuery) {
@@ -69,4 +81,7 @@ $results = $block->getTrackingInfo();
             jQuery('.actions button.close').hide();
         }
     });
-</script>
\ No newline at end of file
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml b/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml
index 1c6b267cd9289..79d833771768d 100644
--- a/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml
+++ b/app/code/Magento/TaxImportExport/view/adminhtml/templates/importExport.phtml
@@ -5,11 +5,12 @@
  */
 
 /** @var $block \Magento\TaxImportExport\Block\Adminhtml\Rate\ImportExport */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div class="import-export-tax-rates">
-    <?php if (!$block->getIsReadonly()) :?>
+    <?php if (!$block->getIsReadonly()):?>
     <div class="import-tax-rates">
-        <?php if ($block->getUseContainer()) :?>
+        <?php if ($block->getUseContainer()):?>
         <form id="import-form"
               class="admin__fieldset"
               action="<?= $block->escapeUrl($block->getUrl('tax/rate/importPost')) ?>"
@@ -18,7 +19,9 @@
         <?php endif; ?>
             <?= $block->getBlockHtml('formkey') ?>
             <div class="fieldset admin__field">
-                <label for="import_rates_file" class="admin__field-label"><span><?= $block->escapeHtml(__('Import Tax Rates')) ?></span></label>
+                <label for="import_rates_file" class="admin__field-label">
+                    <span><?= $block->escapeHtml(__('Import Tax Rates')) ?></span>
+                </label>
                 <div class="admin__field-control">
                     <input type="file"
                            id="import_rates_file"
@@ -27,11 +30,13 @@
                     <?= $block->getButtonHtml(__('Import Tax Rates'), '', 'import-submit') ?>
                 </div>
             </div>
-        <?php if ($block->getUseContainer()) :?>
+        <?php if ($block->getUseContainer()):?>
         </form>
         <?php endif; ?>
-        <script>
-require(['jquery', 'Magento_Ui/js/modal/alert', "mage/mage", "loadingPopup", 'mage/translate'], function(jQuery, uiAlert){
+        <?php $scriptString = <<<script
+
+    require(['jquery', 'Magento_Ui/js/modal/alert', "mage/mage", "loadingPopup", 'mage/translate'],
+        function(jQuery, uiAlert){
 
     jQuery('#import-form').mage('form').mage('validation');
     (function ($) {
@@ -51,11 +56,14 @@ require(['jquery', 'Magento_Ui/js/modal/alert', "mage/mage", "loadingPopup", 'ma
     })(jQuery);
 
 });
-</script>
+
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     </div>
     <?php endif; ?>
     <div class="export-tax-rates <?= ($block->getIsReadonly()) ? 'box-left' : 'box-right' ?>">
-        <?php if ($block->getUseContainer()) :?>
+        <?php if ($block->getUseContainer()):?>
         <form id="export_form"
               class="admin__fieldset"
               action="<?= $block->escapeUrl($block->getUrl('tax/rate/exportPost')) ?>"
@@ -69,7 +77,7 @@ require(['jquery', 'Magento_Ui/js/modal/alert', "mage/mage", "loadingPopup", 'ma
                     <?= $block->getButtonHtml(__('Export Tax Rates'), "this.form.submit()") ?>
                 </div>
             </div>
-        <?php if ($block->getUseContainer()) :?>
+        <?php if ($block->getUseContainer()):?>
         </form>
         <?php endif; ?>
     </div>
diff --git a/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml
index 67c9084b2756e..66456ae403818 100644
--- a/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml
+++ b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var $block \Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content\Uploader */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div id="<?= $block->getHtmlId() ?>" class="uploader">
@@ -18,14 +19,18 @@
         <div id="<%- data.id %>" class="file-row">
             <span class="file-info"><%- data.name %> (<%- data.size %>)</span>
             <div class="progressbar-container">
-                <div class="progressbar upload-progress" style="width: 0%;"></div>
+                <div class="progressbar upload-progress"></div>
             </div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                "width: 0%;",
+                "div.progressbar-container div.progressbar.upload-progress"
+            ) ?>
             <div class="clear"></div>
         </div>
     </script>
 </div>
+<?php $scriptString= <<<script
 
-<script>
 require([
     'jquery',
     'mage/template',
@@ -41,9 +46,9 @@ require([
             form_key: FORM_KEY
         },
         sequentialUploads: true,
-        maxFileSize: <?= $block->escapeJs($block->getFileSizeService()->getMaxFileSize()) ?> ,
+        maxFileSize: {$block->escapeJs($block->getFileSizeService()->getMaxFileSize())} ,
         add: function (e, data) {
-            var progressTmpl = mageTemplate('#<?= $block->getHtmlId() ?>-template'),
+            var progressTmpl = mageTemplate('#{$block->getHtmlId()}-template'),
                 fileSize,
                 tmpl;
 
@@ -62,7 +67,7 @@ require([
                     }
                 });
 
-                $(tmpl).appendTo('#<?= $block->getHtmlId() ?>');
+                $(tmpl).appendTo('#{$block->getHtmlId()}');
             });
 
             $(this).fileupload('process', data).done(function () {
@@ -91,4 +96,7 @@ require([
     });
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/adminhtml/templates/tabs/css.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/css.phtml
index 902daf98182f0..53228243ffd19 100644
--- a/app/code/Magento/Theme/view/adminhtml/templates/tabs/css.phtml
+++ b/app/code/Magento/Theme/view/adminhtml/templates/tabs/css.phtml
@@ -3,12 +3,16 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-/** @var $block \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css */
+/**
+ * @var $block \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 
 <?= $block->getFormHtml() ?>
 
-<script>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "Magento_Ui/js/modal/alert",
@@ -19,7 +23,7 @@ require([
     $( '#css_file_uploader' ).fileupload({
         dataType: 'json',
         replaceFileInput: false,
-        url : '<?= $block->escapeJs($block->escapeUrl($block->getUrl('*/system_design_theme/uploadcss'))) ?>',
+        url : '{$block->escapeJs($block->getUrl('*/system_design_theme/uploadcss'))}',
         acceptFileTypes: /(.|\/)(css)$/i,
 
         /**
@@ -76,4 +80,7 @@ require([
     });
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml
index b50f68cd9353b..e15ac4a088e03 100644
--- a/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml
+++ b/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml
@@ -4,18 +4,27 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
-/** @var $block \Magento\Backend\Block\Widget\Form\Renderer\Fieldset */
+/**
+ * @var $block \Magento\Backend\Block\Widget\Form\Renderer\Fieldset
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 
 <div id="js-file-uploader" class="uploader">
 </div>
-<script id="js-file-uploader-template" type="text/x-magento-template"> 
+<script id="js-file-uploader-template" type="text/x-magento-template">
     <div id="<%- data.id %>" class="file-row">
         <span class="file-info"><%- data.name %> (<%- data.size %>)</span>
         <div class="progressbar-container">
-            <div class="progressbar upload-progress" style="width: 0%;"></div>
+            <div class="progressbar upload-progress""></div>
         </div>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            "width: 0%;",
+            "div.progressbar-container div.progressbar.upload-progress"
+        ) ?>
         <div class="clear"></div>
     </div>
 </script>
@@ -40,8 +49,8 @@
 </script>
 
 <ul id="js-files-container" class="js-files-container ui-sortable" ></ul>
+<?php $scriptString = <<<script
 
-<script>
 require([
     "jquery",
     "jquery/ui",
@@ -61,10 +70,13 @@ jQuery(function($) {
     $('body').trigger(
         'refreshJsList',
         {
-            jsList: <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getJsFiles()) ?>
+            jsList: {$jsonHelper->jsonEncode($block->getJsFiles())}
         }
     );
 });
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/adminhtml/templates/tabs/js.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/js.phtml
index 1b4633d0965f3..4edc895c559e2 100644
--- a/app/code/Magento/Theme/view/adminhtml/templates/tabs/js.phtml
+++ b/app/code/Magento/Theme/view/adminhtml/templates/tabs/js.phtml
@@ -4,11 +4,15 @@
  * See COPYING.txt for license details.
  */
 
-/** @var $block \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Js */
+/**
+ * @var $block \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Js
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <?= $block->getFormHtml() ?>
 
-<script>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "mage/template",
@@ -22,7 +26,7 @@ require([
         dataType: 'json',
         replaceFileInput: false,
         sequentialUploads: true,
-        url: '<?= $block->escapeJs($block->escapeUrl($block->getJsUploadUrl())) ?>',
+        url: '{$block->escapeJs($block->getJsUploadUrl())}',
 
         /**
          * Add data
@@ -125,4 +129,7 @@ require([
 
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/frontend/templates/html/main_css_preloader.phtml b/app/code/Magento/Theme/view/frontend/templates/html/main_css_preloader.phtml
index 2c1c7db75b111..6c2f17b6ffb08 100644
--- a/app/code/Magento/Theme/view/frontend/templates/html/main_css_preloader.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/html/main_css_preloader.phtml
@@ -3,11 +3,16 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <div data-role="main-css-loader" class="loading-mask">
     <div class="loader">
         <img src="<?= $block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')); ?>"
-             alt="<?= $block->escapeHtml(__('Loading...')); ?>"
-             style="position: absolute;">
+             alt="<?= $block->escapeHtml(__('Loading...')); ?>">
     </div>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "position: absolute;",
+        "div.loader img"
+    ) ?>
 </div>
diff --git a/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml b/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml
index 1414c21c6e9bc..bb9d5cb2fd2e0 100644
--- a/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/html/notices.phtml
@@ -6,30 +6,41 @@
 
 /**
  * @var $block \Magento\Theme\Block\Html\Notices
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
-<?php if ($block->displayNoscriptNotice()) : ?>
+<?php if ($block->displayNoscriptNotice()): ?>
     <noscript>
         <div class="message global noscript">
             <div class="content">
                 <p>
                     <strong><?= $block->escapeHtml(__('JavaScript seems to be disabled in your browser.')) ?></strong>
-                    <span><?= $block->escapeHtml(__('For the best experience on our site, be sure to turn on Javascript in your browser.')) ?></span>
+                    <span>
+                        <?= $block->escapeHtml(
+                            __('For the best experience on our site, be sure to turn on Javascript in your browser.')
+                        ) ?>
+                    </span>
                 </p>
             </div>
         </div>
     </noscript>
 <?php endif; ?>
-<?php if ($block->displayNoLocalStorageNotice()) : ?>
-    <div class="notice global site local_storage" style="display: none;">
+<?php if ($block->displayNoLocalStorageNotice()): ?>
+    <div class="notice global site local_storage">
         <div class="content">
             <p>
-                <strong><?= $block->escapeHtml(__('Local Storage seems to be disabled in your browser.')) ?></strong><br />
-                <?= $block->escapeHtml(__('For the best experience on our site, be sure to turn on Local Storage in your browser.')) ?>
+                <strong><?= $block->escapeHtml(__('Local Storage seems to be disabled in your browser.')) ?></strong>
+                <br />
+                <?= $block->escapeHtml(
+                    __('For the best experience on our site, be sure to turn on Local Storage in your browser.')
+                ) ?>
             </p>
         </div>
     </div>
-    <script>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'div.notice.global.site.local_storage') ?>
+
+    <?php $scriptString = <<<script
+
 require(['jquery'], function(jQuery){
 
         // <![CDATA[
@@ -45,9 +56,12 @@ require(['jquery'], function(jQuery){
         // ]]>
 
 });
-</script>
+
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
-<?php if ($block->displayDemoNotice()) : ?>
+<?php if ($block->displayDemoNotice()): ?>
     <div class="message global demo">
         <div class="content">
             <p><?= $block->escapeHtml(__('This is a demo store. No orders will be fulfilled.')) ?></p>
diff --git a/app/code/Magento/Theme/view/frontend/templates/html/print.phtml b/app/code/Magento/Theme/view/frontend/templates/html/print.phtml
index d05faac66ffd1..e939ad40aafb6 100644
--- a/app/code/Magento/Theme/view/frontend/templates/html/print.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/html/print.phtml
@@ -3,8 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
+
     require(
         [
             'jquery'
@@ -15,4 +19,7 @@
             });
         }
     );
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/frontend/templates/js/css_rel_preload.phtml b/app/code/Magento/Theme/view/frontend/templates/js/css_rel_preload.phtml
index d90d528ffc6f8..11a388a0fec20 100644
--- a/app/code/Magento/Theme/view/frontend/templates/js/css_rel_preload.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/js/css_rel_preload.phtml
@@ -3,8 +3,26 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
+
     /*! loadCSS rel=preload polyfill. [c]2017 Filament Group, Inc. MIT License */
-    !function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};if(e.support=function(){var e;try{e=t.document.createElement("link").relList.supports("preload")}catch(t){e=!1}return function(){return e}}(),e.bindMediaToggle=function(t){var e=t.media||"all";function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),setTimeout(function(){t.rel="stylesheet",t.media="only x"}),setTimeout(a,3e3)},e.poly=function(){if(!e.support())for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];"preload"!==o.rel||"style"!==o.getAttribute("as")||o.getAttribute("data-loadcss")||(o.setAttribute("data-loadcss",!0),e.bindMediaToggle(o))}},!e.support()){e.poly();var a=t.setInterval(e.poly,500);t.addEventListener?t.addEventListener("load",function(){e.poly(),t.clearInterval(a)}):t.attachEvent&&t.attachEvent("onload",function(){e.poly(),t.clearInterval(a)})}"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}("undefined"!=typeof global?global:this);
-</script>
+    !function(t){"use strict";t.loadCSS||(t.loadCSS=function(){});var e=loadCSS.relpreload={};
+    if(e.support=function(){var e;try{e=t.document.createElement("link").relList.supports("preload")}
+    catch(t){e=!1}return function(){return e}}(),e.bindMediaToggle=function(t){var e=t.media||"all";
+    function a(){t.media=e}t.addEventListener?t.addEventListener("load",a):t.attachEvent&&t.attachEvent("onload",a),
+    setTimeout(function(){t.rel="stylesheet",t.media="only x"}),setTimeout(a,3e3)},e.poly=function(){if(!e.support())
+    for(var a=t.document.getElementsByTagName("link"),n=0;n<a.length;n++){var o=a[n];"preload"!==o.rel||
+    "style"!==o.getAttribute("as")||o.getAttribute("data-loadcss")||
+    (o.setAttribute("data-loadcss",!0),e.bindMediaToggle(o))}},!e.support()){e.poly();var a=t.setInterval(e.poly,500);
+    t.addEventListener?t.addEventListener("load",
+    function(){e.poly(),t.clearInterval(a)}):t.attachEvent&&t.attachEvent("onload",
+    function(){e.poly(),t.clearInterval(a)})}"undefined"!=typeof exports?exports.loadCSS=loadCSS:t.loadCSS=loadCSS}
+    ("undefined"!=typeof global?global:this);
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml
index 6b6327a5679ea..67dd55d3d6372 100644
--- a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml
+++ b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml
@@ -4,10 +4,15 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\Framework\View\Element\Template $block */
+/**
+ * @var \Magento\Framework\View\Element\Template $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
-<link rel="stylesheet" type="text/css" href="<?= $block->escapeUrl($block->getViewFileUrl('prototype/windows/themes/default.css')) ?>"/>
-<link rel="stylesheet" type="text/css" href="<?= $block->escapeUrl($block->getViewFileUrl('mage/translate-inline.css')) ?>"/>
+<link rel="stylesheet" type="text/css"
+      href="<?= $block->escapeUrl($block->getViewFileUrl('prototype/windows/themes/default.css')) ?>"/>
+<link rel="stylesheet" type="text/css"
+      href="<?= $block->escapeUrl($block->getViewFileUrl('mage/translate-inline.css')) ?>"/>
 
 <script id="translate-inline-icon" type="text/x-magento-template">
     <img src="<%- data.img %>" height="16" width="16" class="translate-edit-icon">
@@ -51,8 +56,12 @@
     <% } %>
 </script>
 
-<div data-role="translate-dialog" data-mage-init='{"translateInline":{"ajaxUrl":"<?= $block->escapeJs($block->escapeUrl($block->getAjaxUrl())) ?>"},"loader":{}}'></div>
-<script>
+<div data-role="translate-dialog"
+     data-mage-init='{"translateInline":{"ajaxUrl":"<?= $block->escapeJs($block->escapeUrl($block->getAjaxUrl())) ?>"},
+     "loader":{}}'>
+</div>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "mage/edit-trigger",
@@ -60,12 +69,15 @@ require([
 ], function($){
         $('body').editTrigger(
             {
-                img: '<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl('Magento_Theme::fam_book_open.png'))) ?>',
+                img: '{$block->escapeJs($block->getViewFileUrl('Magento_Theme::fam_book_open.png'))}',
                 alwaysShown: true,
                 singleElement: false
             }
         );
-        
+
         $('body').addClass('trnslate-inline-area');
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml
index 84abf64af9757..837c528d6cfda 100644
--- a/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml
+++ b/app/code/Magento/UrlRewrite/view/adminhtml/templates/selector.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var \Magento\UrlRewrite\Block\Selector $block */
+/**
+ * @var \Magento\UrlRewrite\Block\Selector $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 <div class="form-inline">
     <fieldset class="admin__fieldset fieldset" data-container-for="entity-type-selector">
@@ -13,11 +16,18 @@
                 <span><?= $block->escapeHtml($block->getSelectorLabel()) ?></span>
             </label>
             <div class="admin__field-control control">
-                <select data-role="entity-type-selector" class="admin__control-select select" onchange="window.location = this.value;" id="entity-type-selector">
-                <?php foreach ($block->getModes() as $mode => $label) : ?>
-                    <option <?= /* @noEscape */ $block->isMode($mode) ? 'selected="selected" ' : '' ?>value="<?= $block->escapeUrl($block->getModeUrl($mode)) ?>"><?= $block->escapeHtml($label) ?></option>
+                <select data-role="entity-type-selector" class="admin__control-select select" id="entity-type-selector">
+                <?php foreach ($block->getModes() as $mode => $label): ?>
+                    <option <?= /* @noEscape */ $block->isMode($mode) ? 'selected="selected" ' : '' ?>
+                        value="<?= $block->escapeUrl($block->getModeUrl($mode)) ?>"><?= $block->escapeHtml($label) ?>
+                    </option>
                 <?php endforeach; ?>
                 </select>
+                <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                    'onchange',
+                    'window.location = this.value;',
+                    'select#entity-type-selector'
+                ) ?>
             </div>
         </div>
     </fieldset>
diff --git a/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml b/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml
index 97308204be854..84567a81660f2 100644
--- a/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml
+++ b/app/code/Magento/User/view/adminhtml/templates/role/edit.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var $block \Magento\User\Block\Role\Tab\Edit */
+/**
+ * @var $block \Magento\User\Block\Role\Tab\Edit
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 ?>
 
 <?= $block->getChildHtml() ?>
@@ -18,8 +21,7 @@
         <label class="label" for="all"><span><?= $block->escapeHtml(__('Resource Access')) ?></span></label>
 
         <div class="control">
-            <select id="all" name="all"
-                    onchange="jQuery('[data-role=tree-resources-container]').toggle()" class="select">
+            <select id="all" name="all" class="select">
                 <option value="0" <?= ($block->isEverythingAllowed() ? '' : 'selected="selected"') ?>>
                     <?= $block->escapeHtml(__('Custom')) ?>
                 </option>
@@ -27,11 +29,16 @@
                     <?= $block->escapeHtml(__('All')) ?>
                 </option>
             </select>
+            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                'onchange',
+                "jQuery('[data-role=tree-resources-container]').toggle()",
+                'select#all'
+            ) ?>
         </div>
     </div>
 
     <div class="field
-        <?php if ($block->isEverythingAllowed()) :?>
+        <?php if ($block->isEverythingAllowed()):?>
             no-display
         <?php endif ?>"
          data-role="tree-resources-container">
diff --git a/app/code/Magento/User/view/adminhtml/templates/role/info.phtml b/app/code/Magento/User/view/adminhtml/templates/role/info.phtml
index 6cf1bb373541d..f6375b17086f9 100644
--- a/app/code/Magento/User/view/adminhtml/templates/role/info.phtml
+++ b/app/code/Magento/User/view/adminhtml/templates/role/info.phtml
@@ -3,11 +3,14 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <form action="<?= $block->escapeUrl($block->getUrl('*/*/saverole')) ?>" method="post" id="role-edit-form">
     <?= $block->getBlockHtml('formkey') ?>
 </form>
-<script>
+<?php $scriptString = <<<script
+
 require([
     "jquery",
     "mage/mage"
@@ -18,4 +21,7 @@ require([
     });
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml b/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml
index a3b5dc68050ac..2042479832898 100644
--- a/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml
+++ b/app/code/Magento/User/view/adminhtml/templates/role/users_grid_js.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $scriptString = <<<script
+
 require([
     'jquery',
     'Magento_Ui/js/modal/confirm',
@@ -12,9 +15,14 @@ require([
     'mage/adminhtml/grid',
     'prototype'
 ], function(jQuery, confirm, _){
-<?php $myBlock = $block->getLayout()->getBlock('roleUsersGrid'); ?>
-<?php if (is_object($myBlock) && $myBlock->getJsObjectName()) : ?>
-    var checkBoxes = $H(<?= /* @noEscape */ $myBlock->getUsers(true) ?>);
+
+script;
+
+$myBlock = $block->getLayout()->getBlock('roleUsersGrid');
+if (is_object($myBlock) && $myBlock->getJsObjectName()):
+    $scriptString .= <<<script
+
+    var checkBoxes = \$H({$myBlock->getUsers(true)});
     var warning = false;
     if (checkBoxes.size() > 0) {
         warning = true;
@@ -43,7 +51,8 @@ require([
 
                 if (checked) {
                     confirm({
-                        content: "<?= $myBlock->escapeHtml(__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?')) ?>",
+                        content: "{$myBlock->escapeJs(__('Warning!\r\nThis action will remove this user from already ' .
+                                                         'assigned role\r\nAre you sure?'))}",
                         actions: {
                             confirm: function () {
                                 checkbox[0].checked = false;
@@ -92,7 +101,9 @@ require([
         if (!allCheckbox.checked && _.size(checkBoxes._object) > 0) {
             allCheckbox.checked = true;
             confirm({
-                content: "<?= $myBlock->escapeHtml(__('Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?')) ?>",
+                content: "{$myBlock->escapeJs(
+                    __('Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?')
+                    )}",
                 actions: {
                     confirm: function () {
                         allCheckbox.checked = false;
@@ -105,25 +116,25 @@ require([
         }
     }
     function markCheckboxes(value) {
-        <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.rows.each(function(row)
+        {$myBlock->escapeJs($myBlock->getJsObjectName())}.rows.each(function(row)
         {
             $(row).getElementsByClassName('checkbox')[0].checked = value;
-            roleUsersRowInit(<?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>, row);
+            roleUsersRowInit({$myBlock->escapeJs($myBlock->getJsObjectName())}, row);
         });
     }
     function onLoad() {
-        if (typeof <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?> !== 'undefined') {
-            <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.
+        if (typeof {$myBlock->escapeJs($myBlock->getJsObjectName())} !== 'undefined') {
+            {$myBlock->escapeJs($myBlock->getJsObjectName())}.
             rowClickCallback = roleUsersRowClick;
-            <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.
+            {$myBlock->escapeJs($myBlock->getJsObjectName())}.
             initRowCallback = roleUsersRowInit;
-            <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.
+            {$myBlock->escapeJs($myBlock->getJsObjectName())}.
             checkboxCheckCallback = registerUserRole;
-            <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.
+            {$myBlock->escapeJs($myBlock->getJsObjectName())}.
             checkCheckboxes = massSelectUsers;
-            <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.
+            {$myBlock->escapeJs($myBlock->getJsObjectName())}.
             rows.each(function (row) {
-                roleUsersRowInit(<?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>, row)
+                roleUsersRowInit({$myBlock->escapeJs($myBlock->getJsObjectName())}, row)
             });
             $('in_role_user_old').value = $('in_role_user').value;
         } else {
@@ -131,7 +142,13 @@ require([
         }
     }
     onLoad();
-<?php endif; ?>
+
+script;
+endif;
+$scriptString .= <<<script
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml b/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml
index 92a97e825ea67..71a866f945693 100644
--- a/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml
+++ b/app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml
@@ -3,18 +3,25 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $scriptString = <<<script
+
 require([
     "mage/adminhtml/grid",
     "prototype"
 ], function(){
 
-<?php $myBlock = $block->getLayout()->getBlock('user.roles.grid'); ?>
-<?php if (is_object($myBlock) && $myBlock->getJsObjectName()) : ?>
-    var radioBoxes = $H({});
+script;
+
+$myBlock = $block->getLayout()->getBlock('user.roles.grid');
+if (is_object($myBlock) && $myBlock->getJsObjectName()):
+    $scriptString .= <<<script
+
+    var radioBoxes = \$H({});
     var warning = false;
-    var userRoles = $H(<?= /* @noEscape */ $myBlock->getSelectedRoles(true) ?>);
+    var userRoles = \$H({$myBlock->getSelectedRoles(true)});
     if (userRoles.size() > 0) warning = true;
     $('user_user_roles').value = userRoles.toQueryString();
 
@@ -37,7 +44,9 @@ require([
             if(checkbox[0] && !checkbox[0].checked){
                 var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
                 if (checked && warning && radioBoxes.size() > 0) {
-                    if ( !confirm("<?= $myBlock->escapeHtml(__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?')) ?>") ) {
+                    if ( !confirm("{$myBlock->escapeJs(
+                        __('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?')
+                        )}") ) {
                         checkbox[0].checked = false;
                         for(i in radioBoxes) {
                             if( radioBoxes[i].status == 1) {
@@ -48,7 +57,7 @@ require([
                     }
                     warning = false;
                 }
-                <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.setCheckboxChecked(checkbox[0], checked);
+                {$myBlock->escapeJs($myBlock->getJsObjectName())}.setCheckboxChecked(checkbox[0], checked);
             }
         }
     }
@@ -60,19 +69,24 @@ require([
         }
     }
 
-    <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.rowClickCallback = roleRowClick;
-    <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.initRowCallback = rolesRowInit;
-    <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.checkboxCheckCallback = registerUserRole;
-    <?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>.rows.each(function(row){
-        rolesRowInit(<?= $myBlock->escapeJs($myBlock->getJsObjectName()) ?>, row)
+    {$myBlock->escapeJs($myBlock->getJsObjectName())}.rowClickCallback = roleRowClick;
+    {$myBlock->escapeJs($myBlock->getJsObjectName())}.initRowCallback = rolesRowInit;
+    {$myBlock->escapeJs($myBlock->getJsObjectName())}.checkboxCheckCallback = registerUserRole;
+    {$myBlock->escapeJs($myBlock->getJsObjectName())}.rows.each(function(row){
+        rolesRowInit({$myBlock->escapeJs($myBlock->getJsObjectName())}, row)
     });
-<?php endif; ?>
+
+script;
+endif;
+$scriptString .= <<<script
 
 });
-</script>
 
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php $editBlock = $block->getLayout()->getBlock('adminhtml.user.edit'); ?>
-<?php if (is_object($editBlock)) : ?>
+<?php if (is_object($editBlock)): ?>
     <script type="text/x-magento-init">
         {
             "[data-role=delete-user]" : {
diff --git a/app/code/Magento/Variable/view/adminhtml/templates/system/variable/js.phtml b/app/code/Magento/Variable/view/adminhtml/templates/system/variable/js.phtml
index a569b8e71a055..28f66d4c913e2 100644
--- a/app/code/Magento/Variable/view/adminhtml/templates/system/variable/js.phtml
+++ b/app/code/Magento/Variable/view/adminhtml/templates/system/variable/js.phtml
@@ -3,8 +3,12 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+
+<?php $scriptString = <<<script
+
 require([
     'prototype'
 ], function () {
@@ -27,4 +31,7 @@ window.toggleValueElement = function(element) {
 }
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Vault/view/adminhtml/templates/form/vault.phtml b/app/code/Magento/Vault/view/adminhtml/templates/form/vault.phtml
index fb0666cde976f..8311ff374c3d1 100644
--- a/app/code/Magento/Vault/view/adminhtml/templates/form/vault.phtml
+++ b/app/code/Magento/Vault/view/adminhtml/templates/form/vault.phtml
@@ -4,7 +4,10 @@
  * See COPYING.txt for license details.
  */
 
-/** @var Magento\Vault\Block\Form $block */
+/**
+ * @var Magento\Vault\Block\Form $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 $code = $block->escapeHtml($block->getMethodCode());
 ?>
 <fieldset data-mage-init='{
@@ -12,10 +15,11 @@ $code = $block->escapeHtml($block->getMethodCode());
             "code": "<?= /* @noEscape */ $code ?>",
             "fieldset": "payment_form_<?= /* @noEscape */ $code ?>"
         }
-    }' class="admin__fieldset payment-method"
-          id="payment_form_<?= /* @noEscape */ $code ?>"
-          style="display:none"
-              >
+    }' class="admin__fieldset payment-method" id="payment_form_<?= /* @noEscape */ $code ?>">
     <input type="hidden" name="payment[public_hash]" id="<?= /* @noEscape */ $code ?>_public_hash" value="" />
     <?= $block->getChildHtml() ?>
 </fieldset>
+<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+    'display:none',
+    'fieldset#payment_form_' . /* @noEscape */ $code
+) ?>
diff --git a/app/code/Magento/Weee/Block/Item/Price/Renderer.php b/app/code/Magento/Weee/Block/Item/Price/Renderer.php
index 721df2c83f460..e29dd9d58f0b4 100644
--- a/app/code/Magento/Weee/Block/Item/Price/Renderer.php
+++ b/app/code/Magento/Weee/Block/Item/Price/Renderer.php
@@ -40,6 +40,7 @@ public function __construct(
         array $data = []
     ) {
         $this->weeeHelper = $weeeHelper;
+        $data['weeeHelper'] = $this->weeeHelper;
         parent::__construct($context, $taxHelper, $priceCurrency, $data);
         $this->_isScopePrivate = true;
     }
diff --git a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml
index 1b77231640868..1eff06bb4b985 100644
--- a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml
+++ b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml
@@ -4,28 +4,37 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
 ?>
 <?php
-/** @var $block \Magento\Weee\Block\Renderer\Weee\Tax */
+/**
+ * @var $block \Magento\Weee\Block\Renderer\Weee\Tax
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
+
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
+/** @var \Magento\Directory\Helper\Data $directoryHelper */
+$directoryHelper = $block->getData('directoryHelper');
+
 $data = ['fptAttribute' => [
-    'region' => $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonDecode(
-        $this->helper(\Magento\Directory\Helper\Data::class)->getRegionJson()
-    ),
+    'region' => $jsonHelper->jsonDecode($directoryHelper->getRegionJson()),
     'itemsData' => $block->getValues(),
     'bundlePriceType' => '#price_type',
 ]];
 ?>
 <div id="attribute-<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>-container" class="field"
      data-attribute-code="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>"
-     data-mage-init="<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($data) ?>">
+     data-mage-init="<?= /* @noEscape */ $jsonHelper->jsonEncode($data) ?>">
     <label class="label"><span><?= $block->escapeHtml($block->getElement()->getLabel()) ?></span></label>
 
     <div class="control">
         <table class="data-table">
             <thead>
                 <tr>
-                    <th class="col-website" <?php if (!$block->isMultiWebsites()) : ?>style="display: none;"<?php endif; ?>><?= $block->escapeHtml(__('Website')) ?></th>
+                    <th class="col-website"><?= $block->escapeHtml(__('Website')) ?></th>
+                    <?php if (!$block->isMultiWebsites()): ?>
+                        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'th.col-website') ?>
+                    <?php endif; ?>
                     <th class="col-country required"><?= $block->escapeHtml(__('Country/State')) ?></th>
                     <th class="col-tax required"><?= $block->escapeHtml(__('Tax')) ?></th>
                     <th class="col-action"><?= $block->escapeHtml(__('Action')) ?></th>
@@ -43,7 +52,8 @@ $data = ['fptAttribute' => [
             Hidden field below with attribute code id is necessary for jQuery validation plugin.
             Validation message will be displayed after this field.
         -->
-        <input type="hidden" name="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>" id="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>" disabled="disabled">
+        <input type="hidden" name="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>"
+               id="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>" disabled="disabled">
     </div>
 
     <script data-role="row-template" type="text/x-magento-template">
@@ -51,22 +61,32 @@ $data = ['fptAttribute' => [
             $elementName = $block->escapeHtmlAttr($block->getElement()->getName());
             $elementClass = $block->escapeHtmlAttr($block->getElement()->getClass());
         ?>
-        <tr id="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>_weee_tax_row_<%- data.index %>" data-role="fpt-item-row">
-            <td class="col-website" <?php if (!$block->isMultiWebsites()) : ?>style="display: none"<?php endif; ?>>
+        <tr id="<?= /* @noEscape */ $block->getElement()->getHtmlId() ?>_weee_tax_row_<%- data.index %>"
+            data-role="fpt-item-row">
+            <td class="col-website">
                 <select id="<?= /* @noEscape */ $elementName ?>_weee_tax_row_<%- data.index %>_website"
                         name="<?= /* @noEscape */ $elementName ?>[<%- data.index %>][website_id]"
                         class="<?= /* @noEscape */ $elementClass ?> website required-entry" data-role="select-website">
-                    <?php foreach ($block->getWebsites() as $_websiteId => $_info) : ?>
-                    <option value="<?= /* @noEscape */ $_websiteId ?>"><?= $block->escapeHtml($_info['name']) ?><?php if (!empty($_info['currency'])) : ?>[<?= /* @noEscape */ $_info['currency'] ?>]<?php endif; ?></option>
+                    <?php foreach ($block->getWebsites() as $_websiteId => $_info): ?>
+                    <option value="<?= /* @noEscape */ $_websiteId ?>"><?= $block->escapeHtml($_info['name']) ?>
+                        <?php if (!empty($_info['currency'])): ?>
+                            [<?= /* @noEscape */ $_info['currency'] ?>]
+                        <?php endif; ?>
+                    </option>
                     <?php endforeach ?>
                 </select>
             </td>
+            <?php if (!$block->isMultiWebsites()): ?>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'td.col-website') ?>
+            <?php endif; ?>
             <td class="col-country">
                 <select id="<?= /* @noEscape */ $elementName ?>_weee_tax_row_<%- data.index %>_country"
                         name="<?= /* @noEscape */ $elementName ?>[<%- data.index %>][country]"
                         class="<?= /* @noEscape */ $elementClass ?> country required-entry" data-role="select-country">
-                    <?php foreach ($block->getCountries() as $_country) : ?>
-                    <option value="<?= $block->escapeHtmlAttr($_country['value']) ?>"><?= $block->escapeHtml($_country['label']) ?></option>
+                    <?php foreach ($block->getCountries() as $_country): ?>
+                    <option value="<?= $block->escapeHtmlAttr($_country['value']) ?>">
+                        <?= $block->escapeHtml($_country['label']) ?>
+                    </option>
                     <?php endforeach ?>
                 </select>
                 <select id="<?= /* @noEscape */ $elementName ?>_weee_tax_row_<%- data.index %>_state"
@@ -81,7 +101,8 @@ $data = ['fptAttribute' => [
                        type="text" value="<%- data.value %>"/>
             </td>
             <td class="col-action">
-                <input name="<?= /* @noEscape */ $elementName ?>[<%- data.index %>][delete]" class="delete" type="hidden" value="" data-role="delete-fpt-item"/>
+                <input name="<?= /* @noEscape */ $elementName ?>[<%- data.index %>][delete]" class="delete"
+                       type="hidden" value="" data-role="delete-fpt-item"/>
                 <?= $block->getChildHtml('delete_button') ?>
             </td>
         </tr>
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml
index 15abae5c889fe..3a2dd0557ef2b 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml
@@ -4,31 +4,43 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
+/**
+ * @var $block \Magento\Weee\Block\Item\Price\Renderer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
-/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
+/** @var \Magento\Weee\Helper\Data $weeeHelper */
+$weeeHelper = $block->getData('weeeHelper');
 
 $_item = $block->getItem();
 ?>
-<?php if ($block->displayPriceWithWeeeDetails()) : ?>
-    <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
-<?php else : ?>
+<?php if ($block->displayPriceWithWeeeDetails()): ?>
+    <span class="cart-tax-total"
+          data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+<?php else: ?>
     <span class="cart-price">
 <?php endif; ?>
 <?= /* @noEscape */ $block->formatPrice($block->getRowDisplayPriceExclTax()) ?>
     </span>
 
-<?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
-    <span class="cart-tax-info" id="esubtotal-item-tax-details<?= (int) $_item->getId() ?>" style="display: none;">
-    <?php if ($block->displayPriceWithWeeeDetails()) : ?>
-        <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?>
-            <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>"><?= /* @noEscape */ $block->formatPrice($tax['row_amount'], true, true) ?></span>
+<?php if ($weeeHelper->getApplied($_item)): ?>
+    <span class="cart-tax-info" id="esubtotal-item-tax-details<?= (int) $_item->getId() ?>">
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display: none',
+            'div#esubtotal-item-tax-details' . (int) $item->getId()
+        ) ?>
+    <?php if ($block->displayPriceWithWeeeDetails()): ?>
+        <?php foreach ($weeeHelper->getApplied($_item) as $tax): ?>
+            <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
+                <?= /* @noEscape */ $block->formatPrice($tax['row_amount'], true, true) ?>
+            </span>
         <?php endforeach; ?>
     <?php endif; ?>
     </span>
 
-    <?php if ($block->displayFinalPrice()) : ?>
-        <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+    <?php if ($block->displayFinalPrice()): ?>
+        <span class="cart-tax-total"
+              data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
             <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total')) ?>">
                 <?= /* @noEscape */ $block->formatPrice($block->getFinalRowDisplayPriceExclTax()) ?>
             </span>
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml
index b848698b8b829..546b2ec7c04b3 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml
@@ -4,34 +4,43 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
-/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
+/**
+ * @var $block \Magento\Weee\Block\Item\Price\Renderer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 $_item = $block->getItem();
 /** @var $_weeeHelper \Magento\Weee\Helper\Data */
-$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class);
+$_weeeHelper = $block->getData('weeeHelper');
 ?>
 <?php $_incl = $_item->getRowTotalInclTax(); ?>
-<?php if ($block->displayPriceWithWeeeDetails()) : ?>
-    <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
-<?php else : ?>
+<?php if ($block->displayPriceWithWeeeDetails()): ?>
+    <span class="cart-tax-total"
+          data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+<?php else: ?>
     <span class="cart-price">
 <?php endif; ?>
 <?= /* @noEscape */ $block->formatPrice($block->getRowDisplayPriceInclTax()) ?>
     </span>
 
-<?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
-    <span class="cart-tax-info" id="subtotal-item-tax-details<?= (int) $_item->getId() ?>" style="display: none;">
-        <?php if ($block->displayPriceWithWeeeDetails()) : ?>
-            <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?>
-                <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>"><?= /* @noEscape */ $block->formatPrice($tax['row_amount_incl_tax'], true, true) ?></span>
+<?php if ($_weeeHelper->getApplied($_item)): ?>
+    <span class="cart-tax-info" id="subtotal-item-tax-details<?= (int) $_item->getId() ?>">
+        <?php if ($block->displayPriceWithWeeeDetails()): ?>
+            <?php foreach ($_weeeHelper->getApplied($_item) as $tax): ?>
+                <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
+                    <?= /* @noEscape */ $block->formatPrice($tax['row_amount_incl_tax'], true, true) ?>
+                </span>
             <?php endforeach; ?>
         <?php endif; ?>
     </span>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display: none',
+        'div#subtotal-item-tax-details' . (int) $item->getId()
+    ) ?>
 
-    <?php if ($block->displayFinalPrice()) : ?>
-        <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+    <?php if ($block->displayFinalPrice()): ?>
+        <span class="cart-tax-total"
+              data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $_item->getId() ?>"}}'>
             <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total Incl. Tax')) ?>">
                 <?= /* @noEscape */ $block->formatPrice($block->getFinalRowDisplayPriceInclTax()) ?>
             </span>
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml
index a485de90c871d..b9b43c8c5eac3 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml
@@ -4,31 +4,43 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
+/**
+ * @var $block \Magento\Weee\Block\Item\Price\Renderer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
-/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
+/** @var \Magento\Weee\Helper\Data $weeeHelper */
+$weeeHelper = $block->getData('weeeHelper');
 
 $_item = $block->getItem();
 ?>
-<?php if ($block->displayPriceWithWeeeDetails()) : ?>
-    <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
-<?php else : ?>
+<?php if ($block->displayPriceWithWeeeDetails()): ?>
+    <span class="cart-tax-total"
+          data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+<?php else: ?>
     <span class="cart-price">
 <?php endif; ?>
 
 <?= /* @noEscape */ $block->formatPrice($block->getUnitDisplayPriceExclTax()) ?>
     </span>
-<?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
-    <span class="cart-tax-info" id="eunit-item-tax-details<?= (int) $_item->getId() ?>" style="display:none;">
-    <?php if ($block->displayPriceWithWeeeDetails()) : ?>
-        <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?>
-            <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>"><?= /* @noEscape */ $block->formatPrice($tax['amount'], true, true) ?></span>
+<?php if ($weeeHelper->getApplied($_item)): ?>
+    <span class="cart-tax-info" id="eunit-item-tax-details<?= (int) $_item->getId() ?>">
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+            'display: none',
+            'span#eunit-item-tax-details' . (int) $item->getId()
+        ) ?>
+    <?php if ($block->displayPriceWithWeeeDetails()): ?>
+        <?php foreach ($weeeHelper->getApplied($_item) as $tax): ?>
+            <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
+                <?= /* @noEscape */ $block->formatPrice($tax['amount'], true, true) ?>
+            </span>
         <?php endforeach; ?>
     <?php endif; ?>
     </span>
 
-    <?php if ($block->displayFinalPrice()) : ?>
-        <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+    <?php if ($block->displayFinalPrice()): ?>
+        <span class="cart-tax-total"
+              data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
             <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total')) ?>">
                 <?= /* @noEscape */ $block->formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?>
             </span>
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml
index 0dada610e181e..24023c0088e3e 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml
@@ -4,35 +4,44 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
-
-/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
+/**
+ * @var $block \Magento\Weee\Block\Item\Price\Renderer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
 $_item = $block->getItem();
 /** @var $_weeeHelper \Magento\Weee\Helper\Data */
-$_weeeHelper = $this->helper(\Magento\Weee\Helper\Data::class);
+$_weeeHelper = $block->getData('weeeHelper');
 ?>
 <?php $_incl = $_item->getPriceInclTax(); ?>
-<?php if ($block->displayPriceWithWeeeDetails()) : ?>
-    <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#unit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
-<?php else : ?>
+<?php if ($block->displayPriceWithWeeeDetails()): ?>
+    <span class="cart-tax-total"
+          data-mage-init='{"taxToggle": {"itemTaxId" : "#unit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+<?php else: ?>
     <span class="cart-price">
 <?php endif; ?>
 
 <?= /* @noEscape */ $block->formatPrice($block->getUnitDisplayPriceInclTax()) ?>
     </span>
 
-<?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item)) : ?>
-    <span class="cart-tax-info" id="unit-item-tax-details<?= (int) $_item->getId() ?>" style="display: none;">
-        <?php if ($block->displayPriceWithWeeeDetails()) : ?>
-            <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($_item) as $tax) : ?>
-                <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>"><?= /* @noEscape */ $block->formatPrice($tax['amount_incl_tax'], true, true) ?></span>
+<?php if ($_weeeHelper->getApplied($_item)): ?>
+    <span class="cart-tax-info" id="unit-item-tax-details<?= (int) $_item->getId() ?>">
+        <?php if ($block->displayPriceWithWeeeDetails()): ?>
+            <?php foreach ($_weeeHelper->getApplied($_item) as $tax): ?>
+                <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
+                    <?= /* @noEscape */ $block->formatPrice($tax['amount_incl_tax'], true, true) ?>
+                </span>
             <?php endforeach; ?>
         <?php endif; ?>
     </span>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        'display: none',
+        'span#unit-item-tax-details' . (int) $item->getId()
+    ) ?>
 
-    <?php if ($block->displayFinalPrice()) : ?>
-        <span class="cart-tax-total" data-mage-init='{"taxToggle": {"itemTaxId" : "#unit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
+    <?php if ($block->displayFinalPrice()): ?>
+        <span class="cart-tax-total"
+              data-mage-init='{"taxToggle": {"itemTaxId" : "#unit-item-tax-details<?= (int) $_item->getId() ?>"}}'>
             <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total Incl. Tax')) ?>">
                 <?= /* @noEscape */ $block->formatPrice($block->getFinalUnitDisplayPriceInclTax()) ?>
             </span>
diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml
index 37aa852871408..05ff81be25c99 100644
--- a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml
@@ -4,35 +4,44 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
+/**
+ * @var $block \Magento\Weee\Block\Item\Price\Renderer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
-/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
+/** @var \Magento\Weee\Helper\Data $weeeHelper */
+$weeeHelper = $block->getData('weeeHelper');
 
 $item = $block->getItem();
 ?>
-<?php if (($block->displayPriceInclTax() || $block->displayBothPrices()) && !$item->getNoSubtotal()) : ?>
+<?php if (($block->displayPriceInclTax() || $block->displayBothPrices()) && !$item->getNoSubtotal()): ?>
     <span class="price-including-tax" data-label="<?= $block->escapeHtmlAttr(__('Incl. Tax')) ?>">
-        <?php if ($block->displayPriceWithWeeeDetails()) : ?>
+        <?php if ($block->displayPriceWithWeeeDetails()): ?>
             <span class="cart-tax-total"
                 data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $item->getId() ?>"}}'>
-        <?php else : ?>
+        <?php else: ?>
             <span class="cart-price">
         <?php endif; ?>
             <?= /* @noEscape */ $block->formatPrice($block->getRowDisplayPriceInclTax()) ?>
             </span>
 
-        <?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?>
-            <div class="cart-tax-info" id="subtotal-item-tax-details<?= (int) $item->getId() ?>" style="display: none;">
-                <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item) as $tax) : ?>
+        <?php if ($weeeHelper->getApplied($item)): ?>
+            <div class="cart-tax-info" id="subtotal-item-tax-details<?= (int) $item->getId() ?>">
+                <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['row_amount_incl_tax'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </div>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display: none',
+                'div#subtotal-item-tax-details' . (int) $item->getId()
+            ) ?>
 
-            <?php if ($block->displayFinalPrice()) : ?>
+            <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
-                    data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $item->getId() ?>"}}'>
+                    data-mage-init='{"taxToggle": {"itemTaxId" : "#subtotal-item-tax-details<?= (int) $item->getId()
+                    ?>"}}'>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total Incl. Tax')) ?>">
                         <?= /* @noEscape */ $block->formatPrice($block->getFinalRowDisplayPriceInclTax()) ?>
                     </span>
@@ -42,30 +51,34 @@ $item = $block->getItem();
     </span>
 <?php endif; ?>
 
-<?php if ($block->displayPriceExclTax() || $block->displayBothPrices()) : ?>
+<?php if ($block->displayPriceExclTax() || $block->displayBothPrices()): ?>
     <span class="price-excluding-tax" data-label="<?= $block->escapeHtmlAttr(__('Excl. Tax')) ?>">
-        <?php if ($block->displayPriceWithWeeeDetails()) : ?>
+        <?php if ($block->displayPriceWithWeeeDetails()): ?>
             <span class="cart-tax-total"
-                data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $item->getId() ?>"}}'>
-        <?php else : ?>
+                data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $item->getId()?>"}}'>
+        <?php else: ?>
             <span class="cart-price">
         <?php endif; ?>
                 <?= /* @noEscape */ $block->formatPrice($block->getRowDisplayPriceExclTax()) ?>
             </span>
 
-        <?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?>
-            <span class="cart-tax-info" id="esubtotal-item-tax-details<?= (int) $item->getId() ?>"
-                style="display: none;">
-                <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item) as $tax) : ?>
+        <?php if ($weeeHelper->getApplied($item)): ?>
+            <span class="cart-tax-info" id="esubtotal-item-tax-details<?= (int) $item->getId() ?>">
+                <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['row_amount'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </span>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display: none',
+                'div#esubtotal-item-tax-details' . (int) $item->getId()
+            ) ?>
 
-            <?php if ($block->displayFinalPrice()) : ?>
+            <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
-                      data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int) $item->getId() ?>"}}'>
+                      data-mage-init='{"taxToggle": {"itemTaxId" : "#esubtotal-item-tax-details<?= (int)$item->getId()
+                        ?>"}}'>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total')) ?>">
                         <?= /* @noEscape */ $block->formatPrice($block->getFinalRowDisplayPriceExclTax()) ?>
                     </span>
diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml
index 4e62409ad00f4..980f94b3ba80d 100644
--- a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml
@@ -4,33 +4,41 @@
  * See COPYING.txt for license details.
  */
 
-// phpcs:disable Magento2.Templates.ThisInTemplate
+/**
+ * @var $block \Magento\Weee\Block\Item\Price\Renderer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
+ */
 
-/** @var $block \Magento\Weee\Block\Item\Price\Renderer */
+/** @var \Magento\Weee\Helper\Data $weeeHelper */
+$weeeHelper = $block->getData('weeeHelper');
 
 $item = $block->getItem();
 ?>
-<?php if ($block->displayPriceInclTax() || $block->displayBothPrices()) : ?>
+<?php if ($block->displayPriceInclTax() || $block->displayBothPrices()): ?>
     <span class="price-including-tax" data-label="<?= $block->escapeHtmlAttr(__('Incl. Tax')) ?>">
-        <?php if ($block->displayPriceWithWeeeDetails()) : ?>
+        <?php if ($block->displayPriceWithWeeeDetails()): ?>
             <span class="cart-tax-total"
                 data-mage-init='{"taxToggle": {"itemTaxId" : "#unit-item-tax-details<?= (int) $item->getId() ?>"}}'>
-        <?php else : ?>
+        <?php else: ?>
             <span class="cart-price">
         <?php endif; ?>
             <?= /* @noEscape */ $block->formatPrice($block->getUnitDisplayPriceInclTax()) ?>
             </span>
 
-        <?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?>
-            <span class="cart-tax-info" id="unit-item-tax-details<?= (int) $item->getId() ?>" style="display: none;">
-                <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item) as $tax) : ?>
+        <?php if ($weeeHelper->getApplied($item)): ?>
+            <span class="cart-tax-info" id="unit-item-tax-details<?= (int) $item->getId() ?>">
+                <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['amount_incl_tax'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </span>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display: none',
+                'span#unit-item-tax-details' . (int) $item->getId()
+            ) ?>
 
-            <?php if ($block->displayFinalPrice()) : ?>
+            <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
                     data-mage-init='{"taxToggle": {"itemTaxId" : "#unit-item-tax-details<?= (int) $item->getId() ?>"}}'>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total Incl. Tax')) ?>">
@@ -42,30 +50,32 @@ $item = $block->getItem();
     </span>
 <?php endif; ?>
 
-<?php if ($block->displayPriceExclTax() || $block->displayBothPrices()) : ?>
+<?php if ($block->displayPriceExclTax() || $block->displayBothPrices()): ?>
     <span class="price-excluding-tax" data-label="<?= $block->escapeHtmlAttr(__('Excl. Tax')) ?>">
-        <?php if ($block->displayPriceWithWeeeDetails()) : ?>
+        <?php if ($block->displayPriceWithWeeeDetails()): ?>
             <span class="cart-tax-total"
                 data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?= (int) $item->getId() ?>"}}'>
-        <?php else : ?>
+        <?php else: ?>
             <span class="cart-price">
         <?php endif; ?>
                 <?= /* @noEscape */ $block->formatPrice($block->getUnitDisplayPriceExclTax()) ?>
             </span>
 
-        <?php if ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item)) : ?>
-            <span class="cart-tax-info" id="eunit-item-tax-details<?= (int) $item->getId() ?>"
-                style="display: none;">
-                <?php foreach ($this->helper(\Magento\Weee\Helper\Data::class)->getApplied($item) as $tax) : ?>
+        <?php if ($weeeHelper->getApplied($item)): ?>
+            <span class="cart-tax-info" id="eunit-item-tax-details<?= (int) $item->getId() ?>">
+                <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['amount'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </span>
-
-            <?php if ($block->displayFinalPrice()) : ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                'display: none',
+                'span#eunit-item-tax-details' . (int) $item->getId()
+            ) ?>
+            <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
-                      data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?= (int) $item->getId() ?>"}}'>
+                      data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?=(int)$item->getId()?>"}}'>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr(__('Total')) ?>">
                         <?= /* @noEscape */ $block->formatPrice($block->getFinalUnitDisplayPriceExclTax()) ?>
                     </span>

From 69c8b58023a809c03f91c3e7148302370cdd213f Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Thu, 30 Apr 2020 12:10:17 -0500
Subject: [PATCH 117/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../testsuite/Magento/Framework/Session/SessionManagerTest.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php b/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
index 6ce5f0cf39c29..13b897b0012d6 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Session/SessionManagerTest.php
@@ -111,7 +111,7 @@ class SessionManagerTest extends \PHPUnit\Framework\TestCase
         private $request;
 
         /**
-         * @var State|\PHPUnit_Framework_MockObject_MockObject
+         * @var State|\PHPUnit\Framework\MockObject\MockObject
          */
         private $appState;
 

From 4758b4366c3881ce23272e39ea5f5d5a4417a1d7 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Mon, 4 May 2020 18:24:30 +0300
Subject: [PATCH 118/307] MC-29420: Remove event handlers from CE

---
 .../Fieldset/Options/Type/CheckboxTest.php    |  15 +-
 .../Fieldset/Options/Type/MultiTest.php       |  17 +-
 .../Fieldset/Options/Type/RadioTest.php       |  17 +-
 .../Fieldset/Options/Type/SelectTest.php      |  17 +-
 .../Form/Field/Select/AllowspecificTest.php   |  11 +-
 .../Block/System/Config/Form/FieldTest.php    |  23 +-
 .../Fieldset/Modules/DisableOutputTest.php    |  11 +
 .../Block/System/Config/Form/FieldsetTest.php |  14 +-
 .../Decorator/DebugHintsTest.php              |  35 ++-
 .../render/item/price_msrp_item.phtml         |   4 +-
 .../System/Config/Field/CountryTest.php       |  22 +-
 .../System/Config/Fieldset/GroupTest.php      |  18 +-
 .../frontend/templates/partner/logo.phtml     |   4 +-
 .../frontend/templates/payment/mark.phtml     |   4 +-
 .../frontend/templates/customer/list.phtml    |   2 +-
 .../frontend/templates/customer/recent.phtml  |   2 +-
 .../frontend/templates/customer/view.phtml    |   2 +-
 .../frontend/templates/helper/summary.phtml   |   2 +-
 .../templates/order/packaging/grid.phtml      |   3 +-
 .../templates/order/tracking/view.phtml       |   3 +-
 .../templates/product/layered/renderer.phtml  |  64 ++++--
 .../Widget/Block/Adminhtml/Widget/Chooser.php |  54 +++--
 .../catalog/category/widget/tree.phtml        |  67 ++++--
 .../templates/instance/edit/layout.phtml      | 211 +++++++++++++-----
 .../adminhtml/templates/instance/js.phtml     |  10 +-
 app/code/Magento/Wishlist/Block/Rss/Link.php  |   5 +
 .../customer/edit/tab/wishlist.phtml          |  22 +-
 .../view/frontend/templates/rss/email.phtml   |  14 +-
 .../view/frontend/templates/shared.phtml      |  35 ++-
 29 files changed, 545 insertions(+), 163 deletions(-)

diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/CheckboxTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/CheckboxTest.php
index 58c0436b5bf7c..5e901420bc3ba 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/CheckboxTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/CheckboxTest.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Bundle\Test\Unit\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class CheckboxTest extends \PHPUnit\Framework\TestCase
 {
@@ -16,9 +18,20 @@ class CheckboxTest extends \PHPUnit\Framework\TestCase
 
     protected function setUp()
     {
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+
         $this->block = (new ObjectManager($this))
             ->getObject(
-                \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Checkbox::class
+                \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Checkbox::class,
+                ['htmlRenderer' => $secureRendererMock]
             );
     }
 
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/MultiTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/MultiTest.php
index 69a1901d89b06..8bef65fed94f3 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/MultiTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/MultiTest.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Bundle\Test\Unit\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class MultiTest extends \PHPUnit\Framework\TestCase
 {
@@ -16,8 +18,21 @@ class MultiTest extends \PHPUnit\Framework\TestCase
 
     protected function setUp()
     {
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+
         $this->block = (new ObjectManager($this))
-            ->getObject(\Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Multi::class);
+            ->getObject(
+                \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Multi::class,
+                ['htmlRenderer' => $secureRendererMock]
+            );
     }
 
     public function testSetValidationContainer()
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/RadioTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/RadioTest.php
index 81b8a6a3161a1..10e35058d558b 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/RadioTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/RadioTest.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Bundle\Test\Unit\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class RadioTest extends \PHPUnit\Framework\TestCase
 {
@@ -16,8 +18,21 @@ class RadioTest extends \PHPUnit\Framework\TestCase
 
     protected function setUp()
     {
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+
         $this->block = (new ObjectManager($this))
-            ->getObject(\Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Radio::class);
+            ->getObject(
+                \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Radio::class,
+                ['htmlRenderer' => $secureRendererMock]
+            );
     }
 
     public function testSetValidationContainer()
diff --git a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/SelectTest.php b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/SelectTest.php
index 1eba793b6f592..4902f459fe1b7 100644
--- a/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/SelectTest.php
+++ b/app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/SelectTest.php
@@ -5,7 +5,9 @@
  */
 namespace Magento\Bundle\Test\Unit\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type;
 
+use Magento\Framework\DataObject;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 
 class SelectTest extends \PHPUnit\Framework\TestCase
 {
@@ -16,8 +18,21 @@ class SelectTest extends \PHPUnit\Framework\TestCase
 
     protected function setUp()
     {
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+
         $this->block = (new ObjectManager($this))
-            ->getObject(\Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Select::class);
+            ->getObject(
+                \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Select::class,
+                ['htmlRenderer' => $secureRendererMock]
+            );
     }
 
     public function testSetValidationContainer()
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
index 75c46c1168843..0652d92b05ac3 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
@@ -7,6 +7,7 @@
 
 use Magento\Framework\Math\Random;
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
+use Magento\Framework\DataObject;
 
 class AllowspecificTest extends \PHPUnit\Framework\TestCase
 {
@@ -32,6 +33,14 @@ function (string $event, string $listener, string $selector): string {
                     return "<script>document.querySelector('{$selector}').{$event} = () => { {$listener} };</script>";
                 }
             );
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
         $this->_object = $testHelper->getObject(
             \Magento\Config\Block\System\Config\Form\Field\Select\Allowspecific::class,
             [
@@ -71,7 +80,7 @@ public function testGetAfterElementHtml()
         $actual = $this->_object->getAfterElementHtml();
 
         $this->assertStringEndsWith('</script>' . $afterHtmlCode, $actual);
-        $this->assertStringStartsWith('<script type="text/javascript">', trim($actual));
+        $this->assertStringStartsWith('<script >', trim($actual));
         $this->assertContains('test_prefix_spec_element_test_suffix', $actual);
     }
 
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php
index d942af9352e6c..7485175639a1a 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Config\Test\Unit\Block\System\Config\Form;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Test how class render field html element in Stores Configuration
  */
@@ -38,10 +40,24 @@ class FieldTest extends \PHPUnit\Framework\TestCase
     protected function setUp()
     {
         $this->_storeManagerMock = $this->createMock(\Magento\Store\Model\StoreManager::class);
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
 
         $data = [
             'storeManager' => $this->_storeManagerMock,
             'urlBuilder' => $this->createMock(\Magento\Backend\Model\Url::class),
+            'secureRenderer' => $secureRendererMock,
         ];
         $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->_object = $helper->getObject(\Magento\Config\Block\System\Config\Form\Field::class, $data);
@@ -150,7 +166,7 @@ public function testRenderHint()
     {
         $testHint = 'test_hint';
         $this->_elementMock->expects($this->any())->method('getHint')->will($this->returnValue($testHint));
-        $expected = '<td class=""><div class="hint"><div style="display: none;">' . $testHint . '</div></div>';
+        $expected = '<td class=""><div class="hint"><div id="hint_test_field_id">' . $testHint . '</div></div>';
         $actual = $this->_object->render($this->_elementMock);
         $this->assertContains($expected, $actual);
     }
@@ -187,8 +203,9 @@ public function testRenderInheritCheckbox()
             '_inherit" name="' .
             $this->_testData['name'] .
             '[inherit]" type="checkbox" value="1"' .
-            ' class="checkbox config-inherit" checked="checked"' . ' disabled="disabled"' . ' readonly="1"' .
-            ' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ';
+            ' class="checkbox config-inherit" checked="checked"' . ' disabled="disabled"' . ' readonly="1" />' .
+            '<script>document.querySelector(\'input#test_field_id_inherit\').onclick = function () '.
+            '{ toggleValueElements(this, Element.previous(this.parentNode)) };</script>';
 
         $expected .= '<label for="' . $this->_testData['htmlId'] . '_inherit" class="inherit">Use Website</label>';
         $actual = $this->_object->render($this->_elementMock);
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php
index bb109bcb25f06..fa3eb66a39d71 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Config\Test\Unit\Block\System\Config\Form\Fieldset\Modules;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -141,6 +143,14 @@ protected function setUp()
             ]
         );
 
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
+
         $data = [
             'context'     => $context,
             'authSession' => $this->authSessionMock,
@@ -150,6 +160,7 @@ protected function setUp()
                 'group'          => $groupMock,
                 'form'           => $formMock,
             ],
+            'secureRenderer' => $secureRendererMock
         ];
 
         $this->object = $this->objectManager->getObject(
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
index 66bbf407c06a5..0dc030f343338 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
@@ -5,6 +5,8 @@
  */
 namespace Magento\Config\Test\Unit\Block\System\Config\Form;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -100,6 +102,13 @@ protected function setUp()
         $groupMock->expects($this->any())->method('getFieldsetCss')->will($this->returnValue('test_fieldset_css'));
 
         $this->_helperMock = $this->createMock(\Magento\Framework\View\Helper\Js::class);
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
 
         $data = [
             'request' => $this->_requestMock,
@@ -108,6 +117,7 @@ protected function setUp()
             'layout' => $this->_layoutMock,
             'jsHelper' => $this->_helperMock,
             'data' => ['group' => $groupMock],
+            'secureRenderer' => $secureRendererMock
         ];
         $this->_testHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
         $this->_object = $this->_testHelper->getObject(\Magento\Config\Block\System\Config\Form\Fieldset::class, $data);
@@ -222,8 +232,8 @@ public function testRenderWithStoredElements($expanded, $nested, $extra)
 
         $this->assertContains('test_field_toHTML', $actual);
 
-        $expected = '<div id="row_test_field_id_comment" class="system-tooltip-box"' .
-            ' style="display:none;">test_field_tootip</div>';
+        $expected = '<div id="row_test_field_id_comment" class="system-tooltip-box">test_field_tootip</div>' .
+        '<style>row_test_field_id_comment { display:none; }</style>';
         $this->assertContains($expected, $actual);
         if ($nested) {
             $this->assertContains('nested', $actual);
diff --git a/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php b/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php
index fd2475320261a..d9e28b48c1666 100644
--- a/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php
+++ b/app/code/Magento/Developer/Test/Unit/Model/TemplateEngine/Decorator/DebugHintsTest.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Developer\Test\Unit\Model\TemplateEngine\Decorator;
 
+use Magento\Framework\DataObject;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class DebugHintsTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -28,7 +32,36 @@ public function testRender($showBlockHints)
         )->will(
             $this->returnValue('<div id="fixture"/>')
         );
-        $model = new \Magento\Developer\Model\TemplateEngine\Decorator\DebugHints($subject, $showBlockHints);
+        $randomMock = $this->createMock(Random::class);
+        $randomMock->method('getRandomString')->willReturn('random');
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
+
+        $model = new \Magento\Developer\Model\TemplateEngine\Decorator\DebugHints(
+            $subject,
+            $showBlockHints,
+            $secureRendererMock,
+            $randomMock
+        );
         $actualResult = $model->render($block, 'template.phtml', ['var' => 'val']);
         $this->assertNotNull($actualResult);
     }
diff --git a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
index fd0f2a45e1771..d2a0982586eed 100644
--- a/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
+++ b/app/code/Magento/Msrp/view/frontend/templates/render/item/price_msrp_item.phtml
@@ -51,7 +51,7 @@
         </a>
         <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
             'onclick',
-            'e.preventDefault()',
+            'event.preventDefault()',
             'a#' . /* @noEscape */ ($popupId)
         ) ?>
     <?php else: ?>
@@ -68,7 +68,7 @@
     </a>
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onclick',
-        'e.preventDefault()',
+        'event.preventDefault()',
         'a#' . /* @noEscape */ ($helpLinkId)
     ) ?>
 </div>
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
index d8487e63c6eca..b3f9e41b302e6 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
@@ -5,6 +5,7 @@
  */
 namespace Magento\Paypal\Test\Unit\Block\Adminhtml\System\Config\Field;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Paypal\Block\Adminhtml\System\Config\Field\Country;
 
 class CountryTest extends \PHPUnit\Framework\TestCase
@@ -58,9 +59,28 @@ protected function setUp()
         $this->_request = $this->getMockForAbstractClass(\Magento\Framework\App\RequestInterface::class);
         $this->_jsHelper = $this->createMock(\Magento\Framework\View\Helper\Js::class);
         $this->_url = $this->createMock(\Magento\Backend\Model\Url::class);
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
+
         $this->_model = $helper->getObject(
             \Magento\Paypal\Block\Adminhtml\System\Config\Field\Country::class,
-            ['request' => $this->_request, 'jsHelper' => $this->_jsHelper, 'url' => $this->_url]
+            [
+                'request' => $this->_request,
+                'jsHelper' => $this->_jsHelper,
+                'url' => $this->_url,
+                'secureRenderer' => $secureRendererMock,
+            ]
         );
     }
 
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php
index 1bea6b11b966b..133d792cda097 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php
@@ -6,6 +6,8 @@
 
 namespace Magento\Paypal\Test\Unit\Block\Adminhtml\System\Config\Fieldset;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class GroupTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -70,9 +72,23 @@ protected function setUp()
             ->method('__call')
             ->with('getUser')
             ->will($this->returnValue($this->_user));
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderEventListenerAsTag')
+            ->willReturnCallback(
+                function (string $event, string $js, string $selector): string {
+                    return "<script>document.querySelector('$selector').$event = function () { $js };</script>";
+                }
+            );
+        $secureRendererMock->method('renderStyleAsTag')
+            ->willReturnCallback(
+                function (string $style, string $selector): string {
+                    return "<style>$selector { $style }</style>";
+                }
+            );
+
         $this->_model = $helper->getObject(
             \Magento\Paypal\Block\Adminhtml\System\Config\Fieldset\Group::class,
-            ['authSession' => $this->_authSession]
+            ['authSession' => $this->_authSession, 'secureRenderer' => $secureRendererMock]
         );
         $this->_model->setGroup($this->_group);
     }
diff --git a/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
index a26d00cc2e9b2..63249f9a52455 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/partner/logo.phtml
@@ -24,10 +24,10 @@
 </div>
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
-    "javascript:window.open(
+    "window.open(
                '" . $block->escapeJs($block->getAboutPaypalPageUrl()) . "',
                'paypal',
                'width=600,height=350,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'
-               ); return false;",
+               ); event.preventDefault();",
     'div.block.paypal.acceptance div.block-content a.action.paypal.additional'
 ) ?>
diff --git a/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
index dae8cb94cb110..0b95e3788f91c 100644
--- a/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
+++ b/app/code/Magento/Paypal/view/frontend/templates/payment/mark.phtml
@@ -24,12 +24,12 @@ $url = $block->escapeUrl($block->getPaymentAcceptanceMarkHref());
 </a>
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
-    "javascript:window.open(
+    "window.open(
            '" . /* @noEscape */ $block->escapeJs($block->getPaymentAcceptanceMarkHref()) . "',
            'olcwhatispaypal',
            'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
            'left=0, top=0, width=400, height=350'
-       ); return false;",
+       ); event.preventDefault();",
     'a.action.paypal.about'
 ) ?>
 <!-- PayPal Logo -->
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
index 0e9a717a5f53c..6dd7aa575e9df 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/list.phtml
@@ -53,7 +53,7 @@ $reviewHelper = $block->getData('reviewHelper');
                         </div>
                         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                             "width:" . /* @noEscape */ ((int)$review->getSum() / (int)$review->getCount()) . "%;",
-                            'div.rating-summary div.rating-result span'
+                            'div.rating-summary div.rating-result>span:first-child'
                         ) ?>
                     <?php endif; ?>
                     </td>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
index 4900d48d0829c..cf7d53e818c36 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/recent.phtml
@@ -37,7 +37,7 @@
                          </div>
                         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                             "width:". $block->escapeHtmlAttr($rating) . "%",
-                            'div.rating-result span'
+                            'div.rating-result>span:first-child'
                         ) ?>
                      </div>
                 <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
index 415645eb8e73e..862a9a466414f 100644
--- a/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/customer/view.phtml
@@ -49,7 +49,7 @@ $product = $block->getProductData();
                             </div>
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                                 "width:" . /* @noEscape */ $rating . "%",
-                                'div.rating-result span'
+                                'div.rating-result>span:first-child'
                             ) ?>
                         </div>
                     <?php endif; ?>
diff --git a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
index b906456f16dc8..93afe4a815f61 100644
--- a/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
+++ b/app/code/Magento/Review/view/frontend/templates/helper/summary.phtml
@@ -30,7 +30,7 @@ $urlForm = $block->getReviewsUrl() . '#review-form';
          </div>
             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                 "width:" . $block->escapeHtmlAttr($rating) . "%",
-                'div.rating-summary div.rating-result span'
+                'div.rating-summary div.rating-result>span:first-child'
             ) ?>
         <?php endif;?>
         <div class="reviews-actions">
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml
index 4ed817ddd7e0f..4a3cad2066d32 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/grid.phtml
@@ -104,6 +104,7 @@
                                qty-decimal
                             <?php endif ?>"> 
                         <button type="button"
+                                id="packaging-delete-item-<?= /* @noEscape */ $item->getId() ?>"
                                 class="action-delete"
                                 data-action="package-delete-item">
                             <span><?= $block->escapeHtml(__('Delete')) ?></span>
@@ -112,7 +113,7 @@
                         <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                             'onclick',
                             'packaging.deleteItem(this);',
-                            'button.action-delete'
+                            'button#packaging-delete-item-' . $item->getId()
                         ) ?>
                     </td>
                 </tr>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml
index d2eb927fd8278..df303b777188c 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking/view.phtml
@@ -87,7 +87,8 @@ $shippingHelper = $block->getData('shippingHelper');
                     </td>
                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                         'onclick',
-                        "deleteTrackingNumber('{$block->escapeJs($block->getRemoveUrl($_track))}'); return false;",
+                        "deleteTrackingNumber('{$block->escapeJs($block->getRemoveUrl($_track))}');
+                         event.preventDefault();",
                         '#del-track-' . (int) $_track->getId()
                     ) ?>
                 </tr>
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index 70eb51651f663..8ae7668ca145d 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -8,6 +8,7 @@
 // phpcs:disable Generic.WhiteSpace.ScopeIndent
 
 /** @var $block \Magento\Swatches\Block\LayeredNavigation\RenderLayered */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php $swatchData = $block->getSwatchData(); ?>
 <div class="swatch-attribute swatch-layered <?= $block->escapeHtmlAttr($swatchData['attribute_code']) ?>"
@@ -22,7 +23,7 @@
                     <?php switch ($swatchData['swatches'][$option]['type']) {
                         case '3':
                             ?>
-                            <div class="swatch-option <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
+                            <div class="swatch-option"
                                  tabindex="-1"
                                  data-option-type="3"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
@@ -30,6 +31,13 @@
                                  data-option-tooltip-thumb=""
                                  data-option-tooltip-value=""
                                 ></div>
+                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                $block->escapeHtmlAttr($label['custom_style']),
+                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                            ) ?>
+                            <?php endif; ?>
+
                             <?php break;
                         case '2':
                             ?>
@@ -43,21 +51,29 @@
                             );
                             $escapedUrl = $block->escapeUrl($swatchImagePath);
                             ?>
-                            <div class="swatch-option image <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
+                            <div class="swatch-option image"
                                  tabindex="-1"
                                  data-option-type="2"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
                                  data-option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
                                  data-option-tooltip-thumb="<?= $block->escapeUrl($swatchThumbPath) ?>"
-                                 data-option-tooltip-value=""
-                                 style="background: url(<?=
-                                 /*  @noEscape */ $escapedUrl
-                                                        ?>) no-repeat center; background-size: initial;">
+                                 data-option-tooltip-value="">
                             </div>
+                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                $block->escapeHtmlAttr($label['custom_style']),
+                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                            ) ?>
+                            <?php endif; ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                "background: url(" . /*  @noEscape */ $escapedUrl .
+                                ") no-repeat center; background-size: initial;",
+                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                            ) ?>
                             <?php break;
                         case '1':
                             ?>
-                            <div class="swatch-option color <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
+                            <div class="swatch-option color"
                                  tabindex="-1"
                                  data-option-type="1"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
@@ -65,16 +81,25 @@
                                  data-option-tooltip-thumb=""
                                  data-option-tooltip-value="<?= $block->escapeHtmlAttr(
                                      $swatchData['swatches'][$option]['value']
-                                 ) ?>"
-                                 style="background: <?= $block->escapeHtmlAttr(
-                                     $swatchData['swatches'][$option]['value']
-                                 ) ?> no-repeat center; background-size: initial;">
+                                 ) ?>">
                             </div>
+                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                $block->escapeHtmlAttr($label['custom_style']),
+                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                            ) ?>
+                            <?php endif; ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                "background: " . $block->escapeHtmlAttr(
+                                    $swatchData['swatches'][$option]['value']
+                                ) . " no-repeat center; background-size: initial;",
+                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                            ) ?>
                             <?php break;
                         case '0':
                         default:
                             ?>
-                            <div class="swatch-option text <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
+                            <div class="swatch-option text"
                                  tabindex="-1"
                                  data-option-type="0"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
@@ -82,6 +107,12 @@
                                  data-option-tooltip-thumb=""
                                  data-option-tooltip-value=""
                                 ><?= $block->escapeHtml($swatchData['swatches'][$option]['value']) ?></div>
+                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
+                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+                                $block->escapeHtmlAttr($label['custom_style']),
+                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                            ) ?>
+                            <?php endif; ?>
                         <?php break;
                     } ?>
                 <?php endif; ?>
@@ -89,11 +120,14 @@
         <?php endforeach; ?>
     </div>
 </div>
+<?php $scriptString = <<<script
 
-<script>
     require(["jquery", "Magento_Swatches/js/swatch-renderer"], function ($) {
-        $('.swatch-layered.<?= $block->escapeJs($swatchData['attribute_code']) ?>')
+        $('.swatch-layered.{$block->escapeJs($swatchData['attribute_code'])}')
             .find('[data-option-type="1"], [data-option-type="2"], [data-option-type="0"], [data-option-type="3"]')
             .SwatchRendererTooltip();
     });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php
index 45b3056eac68d..f10a821c510e1 100644
--- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php
+++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Chooser.php
@@ -11,6 +11,9 @@
  */
 namespace Magento\Widget\Block\Adminhtml\Widget;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Chooser widget block.
  */
@@ -26,20 +29,28 @@ class Chooser extends \Magento\Backend\Block\Template
      */
     protected $_jsonEncoder;
 
+    /**
+     * @var SecureHtmlRenderer
+     */
+    private $secureRenderer;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Framework\Data\Form\Element\Factory $elementFactory
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Framework\Json\EncoderInterface $jsonEncoder,
         \Magento\Framework\Data\Form\Element\Factory $elementFactory,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureRenderer = null
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_elementFactory = $elementFactory;
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
         parent::__construct($context, $data);
     }
 
@@ -189,33 +200,35 @@ protected function _toHtml()
             '</label>
             <div id="' .
             $chooserId .
-            'advice-container" class="hidden"></div>
-            <script>
-            require(["prototype", "mage/adminhtml/wysiwyg/widget"], function(){
+            'advice-container" class="hidden"></div>' .
+            $this->secureRenderer->renderTag(
+                'script',
+                [],
+                'require(["prototype", "mage/adminhtml/wysiwyg/widget"], function(){
             //<![CDATA[
                 (function() {
                     var instantiateChooser = function() {
                         window.' .
-            $chooserId .
-            ' = new WysiwygWidget.chooser(
+                $chooserId .
+                ' = new WysiwygWidget.chooser(
                             "' .
-            $chooserId .
-            '",
+                $chooserId .
+                '",
                             "' .
-            $this->getSourceUrl() .
-            '",
+                $this->getSourceUrl() .
+                '",
                             ' .
-            $configJson .
-            '
+                $configJson .
+                '
                         );
                         if ($("' .
-            $chooserId .
-            'value")) {
+                $chooserId .
+                'value")) {
                             $("' .
-            $chooserId .
-            'value").advaiceContainer = "' .
-            $chooserId .
-            'advice-container";
+                $chooserId .
+                'value").advaiceContainer = "' .
+                $chooserId .
+                'advice-container";
                         }
                     }
 
@@ -223,7 +236,8 @@ protected function _toHtml()
                 })();
             //]]>
             });
-            </script>
-        ';
+            ',
+                false
+            );
     }
 }
diff --git a/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml b/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml
index 72de9550654d3..5bb6756bf4ebe 100644
--- a/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml
+++ b/app/code/Magento/Widget/view/adminhtml/templates/catalog/category/widget/tree.phtml
@@ -5,19 +5,31 @@
  */
 
 /** @var \Magento\Catalog\Block\Adminhtml\Category\Widget\Chooser $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <?php $_divId = 'tree' . $block->getId() ?>
 <div id="<?= $block->escapeHtmlAttr($_divId) ?>" class="tree"></div>
 <script id="ie-deferred-loader" defer="defer" src="//:"></script>
-<script>
+<?php
+$useMassaction = /* @noEscape */ $block->getUseMassaction() ? 1 : 0;
+$isAnchorOnly = /* @noEscape */ $block->getIsAnchorOnly() ? 1 : 0;
+$nodeClickListener = /* @noEscape */ $block->getNodeClickListener();
+$withEmpltyNode = /* @noEscape */ ($block->getWithEmptyNode() ? 'false' : 'true');
+$isVisible = (bool) $block->getRoot()->getIsVisible();
+$categoryId = (int) $block->getCategoryId();
+$rootId = (int) $block->getRoot()->getId();
+$isWasExpanded = (int) $block->getIsWasExpanded();
+$treeJson = /* @noEscape */ $block->getTreeJson();
+$scriptString = <<<script
+
 require(['jquery', "prototype", "extjs/ext-tree-checkbox"], function(jQuery){
 
-var tree<?= $block->escapeJs($block->getId()) ?>;
+var tree{$block->escapeJs($block->getId())};
 
-var useMassaction = <?= /* @noEscape */ $block->getUseMassaction() ? 1 : 0 ?>;
+var useMassaction = {$useMassaction};
 
-var isAnchorOnly = <?= /* @noEscape */ $block->getIsAnchorOnly() ? 1 : 0 ?>;
+var isAnchorOnly = {$isAnchorOnly};
 
 Ext.tree.TreePanel.Enhanced = function(el, config)
 {
@@ -41,9 +53,17 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
         this.setRootNode(root);
 
         if (firstLoad) {
-            <?php if ($block->getNodeClickListener()) : ?>
-                this.addListener('click', <?= /* @noEscape */ $block->getNodeClickListener() ?>.createDelegate(this));
-            <?php endif; ?>
+
+script;
+if ($block->getNodeClickListener()):
+    $scriptString .= <<<script
+
+                this.addListener('click', {$nodeClickListener}.createDelegate(this));
+
+script;
+endif;
+$scriptString .= <<<script
+
         }
 
         this.loader.buildCategoryTree(root, data);
@@ -55,10 +75,10 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
 
 jQuery(function()
 {
-    var emptyNodeAdded = <?= /* @noEscape */ ($block->getWithEmptyNode() ? 'false' : 'true') ?>;
+    var emptyNodeAdded = {$withEmpltyNode};
 
     var categoryLoader = new Ext.tree.TreeLoader({
-        dataUrl: '<?= $block->escapeUrl($block->getLoadTreeUrl()) ?>'
+        dataUrl: '{$block->escapeJs($block->getLoadTreeUrl())}'
     });
 
     categoryLoader.buildCategoryTree = function(parent, config)
@@ -77,7 +97,7 @@ jQuery(function()
                 // Add empty node to reset category filter
                 if(!emptyNodeAdded) {
                     var empty = Object.clone(_node);
-                    empty.text = '<?= $block->escapeJs($block->escapeHtml(__('None'))) ?>';
+                    empty.text = '{$block->escapeJs($block->escapeHtml(__('None')))}';
                     empty.children = [];
                     empty.id = 'none';
                     empty.path = '1/none';
@@ -148,39 +168,42 @@ jQuery(function()
     };
 
     categoryLoader.on("beforeload", function(treeLoader, node) {
-        $('<?= $block->escapeJs($_divId) ?>').fire('category:beforeLoad', {treeLoader:treeLoader});
+        $('{$block->escapeJs($_divId)}').fire('category:beforeLoad', {treeLoader:treeLoader});
         treeLoader.baseParams.id = node.attributes.id;
     });
 
-    tree<?= $block->escapeJs($block->getId()) ?> = new Ext.tree.TreePanel.Enhanced('<?= $block->escapeJs($_divId) ?>', {
+    tree{$block->escapeJs($block->getId())} = new Ext.tree.TreePanel.Enhanced('{$block->escapeJs($_divId)}', {
         animate:          false,
         loader:           categoryLoader,
         enableDD:         false,
         containerScroll:  true,
-        rootVisible:      '<?= (bool) $block->getRoot()->getIsVisible() ?>',
+        rootVisible:      '{$isVisible}',
         useAjax:          true,
-        currentNodeId:    <?= (int) $block->getCategoryId() ?>,
+        currentNodeId:    {$categoryId},
         addNodeTo:        false
     });
 
     if (useMassaction) {
-        tree<?= $block->escapeJs($block->getId()) ?>.on('check', function(node) {
-            $('<?= $block->escapeJs($_divId) ?>').fire('node:changed', {node:node});
-        }, tree<?= $block->escapeJs($block->getId()) ?>);
+        tree{$block->escapeJs($block->getId())}.on('check', function(node) {
+            $('{$block->escapeJs($_divId)}').fire('node:changed', {node:node});
+        }, tree{$block->escapeJs($block->getId())});
     }
 
     // set the root node
     var parameters = {
         text:        'Psw',
         draggable:   false,
-        id:          <?= (int) $block->getRoot()->getId() ?>,
-        expanded:    <?= (int) $block->getIsWasExpanded() ?>,
-        category_id: <?= (int) $block->getCategoryId() ?>
+        id:          {$rootId},
+        expanded:    {$isWasExpanded},
+        category_id: {$categoryId}
     };
 
-    tree<?= $block->escapeJs($block->getId()) ?>.loadTree({parameters:parameters, data:<?= /* @noEscape */ $block->getTreeJson() ?>},true);
+    tree{$block->escapeJs($block->getId())}.loadTree({parameters:parameters, data:{$treeJson}},true);
 
 });
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml
index c45ef65f4f242..6dab476115cee 100644
--- a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml
+++ b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml
@@ -5,6 +5,7 @@
  */
 
 /** @var \Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Tab\Main\Layout $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 ?>
 <fieldset class="fieldset">
@@ -16,7 +17,11 @@
     </div>
 </fieldset>
 <script id="ie-deferred-loader" defer="defer" src="//:"></script>
-<script>
+<?php
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
+$scriptString = <<<script
+
 require([
     'jquery',
     'mage/template',
@@ -30,33 +35,68 @@ require([
 var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="page_group_container_<%- data.id %>">'+
     '<div class="fieldset-wrapper-title">'+
         '<label for="widget_instance[<%- data.id %>][page_group]">Display on <span class="required">*</span></label>'+
-        '<?= $block->getDisplayOnSelectHtml() ?>'+
+        '{$block->getDisplayOnSelectHtml()}'+
         '<div class="actions">'+
-        <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getRemoveLayoutButtonHtml()) ?> +
+        {$jsonHelper->jsonEncode($block->getRemoveLayoutButtonHtml())} +
         '</div>'+
     '</div>'+
     '<div class="fieldset-wrapper-content">'+
-<?php foreach ($block->getDisplayOnContainers() as $container) : ?>
-    '<div class="no-display <?= $block->escapeJs($container['code']) ?> group_container" id="<?= $block->escapeJs($container['name']) ?>_<%- data.id %>">'+
-        '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>]" />'+
-        '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][page_id]" value="<%- data.page_id %>" />'+
-        '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][layout_handle]" value="<?= $block->escapeJs($container['layout_handle']) ?>" />'+
+
+script;
+foreach ($block->getDisplayOnContainers() as $container):
+    $scriptString .= <<<script
+    '<div class="no-display {$block->escapeJs($container['code'])} group_container" '+
+        'id="{$block->escapeJs($container['name'])}_<%- data.id %>">'+
+        '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" '+
+        'value="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}]" />'+
+        '<input disabled="disabled" type="hidden" '+
+        'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][page_id]" '+
+        'value="<%- data.page_id %>" />'+
+        '<input disabled="disabled" type="hidden" class="layout_handle_pattern" '+
+        'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][layout_handle]" '+
+        'value="{$block->escapeJs($container['layout_handle'])}" />'+
         '<table class="data-table">'+
             '<col width="200" />'+
             '<thead>'+
                 '<tr>'+
-                    '<th><label><?= $block->escapeJs(__('%1', $container['label'])) ?></label></th>'+
-                    '<th><label><?= $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                    '<th><label><?= $block->escapeJs(__('Template')) ?></label></th>'+
+                    '<th><label>{$block->escapeJs(__('%1', $container['label']))}</label></th>'+
+                    '<th><label>{$block->escapeJs(__('Container'))} <span class="required">*</span></label></th>'+
+                    '<th><label>{$block->escapeJs(__('Template'))}</label></th>'+
                 '</tr>'+
             '</thead>'+
             '<tbody>'+
                 '<tr>'+
                     '<td>'+
-                        '<input disabled="disabled" type="radio" class="radio for_all" id="all_<?= $block->escapeJs($container['name']) ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][for]" value="all" onclick="WidgetInstance.togglePageGroupChooser(this)" checked="checked" /> '+
-                        '<label for="all_<?= $block->escapeJs($container['name']) ?>_<%- data.id %>"><?= $block->escapeJs(__('All')) ?></label><br />'+
-                        '<input disabled="disabled" type="radio" class="radio for_specific" id="specific_<?= $block->escapeJs($container['name']) ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][for]" value="specific" onclick="WidgetInstance.togglePageGroupChooser(this)" /> '+
-                        '<label for="specific_<?= $block->escapeJs($container['name']) ?>_<%- data.id %>"><?= $block->escapeJs(__('Specific %1', $container['label'])) ?></label>'+
+                        '<input disabled="disabled" type="radio" class="radio for_all" '+
+                        'id="all_{$block->escapeJs($container['name'])}_<%- data.id %>" '+
+                        'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][for]" '+
+                        'value="all" checked="checked" /> '+
+                        '<label for="all_{$block->escapeJs($container['name'])}_<%- data.id %>">'+
+                        '{$block->escapeJs(__('All'))}</label><br />'+
+                        '<input disabled="disabled" type="radio" class="radio for_specific" '+
+                        'id="specific_{$block->escapeJs($container['name'])}_<%- data.id %>" '+
+                        'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][for]" '+
+                        'value="specific" /> '+
+                        '<label for="specific_{$block->escapeJs($container['name'])}_<%- data.id %>">'+
+                        '{$block->escapeJs(__('Specific %1', $container['label']))}</label>'+
+
+script;
+
+    $scriptString1 = $secureRenderer->renderEventListenerAsTag(
+        "onclick",
+        "WidgetInstance.togglePageGroupChooser(this)",
+        "all_" . $block->escapeJs($container['name']) . "_<%- data.id %>"
+    );
+    $scriptString .= "'" . $block->escapeJs($scriptString1) . "'+" . PHP_EOL;
+
+    $scriptString1 = $secureRenderer->renderEventListenerAsTag(
+        "onclick",
+        "WidgetInstance.togglePageGroupChooser(this)",
+        "specific_" . $block->escapeJs($container['name']) . "_<%- data.id %>"
+    );
+    $scriptString .= "'" . $block->escapeJs($scriptString1) . "'+" . PHP_EOL;
+
+    $scriptString .= <<<script
                     '</td>'+
                     '<td>'+
                         '<div class="block_reference_container">'+
@@ -71,33 +111,72 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
                 '</tr>'+
             '</tbody>'+
         '</table>'+
-        '<div class="no-display chooser_container" id="<?= $block->escapeJs($container['name']) ?>_ids_<%- data.id %>">'+
-            '<input disabled="disabled" type="hidden" class="is_anchor_only" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][is_anchor_only]" value="<?= $block->escapeJs($container['is_anchor_only']) ?>" />'+
-            '<input disabled="disabled" type="hidden" class="product_type_id" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][product_type_id]" value="<?= $block->escapeJs($container['product_type_id']) ?>" />'+
+        '<div class="no-display chooser_container" id="{$block->escapeJs($container['name'])}_ids_<%- data.id %>">'+
+            '<input disabled="disabled" type="hidden" class="is_anchor_only" '+
+            'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][is_anchor_only]" '+
+            'value="{$block->escapeJs($container['is_anchor_only'])}" />'+
+            '<input disabled="disabled" type="hidden" class="product_type_id" '+
+            'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][product_type_id]" '+
+            'value="{$block->escapeJs($container['product_type_id'])}" />'+
             '<p>' +
-                '<input disabled="disabled" type="text" class="input-text entities" name="widget_instance[<%- data.id %>][<?= $block->escapeJs($container['name']) ?>][entities]" value="<%- data.<?= $block->escapeJs($container['name']) ?>_entities %>" readonly="readonly" /> ' +
-                '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?= $block->escapeJs($container['code']) ?>\', \'<?= $block->escapeJs($container['name']) ?>_ids_<%- data.id %>\')"  title="<?= $block->escapeJs(__('Open Chooser')) ?>">' +
-                    '<img src="<?= $block->escapeUrl($block->getViewFileUrl('images/rule_chooser_trigger.gif')) ?>" alt="<?= $block->escapeJs(__('Open Chooser')) ?>" />' +
+                '<input disabled="disabled" type="text" class="input-text entities" '+
+                'name="widget_instance[<%- data.id %>][{$block->escapeJs($container['name'])}][entities]" '+
+                'value="<%- data.{$block->escapeJs($container['name'])}_entities %>" readonly="readonly" /> ' +
+                '<a class="widget-option-chooser" href="#" '+
+                'title="{$block->escapeJs(__('Open Chooser'))}">' +
+                    '<img src="{$block->escapeJs($block->getViewFileUrl('images/rule_chooser_trigger.gif'))}" '+
+                    'alt="{$block->escapeJs(__('Open Chooser'))}" />' +
                 '</a> ' +
-                '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?= $block->escapeJs($container['name']) ?>_ids_<%- data.id %>\')" title="<?= $block->escapeJs(__('Apply')) ?>">' +
-                    '<img src="<?= $block->escapeUrl($block->getViewFileUrl('images/rule_component_apply.gif')) ?>" alt="<?= $block->escapeJs(__('Apply')) ?>" />' +
+                '<a id="widget-apply-<%- data.id %>" href="#" '+
+                'title="{$block->escapeJs(__('Apply'))}">' +
+                    '<img src="{$block->escapeJs($block->getViewFileUrl('images/rule_component_apply.gif'))}" '+
+                    'alt="{$block->escapeJs(__('Apply'))}" />' +
                 '</a>' +
             '</p>'+
             '<div class="chooser"></div>'+
         '</div>'+
+
+script;
+
+    $scriptString1 = $secureRenderer->renderEventListenerAsTag(
+        "onclick",
+        "event.preventDefault();
+        WidgetInstance.displayEntityChooser('" .$block->escapeJs($container['code']) .
+        "', '" . $block->escapeJs($container['name']) . "_ids_<%- data.id %>')",
+        "div#" . $block->escapeJs($container['name']) . "_ids_<%- data.id %> a.widget-option-chooser"
+    );
+    $scriptString .= "'" . $block->escapeJs($scriptString1) . "'+" . PHP_EOL;
+
+    $scriptString1 = $secureRenderer->renderEventListenerAsTag(
+        'onclick',
+        "event.preventDefault();
+        WidgetInstance.hideEntityChooser('" . $block->escapeJs($container['name']) . "_ids_<%- data.id %>')",
+        "a#widget-apply-<%- data.id %>"
+    );
+    $scriptString .= "'" . $block->escapeJs($scriptString1) . "'+" . PHP_EOL;
+    $scriptString .= <<<script
+
     '</div>'+
-<?php endforeach; ?>
+
+script;
+endforeach;
+$scriptString .= <<<script
+
 '<div class="no-display all_pages group_container" id="all_pages_<%- data.id %>">'+
-    '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][all_pages]" />'+
-    '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][all_pages][page_id]" value="<%- data.page_id %>" />'+
-    '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%- data.id %>][all_pages][layout_handle]" value="default" />'+
-    '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][all_pages][for]" value="all" />'+
+    '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" '+
+    'value="widget_instance[<%- data.id %>][all_pages]" />'+
+    '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][all_pages][page_id]" '+
+    'value="<%- data.page_id %>" />'+
+    '<input disabled="disabled" type="hidden" class="layout_handle_pattern" '+
+    'name="widget_instance[<%- data.id %>][all_pages][layout_handle]" value="default" />'+
+    '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][all_pages][for]" '+
+    'value="all" />'+
     '<table class="data-table">'+
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?= $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?= $block->escapeJs(__('Template')) ?></label></th>'+
+                '<th><label>{$block->escapeJs(__('Container'))} <span class="required">*</span></label></th>'+
+                '<th><label>{$block->escapeJs(__('Template'))}</label></th>'+
                 '<th> </th>'+
             '</tr>'+
         '</thead>'+
@@ -119,21 +198,24 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
     '</table>'+
 '</div>'+
 '<div class="no-display ignore-validate pages group_container" id="pages_<%- data.id %>">'+
-    '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][pages]" />'+
-    '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][pages][page_id]" value="<%- data.page_id %>" />'+
-    '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][pages][for]" value="all" />'+
+    '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" '+
+    'value="widget_instance[<%- data.id %>][pages]" />'+
+    '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][pages][page_id]" '+
+    'value="<%- data.page_id %>" />'+
+    '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][pages][for]" '+
+    'value="all" />'+
     '<table class="data-table">'+
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?= $block->escapeJs(__('Page')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?= $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?= $block->escapeJs(__('Template')) ?></label></th>'+
+                '<th><label>{$block->escapeJs(__('Page'))} <span class="required">*</span></label></th>'+
+                '<th><label>{$block->escapeJs(__('Container'))} <span class="required">*</span></label></th>'+
+                '<th><label>{$block->escapeJs(__('Template'))}</label></th>'+
             '</tr>'+
         '</thead>'+
         '<tbody>'+
             '<tr>'+
-                '<td><?= /* @noEscape */ $block->getLayoutsChooser() ?></td>'+
+                '<td>{$block->getLayoutsChooser()}</td>'+
                 '<td>'+
                     '<div class="block_reference_container">'+
                         '<div class="block_reference"></div>'+
@@ -150,21 +232,24 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="
     '</table>'+
 '</div>'+
 '<div class="no-display ignore-validate pages group_container" id="page_layouts_<%- data.id %>">'+
-    '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][page_layouts]" />'+
-    '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][page_layouts][page_id]" value="<%- data.page_id %>" />'+
-    '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][page_layouts][for]" value="all" />'+
+    '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" '+
+    'value="widget_instance[<%- data.id %>][page_layouts]" />'+
+    '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][page_layouts][page_id]" '+
+    'value="<%- data.page_id %>" />'+
+    '<input disabled="disabled" type="hidden" class="for_all" '+
+    'name="widget_instance[<%- data.id %>][page_layouts][for]" value="all" />'+
     '<table class="data-table">'+
         '<col width="200" />'+
         '<thead>'+
             '<tr>'+
-                '<th><label><?= $block->escapeJs(__('Page')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?= $block->escapeJs(__('Container')) ?> <span class="required">*</span></label></th>'+
-                '<th><label><?= $block->escapeJs(__('Template')) ?></label></th>'+
+                '<th><label>{$block->escapeJs(__('Page'))} <span class="required">*</span></label></th>'+
+                '<th><label>{$block->escapeJs(__('Container'))} <span class="required">*</span></label></th>'+
+                '<th><label>{$block->escapeJs(__('Template'))}</label></th>'+
             '</tr>'+
         '</thead>'+
         '<tbody>'+
             '<tr>'+
-                '<td><?= /* @noEscape */ $block->getPageLayoutsPageChooser() ?></td>'+
+                '<td>{$block->getPageLayoutsPageChooser()}</td>'+
                 '<td>'+
                     '<div class="block_reference_container">'+
                         '<div class="block_reference"></div>'+
@@ -189,7 +274,7 @@ var WidgetInstance = {
     pageGroupTemplate    : pageGroupTemplate,
     pageGroupContainerId : 'page_group_container',
     count : 0,
-    activePageGroups : $H({}),
+    activePageGroups : \$H({}),
     selectedItems : {},
 
     addPageGroup : function(data) {
@@ -266,7 +351,7 @@ var WidgetInstance = {
     },
     addProductItemToSelection: function(groupId, item) {
         if (undefined == this.selectedItems[groupId]) {
-            this.selectedItems[groupId] = $H({});
+            this.selectedItems[groupId] = \$H({});
         }
         if (!isNaN(parseInt(item))) {
             this.selectedItems[groupId].set(item, 1);
@@ -327,11 +412,11 @@ var WidgetInstance = {
             additional = {};
         }
         if (type == 'categories') {
-            additional.url = '<?= $block->escapeUrl($block->getCategoriesChooserUrl()) ?>';
-            additional.post_parameters = $H({'is_anchor_only':$(chooser).down('input.is_anchor_only').value});
+            additional.url = '{$block->escapeJs($block->getCategoriesChooserUrl())}';
+            additional.post_parameters = \$H({'is_anchor_only':$(chooser).down('input.is_anchor_only').value});
         } else if (type == 'products') {
-            additional.url = '<?= $block->escapeUrl($block->getProductsChooserUrl()) ?>';
-            additional.post_parameters = $H({'product_type_id':$(chooser).down('input.product_type_id').value});
+            additional.url = '{$block->escapeUrl($block->getProductsChooserUrl())}';
+            additional.post_parameters = \$H({'product_type_id':$(chooser).down('input.product_type_id').value});
         }
         if (chooser && additional) {
             this.displayChooser(chooser, additional);
@@ -347,7 +432,7 @@ var WidgetInstance = {
     displayChooser : function(chooser, additional) {
         chooser = $(chooser).down('div.chooser');
         entities = chooser.up('div.chooser_container').down('input[type="text"].entities').value;
-        postParameters = $H({selected:entities});
+        postParameters = \$H({selected:entities});
         url = '';
         if (additional) {
             if (additional.url) url = additional.url;
@@ -436,13 +521,13 @@ var WidgetInstance = {
             selected = '';
             parameters = {};
             if (type == 'block_reference') {
-                url = '<?= $block->escapeUrl($block->getBlockChooserUrl()) ?>';
+                url = '{$block->escapeJs($block->getBlockChooserUrl())}';
                 if (additional.selectedBlock) {
                     selected = additional.selectedBlock;
                 }
                 parameters.layout = value;
             } else if (type == 'block_template') {
-                url = '<?= $block->escapeUrl($block->getTemplateChooserUrl()) ?>';
+                url = '{$block->escapeJs($block->getTemplateChooserUrl())}';
                 if (additional.selectedTemplate) {
                     selected = additional.selectedTemplate;
                 }
@@ -479,9 +564,18 @@ var WidgetInstance = {
 window.WidgetInstance = WidgetInstance;
 
 jQuery(function(){
-    <?php foreach ($block->getPageGroups() as $pageGroup) : ?>
-        WidgetInstance.addPageGroup(<?= /* @noEscape */ $pageGroup ?>);
-    <?php endforeach; ?>
+
+script;
+foreach ($block->getPageGroups() as $pageGroup):
+    $scriptString .= <<<script
+
+        WidgetInstance.addPageGroup({$pageGroup});
+
+script;
+endforeach;
+
+$scriptString .= <<<script
+
     Event.observe(document, 'product:changed', function(event){
         WidgetInstance.checkProduct(event);
     });
@@ -497,4 +591,7 @@ jQuery(function(){
 //]]>
 
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml
index 90aee2baeb4f3..cb82c1dbca75a 100644
--- a/app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml
+++ b/app/code/Magento/Widget/view/adminhtml/templates/instance/js.phtml
@@ -3,8 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $scriptString = <<<script
+
 require([
     'jquery',
     'mage/template',
@@ -27,4 +30,7 @@ setSettings = function(urlTemplate, codeElement, themeElement) {
     setLocation(url);
 };
 });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Wishlist/Block/Rss/Link.php b/app/code/Magento/Wishlist/Block/Rss/Link.php
index 3e716c863862b..28affa8d3372d 100644
--- a/app/code/Magento/Wishlist/Block/Rss/Link.php
+++ b/app/code/Magento/Wishlist/Block/Rss/Link.php
@@ -44,6 +44,7 @@ public function __construct(
         \Magento\Framework\Url\EncoderInterface $urlEncoder,
         array $data = []
     ) {
+        $data['wishlistHelper'] = $this->wishlistHelper;
         parent::__construct($context, $data);
         $this->wishlistHelper = $wishlistHelper;
         $this->rssUrlBuilder = $rssUrlBuilder;
@@ -51,6 +52,8 @@ public function __construct(
     }
 
     /**
+     * Return link.
+     *
      * @return string
      */
     public function getLink()
@@ -72,6 +75,8 @@ public function isRssAllowed()
     }
 
     /**
+     * Return link params.
+     *
      * @return array
      */
     protected function getLinkParams()
diff --git a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml
index e6c0608f4b450..7ee04bf192f29 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml
+++ b/app/code/Magento/Wishlist/view/adminhtml/templates/customer/edit/tab/wishlist.phtml
@@ -5,8 +5,10 @@
  */
 
 /** @var \Magento\Framework\View\Element\Template $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $scriptString = <<<script
+
     require([
             "Magento_Ui/js/modal/confirm",
             "prototype",
@@ -19,13 +21,14 @@
                     if (!urlParams) {
                         urlParams = '';
                     }
-                    var url = <?= $block->escapeJs($block->escapeUrl($block->getJsObjectName())) ?>.url + '?ajax=true' + urlParams;
+                    var url = {$block->escapeJs($block->getJsObjectName())}.url + '?ajax=true' + urlParams;
                     new Ajax.Updater(
-                        <?= $block->escapeJs($block->escapeHtml($block->getJsObjectName())) ?>.containerId,
+                        {$block->escapeJs($block->getJsObjectName())}.containerId,
                         url,
                         {
                             parameters: {form_key: FORM_KEY},
-                            onComplete: <?= $block->escapeJs($block->escapeHtml($block->getJsObjectName())) ?>.initGrid.bind(<?= $block->escapeJs($block->escapeHtml($block->getJsObjectName())) ?>),
+                            onComplete: {$block->escapeJs($block->getJsObjectName())}.initGrid
+                            .bind({$block->escapeJs($block->getJsObjectName())}),
                         evalScripts:true
                 }
             );
@@ -48,7 +51,7 @@
         var self = this;
 
         confirm({
-            content: '<?= $block->escapeJs($block->escapeHtml(__('Are you sure you want to remove this item?'))) ?>',
+            content: '{$block->escapeJs(__('Are you sure you want to remove this item?'))}',
             actions: {
                 confirm: function () {
                     self.reload('&delete=' + itemId);
@@ -61,11 +64,14 @@
     productConfigure.addListType(
         'wishlist',
         {
-            urlFetch: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('customer/wishlist_product_composite_wishlist/configure'))) ?>',
-            urlConfirm: '<?= $block->escapeJs($block->escapeUrl($block->getUrl('customer/wishlist_product_composite_wishlist/update'))) ?>'
+            urlFetch: '{$block->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/configure'))}',
+            urlConfirm: '{$block->escapeJs($block->getUrl('customer/wishlist_product_composite_wishlist/update'))}'
         }
     );
     //-->
 
     });
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml
index 4a97173fde318..f221e50608ca4 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/rss/email.phtml
@@ -5,11 +5,19 @@
  */
 
 /* @var \Magento\Wishlist\Block\Rss\EmailLink $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+
+/** @var \Magento\Wishlist\Helper\Data $wishlistHelper */
+$wishlistHelper = $block->getData('wishlistHelper');
 ?>
-<?php if ($block->getLink()) : ?>
-<p style="font-size:12px; line-height:16px; margin:0 0 16px;">
-    <?= $block->escapeHtml(__("RSS link to %1's wishlist", $this->helper(\Magento\Wishlist\Helper\Data::class)->getCustomerName())) ?>
+<?php if ($block->getLink()): ?>
+<p id="wishlist-rss-email-link">
+    <?= $block->escapeHtml(__("RSS link to %1's wishlist", $wishlistHelper->getCustomerName())) ?>
     <br />
     <a href="<?= $block->escapeUrl($block->getLink()) ?>"><?= $block->escapeUrl($block->getLink()) ?></a>
 </p>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
+        "font-size:12px; line-height:16px; margin:0 0 16px;",
+        'p#wishlist-rss-email-link'
+    ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml
index 0fcaa6c853ff0..0d3158abb0532 100644
--- a/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/templates/shared.phtml
@@ -5,10 +5,12 @@
  */
 
 /** @var \Magento\Wishlist\Block\Share\Wishlist $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
-<?php if ($block->hasWishlistItems()) : ?>
-    <form class="form shared wishlist" action="<?= $block->escapeUrl($block->getUrl('wishlist/index/update')) ?>" method="post">
+<?php if ($block->hasWishlistItems()): ?>
+    <form class="form shared wishlist" action="<?= $block->escapeUrl($block->getUrl('wishlist/index/update')) ?>"
+          method="post">
         <div class="wishlist table-wrapper">
             <table class="table data wishlist" id="wishlist-table">
                 <caption class="table-caption"><?= $block->escapeHtml(__('Wish List')) ?></caption>
@@ -20,14 +22,15 @@
                 </tr>
                 </thead>
                 <tbody>
-                <?php foreach ($block->getWishlistItems() as $item) : ?>
+                <?php foreach ($block->getWishlistItems() as $item): ?>
                     <?php
                     $product = $item->getProduct();
                     $isVisibleProduct = $product->isVisibleInSiteVisibility();
                     ?>
                     <tr>
                         <td data-th="<?= $block->escapeHtmlAttr(__('Product')) ?>" class="col product">
-                            <a class="product photo" href="<?= $block->escapeUrl($block->getProductUrl($item)) ?>" title="<?= $block->escapeHtmlAttr($product->getName()) ?>">
+                            <a class="product photo" href="<?= $block->escapeUrl($block->getProductUrl($item)) ?>"
+                               title="<?= $block->escapeHtmlAttr($product->getName()) ?>">
                                 <?= $block->getImage($product, 'customer_shared_wishlist')->toHtml() ?>
                             </a>
                             <strong class="product name">
@@ -45,10 +48,13 @@
                             ?>
                             <?= $block->getDetailsHtml($item) ?>
                         </td>
-                        <td data-th="<?= $block->escapeHtmlAttr(__('Comment')) ?>" class="col comment"><?= /* @noEscape */ $block->getEscapedDescription($item) ?></td>
-                        <td data-th="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>" class="col actions" data-role="add-to-links">
-                            <?php if ($product->isSaleable()) : ?>
-                                <?php if ($isVisibleProduct) : ?>
+                        <td data-th="<?= $block->escapeHtmlAttr(__('Comment')) ?>"
+                            class="col comment"><?= /* @noEscape */ $block->getEscapedDescription($item) ?>
+                        </td>
+                        <td data-th="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>" class="col actions"
+                            data-role="add-to-links">
+                            <?php if ($product->isSaleable()): ?>
+                                <?php if ($isVisibleProduct): ?>
                                     <button type="button"
                                             title="<?= $block->escapeHtmlAttr(__('Add to Cart')) ?>"
                                             data-post='<?= /* @noEscape */ $block->getSharedItemAddToCartUrl($item) ?>'
@@ -57,9 +63,16 @@
                                     </button>
                                 <?php endif ?>
                             <?php endif; ?>
-                            <a href="#" data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($item) ?>'  onclick="location.assign(this.href); return false;" class="action towishlist" data-action="add-to-wishlist">
+                            <a href="#" data-post='<?= /* @noEscape */ $block->getAddToWishlistParams($item) ?>'
+                               id="wishlist-shared-item-<?= /* @noEscape */ $item->getId() ?>"
+                               class="action towishlist" data-action="add-to-wishlist">
                                 <span><?= $block->escapeHtml(__('Add to Wish List')) ?></span>
                             </a>
+                            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                                'onclick',
+                                "location.assign(this.href); event.preventDefault();",
+                                'a#wishlist-shared-item-' . $item->getId()
+                            ) ?>
                         </td>
                     </tr>
                 <?php endforeach ?>
@@ -68,7 +81,7 @@
         </div>
 
         <div class="actions-toolbar">
-            <?php if ($block->isSaleable()) : ?>
+            <?php if ($block->isSaleable()): ?>
                 <div class="primary">
                     <button type="button"
                             title="<?= $block->escapeHtmlAttr(__('Add All to Cart')) ?>"
@@ -85,6 +98,6 @@
             </div>
         </div>
     </form>
-<?php else : ?>
+<?php else: ?>
     <div class="message info empty"><div><?= $block->escapeHtml(__('Wish List is empty now.')) ?></div></div>
 <?php endif ?>

From 3eddcb5ba4cd31906f65bb422c02de189ccea095 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Mon, 4 May 2020 14:01:45 -0500
Subject: [PATCH 119/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml     | 3 +++
 .../Test/StorefrontPaypalSmartButtonInMiniCartPageTest.xml     | 3 +++
 .../Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml | 3 +++
 .../Test/StorefrontPaypalSmartButtonInShoppingCartPageTest.xml | 3 +++
 .../Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml    | 3 +++
 .../Test/StorefrontPaypalSmartButtonWithCADCurrencyTest.xml    | 3 +++
 .../Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml   | 3 +++
 ...torefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml | 3 +++
 .../Test/StorefrontPaypalSmartButtonWithNZDCurrencyTest.xml    | 3 +++
 .../Test/StorefrontPaypalSmartButtonWithYENCurrencyTest.xml    | 3 +++
 10 files changed, 30 insertions(+)

diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
index d27ac4c4a92f5..2cc94caf4c1b1 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
@@ -17,6 +17,9 @@
             <severity value="CRITICAL"/>
             <testCaseId value="MC-13690"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInMiniCartPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInMiniCartPageTest.xml
index f50d2fc9ad9a4..c19cb3ee4a646 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInMiniCartPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInMiniCartPageTest.xml
@@ -17,6 +17,9 @@
             <severity value="CRITICAL"/>
             <testCaseId value="MC-27604"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml
index 3e4f5c8b4da30..41578eed67625 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml
@@ -17,6 +17,9 @@
             <severity value="CRITICAL"/>
             <testCaseId value="MC-26167"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInShoppingCartPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInShoppingCartPageTest.xml
index 62ebeea2d65be..4aed4b3d7e414 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInShoppingCartPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInShoppingCartPageTest.xml
@@ -16,6 +16,9 @@
             <description value="Users are able to perform PayPal Express Checkout method using PayPal Smart Button on Shopping Cart, payment action is Sale, make sure checkout as guest is not available"/>
             <severity value="CRITICAL"/>
             <testCaseId value="MC-27605"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml
index 4d4f4e8b89957..69ec26a8ea806 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
 
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithCADCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithCADCurrencyTest.xml
index aa35f36268270..ea6df54bc27e1 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithCADCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithCADCurrencyTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!--Enable Advanced Setting-->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml
index 1adfe3b5d3a70..5077544ea0b39 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!--Set merchant country-->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
index 0efb3f33739fa..22997b7005f91 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!--Set merchant country-->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithNZDCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithNZDCurrencyTest.xml
index 4cddf674c9bfe..4040b788b3bd7 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithNZDCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithNZDCurrencyTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <!--Enable Advanced Setting-->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithYENCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithYENCurrencyTest.xml
index b5b42b2a6bcbd..086a6159ccb90 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithYENCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithYENCurrencyTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-33951"/>
+            </skip>
         </annotations>
         <before>
             <magentoCLI command="config:set {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.value}}" stepKey="enableSkipOrderReview"/>

From 7d5e1435b858f42c11e692dee3c23b62ca7319d7 Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Tue, 5 May 2020 11:17:19 +0300
Subject: [PATCH 120/307] MC-33404: Incorrect display of file name in import
 history

---
 .../Block/Adminhtml/Grid/Column/Renderer/Download.php          | 2 +-
 .../Block/Adminhtml/Grid/Column/Renderer/Error.php             | 2 +-
 .../Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php | 3 +--
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php
index 110503a505752..5a9e3a2a8504a 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php
@@ -21,7 +21,7 @@ class Download extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
     public function _getValue(\Magento\Framework\DataObject $row)
     {
         return '<p> ' . $this->escapeHtml($row->getData('imported_file')) .  '</p><a href="'
-        . $this->escapeUrl($this->getUrl('*/*/download', ['filename' => $row->getData('imported_file')])) . '">'
+        . $this->getUrl('*/*/download', ['filename' => $row->getData('imported_file')]) . '">'
         . $this->escapeHtml(__('Download'))
         . '</a>';
     }
diff --git a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php
index 5760d26de68b1..d493fc3fd9531 100644
--- a/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php
+++ b/app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php
@@ -23,7 +23,7 @@ public function _getValue(\Magento\Framework\DataObject $row)
         $result = '';
         if ($row->getData('error_file') != '') {
             $result = '<p> ' . $this->escapeHtml($row->getData('error_file')) .  '</p><a href="'
-                . $this->escapeUrl($this->getUrl('*/*/download', ['filename' => $row->getData('error_file')])) . '">'
+                . $this->getUrl('*/*/download', ['filename' => $row->getData('error_file')]) . '">'
                 . $this->escapeHtml(__('Download'))
                 . '</a>';
         }
diff --git a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
index a4ede993098b3..abc9c9147303e 100644
--- a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
+++ b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
@@ -71,8 +71,7 @@ public function testGetValue()
             ->method('escapeHtml')
             ->with('file.csv')
             ->willReturn('file.csv');
-        $this->escaperMock->expects($this->once())->method('escapeUrl')->willReturn('url');
-        $this->escaperMock->expects($this->at(2))
+        $this->escaperMock->expects($this->at(1))
             ->method('escapeHtml')
             ->with('Download')
             ->willReturn('Download');

From d11b19b36be90f950ee6b2d489d4fcf0cec88982 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Wed, 6 May 2020 14:01:11 +0300
Subject: [PATCH 121/307] MC-29420: Remove event handlers from CE

---
 .../view/adminhtml/templates/tracking.phtml   | 13 +++++--
 .../templates/widget/accordion.phtml          | 15 +++++---
 .../templates/widget/form/element.phtml       | 18 +++++++---
 .../adminhtml/templates/widget/grid.phtml     |  4 +--
 .../templates/widget/grid/extended.phtml      |  7 ++--
 .../templates/widget/grid/serializer.phtml    | 34 ++++++++++++-------
 .../templates/catalog/category/tree.phtml     |  4 +--
 .../catalog/product/edit/websites.phtml       |  2 +-
 .../catalog/product/tab/inventory.phtml       |  2 +-
 .../templates/product/price/tier_prices.phtml | 11 ++++--
 .../product/view/options/type/file.phtml      |  7 +++-
 .../templates/system/config/validatevat.phtml |  2 +-
 .../adminhtml/templates/unitofmeasure.phtml   |  8 +++--
 .../templates/import/frame/result.phtml       | 12 +++++--
 .../templates/transparent/iframe.phtml        | 32 ++++++++++-------
 .../templates/report/grid/container.phtml     |  2 +-
 .../Create/Search/Grid/Renderer/Product.php   | 26 +++++++++++++-
 .../templates/order/create/data.phtml         | 14 +++++---
 .../order/create/shipping/method/form.phtml   |  2 +-
 .../templates/order/view/tab/info.phtml       |  2 +-
 .../adminhtml/web/order/create/scripts.js     |  2 +-
 .../templates/promo/salesrulejs.phtml         | 22 +++++++-----
 .../templates/page/js/require_js.phtml        |  4 +--
 23 files changed, 171 insertions(+), 74 deletions(-)

diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
index 7e01f84b8322c..35d0f9ec89986 100644
--- a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
+++ b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
@@ -9,13 +9,22 @@
  */
 ?>
 
-<script src="<?= $block->escapeUrl($block->getTrackingUrl()) ?>" async></script>
+<?= /* @noEscape */ $secureRenderer->renderTag(
+    'script',
+    [
+        'src' => '"' . $block->escapeJs($block->getTrackingUrl()) .'"',
+        'async' => true,
+    ],
+    '',
+    false
+) ?>
 
 <?php $scriptString = '
     var adminAnalyticsMetadata = {
         "version": "' . $block->escapeJs($block->getMetadata()->getMagentoVersion()) . '",
         "user": "' . $block->escapeJs($block->getMetadata()->getCurrentUser()) . '",
         "mode": "' . $block->escapeJs($block->getMetadata()->getMode()) . '"
-    };';
+    };
+';
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml
index fecf5365544e0..dfee490379dd1 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml
@@ -3,6 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 <?php
 /**
@@ -10,17 +12,20 @@
  */
 $items = $block->getItems();
 ?>
-<?php if (!empty($items)) : ?>
+<?php if (!empty($items)): ?>
     <dl id="tab_content_<?= $block->getHtmlId() ?>" name="tab_content_<?= $block->getHtmlId() ?>" class="accordion">
-    <?php foreach ($items as $_item) : ?>
+    <?php foreach ($items as $_item): ?>
         <?= $block->getChildHtml($_item->getId()) ?>
     <?php endforeach ?>
     </dl>
-    <script>
+    <?php $scriptString = <<<script
         require([
             'mage/adminhtml/accordion'
         ], function(){
-            tab_content_<?= $block->getHtmlId() ?>AccordionJs = new varienAccordion('tab_content_<?= $block->getHtmlId() ?>', '<?= $block->escapeJs($block->getShowOnlyOne()) ?>');
+            tab_content_{$block->getHtmlId()}AccordionJs = new varienAccordion('tab_content_{$block->getHtmlId()}',
+             '{$block->escapeJs($block->getShowOnlyOne())}');
         });
-    </script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
index fce4d094ee0b1..075cd12c90d05 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
@@ -84,7 +84,7 @@ $htmlId = $element->getHtmlId();
 <?php elseif ($type === 'wysiwyg'): ?>
     <span class="form_row">
       <label for="<?= /* @noEscape */ $htmlId ?>"><?= $block->escapeHtml($element->getLabel()) ?>:</label>
-        <script>
+        <?php $scriptString = <<<script
         require([
             "wysiwygAdapter"
         ], function(tinyMCE){
@@ -92,7 +92,7 @@ $htmlId = $element->getHtmlId();
             tinyMCE.init({
                 mode : "exact",
                 theme : "advanced",
-                elements : "<?= $block->escapeJs($element->getName()) ?>",
+                elements : "{$block->escapeJs($element->getName())}",
                 plugins : "inlinepopups,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,"
                     + "insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,"
                     + "fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
@@ -121,7 +121,9 @@ $htmlId = $element->getHtmlId();
                     + ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
             });
         });
-</script>
+script;
+        ?>
+        <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
       <textarea name="<?= $block->escapeHtmlAttr($element->getName()) ?>"
                 title="<?=  $block->escapeHtmlAttr($element->getTitle()) ?>"
                 id="<?= /* @noEscape */ $htmlId ?>"
@@ -144,7 +146,13 @@ $htmlId = $element->getHtmlId();
             </span>
 <?php endif; ?>
 <?php if ($element->getScript()): ?>
-<script>
+    <script>
+        <?= /* @noEscape */ $element->getScript() ?>
+    </script>
+
+    <?php $scriptString = <<<script
     <?= /* @noEscape */ $element->getScript() ?>
-</script>
+script;
+    ?>
+    <?php /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index abbe74ece1fe5..f4ef4db022a8e 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -100,7 +100,7 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                                 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                     'onclick',
                                     /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
-                                        /* @noEscape */ ($_curPage - 1) . '\');return false;',
+                                        /* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();',
                                     'button.action-previous'
                                 ) ?>
                             <?php else: ?>
@@ -136,7 +136,7 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                                 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                     'onclick',
                                     /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
-                                    /* @noEscape */ ($_curPage + 1) . '\');return false;',
+                                    /* @noEscape */ ($_curPage + 1) . '\');event.preventDefault();',
                                     'button.action-next'
                                 ) ?>
                             <?php else: ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 7730dd4c339cb..c43b6397232c5 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -115,7 +115,7 @@ $numColumns = count($block->getColumns());
                             <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
-                                /* @noEscape */ ($_curPage - 1) . '\');return false;',
+                                /* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();',
                                 '. admin__data-grid-pager button.action-previous'
                             ) ?>
                         <?php else: ?>
@@ -149,7 +149,7 @@ $numColumns = count($block->getColumns());
                             <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
-                                /* @noEscape */ ($_curPage + 1) . '\');return false;',
+                                /* @noEscape */ ($_curPage + 1) . '\');event.preventDefault();',
                                 '.admin__data-grid-pager button.action-next'
                             ) ?>
                         <?php else: ?>
@@ -322,11 +322,13 @@ script;
         $scriptString .= <<<script
 
     require(deps, function({$dependencyJsObject}){
+
 script;
         //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed
         $scriptString .= <<<script
 
         //<![CDATA[
+
 script;
         if ($block->getDependencyJsObject()):
             $scriptString .= <<<script
@@ -389,6 +391,7 @@ script;
             $scriptString .= <<<script
 
         });
+
 script;
         endif;
         $scriptString .= <<<script
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml
index 2208a00929592..9ddf3ea5df3c8 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/serializer.phtml
@@ -7,6 +7,7 @@
 <?php
 /**
  * @var $block \Magento\Backend\Block\Widget\Grid\Serializer
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 ?>
 <?php
@@ -14,8 +15,8 @@
 $_id = 'id_' . md5(microtime());
 ?>
 <?php $formId = $block->getFormId()?>
-<?php if (!empty($formId)) : ?>
-<script>
+<?php if (!empty($formId)): ?>
+    <?php $scriptString = <<<script
     require([
         'prototype',
         'mage/adminhtml/grid'
@@ -23,24 +24,33 @@ $_id = 'id_' . md5(microtime());
         Event.observe(window, "load", function(){
             var serializeInput  = document.createElement('input');
             serializeInput.type = 'hidden';
-            serializeInput.name = '<?= $block->escapeJs($block->getInputElementName()) ?>';
-            serializeInput.id   = '<?= /* @noEscape */ $_id ?>';
+            serializeInput.name = '{$block->escapeJs($block->getInputElementName())}';
+            serializeInput.id   = '{$_id}';
             try {
-                document.getElementById('<?= $block->escapeJs($formId) ?>').appendChild(serializeInput);
-                new serializerController('<?= /* @noEscape */ $_id ?>', <?= /* @noEscape */ $block->getDataAsJSON() ?>, <?= /* @noEscape */ $block->getColumnInputNames(true) ?>, <?= $block->escapeJs($block->getGridBlock()->getJsObjectName()) ?>, '<?= $block->escapeJs($block->getReloadParamName()) ?>');
+                document.getElementById('{$block->escapeJs($formId)}').appendChild(serializeInput);
+                new serializerController('{$_id}', {$block->getDataAsJSON()}, {$block->getColumnInputNames(true)},
+                 {$block->escapeJs($block->getGridBlock()->getJsObjectName())},
+                 '{$block->escapeJs($block->getReloadParamName())}');
             } catch(e) {
                 //Error add serializer
             }
         });
     });
-</script>
-<?php else :?>
-<input type="hidden" name="<?= $block->escapeHtmlAttr($block->getInputElementName()) ?>"  value="" id="<?= /* @noEscape */ $_id ?>" />
-<script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+<?php else:?>
+<input type="hidden" name="<?= $block->escapeHtmlAttr($block->getInputElementName()) ?>"  value=""
+       id="<?= /* @noEscape */ $_id ?>" />
+    <?php $scriptString = <<<script
     require([
         'mage/adminhtml/grid'
     ], function(){
-        new serializerController('<?= /* @noEscape */ $_id ?>', <?= /* @noEscape */ $block->getDataAsJSON() ?>, <?= /* @noEscape */ $block->getColumnInputNames(true) ?>, <?= $block->escapeJs($block->getGridBlock()->getJsObjectName()) ?>, '<?= $block->escapeJs($block->getReloadParamName()) ?>');
+        new serializerController('{$_id}', {$block->getDataAsJSON()}, {$block->getColumnInputNames(true)},
+         {$block->escapeJs($block->getGridBlock()->getJsObjectName())},
+         '{$block->escapeJs($block->getReloadParamName())}');
     });
-</script>
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif;?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
index ff5d203076987..3312bd377686d 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
@@ -19,14 +19,14 @@
             <a id="colapseAll" href="#"><?= $block->escapeHtml(__('Collapse All')) ?></a>
             <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                 'onclick',
-                'tree.collapseTree(); return false;',
+                'tree.collapseTree(); event.preventDefault();',
                 '#colapseAll'
             ) ?>
             <span class="separator">|</span>
             <a id="expandAll" href="#"><?= $block->escapeHtml(__('Expand All')) ?></a>
             <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                 'onclick',
-                'tree.expandTree(); return false;',
+                'tree.expandTree();event.preventDefault();',
                 '#expandAll'
             ) ?>
         <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml
index f24293971ee07..59b5eb7f523c1 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/websites.phtml
@@ -75,7 +75,7 @@
 require(["prototype"], function(){
 
     //<![CDATA[
-    var productWebsiteCheckboxes = $$('.website-checkbox');
+    var productWebsiteCheckboxes = \$$('.website-checkbox');
 
     for (var i = 0; i < productWebsiteCheckboxes.length; i++) {
         Event.observe(productWebsiteCheckboxes[i], 'click', toggleStoreFromChoosers);
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml
index 4311e52c7c122..2cf5a78a8138a 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/tab/inventory.phtml
@@ -486,7 +486,7 @@ script;
                 inventory_qty_increments: true
             };
 
-            $$('#table_cataloginventory > div').each(function(el) {
+            \$$('#table_cataloginventory > div').each(function(el) {
                 if (el == $('inventory_manage_stock').up(1)) {
                     return;
                 }
diff --git a/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml
index af50446c93a95..9e740e693fbf2 100644
--- a/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml
+++ b/app/code/Magento/Catalog/view/base/templates/product/price/tier_prices.phtml
@@ -10,6 +10,7 @@
 // phpcs:disable Generic.WhiteSpace.ScopeIndent
 
 /** @var \Magento\Catalog\Pricing\Render\PriceBox $block */
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 /** @var \Magento\Catalog\Pricing\Price\TierPrice $tierPriceModel */
 $tierPriceModel = $block->getPrice();
@@ -56,10 +57,16 @@ $product = $block->getSaleableItem();
                     }
                     ?>
                     <?= $block->escapeHtml(__('Buy %1 for: ', $price['price_qty'])) ?>
-                    <a href="javascript:void(0);"
+                    <a href="#"
                        id="<?= $block->escapeHtmlAttr($popupId) ?>"
                        data-tier-price="<?= $block->escapeHtml($block->jsonEncode($tierPriceData)) ?>">
-                        <?= $block->escapeHtml(__('Click for price')) ?></a>
+                        <?= $block->escapeHtml(__('Click for price')) ?>
+                    </a>
+                    <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+                        'onclick',
+                        'event.preventDefault()',
+                        'a#' . $block->escapeHtmlAttr($popupId)
+                    ) ?>
                 <?php else:
                     $priceAmountBlock = $block->renderAmount(
                         $price['price'],
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
index 0dce2d978eb38..58933e9b867f7 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
@@ -24,9 +24,14 @@
     <?php if ($_fileExists):?>
     <div class="control">
         <span class="<?= /* @noEscape */ $_fileNamed ?>"><?= $block->escapeHtml($_fileInfo->getTitle()) ?></span>
-        <a href="javascript:void(0)" class="label" id="change-<?= /* @noEscape */ $_fileName ?>" >
+        <a href="#" class="label" id="change-<?= /* @noEscape */ $_fileName ?>" >
             <?= $block->escapeHtml(__('Change')) ?>
         </a>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            'event.preventDefault()',
+            'a#change-' ./* @noEscape */ $_fileName
+        ) ?>
         <?php if (!$_option->getIsRequire()):?>
             <input type="checkbox" id="delete-<?= /* @noEscape */ $_fileName ?>" />
             <span class="label"><?= $block->escapeHtml(__('Delete')) ?></span>
diff --git a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
index 222317559e246..f4a3d2db6b687 100644
--- a/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
+++ b/app/code/Magento/Customer/view/adminhtml/templates/system/config/validatevat.phtml
@@ -67,6 +67,6 @@ script;
 <?= /* @noEscape */ $secureRenderer->renderTag('style', [], '#validation_result {margin-bottom: 10px;}', false); ?>
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
-    'javascript:validateVat(); return false;',
+    'validateVat();event.preventDefault();',
     '#' . /* @noEscape */ $block->getHtmlId()
 ); ?>
diff --git a/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml b/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml
index 5ad46f13af90a..2d9c8c91e1b76 100644
--- a/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml
+++ b/app/code/Magento/Dhl/view/adminhtml/templates/unitofmeasure.phtml
@@ -19,10 +19,12 @@
                 dimensionUnit = "({$block->escapeHtml($block->getCm())})";
                 dhlUnitOfMeasureNote = "{$block->escapeHtml($block->getDivideOrderWeightNoteKg())}";
             }
-            $$('[for="carriers_dhl_height"]')[0].innerHTML = "{$block->escapeHtml($block->getHeight())} " +
+            \$$('[for="carriers_dhl_height"]')[0].innerHTML = "{$block->escapeHtml($block->getHeight())} " +
+             dimensionUnit;
+            \$$('[for="carriers_dhl_depth"]')[0].innerHTML = "{$block->escapeHtml($block->getDepth())} " +
+             dimensionUnit;
+            \$$('[for="carriers_dhl_width"]')[0].innerHTML = "{$block->escapeHtml($block->getWidth())} " +
              dimensionUnit;
-            $$('[for="carriers_dhl_depth"]')[0].innerHTML = "{$block->escapeHtml($block->getDepth())} " + dimensionUnit;
-            $$('[for="carriers_dhl_width"]')[0].innerHTML = "{$block->escapeHtml($block->getWidth())} " + dimensionUnit;
 
             $("carriers_dhl_divide_order_weight").next().down().innerHTML = dhlUnitOfMeasureNote;
         }
diff --git a/app/code/Magento/ImportExport/view/adminhtml/templates/import/frame/result.phtml b/app/code/Magento/ImportExport/view/adminhtml/templates/import/frame/result.phtml
index 57f521fba946f..08b8b0414e81e 100644
--- a/app/code/Magento/ImportExport/view/adminhtml/templates/import/frame/result.phtml
+++ b/app/code/Magento/ImportExport/view/adminhtml/templates/import/frame/result.phtml
@@ -3,9 +3,15 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script type='text/javascript'>
+<?php $scriptString = <<<script
+
 //<![CDATA[
-    top.varienImport.postToFrameComplete(<?= /* @noEscape */ $block->getResponseJson() ?>);
+    top.varienImport.postToFrameComplete({$block->getResponseJson()});
 //]]>
-</script>
+
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/iframe.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/iframe.phtml
index 4edb109d6a4b9..8808bd08985f5 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/iframe.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/iframe.phtml
@@ -6,22 +6,28 @@
 
 /**
  * @var \Magento\Payment\Block\Transparent\Iframe $block
+ * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  */
 $params = $block->getParams();
 
+/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
+$jsonHelper = $block->getData('jsonHelper');
 ?>
 <html>
 <head>
-<script>
-<?php if (isset($params['redirect'])) : ?>
-    window.location="<?= $block->escapeUrl($params['redirect']) ?>";
-<?php elseif (isset($params['redirect_parent'])) : ?>
-    window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
-<?php elseif (isset($params['error_msg'])) : ?>
-    window.top.alert(<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($params['error_msg']) ?>);
-<?php elseif (isset($params['order_success'])) : ?>
-    window.top.location = "<?= $block->escapeUrl($params['order_success']) ?>";
-<?php else : ?>
+<?php
+$scriptString = '';
+if (isset($params['redirect'])):
+    $scriptString .= 'window.location="' . $block->escapeJs($params['redirect']) . '";' . PHP_EOL;
+elseif (isset($params['redirect_parent'])):
+    $scriptString .= 'window.top.location="' . $block->escapeJs($params['redirect_parent']) . '";' . PHP_EOL;
+elseif (isset($params['error_msg'])):
+    $scriptString .= 'window.top.alert(' . /* @noEscape */ $jsonHelper->jsonEncode($params['error_msg']) . ');' .
+        PHP_EOL;
+elseif (isset($params['order_success'])):
+    $scriptString .= 'window.top.location = "' . $block->escapeJs($params['order_success']) . '";' . PHP_EOL;
+else:
+    $scriptString .= <<<script
     var require = window.top.require;
     require(['jquery'], function($) {
         var cc_number = $("input[name='payment[cc_number]']").val();
@@ -33,8 +39,10 @@ $params = $block->getParams();
 
         $('#edit_form').trigger('realOrder');
     });
-<?php endif; ?>
-</script>
+script;
+endif;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 </head>
 <body>
 </body>
diff --git a/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml
index 2ff540486d3c5..1d3471a877387 100644
--- a/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml
+++ b/app/code/Magento/Reports/view/adminhtml/templates/report/grid/container.phtml
@@ -24,7 +24,7 @@ require([
 //<![CDATA[
     jQuery('#filter_form').mage('validation', {errorClass: 'mage-error'});
     function filterFormSubmit() {
-        var filters = $$('#filter_form input', '#filter_form select'),
+        var filters = \$$('#filter_form input', '#filter_form select'),
             elements = [];
 
         for (var i in filters) {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php
index 271b5b7afa1c9..c72d27c45cfc5 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php
@@ -5,6 +5,10 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Order\Create\Search\Grid\Renderer;
 
+use Magento\Backend\Block\Context;
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 /**
  * Adminhtml sales create order product search grid product name column renderer
  *
@@ -12,6 +16,22 @@
  */
 class Product extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
 {
+    /**
+     * @var SecureHtmlRenderer
+     */
+    protected $secureRenderer;
+
+    /**
+     * @param Context $context
+     * @param array $data
+     * @param SecureHtmlRenderer|null $secureRenderer
+     */
+    public function __construct(Context $context, array $data = [], ?SecureHtmlRenderer $secureRenderer = null)
+    {
+        parent::__construct($context, $data);
+        $this->secureRenderer = $secureRenderer ?? ObjectManager::getInstance()->get(SecureHtmlRenderer::class);
+    }
+
     /**
      * Render product name to add Configure link
      *
@@ -28,10 +48,14 @@ public function render(\Magento\Framework\DataObject $row)
             $row->getId()
         ) : 'disabled="disabled"';
         return sprintf(
-            '<a href="javascript:void(0)" class="action-configure %s" %s>%s</a>',
+            '<a href="#" id="search-grid-product-' . $row->getId() . '" class="action-configure %s" %s>%s</a>',
             $style,
             $prodAttributes,
             __('Configure')
+        ) . $this->secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            'event.preventDefault()',
+            'a#search-grid-product-' . $row->getId()
         ) . $rendered;
     }
 }
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
index 1ee83cdd62db9..afa08c32773ed 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
@@ -25,12 +25,18 @@ script;
             'div#order-additional_area'
         ) ?>
 
-        <div id="order-search" class="admin__page-section order-search-items">
+        <div id="order-search" class="admin__page-section order-search-items no-display">
             <?= $block->getChildHtml('search') ?>
         </div>
-        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-            'display:none',
-            'div#order-search'
+        <?= /* @noEscape */ $secureRenderer->renderTag(
+            'script',
+            [],
+            "let elemOrderSearch = document.querySelector('div#order-search');
+            if (elemOrderSearch) {
+                elemOrderSearch.style.display = 'none';
+                elemOrderSearch.classList.remove('no-display');
+            }",
+            false
         ) ?>
 
         <section id="order-items" class="admin__page-section order-items" data-mage-init='{"loader": {}}'>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
index d55b75103c7e3..744276213077c 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
@@ -98,7 +98,7 @@ $taxHelper = $block->getData('taxHelper');
         </div>
         <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
             'onclick',
-            "$('order-shipping-method-info').hide();$('order-shipping-method-choose').show();return false",
+            "$('order-shipping-method-info').hide();$('order-shipping-method-choose').show();event.preventDefault()",
             'div#order-shipping-method-info a.action-default'
         ) ?>
     <?php else: ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml
index 590aca0acfc0d..06f0603a21215 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/view/tab/info.phtml
@@ -91,7 +91,7 @@ require([
         var headerLine = null;
         var contentLine = null;
 
-        $$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element) {
+        \$$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element) {
             if (element.down(0)) {
                 headerLine = element.down(0).innerHTML;
                 contentLine = element.down(0).next().innerHTML;
diff --git a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js
index e138112ac3f5a..102b7072dc6d1 100644
--- a/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js
+++ b/app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js
@@ -93,7 +93,7 @@ define([
 
                     this.itemsArea.onLoad = this.itemsArea.onLoad.wrap(function (proceed) {
                         proceed();
-                        if ($(searchAreaId) && !$(searchAreaId).visible() && !$(searchButtonId)) {
+                        if ($(searchAreaId) && !jQuery('#' + searchAreaId).is(':visible') && !$(searchButtonId)) {
                             this.addControlButton(searchButton);
                         }
                     });
diff --git a/app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml b/app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml
index 64918c24cdc61..5a81d2fd94e14 100644
--- a/app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml
+++ b/app/code/Magento/SalesRule/view/adminhtml/templates/promo/salesrulejs.phtml
@@ -3,8 +3,10 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<script>
+<?php $scriptString = <<<script
 require([
     'jquery',
     "uiRegistry",
@@ -41,15 +43,15 @@ function generateCouponCodes(idPrefix, generateUrl, grid) {
     var elements = $(idPrefix + 'information_fieldset').select('input', 'select', 'textarea');
 
     elements = elements.concat(
-        $$('#rule_uses_per_coupon'),
-        $$('#rule_uses_per_customer'),
-        $$('#rule_to_date')
+        \$$('#rule_uses_per_coupon'),
+        \$$('#rule_uses_per_customer'),
+        \$$('#rule_to_date')
     );
 
     var params = Form.serializeElements(elements, true);
     params.form_key = FORM_KEY;
-    if ($$('#'+idPrefix + 'information_fieldset .messages')) {
-        $$('#'+idPrefix + 'information_fieldset .messages')[0].update();
+    if (\$$('#'+idPrefix + 'information_fieldset .messages')) {
+        \$$('#'+idPrefix + 'information_fieldset .messages')[0].update();
     }
     if ($('messages')) {
         $('messages').update();
@@ -71,8 +73,8 @@ function generateCouponCodes(idPrefix, generateUrl, grid) {
                 couponCodesGrid.reload();
             }
             if (response && response.messages) {
-                if ($$('#'+idPrefix + 'information_fieldset .messages')) {
-                    $$('#'+idPrefix + 'information_fieldset .messages')[0].update(response.messages);
+                if (\$$('#'+idPrefix + 'information_fieldset .messages')) {
+                    \$$('#'+idPrefix + 'information_fieldset .messages')[0].update(response.messages);
                 } else if ($('messages')) {
                     $('messages').update(response.messages);
                 }
@@ -94,4 +96,6 @@ window.validateCouponGenerate = validateCouponGenerate;
 window.generateCouponCodes = generateCouponCodes;
 window.refreshCouponCodesGrid = refreshCouponCodesGrid;
 });
-</script>
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
diff --git a/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml b/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml
index b56468ba07f9d..a83d510ee0926 100644
--- a/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/page/js/require_js.phtml
@@ -7,9 +7,9 @@
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 $scriptString = '
-    var BASE_URL = \'' . /* @noEscape */ $block->escapeUrl($block->getBaseUrl()) .'\';
+    var BASE_URL = \'' . /* @noEscape */ $block->escapeJs($block->getBaseUrl()) .'\';
     var require = {
-        \'baseUrl\': \'' . /* @noEscape */ $block->escapeUrl($block->getViewFileUrl('/')) . '\'
+        \'baseUrl\': \'' . /* @noEscape */ $block->escapeJs($block->getViewFileUrl('/')) . '\'
     };';
 
 echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);

From 660bc97d72da4e81a2633065dc8d575801dd3805 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Wed, 6 May 2020 14:55:50 +0300
Subject: [PATCH 122/307] MC-29420: Remove event handlers from CE

---
 .../templates/widget/form/element/gallery.phtml      |  2 +-
 .../catalog/product/composite/configure.phtml        |  6 +++---
 .../templates/system/config/bml_api_wizard.phtml     |  4 ++--
 .../templates/order/create/coupons/form.phtml        |  2 +-
 .../templates/order/create/items/grid.phtml          |  2 +-
 .../order/create/shipping/method/form.phtml          |  2 +-
 .../templates/order/create/sidebar/items.phtml       | 12 ++++++------
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
index 955fb4fd1183c..c2abd6069dd5d 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element/gallery.phtml
@@ -47,7 +47,7 @@
             </a><br/>
                 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                     'onclick',
-                    "imagePreview('<?= $imgId ?>');return false;",
+                    "imagePreview('<?= $imgId ?>');event.preventDefault()",
                     '#a_' . $imgId
                 ) ?>
             <input type="file"
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index cad35ece5603e..1c27fbb31c620 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -11,11 +11,11 @@
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onload',
         "window.productConfigure && productConfigure.onLoadIFrame()",
-        '#product_composite_configure_form'
+        '#product_composite_configure_iframe'
     ) ?>
     <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
         "width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px",
-        '#product_composite_configure_confirmed'
+        '#product_composite_configure_iframe'
     ) ?>
 
     <form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data"
@@ -45,7 +45,7 @@
     </form>
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onsubmit',
-        "productConfigure.onConfirmBtn(); return false;",
+        "productConfigure.onConfirmBtn();event.preventDefault()",
         '#product_composite_configure_form'
     ) ?>
 
diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml
index 5b8d12ac20a67..040be8e3f4fa6 100644
--- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml
+++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/bml_api_wizard.phtml
@@ -17,11 +17,11 @@
 </div>
 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
     'onclick',
-    "javascript:window.open(
+    "window.open(
             '" . $block->escapeUrl($block->getButtonUrl()) . "',
             'bmlapiwizard',
             'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
             'left=100, top=100, width=550, height=550'
-        ); return false;",
+        );event.preventDefault()",
     'button#' . $block->escapeHtml($block->getHtmlId())
 ) ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml
index 156ee072c762d..469155a80891a 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/coupons/form.phtml
@@ -25,7 +25,7 @@
         </p>
             <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                 'onclick',
-                "order.applyCoupon(''); return false;",
+                "order.applyCoupon('');event.preventDefault();",
                 'p.added-coupon-code a.action-remove'
             ) ?>
         <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
index c942d9dd96fe1..330d68a07e44d 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
@@ -115,7 +115,7 @@ $catalogHelper =$block->getData('catalogHelper');
                                 <?php endif; ?>
                                 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                     'onclick',
-                                    "$('item_tier_<?= (int) $_item->getId() ?>').toggle();return false;",
+                                    "$('item_tier_<?= (int) $_item->getId() ?>').toggle();event.preventDefault();",
                                     'div#item_tier_block_' . (int) $_item->getId() . ' a'
                                 ) ?>
                             <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
index 744276213077c..fd5b7a55b4960 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/shipping/method/form.phtml
@@ -125,7 +125,7 @@ script;
     </div>
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onclick',
-        "order.loadShippingRates();return false",
+        "order.loadShippingRates();event.preventDefault();",
         'div#order-shipping-method-summary a.action-default'
     ) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
index aba788f6d5220..5af76eef829b1 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
@@ -19,8 +19,8 @@
     </div>
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onclick',
-        "event.preventDefault(); order.loadArea('sidebar_" . $block->escapeJs($block->getDataId()) .
-        "', 'sidebar_data_" . $block->escapeJs($block->getDataId()) . "');return false;",
+        "order.loadArea('sidebar_" . $block->escapeJs($block->getDataId()) .
+        "', 'sidebar_data_" . $block->escapeJs($block->getDataId()) . "');event.preventDefault();",
         'div.head.sidebar-title-block'
     ) ?>
     <div class="content">
@@ -105,9 +105,9 @@
                                     </a>
                                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                         'onclick',
-                                        "event.preventDefault(); order.sidebarConfigureProduct('sidebar_wishlist', " .
+                                        "order.sidebarConfigureProduct('sidebar_wishlist', " .
                                         (int) $block->getProductId($_item) . ", " . (int) $block->getItemId($_item) .
-                                        "); return false;",
+                                        ");event.preventDefault();",
                                         'a.icon.icon-configure'
                                     ) ?>
                                 <?php elseif ($block->isConfigurationRequired($_item->getTypeId())): ?>
@@ -118,8 +118,8 @@
                                     </a>
                                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                         'onclick',
-                                        "event.preventDefault(); order.sidebarConfigureProduct('sidebar', " .
-                                        (int) $block->getProductId($_item) . "); return false;",
+                                        "order.sidebarConfigureProduct('sidebar', " .
+                                        (int) $block->getProductId($_item) . ");event.preventDefault();",
                                         'a.icon.icon-configure'
                                     ) ?>
                                 <?php else: ?>

From f6619d52a2dfb86d021740954be9afa1f66b9013 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 7 May 2020 14:29:05 +0300
Subject: [PATCH 123/307] MC-29420: Remove event handlers from CE

---
 .../Config/SubscriptionStatusLabelTest.php    |  8 ++--
 .../Adminhtml/System/Config/VerticalTest.php  |  6 +--
 .../templates/widget/form/element.phtml       | 10 +----
 .../templates/catalog/category/tree.phtml     | 20 +++++-----
 .../adminhtml/templates/browser/tree.phtml    | 20 +++++-----
 .../System/Config/Form/Field/ImageTest.php    |  2 +-
 .../Form/Field/Select/AllowspecificTest.php   |  2 +-
 .../Block/System/Config/Form/FieldTest.php    |  6 +--
 .../Fieldset/Modules/DisableOutputTest.php    | 12 +++---
 .../Block/System/Config/Form/FieldsetTest.php | 14 +++----
 .../Grid/Column/Renderer/ButtonTest.php       |  4 +-
 .../Block/Adminhtml/Form/Field/ImportTest.php |  2 +-
 .../System/Config/Field/CountryTest.php       |  6 +--
 .../Field/Enable/AbstractEnableTest.php       |  2 +-
 .../System/Config/Fieldset/GroupTest.php      |  6 +--
 .../System/Config/Fieldset/PaymentTest.php    |  4 +-
 .../frontend/templates/reorder/sidebar.phtml  |  4 +-
 .../templates/product/layered/renderer.phtml  | 38 ++++---------------
 .../view/adminhtml/templates/rule/edit.phtml  | 28 +++++++-------
 .../adminhtml/templates/rule/rate/form.phtml  |  7 +---
 .../layout/customer_index_wishlist.xml        |  1 -
 .../View/Test/Unit/Helper/JsTest.php          | 16 +++++++-
 22 files changed, 97 insertions(+), 121 deletions(-)

diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
index 34a1a0129362e..b1189ac4c01ea 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
@@ -20,22 +20,22 @@ class SubscriptionStatusLabelTest extends \PHPUnit\Framework\TestCase
     private $subscriptionStatusLabel;
 
     /**
-     * @var AbstractElement|\PHPUnit_Framework_MockObject_MockObject
+     * @var AbstractElement|\PHPUnit\Framework\MockObject\MockObject
      */
     private $abstractElementMock;
 
     /**
-     * @var SubscriptionStatusProvider|\PHPUnit_Framework_MockObject_MockObject
+     * @var SubscriptionStatusProvider|\PHPUnit\Framework\MockObject\MockObject
      */
     private $subscriptionStatusProviderMock;
 
     /**
-     * @var Context|\PHPUnit_Framework_MockObject_MockObject
+     * @var Context|\PHPUnit\Framework\MockObject\MockObject
      */
     private $contextMock;
 
     /**
-     * @var Form|\PHPUnit_Framework_MockObject_MockObject
+     * @var Form|\PHPUnit\Framework\MockObject\MockObject
      */
     private $formMock;
 
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
index f462fbe62d8e7..3ddc852f516c7 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
@@ -19,17 +19,17 @@ class VerticalTest extends \PHPUnit\Framework\TestCase
     private $vertical;
 
     /**
-     * @var AbstractElement|\PHPUnit_Framework_MockObject_MockObject
+     * @var AbstractElement|\PHPUnit\Framework\MockObject\MockObject
      */
     private $abstractElementMock;
 
     /**
-     * @var Context|\PHPUnit_Framework_MockObject_MockObject
+     * @var Context|\PHPUnit\Framework\MockObject\MockObject
      */
     private $contextMock;
 
     /**
-     * @var Form|\PHPUnit_Framework_MockObject_MockObject
+     * @var Form|\PHPUnit\Framework\MockObject\MockObject
      */
     private $formMock;
 
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
index 075cd12c90d05..299f53dc9e3ef 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/form/element.phtml
@@ -146,13 +146,5 @@ script;
             </span>
 <?php endif; ?>
 <?php if ($element->getScript()): ?>
-    <script>
-        <?= /* @noEscape */ $element->getScript() ?>
-    </script>
-
-    <?php $scriptString = <<<script
-    <?= /* @noEscape */ $element->getScript() ?>
-script;
-    ?>
-    <?php /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
+    <?php /* @noEscape */ $secureRenderer->renderTag('script', [], $element->getScript(), false) ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
index 3312bd377686d..0cd00e88f4350 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/tree.phtml
@@ -17,21 +17,21 @@
     <div class="tree-actions">
         <?php if ($block->getRoot()):?>
             <a id="colapseAll" href="#"><?= $block->escapeHtml(__('Collapse All')) ?></a>
-            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
-                'onclick',
-                'tree.collapseTree(); event.preventDefault();',
-                '#colapseAll'
-            ) ?>
             <span class="separator">|</span>
             <a id="expandAll" href="#"><?= $block->escapeHtml(__('Expand All')) ?></a>
-            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
-                'onclick',
-                'tree.expandTree();event.preventDefault();',
-                '#expandAll'
-            ) ?>
         <?php endif; ?>
     </div>
     <?php if ($block->getRoot()):?>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            'tree.collapseTree(); event.preventDefault();',
+            '#colapseAll'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            'tree.expandTree();event.preventDefault();',
+            '#expandAll'
+        ) ?>
     <div class="tree-holder">
         <div id="tree-div" class="tree-wrapper"></div>
     </div>
diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
index 738cf72f86592..4c8d1ca7157e9 100644
--- a/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
+++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/tree.phtml
@@ -16,19 +16,19 @@ $jsonHelper = $block->getData('jsonHelper');
     <div class="categories-side-col">
         <div class="tree-actions">
             <a id="collapseAll"><?= $block->escapeHtml(__('Collapse All')) ?></a>
-            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
-                'onclick',
-                "jQuery('[data-role=tree]').jstree('close_all');",
-                '#div.tree-actions a#collapseAll'
-            ) ?>
             <span class="separator">|</span>
             <a id="expandAll"><?= $block->escapeHtml(__('Expand All')) ?></a>
-            <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
-                'onclick',
-                "jQuery('[data-role=tree]').jstree('open_all');",
-                '#div.tree-actions a#expandAll'
-            ) ?>
         </div>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "jQuery('[data-role=tree]').jstree('close_all');",
+            '#div.tree-actions a#collapseAll'
+        ) ?>
+        <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
+            'onclick',
+            "jQuery('[data-role=tree]').jstree('open_all');",
+            '#div.tree-actions a#expandAll'
+        ) ?>
     </div>
     <div data-role="tree" data-mage-init='<?= $block->escapeHtml(
         $jsonHelper->jsonEncode($block->getTreeWidgetOptions())
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php
index 0d73fd51debbf..6f3b1bfa22cc9 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/ImageTest.php
@@ -15,7 +15,7 @@
 class ImageTest extends \PHPUnit\Framework\TestCase
 {
     /**
-     * @var \Magento\Framework\Url|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Url|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $urlBuilderMock;
 
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
index 0652d92b05ac3..6f7c8e1dc6412 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
@@ -17,7 +17,7 @@ class AllowspecificTest extends \PHPUnit\Framework\TestCase
     protected $_object;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_formMock;
 
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php
index 7485175639a1a..735f9115cdab1 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldTest.php
@@ -18,7 +18,7 @@ class FieldTest extends \PHPUnit\Framework\TestCase
     protected $_object;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_elementMock;
 
@@ -28,12 +28,12 @@ class FieldTest extends \PHPUnit\Framework\TestCase
     protected $_testData;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_storeManagerMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_layoutMock;
 
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php
index fa3eb66a39d71..2c32a94468147 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php
@@ -18,7 +18,7 @@ class DisableOutputTest extends \PHPUnit\Framework\TestCase
     protected $object;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $elementMock;
 
@@ -36,7 +36,7 @@ class DisableOutputTest extends \PHPUnit\Framework\TestCase
     ];
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $layoutMock;
 
@@ -46,22 +46,22 @@ class DisableOutputTest extends \PHPUnit\Framework\TestCase
     protected $objectManager;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $moduleListMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $authSessionMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $userMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $jsHelperMock;
 
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
index 0dc030f343338..d2b621c2886a3 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
@@ -18,17 +18,17 @@ class FieldsetTest extends \PHPUnit\Framework\TestCase
     protected $_object;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_elementMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_requestMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_urlModelMock;
 
@@ -46,7 +46,7 @@ class FieldsetTest extends \PHPUnit\Framework\TestCase
     ];
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_layoutMock;
 
@@ -56,17 +56,17 @@ class FieldsetTest extends \PHPUnit\Framework\TestCase
     protected $_testHelper;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_helperMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $authSessionMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $userMock;
 
diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
index b3227a4068899..514ce7a7cc0cb 100644
--- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
+++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
@@ -13,12 +13,12 @@
 class ButtonTest extends \PHPUnit\Framework\TestCase
 {
     /**
-     * @var \Magento\Backend\Block\Context|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Backend\Block\Context|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $contextMock;
 
     /**
-     * @var \Magento\Framework\Escaper|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Escaper|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $escaperMock;
 
diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
index 8a8e06f8194aa..65f47d214b7b7 100644
--- a/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
+++ b/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
@@ -21,7 +21,7 @@ class ImportTest extends \PHPUnit\Framework\TestCase
     protected $_object;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \PHPUnit\Framework\MockObject\MockObject
      */
     protected $_formMock;
 
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
index b3f9e41b302e6..73422c062eca9 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
@@ -21,17 +21,17 @@ class CountryTest extends \PHPUnit\Framework\TestCase
     protected $_element;
 
     /**
-     * @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\RequestInterface|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $_request;
 
     /**
-     * @var \Magento\Framework\View\Helper\Js|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\View\Helper\Js|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $_jsHelper;
 
     /**
-     * @var \Magento\Backend\Model\Url|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Backend\Model\Url|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $_url;
 
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php
index e4253291cac57..13357fbcccbef 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/Enable/AbstractEnableTest.php
@@ -27,7 +27,7 @@ class AbstractEnableTest extends \PHPUnit\Framework\TestCase
     protected $abstractEnable;
 
     /**
-     * @var \Magento\Framework\Data\Form\Element\AbstractElement|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Data\Form\Element\AbstractElement|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $elementMock;
 
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php
index 133d792cda097..ad6aa5e25674b 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/GroupTest.php
@@ -21,17 +21,17 @@ class GroupTest extends \PHPUnit\Framework\TestCase
     private $_element;
 
     /**
-     * @var \Magento\Backend\Model\Auth\Session|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Backend\Model\Auth\Session|\PHPUnit\Framework\MockObject\MockObject
      */
     private $_authSession;
 
     /**
-     * @var \Magento\User\Model\User|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\User\Model\User|\PHPUnit\Framework\MockObject\MockObject
      */
     private $_user;
 
     /**
-     * @var \Magento\Config\Model\Config\Structure\Element\Group|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Config\Model\Config\Structure\Element\Group|\PHPUnit\Framework\MockObject\MockObject
      */
     private $_group;
 
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php
index df9638ef47135..a8d741deec933 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Fieldset/PaymentTest.php
@@ -25,12 +25,12 @@ class PaymentTest extends \PHPUnit\Framework\TestCase
     protected $_element;
 
     /**
-     * @var \Magento\Config\Model\Config\Structure\Element\Group|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Config\Model\Config\Structure\Element\Group|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $_group;
 
     /**
-     * @var \Magento\Config\Model\Config|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Config\Model\Config|\PHPUnit\Framework\MockObject\MockObject
      */
     protected $_backendConfig;
 
diff --git a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml
index 22664e8138925..6bdac443f657d 100644
--- a/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml
+++ b/app/code/Magento/Sales/view/frontend/templates/reorder/sidebar.phtml
@@ -36,8 +36,8 @@
                                    data-bind="attr: {
                                         id: 'reorder-item-' + id,
                                         value: id,
-                                        title: is_saleable ? '<?= $block->escapeHtml(__('Add to Cart')) ?>' : '
-                                        <?= $block->escapeHtml(__('Product is not salable.')) ?>'
+                                        title: is_saleable ? '<?= $block->escapeHtml(__('Add to Cart')) ?>' :
+                                         '<?= $block->escapeHtml(__('Product is not salable.')) ?>'
                                    },
                                    disable: !is_saleable"
                                    class="checkbox" data-validate='{"validate-one-checkbox-required-by-name": true}'/>
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index 8ae7668ca145d..55fd7af1ed4e5 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -23,7 +23,7 @@
                     <?php switch ($swatchData['swatches'][$option]['type']) {
                         case '3':
                             ?>
-                            <div class="swatch-option"
+                            <div class="swatch-option <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
                                  tabindex="-1"
                                  data-option-type="3"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
@@ -31,13 +31,6 @@
                                  data-option-tooltip-thumb=""
                                  data-option-tooltip-value=""
                                 ></div>
-                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
-                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                $block->escapeHtmlAttr($label['custom_style']),
-                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
-                            ) ?>
-                            <?php endif; ?>
-
                             <?php break;
                         case '2':
                             ?>
@@ -51,20 +44,17 @@
                             );
                             $escapedUrl = $block->escapeUrl($swatchImagePath);
                             ?>
-                            <div class="swatch-option image"
+                            <div class="swatch-option image <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
                                  tabindex="-1"
                                  data-option-type="2"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
                                  data-option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
                                  data-option-tooltip-thumb="<?= $block->escapeUrl($swatchThumbPath) ?>"
-                                 data-option-tooltip-value="">
+                                 data-option-tooltip-value=""
+                                 style="background: url(<?=
+                                 /*  @noEscape */ $escapedUrl
+                                                        ?>) no-repeat center; background-size: initial;">
                             </div>
-                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
-                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                $block->escapeHtmlAttr($label['custom_style']),
-                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
-                            ) ?>
-                            <?php endif; ?>
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                                 "background: url(" . /*  @noEscape */ $escapedUrl .
                                 ") no-repeat center; background-size: initial;",
@@ -73,7 +63,7 @@
                             <?php break;
                         case '1':
                             ?>
-                            <div class="swatch-option color"
+                            <div class="swatch-option color <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
                                  tabindex="-1"
                                  data-option-type="1"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
@@ -83,12 +73,6 @@
                                      $swatchData['swatches'][$option]['value']
                                  ) ?>">
                             </div>
-                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
-                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                $block->escapeHtmlAttr($label['custom_style']),
-                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
-                            ) ?>
-                            <?php endif; ?>
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                                 "background: " . $block->escapeHtmlAttr(
                                     $swatchData['swatches'][$option]['value']
@@ -99,7 +83,7 @@
                         case '0':
                         default:
                             ?>
-                            <div class="swatch-option text"
+                            <div class="swatch-option text <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
                                  tabindex="-1"
                                  data-option-type="0"
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
@@ -107,12 +91,6 @@
                                  data-option-tooltip-thumb=""
                                  data-option-tooltip-value=""
                                 ><?= $block->escapeHtml($swatchData['swatches'][$option]['value']) ?></div>
-                            <?php if ($block->escapeHtmlAttr($label['custom_style'])): ?>
-                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                $block->escapeHtmlAttr($label['custom_style']),
-                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
-                            ) ?>
-                            <?php endif; ?>
                         <?php break;
                     } ?>
                 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml
index 0b0c892e47edf..0141101ef5a78 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml
@@ -98,14 +98,14 @@ require([
                             });
                         else
                             alert({
-                                content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
+                                content: '{$block->escapeJs(__('An error occurred'))}'
                             });
                     }
                 },
                 error: function () {
                     $('body').trigger('processStop');
                     alert({
-                        content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
+                        content: '{$block->escapeJs(__('An error occurred'))}'
                     });
                 },
                 dataType: "json"
@@ -116,9 +116,9 @@ require([
             var options = {
                 mselectContainer: '#tax_rate + section.mselect-list',
                 toggleAddButton:false,
-                addText: '{$block->escapeJs($block->escapeHtml(__('Add New Tax Rate')))}',
+                addText: '{$block->escapeJs(__('Add New Tax Rate'))}',
                 parse: null,
-                nextPageUrl: '{$block->escapeHtml($block->getTaxRatesPageUrl())}',
+                nextPageUrl: '{$block->escapeJs($block->getTaxRatesPageUrl())}',
                 selectedValues: this.settings.selected_values,
                 mselectInputSubmitCallback: function (value, options) {
                     var select = $('#tax_rate');
@@ -166,10 +166,12 @@ require([
                     .on('click.mselect-edit', '.mselect-edit', this.edit)
                     .on("click.mselect-delete", ".mselect-delete", function () {
                         var that = $(this),
+
 script;
                             // phpcs:ignore Magento2.SQL.RawQuery
                             $scriptString .= "select = that.closest('.mselect-list').prev()," . PHP_EOL;
                             $scriptString .= <<<script
+
                             rateValue = that.parent().find('input[type="checkbox"]').val();
 
                         confirm({
@@ -205,18 +207,14 @@ script;
                                                     });
                                                 else
                                                     alert({
-                                                        content: '{$block->escapeJs($block->escapeHtml(
-                                                            __('An error occurred')
-                                                        ))}'
+                                                        content: '{$block->escapeJs(__('An error occurred'))}'
                                                     });
                                             }
                                         },
                                         error: function () {
                                             $('body').trigger('processStop');
                                             alert({
-                                                content: '{$block->escapeJs($block->escapeHtml(
-                                                    __('An error occurred')
-                                                ))}'
+                                                content: '{$block->escapeJs(__('An error occurred'))}'
                                             });
                                         }
                                     };
@@ -239,7 +237,7 @@ script;
             taxRateFormElement.mage('form').mage('validation');
 
             taxRateForm.dialogRates({
-                title: '{$block->escapeJs($block->escapeHtml(__('Tax Rate')))}',
+                title: '{$block->escapeJs(__('Tax Rate'))}',
                 type: 'slide',
                 id: '{$jsId}',
                 modalClass: 'tax-rate-popup',
@@ -247,7 +245,7 @@ script;
                     taxRateFormElement.data('validation').clearError();
                 },
                 buttons: [{
-                    text: '{$block->escapeJs($block->escapeHtml(__('Save')))}',
+                    text: '{$block->escapeJs(__('Save'))}',
                     'class': 'action-save action-primary',
                     click: function() {
                         this.updateItemRate();
@@ -255,10 +253,12 @@ script;
                             itemRateData = $.extend({}, itemRate);
 
                         if (itemRateData.itemElement) {
+
 script;
                             //phpcs:ignore Magento2.SQL.RawQuerys
                             $scriptString .= ' delete itemRateData.itemElement;';
 $scriptString.= <<<script
+
                         }
 
                         if (!taxRateFormElement.validation().valid()) {
@@ -295,14 +295,14 @@ $scriptString.= <<<script
                                         });
                                     else
                                         alert({
-                                            content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
+                                            content: '{$block->escapeJs(__('An error occurred'))}'
                                         });
                                 }
                             },
                             error: function () {
                                 $('body').trigger('processStop');
                                 alert({
-                                    content: '{$block->escapeJs($block->escapeHtml(__('An error occurred')))}'
+                                    content: '{$block->escapeJs(__('An error occurred'))}'
                                 });
                             }
                         };
diff --git a/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
index 23797977fe6a2..e6b7282cf4d27 100644
--- a/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
+++ b/app/code/Magento/Tax/view/adminhtml/templates/rule/rate/form.phtml
@@ -4,18 +4,13 @@
  * See COPYING.txt for license details.
  */
 /* @var $block \Magento\Tax\Block\Adminhtml\Rate\Form */
-/* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
 
 <div data-role="spinner" class="grid-loading-mask">
     <div class="grid-loader"></div>
 </div>
 
-<div class="form-inline" id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>"
+<div class="form-inline no-display" id="<?= $block->escapeHtmlAttr($block->getNameInLayout()) ?>">
     <?= $block->getFormHtml() ?>
     <?= $block->getChildHtml('form_after') ?>
 </div>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    "display:none",
-    '#'. $block->escapeJs($block->getNameInLayout())
-) ?>
diff --git a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
index 0ee4233029105..cc5ef6b3ab554 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
+++ b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
@@ -112,6 +112,5 @@
                 </arguments>
             </block>
         </block>
-        <block class="Magento\Catalog\Block\Adminhtml\Product\Composite\Configure" template="Magento_Catalog::catalog/product/composite/configure.phtml" name="configure.popup"/>
     </container>
 </layout>
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Helper/JsTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Helper/JsTest.php
index 4e7df3fd1b4fa..b0790285ae75c 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Helper/JsTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Helper/JsTest.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Framework\View\Test\Unit\Helper;
 
+use Magento\Framework\DataObject;
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
+
 class JsTest extends \PHPUnit\Framework\TestCase
 {
     /**
@@ -12,9 +15,18 @@ class JsTest extends \PHPUnit\Framework\TestCase
      */
     public function testGetScript()
     {
-        $helper = new \Magento\Framework\View\Helper\Js();
+        $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
+        $secureRendererMock->method('renderTag')
+            ->willReturnCallback(
+                function (string $tag, array $attributes, string $content): string {
+                    $attributes = new DataObject($attributes);
+
+                    return "<$tag {$attributes->serialize()}>$content</$tag>";
+                }
+            );
+        $helper = new \Magento\Framework\View\Helper\Js($secureRendererMock);
         $this->assertEquals(
-            "<script type=\"text/javascript\">//<![CDATA[\ntest\n//]]></script>",
+            "<script >//<![CDATA[\ntest\n//]]></script>",
             $helper->getScript('test')
         );
     }

From 2c0636b9f4333c4b1ff58c6c56b4bdd3dc6facfb Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 7 May 2020 19:56:26 +0300
Subject: [PATCH 124/307] MC-29420: Remove event handlers from CE

---
 .../adminhtml/templates/payment/script.phtml  | 24 +++++++++++
 .../Composite/Fieldset/Options/Type/Radio.php |  2 +-
 .../Fieldset/Options/Type/Select.php          |  2 +-
 .../Sales/Order/View/Items/Renderer.php       | 24 +++++++++--
 .../sales/order/view/items/renderer.phtml     |  6 +--
 .../Composite/Fieldset/Configurable.php       |  6 +--
 .../System/Config/Fieldset/Payment.php        |  4 +-
 .../templates/product/layered/renderer.phtml  |  5 +--
 app/code/Magento/Tax/Block/Checkout/Tax.php   | 40 +++++++++++++++++++
 .../templates/checkout/grandtotal.phtml       | 14 ++++++-
 .../templates/checkout/shipping.phtml         | 18 ++++++++-
 .../templates/checkout/subtotal.phtml         | 15 +++++--
 .../frontend/templates/checkout/tax.phtml     | 20 ++++++----
 13 files changed, 147 insertions(+), 33 deletions(-)

diff --git a/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml b/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
index e69de29bb2d1d..6be6008dba507 100644
--- a/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
+++ b/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/** @var Magento\AuthorizenetAcceptjs\Block\Payment $block */
+?>
+<script>
+    //<![CDATA[
+    require(
+        [
+            'Magento_AuthorizenetAcceptjs/js/authorizenet',
+            'jquery',
+            'domReady!'
+        ], function(AuthorizenetAcceptjs, $) {
+            var config = <?= /* @noEscape */ $block->getPaymentConfig() ?>,
+                form = $('#payment_form_<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($block->getMethodCode())) ?>');
+
+            config.active = form.length > 0 && !form.is(':hidden');
+            new AuthorizenetAcceptjs(config);
+        });
+    //]]>
+</script>
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php
index e5d2e3e830379..a9b8f7880cac3 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php
@@ -81,6 +81,6 @@ public function setValidationContainer($elementId, $containerId)
             $containerId .
             '\';';
 
-        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+        return $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 }
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php
index 0f0f4a62eb7fc..948d0c4a84c92 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php
@@ -80,6 +80,6 @@ public function setValidationContainer($elementId, $containerId)
             $containerId .
             '\';';
 
-        return /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false);
+        return $this->secureRenderer->renderTag('script', [], $scriptString, false);
     }
 }
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php
index 9fe8891254a5a..dee924ae3cf5e 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php
@@ -6,7 +6,9 @@
 namespace Magento\Bundle\Block\Adminhtml\Sales\Order\View\Items;
 
 use Magento\Catalog\Model\Product\Type\AbstractType;
+use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Serialize\Serializer\Json;
+use Magento\Catalog\Helper\Data as CatalogHelper;
 
 /**
  * Adminhtml sales order item renderer
@@ -32,6 +34,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\
      * @param \Magento\Checkout\Helper\Data $checkoutHelper
      * @param array $data
      * @param \Magento\Framework\Serialize\Serializer\Json $serializer
+     * @param CatalogHelper|null $catalogHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -41,10 +44,11 @@ public function __construct(
         \Magento\GiftMessage\Helper\Message $messageHelper,
         \Magento\Checkout\Helper\Data $checkoutHelper,
         array $data = [],
-        Json $serializer = null
+        Json $serializer = null,
+        ?CatalogHelper $catalogHelper = null
     ) {
-        $this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
-            ->get(Json::class);
+        $this->serializer = $serializer ?? ObjectManager::getInstance()->get(Json::class);
+        $data['catalogHelper'] = $catalogHelper ?? ObjectManager::getInstance()->get(CatalogHelper::class);
 
         parent::__construct(
             $context,
@@ -63,7 +67,7 @@ public function __construct(
      * @param string $value
      * @param int $length
      * @param string $etc
-     * @param string &$remainder
+     * @param string $remainder
      * @param bool $breakWords
      * @return string
      */
@@ -76,6 +80,8 @@ public function truncateString($value, $length = 80, $etc = '...', &$remainder =
     }
 
     /**
+     * Get is shipment separately.
+     *
      * @param null|object $item
      * @return bool
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -109,6 +115,8 @@ public function isShipmentSeparately($item = null)
     }
 
     /**
+     * Get is child calculated.
+     *
      * @param null|object $item
      * @return bool
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -144,6 +152,8 @@ public function isChildCalculated($item = null)
     }
 
     /**
+     * Return selection attributes.
+     *
      * @param mixed $item
      * @return mixed
      */
@@ -161,6 +171,8 @@ public function getSelectionAttributes($item)
     }
 
     /**
+     * Return order options.
+     *
      * @return array
      */
     public function getOrderOptions()
@@ -182,6 +194,8 @@ public function getOrderOptions()
     }
 
     /**
+     * Return value html.
+     *
      * @param object $item
      * @return string
      */
@@ -204,6 +218,8 @@ public function getValueHtml($item)
     }
 
     /**
+     * Return can show price.
+     *
      * @param object $item
      * @return bool
      */
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
index c8d3a9b1f091c..9620f648ae3b8 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/order/view/items/renderer.phtml
@@ -16,8 +16,8 @@
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 
 <?php $_prevOptionId = '' ?>
@@ -58,7 +58,7 @@ $helper = $block->getData('jsonHelper');
             </div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         </td>
         <?php else: ?>
diff --git a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
index 34d4d22dd09bc..1718a460d7544 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Composite/Fieldset/Configurable.php
@@ -37,7 +37,6 @@ class Configurable extends \Magento\ConfigurableProduct\Block\Product\View\Type\
      * @param Format|null $localeFormat
      * @param Session|null $customerSession
      * @param \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices|null $variationPrices
-     * @param ProductHelper|null $productHelper
      */
     public function __construct(
         \Magento\Catalog\Block\Product\Context $context,
@@ -51,10 +50,9 @@ public function __construct(
         array $data = [],
         Format $localeFormat = null,
         Session $customerSession = null,
-        \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices $variationPrices = null,
-        ?ProductHelper $productHelper = null
+        \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Variations\Prices $variationPrices = null
     ) {
-        $data['productHelper'] = $productHelper ?? ObjectManager::getInstance()->get(ProductHelper::class);
+        $data['productHelper'] = $catalogProduct;
         parent::__construct(
             $context,
             $arrayUtils,
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
index 24d7db0058045..d34646a4138eb 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Payment.php
@@ -112,7 +112,7 @@ protected function _getHeaderTitleHtml($element)
         $html .= /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
             'onclick',
             "paypalToggleSolution.call(this, '" . $htmlId . "', '" . $this->getUrl('adminhtml/*/state') .
-            "'); return false;",
+            "');event.preventDefault();",
             'button#' . $htmlId . '-head'
         );
 
@@ -177,7 +177,7 @@ protected function _getExtraJs($element)
                 var doScroll = false;
                 Fieldset.toggleCollapse(id, url);
                 if ($(this).hasClassName(\"open\")) {
-                    $$(\".with-button button.button\").each(function(anotherButton) {
+                    \$$(\".with-button button.button\").each(function(anotherButton) {
                         if (anotherButton != this && $(anotherButton).hasClassName(\"open\")) {
                             $(anotherButton).click();
                             doScroll = true;
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index 55fd7af1ed4e5..971dddfd40e68 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -50,10 +50,7 @@
                                  data-option-id="<?= $block->escapeHtmlAttr($option) ?>"
                                  data-option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
                                  data-option-tooltip-thumb="<?= $block->escapeUrl($swatchThumbPath) ?>"
-                                 data-option-tooltip-value=""
-                                 style="background: url(<?=
-                                 /*  @noEscape */ $escapedUrl
-                                                        ?>) no-repeat center; background-size: initial;">
+                                 data-option-tooltip-value="">
                             </div>
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                                 "background: url(" . /*  @noEscape */ $escapedUrl .
diff --git a/app/code/Magento/Tax/Block/Checkout/Tax.php b/app/code/Magento/Tax/Block/Checkout/Tax.php
index 0a86c0312ab1c..a53db42be2ad6 100644
--- a/app/code/Magento/Tax/Block/Checkout/Tax.php
+++ b/app/code/Magento/Tax/Block/Checkout/Tax.php
@@ -9,8 +9,48 @@
  */
 namespace Magento\Tax\Block\Checkout;
 
+use Magento\Checkout\Helper\Data as CheckoutHelper;
+use Magento\Framework\App\ObjectManager;
+use Magento\Tax\Helper\Data as TaxHelper;
+use Magento\Sales\Model\ConfigInterface;
+
+/**
+ * Class for manage tax amount.
+ */
 class Tax extends \Magento\Checkout\Block\Total\DefaultTotal
 {
+    /**
+     * @param \Magento\Framework\View\Element\Template\Context $context
+     * @param \Magento\Customer\Model\Session $customerSession
+     * @param \Magento\Checkout\Model\Session $checkoutSession
+     * @param ConfigInterface $salesConfig
+     * @param array $layoutProcessors
+     * @param array $data
+     * @param CheckoutHelper|null $checkoutHelper
+     * @param TaxHelper|null $taxHelper
+     */
+    public function __construct(
+        \Magento\Framework\View\Element\Template\Context $context,
+        \Magento\Customer\Model\Session $customerSession,
+        \Magento\Checkout\Model\Session $checkoutSession,
+        ConfigInterface $salesConfig,
+        array $layoutProcessors = [],
+        array $data = [],
+        ?CheckoutHelper $checkoutHelper = null,
+        ?TaxHelper $taxHelper = null
+    ) {
+        $data['taxHelper'] = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class);
+        parent::__construct(
+            $context,
+            $customerSession,
+            $checkoutSession,
+            $salesConfig,
+            $layoutProcessors,
+            $data,
+            $checkoutHelper
+        );
+    }
+
     /**
      * @var string
      */
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
index a85e5e9b76972..e9a92120f8cf1 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/grandtotal.phtml
@@ -24,6 +24,10 @@ $checkoutHelper = $block->getData('checkoutHelper');
             <strong><?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotalExclTax()) ?></strong>
         </td>
     </tr>
+    <?php if ($style): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.grand.totals.excl th.mark') ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.grand.totals.excl td.amount') ?>
+    <?php endif; ?>
     <?= /* @noEscape */ $block->renderTotals('taxes', $colspan) ?>
     <tr class="grand totals incl">
         <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
@@ -33,6 +37,10 @@ $checkoutHelper = $block->getData('checkoutHelper');
             <strong><?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
+    <?php if ($style): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.grand.totals.incl th.mark') ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.grand.totals.incl td.amount') ?>
+    <?php endif; ?>
 <?php else: ?>
     <tr class="grand totals">
         <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
@@ -42,6 +50,8 @@ $checkoutHelper = $block->getData('checkoutHelper');
             <strong><?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValue()) ?></strong>
         </td>
     </tr>
+    <?php if ($style): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.grand.totals th.mark') ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.grand.totals td.amount') ?>
+    <?php endif; ?>
 <?php endif; ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping th.mark') ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping td.amount') ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
index 9f08c668952f1..e2989d8313283 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/shipping.phtml
@@ -27,6 +27,10 @@
             <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingExcludeTax()) ?>
         </td>
     </tr>
+        <?php if ($style): ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl th.mark') ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl td.amount') ?>
+        <?php endif; ?>
     <tr class="totals shipping incl">
         <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
             <?= $block->escapeHtml($block->getIncludeTaxLabel()) ?>
@@ -35,6 +39,10 @@
             <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingIncludeTax()) ?>
         </td>
     </tr>
+        <?php if ($style): ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl th.mark') ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl td.amount') ?>
+        <?php endif; ?>
     <?php elseif ($block->displayIncludeTax()): ?>
     <tr class="totals shipping incl">
         <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
@@ -44,6 +52,10 @@
             <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingIncludeTax()) ?>
         </td>
     </tr>
+        <?php if ($style): ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl th.mark') ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.incl td.amount') ?>
+        <?php endif; ?>
     <?php else: ?>
     <tr class="totals shipping excl">
         <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
@@ -53,7 +65,9 @@
             <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getShippingExcludeTax()) ?>
         </td>
     </tr>
+        <?php if ($style): ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl th.mark') ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.shipping.excl td.amount') ?>
+        <?php endif; ?>
     <?php endif; ?>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping th.mark') ?>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping td.amount') ?>
 <?php endif; ?>
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
index 88d4721b1aa47..dc9034fc9f694 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/subtotal.phtml
@@ -25,6 +25,10 @@ $checkoutHelper = $block->getData('checkoutHelper');
         <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValueExclTax()) ?>
     </td>
 </tr>
+    <?php if ($style): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.sub.excl th.mark') ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.sub.excl td.amount') ?>
+    <?php endif; ?>
 <tr class="totals sub incl">
     <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
         <?= $block->escapeHtml(__('Subtotal (Incl. Tax)')) ?>
@@ -33,6 +37,10 @@ $checkoutHelper = $block->getData('checkoutHelper');
         <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValueInclTax()) ?>
     </td>
 </tr>
+    <?php if ($style): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.sub.incl th.mark') ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.sub.incl td.amount') ?>
+    <?php endif; ?>
 <?php else: ?>
 <tr class="totals sub">
     <th class="mark" colspan="<?= /* @noEscape */ $colspan ?>" scope="row">
@@ -42,7 +50,8 @@ $checkoutHelper = $block->getData('checkoutHelper');
         <?= /* @noEscape */ $checkoutHelper->formatPrice($block->getTotal()->getValue()) ?>
     </td>
 </tr>
+    <?php if ($style): ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.sub th.mark') ?>
+        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($style, 'tr.totals.sub td.amount') ?>
+    <?php endif; ?>
 <?php endif; ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping th.mark') ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(/* @noEscape */ $style, 'tr.totals.shipping td.amount') ?>
-
diff --git a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
index 28767bb3d4cbb..e265c029578a6 100644
--- a/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/checkout/tax.phtml
@@ -13,11 +13,13 @@
 <?php
     $_value = $block->getTotal()->getValue();
     $_style = $block->escapeHtmlAttr($block->getTotal()->getStyle());
+    /** @var \Magento\Tax\Helper\Data $taxHelper */
+    $taxHelper = $block->getData('taxHelper');
     /** @var \Magento\Checkout\Helper\Data $checkoutHelper */
     $checkoutHelper = $block->getData('checkoutHelper');
     $attributes = 'class="totals-tax"';
 
-if ($checkoutHelper->displayFullSummary() && $_value != 0) {
+if ($taxHelper->displayFullSummary() && $_value != 0) {
     $attributes = 'class="totals-tax-summary" data-mage-init=\'{"toggleAdvanced": {"selectorsToggleClass": "shown",
      "baseToggleClass": "expanded", "toggleContainers": ".totals-tax-details"}}\'';
 }
@@ -25,7 +27,7 @@ if ($checkoutHelper->displayFullSummary() && $_value != 0) {
 
 <tr <?= /* @noEscape */ $attributes ?>>
     <th class="mark" colspan="<?= (int) $block->getColspan() ?>" scope="row">
-        <?php if ($checkoutHelper->displayFullSummary()): ?>
+        <?php if ($taxHelper->displayFullSummary()): ?>
             <span class="detailed"><?= $block->escapeHtml($block->getTotal()->getTitle()) ?></span>
         <?php else: ?>
             <?= $block->escapeHtml($block->getTotal()->getTitle()) ?>
@@ -35,10 +37,12 @@ if ($checkoutHelper->displayFullSummary() && $_value != 0) {
         <?= /* @noEscape */ $checkoutHelper->formatPrice($_value) ?>
     </td>
 </tr>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax th.mark') ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax td.amount') ?>
+<?php if ($_style): ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax th.mark') ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax td.amount') ?>
+<?php endif; ?>
 
-<?php if ($checkoutHelper->displayFullSummary() && $_value != 0): ?>
+<?php if ($taxHelper->displayFullSummary() && $_value != 0): ?>
     <?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
         <?php if (isset($info['hidden']) && $info['hidden']) { continue; } ?>
         <?php $percent = $info['percent']; ?>
@@ -62,8 +66,10 @@ if ($checkoutHelper->displayFullSummary() && $_value != 0) {
                     </td>
                 <?php endif; ?>
             </tr>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details th.mark') ?>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details td.amount') ?>
+            <?php if ($_style): ?>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details th.mark') ?>
+                <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($_style, 'tr.totals-tax-details td.amount') ?>
+            <?php endif; ?>
             <?php $isFirst = 0; ?>
         <?php endforeach; ?>
     <?php endforeach; ?>

From ae82dc4af811115b8abffc5691320dae5e99f0cb Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Fri, 8 May 2020 16:50:56 +0300
Subject: [PATCH 125/307] MC-29420: Remove event handlers from CE

---
 .../templates/widget/tabshoriz.phtml          | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
index 75858f044e76b..c51b357091bda 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml
@@ -42,22 +42,23 @@
         </div>
         <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
             'display:none',
-            '#' . $block->escapeJs($block->getTabId($_tab))
+            '#' . $block->escapeJs($block->getTabId($_tab)) . '_content'
         ); ?>
     </li>
     <?php endforeach; ?>
 </ul>
 </div>
-    <?php $scriptString = '
-require([\'jquery\',\'mage/backend/tabs\'], function($){
+    <?php $scriptString = <<<script
+require(["jquery","mage/backend/tabs"], function($){
     $(function() {
-        $(\'#' . /* @noEscape */ $block->getId() . '\').tabs({
-            active: \'' . /* @noEscape */ $block->getActiveTabId() . '\',
-            destination: \'#' . /* @noEscape */ $block->getDestElementId() . '\',
-            shadowTabs: ' . /* @noEscape */ $block->getAllShadowTabs() . '
+        $('#{$block->getId()}').tabs({
+            active: '{$block->getActiveTabId()}',
+            destination: '#{$block->getDestElementId()}',
+            shadowTabs: {$block->getAllShadowTabs()}
         });
     });
-});';
+});
+script;
     ?>
-    <?= $secureRenderer->renderTag('script', [], /* @noEscape */ $scriptString, false); ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php endif; ?>

From feb9f333e93f1cbbaeee6a154251f6d940d6d295 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Sun, 10 May 2020 11:42:07 +0300
Subject: [PATCH 126/307] MC-33404: Incorrect display of file name in import
 history

---
 .../Adminhtml/Grid/Column/Renderer/DownloadTest.php      | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
index cc0609015a840..d9a00c16cb0af 100644
--- a/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
+++ b/app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php
@@ -13,6 +13,7 @@
 use Magento\Framework\Escaper;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
 use Magento\ImportExport\Block\Adminhtml\Grid\Column\Renderer\Download;
+use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 
 /**
@@ -21,7 +22,7 @@
 class DownloadTest extends TestCase
 {
     /**
-     * @var Context
+     * @var Context|MockObject
      */
     protected $context;
 
@@ -36,7 +37,7 @@ class DownloadTest extends TestCase
     protected $download;
 
     /**
-     * @var Escaper|\PHPUnit_Framework_MockObject_MockObjecti
+     * @var Escaper|MockObject
      */
     private $escaperMock;
 
@@ -48,7 +49,7 @@ protected function setUp(): void
         $this->escaperMock = $this->createMock(Escaper::class);
         $urlModel = $this->createPartialMock(Url::class, ['getUrl']);
         $urlModel->expects($this->any())->method('getUrl')->willReturn('url');
-        $this->context = $this->createPartialMock(Context::class, ['getUrlBuilder']);
+        $this->context = $this->createPartialMock(Context::class, ['getUrlBuilder', 'getEscaper']);
         $this->context->expects($this->any())->method('getUrlBuilder')->willReturn($urlModel);
         $this->context->expects($this->any())->method('getEscaper')->willReturn($this->escaperMock);
         $data = [];
@@ -58,7 +59,7 @@ protected function setUp(): void
             Download::class,
             [
                 'context' => $this->context,
-                'data' => $data
+                'data' => $data,
             ]
         );
     }

From 20037ecbe50a12d49a43d07237e16fa1be34bbcf Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Mon, 11 May 2020 16:53:58 -0500
Subject: [PATCH 127/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index 38d0c8dc75754..77f9c5e1fe552 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -36,7 +36,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     /**
      * @inheritdoc
      */
-    public function setUp()
+    public function setUp(): void
     {
         $context = $this->getMockObject(Context::class);
         $registry = $this->getMockObject(Registry::class);

From 755ab93dcf25d7e8ba610bb2b7cf1af247e467a3 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Tue, 12 May 2020 10:45:33 +0300
Subject: [PATCH 128/307] MC-29420: Remove event handlers from CE

---
 .../AdminAnalytics/view/adminhtml/templates/tracking.phtml      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
index 35d0f9ec89986..07983e08b97ad 100644
--- a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
+++ b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/tracking.phtml
@@ -15,7 +15,7 @@
         'src' => '"' . $block->escapeJs($block->getTrackingUrl()) .'"',
         'async' => true,
     ],
-    '',
+    ' ',
     false
 ) ?>
 

From 69b5f48eac56e92d99fddb54fc44a5c1d0d6bd74 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Tue, 12 May 2020 15:12:12 +0300
Subject: [PATCH 129/307] MC-29420: Remove event handlers from CE

---
 .../view/adminhtml/templates/widget/grid/extended.phtml   | 3 +--
 .../templates/product/view/options/type/file.phtml        | 8 ++++----
 app/code/Magento/Customer/Block/Form/Register.php         | 1 +
 .../Customer/view/frontend/templates/form/register.phtml  | 8 +++++---
 .../Magento/Reports/view/adminhtml/templates/grid.phtml   | 5 +++--
 .../adminhtml/templates/order/create/items/grid.phtml     | 2 +-
 .../Magento/Payment/Block/Transparent/IframeTest.php      | 5 ++---
 7 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index c43b6397232c5..6f7e37bc94094 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -340,8 +340,7 @@ script;
         $encodedId = /* @noEscape */ $jsonHelper->jsonEncode($block->getId());
         $scriptString .= <<<script
 
-    {$block->escapeJs($block->getJsObjectName())} = new varienGrid(
-        {$encodedId},
+    {$block->escapeJs($block->getJsObjectName())} = new varienGrid({$encodedId},
          '{$block->escapeJs($block->getGridUrl())}',
          '{$block->escapeJs($block->getVarNamePage())}',
          '{$block->escapeJs($block->getVarNameSort())}',
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
index 58933e9b867f7..a11f5db1f4842 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
@@ -61,14 +61,14 @@
         <?php endif; ?>
         <?php if ($_option->getImageSizeX() > 0):?>
             <p class="note">
-                <?= $block->escapeHtml(__('Maximum image width')) ?>:
-                <strong><?= (int)$_option->getImageSizeX() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
+                <?= $block->escapeHtml(__('Maximum image width')) ?>: <strong><?= (int)$_option->getImageSizeX()
+                ?> <?= $block->escapeHtml(__('px.')) ?></strong>
             </p>
         <?php endif; ?>
         <?php if ($_option->getImageSizeY() > 0):?>
             <p class="note">
-                <?= $block->escapeHtml(__('Maximum image height')) ?>:
-                <strong><?= (int)$_option->getImageSizeY() ?> <?= $block->escapeHtml(__('px.')) ?></strong>
+                <?= $block->escapeHtml(__('Maximum image height')) ?>: <strong><?= (int)$_option->getImageSizeY()
+                ?> <?= $block->escapeHtml(__('px.')) ?></strong>
             </p>
         <?php endif; ?>
     </div>
diff --git a/app/code/Magento/Customer/Block/Form/Register.php b/app/code/Magento/Customer/Block/Form/Register.php
index 4f030c38ac63c..6cf1fcdb31506 100644
--- a/app/code/Magento/Customer/Block/Form/Register.php
+++ b/app/code/Magento/Customer/Block/Form/Register.php
@@ -76,6 +76,7 @@ public function __construct(
         $this->_customerSession = $customerSession;
         $this->newsLetterConfig = $newsLetterConfig ?: ObjectManager::getInstance()->get(Config::class);
         $data['addressHelper'] = $addressHelper ?? ObjectManager::getInstance()->get(AddressHelper::class);
+        $data['directoryHelper'] = $directoryHelper;
         parent::__construct(
             $context,
             $directoryHelper,
diff --git a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
index a9a28295be09a..1b50b8de34280 100644
--- a/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/form/register.phtml
@@ -11,7 +11,9 @@ use Magento\Customer\Helper\Address;
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 
 /** @var Magento\Customer\Helper\Address $addressHelper */
-$addressHelper = $block->getData('adressHelper');
+$addressHelper = $block->getData('addressHelper');
+/** @var \Magento\Directory\Helper\Data $directoryHelper */
+$directoryHelper = $block->getData('directoryHelper');
 $formData = $block->getFormData();
 ?>
 <?php $displayAll = $block->getConfig('general/region/display_all'); ?>
@@ -322,9 +324,9 @@ script;
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
 <?php if ($block->getShowAddressFields()): ?>
     <?php
-    $regionJson = /* @noEscape */ $addressHelper->getRegionJson();
+    $regionJson = /* @noEscape */ $directoryHelper->getRegionJson();
     $regionId = (int) $formData->getRegionId();
-    $countriesWithOptionalZip = /* @noEscape */ $addressHelper->getCountriesWithOptionalZip(true);
+    $countriesWithOptionalZip = /* @noEscape */ $directoryHelper->getCountriesWithOptionalZip(true);
     ?>
 <script type="text/x-magento-init">
     {
diff --git a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
index 53473cb671e7c..f615c705b356d 100644
--- a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
+++ b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
@@ -104,7 +104,8 @@ script;
         </div>
     </div>
     <?php if ($block->canDisplayContainer()): ?>
-        <?php $scriptString = <<<script
+        <?php $useAjax = $block->getUseAjax() ? 'true' : 'false';
+        $scriptString = <<<script
 
             require([
                 "jquery",
@@ -119,7 +120,7 @@ script;
                  '{$block->escapeJs($block->getVarNameSort())}', '{$block->escapeJs($block->getVarNameDir())}',
                  '{$block->escapeJs($block->getVarNameFilter())}');
                 {$block->escapeJs($block->getJsObjectName())}.useAjax =
-                 '{($block->getUseAjax() ? 'true' : 'false')}';
+                 '{$useAjax}';
 
 script;
         ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
index 330d68a07e44d..410318a358429 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
@@ -115,7 +115,7 @@ $catalogHelper =$block->getData('catalogHelper');
                                 <?php endif; ?>
                                 <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                     'onclick',
-                                    "$('item_tier_<?= (int) $_item->getId() ?>').toggle();event.preventDefault();",
+                                    "$('item_tier_" . (int) $_item->getId() ."').toggle();event.preventDefault();",
                                     'div#item_tier_block_' . (int) $_item->getId() . ' a'
                                 ) ?>
                             <?php endif; ?>
diff --git a/dev/tests/integration/testsuite/Magento/Payment/Block/Transparent/IframeTest.php b/dev/tests/integration/testsuite/Magento/Payment/Block/Transparent/IframeTest.php
index 0b92956eebf11..0cb20792b7578 100644
--- a/dev/tests/integration/testsuite/Magento/Payment/Block/Transparent/IframeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Payment/Block/Transparent/IframeTest.php
@@ -6,8 +6,7 @@
 namespace Magento\Payment\Block\Transparent;
 
 /**
- * Class IframeTest
- * @package Magento\Payment\Block\Transparent
+ * Class for testing Iframe
  */
 class IframeTest extends \PHPUnit\Framework\TestCase
 {
@@ -38,7 +37,7 @@ public function testToHtml($xssString)
         $content = $block->toHtml();
 
         $this->assertNotContains($xssString, $content, 'Params must be escaped');
-        $this->assertContains($block->escapeXssInUrl($xssString), $content, 'Content must be present');
+        $this->assertContains($block->escapeJs($xssString), $content, 'Content must be present');
     }
 
     /**

From ae27a7207d2fe4f5e5bea8136c3dd2530248503b Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Tue, 12 May 2020 15:31:08 +0300
Subject: [PATCH 130/307] MC-34231: 2.4.0-develop-pr33 PR stabilization

---
 .../Theme/Test/Unit/Model/Design/Backend/ImageTest.php | 10 +++++-----
 .../Catalog/Model/ResourceModel/Eav/AttributeTest.php  |  7 ++++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index 38d0c8dc75754..4596655c0d6e0 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -36,7 +36,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     /**
      * @inheritdoc
      */
-    public function setUp()
+    public function setUp() : void
     {
         $context = $this->getMockObject(Context::class);
         $registry = $this->getMockObject(Registry::class);
@@ -70,7 +70,7 @@ public function setUp()
     /**
      * @inheritdoc
      */
-    public function tearDown()
+    public function tearDown() : void
     {
         unset($this->imageBackend);
     }
@@ -92,12 +92,12 @@ private function getMockObject(string $class, array $methods = []): \PHPUnit\Fra
 
     /**
      * Test for beforeSave method with invalid file extension.
-     *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Something is wrong with the file upload settings.
      */
     public function testBeforeSaveWithInvalidExtensionFile()
     {
+        $this->expectException(\Magento\Framework\Exception\LocalizedException::class);
+        $this->expectExceptionMessage('Something is wrong with the file upload settings.');
+
         $invalidFileName = 'fileName.invalidExtension';
         $this->imageBackend->setData(
             [
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
index 9432f8bc55020..56e8023ccc691 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
@@ -8,6 +8,7 @@
 use Magento\Eav\Api\AttributeRepositoryInterface;
 use Magento\Eav\Api\Data\AttributeInterface;
 use Magento\Eav\Model\Config;
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\ObjectManagerInterface;
 use Magento\TestFramework\Helper\Bootstrap;
 
@@ -67,13 +68,13 @@ public function testCRUD()
     /**
      * @magentoDataFixture Magento/Catalog/_files/product_attribute.php
      *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Do not change entity type.
-     *
      * @return void
      */
     public function testAttributeSaveWithChangedEntityType(): void
     {
+        $this->expectException(LocalizedException::class);
+        $this->expectExceptionMessage('Do not change entity type.');
+
         $attribute = $this->attributeRepository->get($this->catalogProductEntityType, 'test_attribute_code_333');
         $attribute->setEntityTypeId(1);
         $attribute->save();

From 8f08535e5817773b62dd450c4e13a4e47c3185be Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Tue, 12 May 2020 19:47:35 +0300
Subject: [PATCH 131/307] MC-29420: Remove event handlers from CE

---
 .../adminhtml/templates/widget/grid/extended.phtml  |  5 ++---
 .../Block/Adminhtml/Sales/Order/Items/Renderer.php  |  8 ++++----
 .../sales/creditmemo/create/items/renderer.phtml    |  6 +++---
 .../sales/creditmemo/view/items/renderer.phtml      |  6 +++---
 .../sales/invoice/create/items/renderer.phtml       |  6 +++---
 .../sales/invoice/view/items/renderer.phtml         |  6 +++---
 .../sales/shipment/create/items/renderer.phtml      |  6 +++---
 .../sales/shipment/view/items/renderer.phtml        |  6 +++---
 .../templates/order/create/items/grid.phtml         | 13 ++++++-------
 9 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 6f7e37bc94094..1a4f038c2abf3 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -275,9 +275,8 @@ $numColumns = count($block->getColumns());
             <?php elseif ($block->getEmptyText()): ?>
                 <tr class="data-grid-tr-no-data">
                     <td class="<?= $block->escapeHtmlAttr($block->getEmptyTextClass()) ?>"
-                        colspan="<?= $block->escapeHtmlAttr($numColumns) ?>">
-                        <?= $block->escapeHtml($block->getEmptyText()) ?>
-                    </td>
+                        colspan="<?= $block->escapeHtmlAttr($numColumns) ?>"><?=
+                        $block->escapeHtml($block->getEmptyText()) ?></td>
                 </tr>
             <?php endif; ?>
             </tbody>
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
index f1a09369df74c..3cf8a5840f334 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php
@@ -8,7 +8,7 @@
 use Magento\Catalog\Model\Product\Type\AbstractType;
 use Magento\Framework\Serialize\Serializer\Json;
 use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Json\Helper\Data as JsonHelper;
+use Magento\Catalog\Helper\Data as CatalogHelper;
 
 /**
  * Adminhtml sales order item renderer
@@ -32,7 +32,7 @@ class Renderer extends \Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRend
      * @param \Magento\Framework\Registry $registry
      * @param array $data
      * @param \Magento\Framework\Serialize\Serializer\Json $serializer
-     * @param JsonHelper|null $jsonHelper
+     * @param CatalogHelper|null $catalogHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -41,10 +41,10 @@ public function __construct(
         \Magento\Framework\Registry $registry,
         array $data = [],
         Json $serializer = null,
-        ?JsonHelper $jsonHelper = null
+        ?CatalogHelper $catalogHelper = null
     ) {
         $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
-        $data['jsonHelper'] = $jsonHelper ?? ObjectManager::getInstance()->get(JsonHelper::class);
+        $data['catalogHelper'] = $catalogHelper ?? ObjectManager::getInstance()->get(CatalogHelper::class);
         parent::__construct($context, $stockRegistry, $stockConfiguration, $registry, $data);
     }
 
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
index 5fef2baf2ed65..f32fa87c0ac11 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/create/items/renderer.phtml
@@ -16,8 +16,8 @@
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 
 <?php $_prevOptionId = '' ?>
@@ -55,7 +55,7 @@ $helper = $block->getData('jsonHelper');
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         </td>
         <?php else: ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
index f19767bf488ca..12a27be743875 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/creditmemo/view/items/renderer.phtml
@@ -16,8 +16,8 @@
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 
 <?php $_prevOptionId = '' ?>
@@ -53,7 +53,7 @@ $helper = $block->getData('jsonHelper');
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         </td>
         <?php else: ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
index caf2470f20f50..23e7ef27fa78d 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml
@@ -16,8 +16,8 @@
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 
 <?php $_prevOptionId = '' ?>
@@ -63,7 +63,7 @@ $helper = $block->getData('jsonHelper');
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         </td>
         <?php else: ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
index b7906fe5bf044..004c484bb9ba5 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/view/items/renderer.phtml
@@ -16,8 +16,8 @@
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 
 <?php $_prevOptionId = '' ?>
@@ -53,7 +53,7 @@ $helper = $block->getData('jsonHelper');
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         <?php else: ?>
         <td class="col-product">
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
index 0a5083ba0b569..9c3cdcd97bf52 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/create/items/renderer.phtml
@@ -9,8 +9,8 @@
 ?>
 
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 <?php $_item = $block->getItem() ?>
 <?php $items = $block->getChildren($_item); ?>
@@ -46,7 +46,7 @@ $helper = $block->getData('jsonHelper');
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         </td>
         <?php else: ?>
diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
index 6510d1493f764..73efa4bddcc1c 100644
--- a/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
+++ b/app/code/Magento/Bundle/view/adminhtml/templates/sales/shipment/view/items/renderer.phtml
@@ -14,8 +14,8 @@
 <?php $_count = count($items) ?>
 <?php $_index = 0 ?>
 <?php
-/** @var \Magento\Framework\Json\Helper\Data $helper */
-$helper = $block->getData('jsonHelper');
+/** @var \Magento\Catalog\Helper\Data $catalogHelper */
+$catalogHelper = $block->getData('catalogHelper');
 ?>
 
 <?php $_prevOptionId = '' ?>
@@ -46,7 +46,7 @@ $helper = $block->getData('jsonHelper');
             <div class="product-title"><?= $block->escapeHtml($_item->getName()) ?></div>
             <div class="product-sku-block">
                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
-                <?= /* @noEscape */ implode('<br />', $helper->splitSku($_item->getSku())) ?>
+                <?= /* @noEscape */ implode('<br />', $catalogHelper->splitSku($_item->getSku())) ?>
             </div>
         </td>
         <?php else: ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
index 410318a358429..ada5cb36cdbb0 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml
@@ -79,9 +79,8 @@ $catalogHelper =$block->getData('catalogHelper');
                 <tbody class="<?= /* @noEscape */ ($i%2) ? 'even' : 'odd' ?>">
                     <tr>
                         <td class="col-product">
-                            <span id="order_item_<?= (int) $_item->getId() ?>_title">
-                                <?= $block->escapeHtml($_item->getName()) ?>
-                            </span>
+                            <span id="order_item_<?= (int) $_item->getId() ?>_title"><?=
+                                $block->escapeHtml($_item->getName()) ?></span>
                             <div class="product-sku-block">
                                 <span><?= $block->escapeHtml(__('SKU')) ?>:</span>
                                 <?= /* @noEscape */ implode(
@@ -125,16 +124,16 @@ $catalogHelper =$block->getData('catalogHelper');
                                            class="admin__control-checkbox"
                                            id="item_use_custom_price_<?= (int) $_item->getId() ?>"
                                            <?php if ($_isCustomPrice): ?> checked="checked"<?php endif; ?> />
+                                    <label
+                                        class="normal admin__field-label"
+                                        for="item_use_custom_price_<?= (int) $_item->getId() ?>">
+                                        <span><?= $block->escapeHtml(__('Custom Price')) ?>*</span></label>
                                     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
                                         'onclick',
                                         "order.toggleCustomPrice(this, 'item_custom_price_" . (int) $_item->getId() .
                                         "', 'item_tier_block_" . (int) $_item->getId() . "');",
                                         'input#item_use_custom_price_' . (int) $_item->getId()
                                     ) ?>
-                                    <label
-                                        class="normal admin__field-label"
-                                        for="item_use_custom_price_<?= (int) $_item->getId() ?>">
-                                        <span><?= $block->escapeHtml(__('Custom Price')) ?>*</span></label>
                                 </div>
                             <?php endif; ?>
                             <input id="item_custom_price_<?= (int) $_item->getId() ?>"

From 51b5080b953dda0a9ded0bf12c981aa71dc9221e Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Tue, 12 May 2020 12:02:29 -0500
Subject: [PATCH 132/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../Theme/Test/Unit/Model/Design/Backend/ImageTest.php    | 2 +-
 .../Catalog/Model/ResourceModel/Eav/AttributeTest.php     | 8 +++++---
 .../testsuite/Magento/Customer/Model/AttributeTest.php    | 2 +-
 .../Magento/Customer/Model/Metadata/Form/ImageTest.php    | 4 ++--
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index 77f9c5e1fe552..ec34637b915eb 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -70,7 +70,7 @@ public function setUp(): void
     /**
      * @inheritdoc
      */
-    public function tearDown()
+    public function tearDown(): void
     {
         unset($this->imageBackend);
     }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
index 9432f8bc55020..263a1c41ac8df 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Eav/AttributeTest.php
@@ -67,13 +67,15 @@ public function testCRUD()
     /**
      * @magentoDataFixture Magento/Catalog/_files/product_attribute.php
      *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Do not change entity type.
-     *
      * @return void
      */
     public function testAttributeSaveWithChangedEntityType(): void
     {
+        $this->expectException(
+            \Magento\Framework\Exception\LocalizedException::class
+        );
+        $this->expectExceptionMessage('Do not change entity type.');
+
         $attribute = $this->attributeRepository->get($this->catalogProductEntityType, 'test_attribute_code_333');
         $attribute->setEntityTypeId(1);
         $attribute->save();
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
index dde20a8049437..d55046bc04f49 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
@@ -41,7 +41,7 @@ class AttributeTest extends \PHPUnit\Framework\TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->objectManager = Bootstrap::getObjectManager();
         $this->model = $this->objectManager->get(Attribute::class);
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
index 5d00feec17407..c8cee6a53f682 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
@@ -55,7 +55,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     /**
      * @inheritDoc
      */
-    public function setUp()
+    public function setUp(): void
     {
         $this->objectManager = Bootstrap::getObjectManager();
         $this->filesystem = $this->objectManager->get(Filesystem::class);
@@ -199,7 +199,7 @@ public function testProcessCustomerInvalidValue()
      * @inheritdoc
      * @throws FileSystemException
      */
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         parent::tearDownAfterClass();
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(

From 1ac621711126a8c13e41ad5faa6b3f8ad91d7ef5 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 12 May 2020 12:17:44 -0500
Subject: [PATCH 133/307] MC-33823: Merge CE, EE and B2B changes

---
 app/code/Magento/Csp/Model/BlockCache.php     | 134 ++++++++++++++++++
 app/code/Magento/Csp/etc/di.xml               |  11 ++
 .../view/frontend/templates/secure.phtml      |   9 ++
 .../testsuite/Magento/Csp/CachedBlockTest.php |  82 +++++++++++
 4 files changed, 236 insertions(+)
 create mode 100644 app/code/Magento/Csp/Model/BlockCache.php
 create mode 100644 dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/secure.phtml
 create mode 100644 dev/tests/integration/testsuite/Magento/Csp/CachedBlockTest.php

diff --git a/app/code/Magento/Csp/Model/BlockCache.php b/app/code/Magento/Csp/Model/BlockCache.php
new file mode 100644
index 0000000000000..59cb62584f6bc
--- /dev/null
+++ b/app/code/Magento/Csp/Model/BlockCache.php
@@ -0,0 +1,134 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp\Model;
+
+use Magento\Csp\Model\Collector\DynamicCollector;
+use Magento\Csp\Model\Policy\FetchPolicy;
+use Magento\Framework\App\CacheInterface;
+use Magento\Framework\Serialize\SerializerInterface;
+
+/**
+ * CSP aware block cache.
+ */
+class BlockCache implements CacheInterface
+{
+    /**
+     * @var CacheInterface
+     */
+    private $cache;
+
+    /**
+     * @var DynamicCollector
+     */
+    private $dynamicCollector;
+
+    /**
+     * @var SerializerInterface
+     */
+    private $serializer;
+
+    /**
+     * @param CacheInterface $cache
+     * @param DynamicCollector $dynamicCollector
+     * @param SerializerInterface $serializer
+     */
+    public function __construct(
+        CacheInterface $cache,
+        DynamicCollector $dynamicCollector,
+        SerializerInterface $serializer
+    ) {
+        $this->cache = $cache;
+        $this->dynamicCollector = $dynamicCollector;
+        $this->serializer = $serializer;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getFrontend()
+    {
+        return $this->cache->getFrontend();
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function load($identifier)
+    {
+        /** @var array|null $data */
+        $data = null;
+        $loaded = $this->cache->load($identifier);
+        try {
+            $data = $this->serializer->unserialize($loaded);
+            if (!is_array($data) || !array_key_exists('policies', $data) || !array_key_exists('html', $data)) {
+                $data = null;
+            }
+        } catch (\Throwable $exception) {
+            //Most likely block HTML was cached without policy data.
+        }
+        if ($data) {
+            foreach ($data['policies'] as $policyData) {
+                $this->dynamicCollector->add(
+                    new FetchPolicy(
+                        $policyData['id'],
+                        false,
+                        $policyData['hosts'],
+                        [],
+                        false,
+                        false,
+                        false,
+                        [],
+                        $policyData['hashes']
+                    )
+                );
+            }
+            $loaded = $data['html'];
+        }
+
+        return $loaded;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function save($data, $identifier, $tags = [], $lifeTime = null)
+    {
+        $collected = $this->dynamicCollector->collect();
+        if ($collected) {
+            $policiesData = [];
+            foreach ($collected as $policy) {
+                if ($policy instanceof FetchPolicy) {
+                    $policiesData[] = [
+                        'id' => $policy->getId(),
+                        'hosts' => $policy->getHostSources(),
+                        'hashes' => $policy->getHashes()
+                    ];
+                }
+            }
+            $data = $this->serializer->serialize(['policies' => $policiesData, 'html' => $data]);
+        }
+
+        return $this->cache->save($data, $identifier, $tags, $lifeTime);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function remove($identifier)
+    {
+        return $this->cache->remove($identifier);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function clean($tags = [])
+    {
+        return $this->cache->clean($tags);
+    }
+}
diff --git a/app/code/Magento/Csp/etc/di.xml b/app/code/Magento/Csp/etc/di.xml
index ac2d73fd01add..7b1129a0e1a41 100644
--- a/app/code/Magento/Csp/etc/di.xml
+++ b/app/code/Magento/Csp/etc/di.xml
@@ -89,4 +89,15 @@
             <argument name="cspRenderer" xsi:type="object">Magento\Csp\Api\CspRendererInterface</argument>
         </arguments>
     </type>
+
+    <type name="Magento\Csp\Model\BlockCache">
+        <arguments>
+            <argument name="cache" xsi:type="object">configured_block_cache</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Framework\View\Element\Context">
+        <arguments>
+            <argument name="cache" xsi:type="object">Magento\Csp\Model\BlockCache</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/secure.phtml b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/secure.phtml
new file mode 100644
index 0000000000000..f3ed9365d18b4
--- /dev/null
+++ b/dev/tests/integration/_files/Magento/TestModuleCspUtil/view/frontend/templates/secure.phtml
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+?>
+<?= /* @NoEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], 'let var = 1; console.log("var = " + var);', false) ?>
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CachedBlockTest.php b/dev/tests/integration/testsuite/Magento/Csp/CachedBlockTest.php
new file mode 100644
index 0000000000000..1b5325a07bdd1
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Csp/CachedBlockTest.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Csp;
+
+use Magento\Csp\Model\Collector\DynamicCollector;
+use Magento\Csp\Model\Collector\DynamicCollectorMock;
+use Magento\Framework\Math\Random;
+use Magento\Framework\View\LayoutInterface;
+use PHPUnit\Framework\TestCase;
+use Magento\Framework\View\Element\Template;
+use Magento\TestFramework\Helper\Bootstrap;
+
+/**
+ * Test that inline util works fine with cached blocks.
+ */
+class CachedBlockTest extends TestCase
+{
+    /**
+     * @var LayoutInterface
+     */
+    private $layout;
+
+    /**
+     * @var DynamicCollectorMock
+     */
+    private $dynamicCollected;
+
+    /**
+     * @var Random
+     */
+    private $random;
+
+    /**
+     * @inheritDoc
+     */
+    protected function setUp(): void
+    {
+        Bootstrap::getObjectManager()->configure([
+            'preferences' => [
+                DynamicCollector::class => DynamicCollectorMock::class
+            ]
+        ]);
+        $this->layout = Bootstrap::getObjectManager()->get(LayoutInterface::class);
+        $this->dynamicCollected = Bootstrap::getObjectManager()->get(DynamicCollector::class);
+        $this->random = Bootstrap::getObjectManager()->get(Random::class);
+    }
+
+    /**
+     * Validate policies preserved when reading block from cache.
+     *
+     * @return void
+     *
+     * @magentoAppArea frontend
+     * @magentoCache block_html enabled
+     */
+    public function testCachedPolicies(): void
+    {
+        /** @var Template $block */
+        $block = $this->layout->createBlock(
+            Template::class,
+            'test-block',
+            ['data' => ['cache_lifetime' => 3600, 'cache_key' => $this->random->getRandomString(32)]]
+        );
+        $block->setTemplate('Magento_TestModuleCspUtil::secure.phtml');
+        //Clearing previously added just in case.
+        $this->dynamicCollected->consumeAdded();
+
+        $block->toHtml();
+        $dynamic = $this->dynamicCollected->consumeAdded();
+        $this->assertNotEmpty($dynamic);
+
+        //From cache
+        $block->toHtml();
+        $cached = $this->dynamicCollected->consumeAdded();
+        $this->assertEquals($dynamic, $cached);
+    }
+}

From dcfe1c210b7629edb1ec8e606428cf9ef9eaf401 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 12 May 2020 14:33:49 -0500
Subject: [PATCH 134/307] MC-33823: Merge CE, EE and B2B changes

---
 app/code/Magento/Csp/etc/config.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Csp/etc/config.xml b/app/code/Magento/Csp/etc/config.xml
index c13cd37ca0340..88b4c305b62e6 100644
--- a/app/code/Magento/Csp/etc/config.xml
+++ b/app/code/Magento/Csp/etc/config.xml
@@ -70,14 +70,14 @@
                     <styles>
                         <policy_id>style-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>0</eval>
                         <dynamic>0</dynamic>
                     </styles>
                     <scripts>
                         <policy_id>script-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>1</eval>
                         <dynamic>0</dynamic>
                     </scripts>
@@ -170,14 +170,14 @@
                     <styles>
                         <policy_id>style-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>0</eval>
                         <dynamic>0</dynamic>
                     </styles>
                     <scripts>
                         <policy_id>script-src</policy_id>
                         <self>1</self>
-                        <inline>1</inline>
+                        <inline>0</inline>
                         <eval>1</eval>
                         <dynamic>0</dynamic>
                     </scripts>

From 16497a0ac8f439f47d89954ca3ac1ff5e9256fe6 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Tue, 12 May 2020 17:10:35 -0500
Subject: [PATCH 135/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../Test/Unit/Model/Template/FilterTest.php   |  3 +-
 .../Unit/Model/Metadata/Form/ImageTest.php    | 32 +++++++++++++++++++
 .../Test/Unit/Model/Template/FilterTest.php   |  5 ++-
 .../Block/Adminhtml/Queue/PreviewTest.php     | 16 +++++-----
 .../Unit/Model/Design/Backend/ImageTest.php   | 10 ++++--
 .../Image/Test/Unit/Adapter/Gd2Test.php       |  5 +--
 .../Test/Unit/Adapter/ImageMagickTest.php     |  4 ++-
 7 files changed, 59 insertions(+), 16 deletions(-)

diff --git a/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
index 76b5e6624225b..502b7aa63a1a2 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
@@ -119,10 +119,11 @@ public function testMediaDirectiveRelativePath()
      * Test using media directive with a URL path including schema.
      *
      * @covers \Magento\Cms\Model\Template\Filter::mediaDirective
-     * @expectedException \InvalidArgumentException
      */
     public function testMediaDirectiveURL()
     {
+        $this->expectException(\InvalidArgumentException::class);
+
         $baseMediaDir = 'pub/media';
         $construction = [
             '{{media url="http://wysiwyg/images/image.jpg"}}',
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
index 75a5b017a7505..8fd122c967c5f 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
@@ -230,6 +230,14 @@ public function testValidate()
             'name' => 'logo.gif',
         ];
 
+        $this->ioFileSystemMock->expects($this->any())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn([
+                'filename' => 'logo',
+                'extension' => 'gif'
+            ]);
+
         $this->attributeMetadataMock->expects($this->once())
             ->method('getStoreLabel')
             ->willReturn('File Input Field Label');
@@ -272,6 +280,14 @@ public function testValidateMaxFileSize()
             ->method('getValue')
             ->willReturn($maxFileSize);
 
+        $this->ioFileSystemMock->expects($this->any())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn([
+                'filename' => 'logo',
+                'extension' => 'gif'
+            ]);
+
         $this->attributeMetadataMock->expects($this->once())
             ->method('getStoreLabel')
             ->willReturn('File Input Field Label');
@@ -316,6 +332,14 @@ public function testValidateMaxImageWidth()
             ->method('getValue')
             ->willReturn($maxImageWidth);
 
+        $this->ioFileSystemMock->expects($this->any())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn([
+                'filename' => 'logo',
+                'extension' => 'gif'
+            ]);
+
         $this->attributeMetadataMock->expects($this->once())
             ->method('getStoreLabel')
             ->willReturn('File Input Field Label');
@@ -360,6 +384,14 @@ public function testValidateMaxImageHeight()
             ->method('getValue')
             ->willReturn($maxImageHeight);
 
+        $this->ioFileSystemMock->expects($this->any())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn([
+                'filename' => 'logo',
+                'extension' => 'gif'
+            ]);
+
         $this->attributeMetadataMock->expects($this->once())
             ->method('getStoreLabel')
             ->willReturn('File Input Field Label');
diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php
index 81262a9071f6c..ac890dd3d4a73 100644
--- a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php
+++ b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php
@@ -475,11 +475,14 @@ public function testProtocolDirectiveWithValidSchema()
     }
 
     /**
-     * @expectedException \Magento\Framework\Exception\MailException
      * @throws NoSuchEntityException
      */
     public function testProtocolDirectiveWithInvalidSchema()
     {
+        $this->expectException(
+            \Magento\Framework\Exception\MailException::class
+        );
+
         $model = $this->getModel();
         $storeMock = $this->createMock(\Magento\Store\Model\Store::class);
         $storeMock->expects($this->once())->method('isCurrentlySecure')->willReturn(true);
diff --git a/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php b/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php
index d64410c210837..9b5855a06be26 100644
--- a/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php
+++ b/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php
@@ -178,17 +178,17 @@ public function testToHtmlWithId()
         );
         $this->queueMock->expects($this->once())
             ->method('load')->willReturnSelf();
-        $this->queue->expects($this->once())->method('getTemplateId')->willReturn($templateId);
-        $this->queue->expects($this->once())->method('getNewsletterType')->willReturn($newsletterType);
-        $this->queue->expects($this->once())->method('getNewsletterText')->willReturn($newsletterText);
-        $this->queue->expects($this->once())->method('getNewsletterStyles')->willReturn($newsletterStyle);
+        $this->queueMock->expects($this->once())->method('getTemplateId')->willReturn($templateId);
+        $this->queueMock->expects($this->once())->method('getNewsletterType')->willReturn($newsletterType);
+        $this->queueMock->expects($this->once())->method('getNewsletterText')->willReturn($newsletterText);
+        $this->queueMock->expects($this->once())->method('getNewsletterStyles')->willReturn($newsletterStyle);
         $this->templateMock->expects($this->any())
             ->method('isPlain')
             ->willReturn(true);
-        $this->template->expects($this->once())->method('setId')->willReturn($templateId);
-        $this->template->expects($this->once())->method('setTemplateType')->willReturn($newsletterType);
-        $this->template->expects($this->once())->method('setTemplateText')->willReturn($newsletterText);
-        $this->template->expects($this->once())->method('setTemplateStyles')->willReturn($newsletterStyle);
+        $this->templateMock->expects($this->once())->method('setId')->willReturn($templateId);
+        $this->templateMock->expects($this->once())->method('setTemplateType')->willReturn($newsletterType);
+        $this->templateMock->expects($this->once())->method('setTemplateText')->willReturn($newsletterText);
+        $this->templateMock->expects($this->once())->method('setTemplateStyles')->willReturn($newsletterStyle);
         /** @var Store $store */
         $this->storeManagerMock->expects($this->once())
             ->method('getDefaultStoreView')
diff --git a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
index ec34637b915eb..f1c2b1d755971 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Design/Backend/ImageTest.php
@@ -92,12 +92,16 @@ private function getMockObject(string $class, array $methods = []): \PHPUnit\Fra
 
     /**
      * Test for beforeSave method with invalid file extension.
-     *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Something is wrong with the file upload settings.
      */
     public function testBeforeSaveWithInvalidExtensionFile()
     {
+        $this->expectException(
+            \Magento\Framework\Exception\LocalizedException::class
+        );
+        $this->expectExceptionMessage(
+            'Something is wrong with the file upload settings.'
+        );
+
         $invalidFileName = 'fileName.invalidExtension';
         $this->imageBackend->setData(
             [
diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
index a1e6e374afd56..70b55ab6e4a33 100644
--- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
+++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
@@ -122,7 +122,6 @@ public function filesProvider()
 
     /**
      * Test if open() method resets cached fileType
-     *
      */
     public function testOpenDifferentTypes()
     {
@@ -156,10 +155,12 @@ public function testOpenDifferentTypes()
     }
 
     /**
-     * @expectedException \InvalidArgumentException
+     * Test open() with invalid URL.
      */
     public function testOpenInvalidURL()
     {
+        $this->expectException(\InvalidArgumentException::class);
+
         $this->adapter->open('bar://foo.bar');
     }
 }
diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php
index 9f50fd5b7445d..2a27d25dac82e 100644
--- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php
+++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php
@@ -101,10 +101,12 @@ public function testSaveWithException()
     }
 
     /**
-     * @expectedException \InvalidArgumentException
+     * Test open() with invalid URL.
      */
     public function testOpenInvalidUrl()
     {
+        $this->expectException(\InvalidArgumentException::class);
+
         $this->imageMagic->open('bar://foo.bar');
     }
 }

From 4f9be0e64a89e2d6ed092f193813497bc631c660 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Tue, 12 May 2020 17:19:08 -0500
Subject: [PATCH 136/307] MC-29566: [2.4.x] Deprecate SID query
 parameter-related methods

---
 .../testsuite/Magento/Customer/Model/AttributeTest.php    | 8 +++++---
 .../Magento/Customer/Model/Metadata/Form/ImageTest.php    | 6 +++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
index d55046bc04f49..f433324efcfa6 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
@@ -69,13 +69,15 @@ public function testCRUD(): void
     /**
      * @magentoDataFixture Magento/Customer/_files/attribute_user_defined_customer.php
      *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Do not change entity type.
-     *
      * @return void
      */
     public function testAttributeSaveWithChangedEntityType(): void
     {
+        $this->expectException(
+            \Magento\Framework\Exception\LocalizedException::class
+        );
+        $this->expectExceptionMessage('Do not change entity type.');
+
         $attribute = $this->attributeRepository->get($this->customerEntityType, 'user_attribute');
         $attribute->setEntityTypeId(5);
         $attribute->save();
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
index c8cee6a53f682..48e45126d124b 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
@@ -157,12 +157,16 @@ public function testProcessCustomerValue()
      * Test for processCustomerValue method with invalid value
      *
      * @magentoAppIsolation enabled
-     * @expectedException \Magento\Framework\Exception\ValidatorException
+     *
      * @throws FileSystemException
      * @throws \ReflectionException
      */
     public function testProcessCustomerInvalidValue()
     {
+        $this->expectException(
+            \Magento\Framework\Exception\ValidatorException::class
+        );
+
         $this->mediaDirectory->delete('customer');
         $this->mediaDirectory->create($this->mediaDirectory->getRelativePath('customer/tmp/'));
         $tmpFilePath = $this->mediaDirectory->getAbsolutePath('customer/tmp/' . $this->fileName);

From 7173fa4358fbf72aafb8d8b20a54b7aca14b7911 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Wed, 13 May 2020 15:01:39 +0300
Subject: [PATCH 137/307] MC-34231: 2.4.0-develop-pr33 PR stabilization

---
 .../Test/Unit/Model/Template/FilterTest.php   |  2 +-
 .../Unit/Model/Metadata/Form/ImageTest.php    | 20 ++++++
 .../Test/Unit/Model/Template/FilterTest.php   |  2 +-
 .../Block/Adminhtml/Queue/PreviewTest.php     | 71 +++++++++++--------
 .../Image/Test/Unit/Adapter/Gd2Test.php       |  3 +-
 .../Test/Unit/Adapter/ImageMagickTest.php     |  3 +-
 6 files changed, 68 insertions(+), 33 deletions(-)

diff --git a/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
index 76b5e6624225b..96aec148fe50b 100644
--- a/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
+++ b/app/code/Magento/Cms/Test/Unit/Model/Template/FilterTest.php
@@ -119,10 +119,10 @@ public function testMediaDirectiveRelativePath()
      * Test using media directive with a URL path including schema.
      *
      * @covers \Magento\Cms\Model\Template\Filter::mediaDirective
-     * @expectedException \InvalidArgumentException
      */
     public function testMediaDirectiveURL()
     {
+        $this->expectException(\InvalidArgumentException::class);
         $baseMediaDir = 'pub/media';
         $construction = [
             '{{media url="http://wysiwyg/images/image.jpg"}}',
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
index 75a5b017a7505..2989e3268e7a0 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Metadata/Form/ImageTest.php
@@ -239,6 +239,11 @@ public function testValidate()
             ->with(FileProcessor::TMP_DIR . '/' . $value['name'])
             ->willReturn(true);
 
+        $this->ioFileSystemMock->expects($this->once())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn(['extension' => 'gif']);
+
         $model = $this->initialize([
             'value' => $value,
             'isAjax' => false,
@@ -284,6 +289,11 @@ public function testValidateMaxFileSize()
             ->with(FileProcessor::TMP_DIR . '/' . $value['name'])
             ->willReturn(true);
 
+        $this->ioFileSystemMock->expects($this->once())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn(['extension' => 'gif']);
+
         $model = $this->initialize([
             'value' => $value,
             'isAjax' => false,
@@ -328,6 +338,11 @@ public function testValidateMaxImageWidth()
             ->with(FileProcessor::TMP_DIR . '/' . $value['name'])
             ->willReturn(true);
 
+        $this->ioFileSystemMock->expects($this->once())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn(['extension' => 'gif']);
+
         $model = $this->initialize([
             'value' => $value,
             'isAjax' => false,
@@ -372,6 +387,11 @@ public function testValidateMaxImageHeight()
             ->with(FileProcessor::TMP_DIR . '/' . $value['name'])
             ->willReturn(true);
 
+        $this->ioFileSystemMock->expects($this->once())
+            ->method('getPathInfo')
+            ->with($value['name'])
+            ->willReturn(['extension' => 'gif']);
+
         $model = $this->initialize([
             'value' => $value,
             'isAjax' => false,
diff --git a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php
index 81262a9071f6c..17ee299140464 100644
--- a/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php
+++ b/app/code/Magento/Email/Test/Unit/Model/Template/FilterTest.php
@@ -475,11 +475,11 @@ public function testProtocolDirectiveWithValidSchema()
     }
 
     /**
-     * @expectedException \Magento\Framework\Exception\MailException
      * @throws NoSuchEntityException
      */
     public function testProtocolDirectiveWithInvalidSchema()
     {
+        $this->expectException(\Magento\Framework\Exception\MailException::class);
         $model = $this->getModel();
         $storeMock = $this->createMock(\Magento\Store\Model\Store::class);
         $storeMock->expects($this->once())->method('isCurrentlySecure')->willReturn(true);
diff --git a/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php b/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php
index d64410c210837..d3b6495df680f 100644
--- a/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php
+++ b/app/code/Magento/Newsletter/Test/Unit/Block/Adminhtml/Queue/PreviewTest.php
@@ -100,16 +100,23 @@ protected function setUp(): void
             ->willReturn($backendSession);
 
         $templateFactory = $this->createPartialMock(TemplateFactory::class, ['create']);
-        $this->templateMock = $this->createPartialMock(
-            Template::class,
-            [
-                'isPlain',
-                'setId',
-                'setTemplateType',
-                'setTemplateText',
-                'setTemplateStyles',
-            ]
-        );
+        $this->templateMock = $this->getMockBuilder(Template::class)
+            ->disableOriginalConstructor()
+            ->setMethods(
+                [
+                    'isPlain',
+                    'setId',
+                ]
+            )
+            ->addMethods(
+                [
+                    'setTemplateType',
+                    'setTemplateText',
+                    'setTemplateStyles',
+                ]
+            )
+            ->getMock();
+
         $templateFactory->expects($this->once())
             ->method('create')
             ->willReturn($this->templateMock);
@@ -121,16 +128,22 @@ protected function setUp(): void
             ->willReturn($this->subscriberMock);
 
         $queueFactory = $this->createPartialMock(QueueFactory::class, ['create']);
-        $this->queueMock = $this->createPartialMock(
-            Queue::class,
-            [
-                'load',
-                'getTemplateId',
-                'getNewsletterType',
-                'getNewsletterText',
-                'getNewsletterStyles',
-            ]
-        );
+        $this->queueMock = $this->getMockBuilder(Queue::class)
+            ->disableOriginalConstructor()
+            ->setMethods(
+                [
+                    'load',
+                ]
+            )
+            ->addMethods(
+                [
+                    'getTemplateId',
+                    'getNewsletterType',
+                    'getNewsletterText',
+                    'getNewsletterStyles',
+                ]
+            )
+            ->getMock();
         $queueFactory->expects($this->any())
             ->method('create')
             ->willReturn($this->queueMock);
@@ -148,7 +161,7 @@ protected function setUp(): void
                 'context' => $context,
                 'templateFactory' => $templateFactory,
                 'subscriberFactory' => $subscriberFactory,
-                'queueFactory' => $queueFactory
+                'queueFactory' => $queueFactory,
             ]
         );
     }
@@ -178,17 +191,17 @@ public function testToHtmlWithId()
         );
         $this->queueMock->expects($this->once())
             ->method('load')->willReturnSelf();
-        $this->queue->expects($this->once())->method('getTemplateId')->willReturn($templateId);
-        $this->queue->expects($this->once())->method('getNewsletterType')->willReturn($newsletterType);
-        $this->queue->expects($this->once())->method('getNewsletterText')->willReturn($newsletterText);
-        $this->queue->expects($this->once())->method('getNewsletterStyles')->willReturn($newsletterStyle);
+        $this->queueMock->expects($this->once())->method('getTemplateId')->willReturn($templateId);
+        $this->queueMock->expects($this->once())->method('getNewsletterType')->willReturn($newsletterType);
+        $this->queueMock->expects($this->once())->method('getNewsletterText')->willReturn($newsletterText);
+        $this->queueMock->expects($this->once())->method('getNewsletterStyles')->willReturn($newsletterStyle);
         $this->templateMock->expects($this->any())
             ->method('isPlain')
             ->willReturn(true);
-        $this->template->expects($this->once())->method('setId')->willReturn($templateId);
-        $this->template->expects($this->once())->method('setTemplateType')->willReturn($newsletterType);
-        $this->template->expects($this->once())->method('setTemplateText')->willReturn($newsletterText);
-        $this->template->expects($this->once())->method('setTemplateStyles')->willReturn($newsletterStyle);
+        $this->templateMock->expects($this->once())->method('setId')->willReturn($templateId);
+        $this->templateMock->expects($this->once())->method('setTemplateType')->willReturn($newsletterType);
+        $this->templateMock->expects($this->once())->method('setTemplateText')->willReturn($newsletterText);
+        $this->templateMock->expects($this->once())->method('setTemplateStyles')->willReturn($newsletterStyle);
         /** @var Store $store */
         $this->storeManagerMock->expects($this->once())
             ->method('getDefaultStoreView')
diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
index a1e6e374afd56..2383f15dbf3ee 100644
--- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
+++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/Gd2Test.php
@@ -156,10 +156,11 @@ public function testOpenDifferentTypes()
     }
 
     /**
-     * @expectedException \InvalidArgumentException
+     * Check case with invalid URL
      */
     public function testOpenInvalidURL()
     {
+        $this->expectException(\InvalidArgumentException::class);
         $this->adapter->open('bar://foo.bar');
     }
 }
diff --git a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php
index 9f50fd5b7445d..c8c1faf23c7dc 100644
--- a/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php
+++ b/lib/internal/Magento/Framework/Image/Test/Unit/Adapter/ImageMagickTest.php
@@ -101,10 +101,11 @@ public function testSaveWithException()
     }
 
     /**
-     * @expectedException \InvalidArgumentException
+     * Check case with invalid URL
      */
     public function testOpenInvalidUrl()
     {
+        $this->expectException(\InvalidArgumentException::class);
         $this->imageMagic->open('bar://foo.bar');
     }
 }

From 767c882a187567d09a08e854ca202d0ff1dff8c5 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Wed, 13 May 2020 16:23:33 +0300
Subject: [PATCH 138/307] MC-29420: Remove event handlers from CE

---
 .../frontend/templates/product/image_with_borders.phtml   | 7 +++----
 .../Magento/Reports/view/adminhtml/templates/grid.phtml   | 8 +++++---
 .../adminhtml/templates/order/create/sidebar/items.phtml  | 6 +++---
 .../frontend/templates/product/layered/renderer.phtml     | 4 ++--
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index dce1a51a57c63..25c74541014ef 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -9,8 +9,7 @@
 /** @var $escaper \Magento\Framework\Escaper */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-
-<span class="product-image-container">
+<span class="product-image-container" id="product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
     <span class="product-image-wrapper">
         <img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>"
             <?php foreach ($block->getCustomAttributes() as $name => $value): ?>
@@ -24,9 +23,9 @@
 </span>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     'width:' . (int)$block->getWidth() . 'px;',
-    'span.product-image-container'
+    '#product-image-container-' . $block->getProductId()
 ) ?>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     'padding-bottom: '. ($block->getRatio() * 100) . '%;',
-    'span.product-image-wrapper'
+    '#product-image-container-' . $block->getProductId() . ' span.product-image-wrapper'
 ) ?>
diff --git a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
index f615c705b356d..4f6e3c4a9a02b 100644
--- a/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
+++ b/app/code/Magento/Reports/view/adminhtml/templates/grid.phtml
@@ -104,7 +104,10 @@ script;
         </div>
     </div>
     <?php if ($block->canDisplayContainer()): ?>
-        <?php $useAjax = $block->getUseAjax() ? 'true' : 'false';
+        <?php $useAjax = '';
+        if ($block->getUseAjax()):
+            $useAjax = $block->escapeJs($block->getUseAjax());
+        endif;
         $scriptString = <<<script
 
             require([
@@ -119,8 +122,7 @@ script;
                  '{$block->escapeJs($block->getGridUrl())}', '{$block->escapeJs($block->getVarNamePage())}',
                  '{$block->escapeJs($block->getVarNameSort())}', '{$block->escapeJs($block->getVarNameDir())}',
                  '{$block->escapeJs($block->getVarNameFilter())}');
-                {$block->escapeJs($block->getJsObjectName())}.useAjax =
-                 '{$useAjax}';
+                {$block->escapeJs($block->getJsObjectName())}.useAjax = '{$useAjax}';
 
 script;
         ?>
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
index 5af76eef829b1..dd5a2e4771a7e 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/sidebar/items.phtml
@@ -59,7 +59,7 @@
 
             <tbody>
                 <?php foreach ($block->getItems() as $_item): ?>
-                    <tr>
+                    <tr id="product-id-<?= (int) $block->getProductId($_item) ?>">
                         <td class="col-item"><?= $block->escapeHtml($_item->getName()) ?></td>
 
                         <?php if ($block->canDisplayItemQty()): ?>
@@ -108,7 +108,7 @@
                                         "order.sidebarConfigureProduct('sidebar_wishlist', " .
                                         (int) $block->getProductId($_item) . ", " . (int) $block->getItemId($_item) .
                                         ");event.preventDefault();",
-                                        'a.icon.icon-configure'
+                                        'tr#product-id-' . (int) $block->getProductId($_item) .' a.icon.icon-configure'
                                     ) ?>
                                 <?php elseif ($block->isConfigurationRequired($_item->getTypeId())): ?>
                                     <a href="#"
@@ -120,7 +120,7 @@
                                         'onclick',
                                         "order.sidebarConfigureProduct('sidebar', " .
                                         (int) $block->getProductId($_item) . ");event.preventDefault();",
-                                        'a.icon.icon-configure'
+                                        'tr#product-id-' . (int) $block->getProductId($_item) . ' a.icon.icon-configure'
                                     ) ?>
                                 <?php else: ?>
                                     <input id="sidebar-<?= $block->escapeHtmlAttr($block->getSidebarStorageAction())
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index 971dddfd40e68..d8353553dcd81 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -55,7 +55,7 @@
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                                 "background: url(" . /*  @noEscape */ $escapedUrl .
                                 ") no-repeat center; background-size: initial;",
-                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                                'div[data-option-id="' . $block->escapeHtmlAttr($option) . '"]'
                             ) ?>
                             <?php break;
                         case '1':
@@ -74,7 +74,7 @@
                                 "background: " . $block->escapeHtmlAttr(
                                     $swatchData['swatches'][$option]['value']
                                 ) . " no-repeat center; background-size: initial;",
-                                "div[data-option-id='" . $block->escapeHtmlAttr($option) . "']"
+                                'div[data-option-id="' . $block->escapeHtmlAttr($option) . '"]'
                             ) ?>
                             <?php break;
                         case '0':

From 3be360f76239c0f9295f6794a1d8d6cdbb13b340 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Wed, 13 May 2020 17:50:59 +0300
Subject: [PATCH 139/307] MC-29420: Remove event handlers from CE

---
 .../frontend/templates/product/layered/renderer.phtml     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index d8353553dcd81..2f113230e28cf 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -53,8 +53,8 @@
                                  data-option-tooltip-value="">
                             </div>
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                "background: url(" . /*  @noEscape */ $escapedUrl .
-                                ") no-repeat center; background-size: initial;",
+                                'background: url(' . /*  @noEscape */ $escapedUrl .
+                                ') no-repeat center; background-size: initial;',
                                 'div[data-option-id="' . $block->escapeHtmlAttr($option) . '"]'
                             ) ?>
                             <?php break;
@@ -71,9 +71,9 @@
                                  ) ?>">
                             </div>
                             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                "background: " . $block->escapeHtmlAttr(
+                                'background: ' . $block->escapeHtml(
                                     $swatchData['swatches'][$option]['value']
-                                ) . " no-repeat center; background-size: initial;",
+                                ) . ' no-repeat center; background-size: initial;',
                                 'div[data-option-id="' . $block->escapeHtmlAttr($option) . '"]'
                             ) ?>
                             <?php break;

From 52a3eb1e6b8ec9388df841068ed0602cfc8e26bf Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Wed, 13 May 2020 20:21:45 +0300
Subject: [PATCH 140/307] MC-34231: 2.4.0-develop-pr33 PR stabilization

---
 .../testsuite/Magento/Customer/Model/AttributeTest.php     | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
index dde20a8049437..fdf92a5b3137c 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/AttributeTest.php
@@ -41,7 +41,7 @@ class AttributeTest extends \PHPUnit\Framework\TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp() : void
     {
         $this->objectManager = Bootstrap::getObjectManager();
         $this->model = $this->objectManager->get(Attribute::class);
@@ -69,13 +69,12 @@ public function testCRUD(): void
     /**
      * @magentoDataFixture Magento/Customer/_files/attribute_user_defined_customer.php
      *
-     * @expectedException \Magento\Framework\Exception\LocalizedException
-     * @expectedExceptionMessage Do not change entity type.
-     *
      * @return void
      */
     public function testAttributeSaveWithChangedEntityType(): void
     {
+        $this->expectException(\Magento\Framework\Exception\LocalizedException::class);
+        $this->expectExceptionMessage('Do not change entity type.');
         $attribute = $this->attributeRepository->get($this->customerEntityType, 'user_attribute');
         $attribute->setEntityTypeId(5);
         $attribute->save();

From 45026811aeb4cf6dcdc47b6958f7c2345c5710ba Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Wed, 13 May 2020 20:34:22 +0300
Subject: [PATCH 141/307] MC-34231: 2.4.0-develop-pr33 PR stabilization

---
 .../Magento/Customer/Model/Metadata/Form/ImageTest.php     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
index 5d00feec17407..ef05e60bad251 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
@@ -55,7 +55,7 @@ class ImageTest extends \PHPUnit\Framework\TestCase
     /**
      * @inheritDoc
      */
-    public function setUp()
+    public function setUp() : void
     {
         $this->objectManager = Bootstrap::getObjectManager();
         $this->filesystem = $this->objectManager->get(Filesystem::class);
@@ -157,12 +157,12 @@ public function testProcessCustomerValue()
      * Test for processCustomerValue method with invalid value
      *
      * @magentoAppIsolation enabled
-     * @expectedException \Magento\Framework\Exception\ValidatorException
      * @throws FileSystemException
      * @throws \ReflectionException
      */
     public function testProcessCustomerInvalidValue()
     {
+        $this->expectException(\Magento\Framework\Exception\ValidatorException::class);
         $this->mediaDirectory->delete('customer');
         $this->mediaDirectory->create($this->mediaDirectory->getRelativePath('customer/tmp/'));
         $tmpFilePath = $this->mediaDirectory->getAbsolutePath('customer/tmp/' . $this->fileName);
@@ -197,9 +197,10 @@ public function testProcessCustomerInvalidValue()
 
     /**
      * @inheritdoc
+     *
      * @throws FileSystemException
      */
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass() : void
     {
         parent::tearDownAfterClass();
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(

From 64247aa68aa99e3327de81ec0efe5a335151cd92 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 13 May 2020 14:23:38 -0500
Subject: [PATCH 142/307] MC-33823: Merge CE, EE and B2B changes

---
 nginx.conf.sample | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/nginx.conf.sample b/nginx.conf.sample
index 9219400f6aacd..ca24015481387 100644
--- a/nginx.conf.sample
+++ b/nginx.conf.sample
@@ -3,13 +3,13 @@
 #    # use tcp connection
 #    # server  127.0.0.1:9000;
 #    # or socket
-#    server   unix:/var/run/php/php7.0-fpm.sock;
+#    server   unix:/var/run/php/php7.4-fpm.sock;
 # }
 # server {
 #    listen 80;
 #    server_name mage.dev;
 #    set $MAGE_ROOT /var/www/magento2;
-#    set $MAGE_DEBUG_SHOW_ARGS 1;
+#    set $MAGE_DEBUG_SHOW_ARGS 0;
 #    include /vagrant/magento2/nginx.conf.sample;
 # }
 #
@@ -177,6 +177,7 @@ location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)
     try_files $uri =404;
     fastcgi_pass   fastcgi_backend;
     fastcgi_buffers 1024 4k;
+    fastcgi_buffer_size 32k;
 
     fastcgi_param  PHP_FLAG  "session.auto_start=off \n suhosin.session.cryptua=off";
     fastcgi_param  PHP_VALUE "memory_limit=756M \n max_execution_time=18000";

From 3d41baed777550632d7e0fcce7d659a43ce02b74 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 13 May 2020 19:44:16 -0500
Subject: [PATCH 143/307] MC-33823: Merge CE, EE and B2B changes

---
 .../view/adminhtml/templates/widget/grid/extended.phtml   | 2 +-
 .../Adminhtml/Catalog/Product/Edit/Tab/Attributes.php     | 4 +---
 .../Mftf/Section/StorefrontProductInfoMainSection.xml     | 4 ++--
 .../System/Config/Form/Field/Select/AllowspecificTest.php | 2 +-
 app/code/Magento/Csp/Model/BlockCache.php                 | 1 +
 app/code/Magento/Email/composer.json                      | 3 ++-
 .../Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php  | 1 +
 app/code/Magento/Integration/composer.json                | 3 ++-
 app/code/Magento/Newsletter/composer.json                 | 3 ++-
 .../Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php   | 2 +-
 app/code/Magento/Payment/composer.json                    | 3 ++-
 .../Block/Adminhtml/System/Config/Field/CountryTest.php   | 2 +-
 app/code/Magento/Tax/composer.json                        | 3 ++-
 app/code/Magento/TaxImportExport/composer.json            | 3 ++-
 app/code/Magento/User/composer.json                       | 3 ++-
 app/code/Magento/Widget/composer.json                     | 3 ++-
 .../testsuite/Magento/Csp/CspAwareActionTest.php          | 2 +-
 dev/tests/integration/testsuite/Magento/Csp/CspTest.php   | 4 ----
 .../integration/testsuite/Magento/Csp/CspUtilTest.php     | 8 ++++----
 19 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 1a4f038c2abf3..9cf4e18b8af1f 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -116,7 +116,7 @@ $numColumns = count($block->getColumns());
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                 /* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();',
-                                '. admin__data-grid-pager button.action-previous'
+                                '.admin__data-grid-pager button.action-previous'
                             ) ?>
                         <?php else: ?>
                             <button type="button" class="action-previous disabled">
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php
index f2f62c0914b4a..cc28fab403fa4 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php
@@ -127,9 +127,7 @@ function changeTaxClassId() {
                 });
                 ";
 
-            $tax->setAfterElementHtml(
-                /* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false)
-            );
+            $tax->setAfterElementHtml($this->secureRenderer->renderTag('script', [], $scriptString, false));
         }
 
         $weight = $this->getForm()->getElement('weight');
diff --git a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml
index 29a1b72947c06..3f3d9faf3f17d 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml
@@ -9,7 +9,7 @@
 <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
     <section name="StorefrontProductInfoMainSection">
-        <element name="AddToCart" type="button" selector="#product-addtocart-button"/>
-        <element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
+        <element name="AddToCart" type="button" selector="button#product-addtocart-button"/>
+        <element name="updateCart" type="button" selector="button#product-updatecart-button" timeout="30"/>
     </section>
 </sections>
diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
index b70876000aa3d..129dfc902963f 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php
@@ -92,7 +92,7 @@ public function testGetAfterElementHtml()
 
         $this->assertStringEndsWith('</script>' . $afterHtmlCode, $actual);
         $this->assertStringStartsWith('<script >', trim($actual));
-        $this->assertContains('test_prefix_spec_element_test_suffix', $actual);
+        $this->assertStringContainsString('test_prefix_spec_element_test_suffix', $actual);
     }
 
     /**
diff --git a/app/code/Magento/Csp/Model/BlockCache.php b/app/code/Magento/Csp/Model/BlockCache.php
index 59cb62584f6bc..f0469c3251379 100644
--- a/app/code/Magento/Csp/Model/BlockCache.php
+++ b/app/code/Magento/Csp/Model/BlockCache.php
@@ -70,6 +70,7 @@ public function load($identifier)
             }
         } catch (\Throwable $exception) {
             //Most likely block HTML was cached without policy data.
+            $data = null;
         }
         if ($data) {
             foreach ($data['policies'] as $policyData) {
diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json
index a85c6177c8a48..334bbcf9d4617 100644
--- a/app/code/Magento/Email/composer.json
+++ b/app/code/Magento/Email/composer.json
@@ -14,7 +14,8 @@
         "magento/module-theme": "*",
         "magento/module-require-js": "*",
         "magento/module-media-storage": "*",
-        "magento/module-variable": "*"
+        "magento/module-variable": "*",
+        "magento/module-ui": "*"
     },
     "suggest": {
         "magento/module-theme": "*"
diff --git a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
index 06bb0ee33e02e..3813682eed004 100644
--- a/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
+++ b/app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php
@@ -44,6 +44,7 @@ protected function setUp(): void
     {
         $this->escaperMock = $this->createMock(Escaper::class);
         $this->escaperMock->expects($this->any())->method('escapeHtml')->willReturnArgument(0);
+        $this->escaperMock->expects($this->any())->method('escapeHtmlAttr')->willReturnArgument(0);
         $this->contextMock = $this->createPartialMock(Context::class, ['getEscaper']);
         $this->contextMock->expects($this->any())->method('getEscaper')->willReturn($this->escaperMock);
         $randomMock = $this->createMock(Random::class);
diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json
index 0b9752c743213..c85e84284b43f 100644
--- a/app/code/Magento/Integration/composer.json
+++ b/app/code/Magento/Integration/composer.json
@@ -12,7 +12,8 @@
         "magento/module-customer": "*",
         "magento/module-security": "*",
         "magento/module-store": "*",
-        "magento/module-user": "*"
+        "magento/module-user": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json
index cc0d717a1958d..790370c328644 100644
--- a/app/code/Magento/Newsletter/composer.json
+++ b/app/code/Magento/Newsletter/composer.json
@@ -14,7 +14,8 @@
         "magento/module-email": "*",
         "magento/module-require-js": "*",
         "magento/module-store": "*",
-        "magento/module-widget": "*"
+        "magento/module-widget": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
diff --git a/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php b/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
index 096b54f0a7425..062e428ef68b1 100644
--- a/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
+++ b/app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php
@@ -91,7 +91,7 @@ public function testGetElementHtml()
             '<input id="time_condition" type="hidden" name="test_name" value="',
             $testString
         );
-        $this->assertStringEndsWith(
+        $this->assertStringContainsString(
             '<input id="test_name_prefixtest_html_idtest_name_suffix" ' .
             'name="test_name"  data-ui-id="form-element-test_name" value="" type="file"',
             $testString
diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json
index 6ee0baec247f3..72246c5698f80 100644
--- a/app/code/Magento/Payment/composer.json
+++ b/app/code/Magento/Payment/composer.json
@@ -12,7 +12,8 @@
         "magento/module-directory": "*",
         "magento/module-quote": "*",
         "magento/module-sales": "*",
-        "magento/module-store": "*"
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
index 4fe4c26bb38d9..e8c46080e862e 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
@@ -130,7 +130,7 @@ public function testRender($requestCountry, $requestDefaultCountry, $canUseDefau
         }
         $this->_jsHelper->expects($this->once())
             ->method('getScript')
-            ->with(new LogicalAnd($constraints));
+            ->with(self::logicalAnd($constraints));
         $this->_url->expects($this->once())
             ->method('getUrl')
             ->with(
diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json
index 65c668553cd14..2fe0597c85a63 100644
--- a/app/code/Magento/Tax/composer.json
+++ b/app/code/Magento/Tax/composer.json
@@ -19,7 +19,8 @@
         "magento/module-reports": "*",
         "magento/module-sales": "*",
         "magento/module-shipping": "*",
-        "magento/module-store": "*"
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "suggest": {
         "magento/module-tax-sample-data": "*"
diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json
index ee24deb9d3246..01c069b4299c1 100644
--- a/app/code/Magento/TaxImportExport/composer.json
+++ b/app/code/Magento/TaxImportExport/composer.json
@@ -10,7 +10,8 @@
         "magento/module-backend": "*",
         "magento/module-directory": "*",
         "magento/module-store": "*",
-        "magento/module-tax": "*"
+        "magento/module-tax": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json
index 8ac1677bdfe81..6ba4be749cc7c 100644
--- a/app/code/Magento/User/composer.json
+++ b/app/code/Magento/User/composer.json
@@ -12,7 +12,8 @@
         "magento/module-email": "*",
         "magento/module-integration": "*",
         "magento/module-security": "*",
-        "magento/module-store": "*"
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json
index 3f0f7fb212d4a..2cf8429095ce7 100644
--- a/app/code/Magento/Widget/composer.json
+++ b/app/code/Magento/Widget/composer.json
@@ -12,7 +12,8 @@
         "magento/module-cms": "*",
         "magento/module-store": "*",
         "magento/module-theme": "*",
-        "magento/module-variable": "*"
+        "magento/module-variable": "*",
+        "magento/module-ui": "*"
     },
     "suggest": {
         "magento/module-widget-sample-data": "*"
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
index 7e1e2c236eed9..883851c77a46f 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php
@@ -34,7 +34,7 @@ public function testAwareAction(): void
         $header = $this->getResponse()->getHeader('Content-Security-Policy');
         $this->assertNotEmpty($header);
 
-        $this->assertContains(
+        $this->assertStringContainsString(
             'script-src https://controller.magento.com'
                 .' \'self\' \'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'',
             $header->getFieldValue()
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspTest.php
index eeb96d8943ced..8905c953a00e3 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspTest.php
@@ -23,10 +23,6 @@ class CspTest extends AbstractController
      */
     private function searchInResponse($response, string $search): bool
     {
-        if (mb_stripos(mb_strtolower($response->getBody()), mb_strtolower($search)) !== false) {
-            return true;
-        }
-
         foreach ($response->getHeaders() as $header) {
             if (mb_stripos(mb_strtolower($header->toString()), mb_strtolower($search)) !== false) {
                 return true;
diff --git a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
index 6af97bf83b4d0..93d019f572e63 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php
@@ -29,14 +29,14 @@ public function testPhtmlHelper(): void
         $this->dispatch('csputil/csp/helper');
         $content = $this->getResponse()->getContent();
 
-        $this->assertContains(
+        $this->assertStringContainsString(
             '<script src="http://my.magento.com/static/script.js"/>',
             $content
         );
-        $this->assertContains("<script>\n    let myVar = 1;\n</script>", $content);
+        $this->assertStringContainsString("<script>\n    let myVar = 1;\n</script>", $content);
         $header = $this->getResponse()->getHeader('Content-Security-Policy');
         $this->assertNotEmpty($header);
-        $this->assertContains('http://my.magento.com', $header->getFieldValue());
-        $this->assertContains('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $header->getFieldValue());
+        $this->assertStringContainsString('http://my.magento.com', $header->getFieldValue());
+        $this->assertStringContainsString('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $header->getFieldValue());
     }
 }

From 3e149f6c2f8956ca69a2e5748c0afc7c650de359 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 14 May 2020 12:51:38 +0300
Subject: [PATCH 144/307] MC-33922: Improve email templates

---
 .../VariableResolver/LegacyResolver.php       | 22 ++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php b/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
index a46dc64ed0b5b..25bff73dacec2 100644
--- a/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
+++ b/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
@@ -160,12 +160,32 @@ private function handleObjectMethod(Template $filter, array $templateVariables,
     {
         $object = $stackArgs[$i - 1]['variable'];
         $method = $stackArgs[$i]['name'];
-        if (method_exists($object, $method) && substr($method, 0, 3) !== 'set') {
+        if ($this->isMethodCallable($object, $method)) {
             $args = $this->getStackArgs($stackArgs[$i]['args'], $filter, $templateVariables);
             $stackArgs[$i]['variable'] = call_user_func_array([$object, $method], $args);
         }
     }
 
+    /**
+     * Check if object method can be called.
+     *
+     * @param mixed $object
+     * @param string $method
+     * @return bool
+     */
+    private function isMethodCallable($object, string $method): bool
+    {
+        if (
+            method_exists($object, $method)
+            && substr($method, 0, 3) !== 'set'
+            && $method !== '___callParent'
+        ) {
+            return true;
+        }
+
+        return false;
+    }
+
     /**
      * Return if the given index should be processed for data access
      *

From cda18d35cdfa606dfd765db83482c211d39e833e Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 14 May 2020 14:32:35 +0300
Subject: [PATCH 145/307] MC-33922: Improve email templates

---
 .../Framework/Filter/VariableResolver/LegacyResolver.php       | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php b/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
index 25bff73dacec2..2cc0657e1bdb5 100644
--- a/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
+++ b/lib/internal/Magento/Framework/Filter/VariableResolver/LegacyResolver.php
@@ -175,8 +175,7 @@ private function handleObjectMethod(Template $filter, array $templateVariables,
      */
     private function isMethodCallable($object, string $method): bool
     {
-        if (
-            method_exists($object, $method)
+        if (method_exists($object, $method)
             && substr($method, 0, 3) !== 'set'
             && $method !== '___callParent'
         ) {

From 499d43d3b52b896aa2840a9872aface1ad74bb0a Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 14 May 2020 12:16:05 -0500
Subject: [PATCH 146/307] MC-33823: Merge CE, EE and B2B changes

---
 .../catalog/product/composite/configure.phtml | 33 ++++++++-------
 .../Adminhtml/System/Config/Field/Country.php |  9 ++--
 .../System/Config/Field/CountryTest.php       | 42 ++++++++++++++-----
 .../layout/customer_index_wishlist.xml        |  1 +
 4 files changed, 55 insertions(+), 30 deletions(-)

diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index 1c27fbb31c620..af677202a6250 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -11,33 +11,34 @@
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onload',
         "window.productConfigure && productConfigure.onLoadIFrame()",
-        '#product_composite_configure_iframe'
+        'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
     ) ?>
     <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
         "width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px",
-        '#product_composite_configure_iframe'
+        'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
     ) ?>
 
     <form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data"
-          target="product_composite_configure_iframe">
+          target="product_composite_configure_iframe" class="product_composite_configure_form">
         <div class="entry-edit">
-            <div id="product_composite_configure_messages">
+            <div id="product_composite_configure_messages" class="product_composite_configure_messages">
                 <div class="messages"><div class="message message-error error"><div></div></div></div>
             </div>
             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                 'display:none;',
-                '#product_composite_configure_messages'
+                '.product_composite_configure_messages:last-of-type'
             ) ?>
             <div id="product_composite_configure_form_fields" class="content product-composite-configure-inner"></div>
-            <div id="product_composite_configure_form_additional"></div>
+            <div id="product_composite_configure_form_additional" class="product_composite_configure_form_additional">
+            </div>
             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                 'display:none;',
-                '#product_composite_configure_form_additional'
+                '.product_composite_configure_form_additional:last-of-type'
             ) ?>
-            <div id="product_composite_configure_form_confirmed"></div>
+            <div id="product_composite_configure_form_confirmed" class="product_composite_configure_form_confirmed"></div>
             <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                 'display:none;',
-                '#product_composite_configure_form_confirmed'
+                '.product_composite_configure_form_confirmed:last-of-type'
             ) ?>
         </div>
         <input type="hidden" name="as_js_varname" value="iFrameResponse" />
@@ -46,13 +47,13 @@
     <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
         'onsubmit',
         "productConfigure.onConfirmBtn();event.preventDefault()",
-        '#product_composite_configure_form'
+        '.product_composite_configure_form:last-of-type'
     ) ?>
 
-    <div id="product_composite_configure_confirmed"></div>
+    <div id="product_composite_configure_confirmed" class="product_composite_configure_confirmed"></div>
     <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
         'display:none;',
-        '#product_composite_configure_confirmed'
+        '.product_composite_configure_confirmed:last-of-type'
     ) ?>
 
     <?php $scriptString = <<<script
@@ -60,9 +61,9 @@
             "jquery",
             "mage/mage"
         ], function(jQuery){
-
-            jQuery('#product_composite_configure_form').mage('form').mage('validation');
-
+            jQuery('.product_composite_configure_form').each(function () {
+                Jquery(this).mage('form').mage('validation');
+            });
         });
 script;
     ?>
@@ -70,6 +71,6 @@ script;
 </div>
 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
     'display:none',
-    '#product_composite_configure'
+    '.product-configure-popup:last-of-type'
 ) ?>
 
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Country.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Country.php
index 340c34fc2635c..6f29e607df58d 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Country.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Country.php
@@ -9,6 +9,7 @@
  */
 namespace Magento\Paypal\Block\Adminhtml\System\Config\Field;
 
+use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Paypal\Model\Config\StructurePlugin;
 
 class Country extends \Magento\Config\Block\System\Config\Form\Field
@@ -51,15 +52,17 @@ class Country extends \Magento\Config\Block\System\Config\Form\Field
      * @param \Magento\Framework\View\Helper\Js $jsHelper
      * @param \Magento\Directory\Helper\Data $directoryHelper
      * @param array $data
+     * @param SecureHtmlRenderer|null $secureHtmlRenderer
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Backend\Model\Url $url,
         \Magento\Framework\View\Helper\Js $jsHelper,
         \Magento\Directory\Helper\Data $directoryHelper,
-        array $data = []
+        array $data = [],
+        ?SecureHtmlRenderer $secureHtmlRenderer = null
     ) {
-        parent::__construct($context, $data);
+        parent::__construct($context, $data, $secureHtmlRenderer);
         $this->_url = $url;
         $this->_jsHelper = $jsHelper;
         $this->directoryHelper = $directoryHelper;
@@ -132,7 +135,7 @@ protected function _getElementHtml(\Magento\Framework\Data\Form\Element\Abstract
         }
 
         return parent::_getElementHtml($element) . $this->_jsHelper->getScript(
-            'require([\'prototype\'], function(){document.observe("dom:loaded", function() {' . $jsString . '});});'
+            'require([\'prototype\'], function() { document.observe("dom:loaded", function() {' . $jsString . '}); });'
         );
     }
 }
diff --git a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
index e8c46080e862e..c06bb6d847225 100644
--- a/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php
@@ -15,10 +15,10 @@
 use Magento\Framework\View\Helper\SecureHtmlRenderer;
 use Magento\Paypal\Block\Adminhtml\System\Config\Field\Country;
 use Magento\Paypal\Model\Config\StructurePlugin;
-use PHPUnit\Framework\Constraint\LogicalAnd;
 use PHPUnit\Framework\Constraint\StringContains;
 use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
+use Magento\Directory\Helper\Data as DirectoryHelper;
 
 class CountryTest extends TestCase
 {
@@ -47,6 +47,11 @@ class CountryTest extends TestCase
      */
     protected $_url;
 
+    /**
+     * @var DirectoryHelper
+     */
+    private $helper;
+
     protected function setUp(): void
     {
         $helper = new ObjectManager($this);
@@ -71,6 +76,7 @@ protected function setUp(): void
         $this->_request = $this->getMockForAbstractClass(RequestInterface::class);
         $this->_jsHelper = $this->createMock(Js::class);
         $this->_url = $this->createMock(Url::class);
+        $this->helper = $this->createMock(DirectoryHelper::class);
         $secureRendererMock = $this->createMock(SecureHtmlRenderer::class);
         $secureRendererMock->method('renderEventListenerAsTag')
             ->willReturnCallback(
@@ -90,7 +96,8 @@ function (string $style, string $selector): string {
                 'request' => $this->_request,
                 'jsHelper' => $this->_jsHelper,
                 'url' => $this->_url,
-                'secureRenderer' => $secureRendererMock
+                'directoryHelper' => $this->helper,
+                'secureHtmlRenderer' => $secureRendererMock
             ]
         );
     }
@@ -123,15 +130,7 @@ public function testRender($requestCountry, $requestDefaultCountry, $canUseDefau
                 '$("' . $this->_element->getHtmlId() . '").observe("change", function () {'
             ),
         ];
-        if ($canUseDefault && ($requestCountry == 'US') && $requestDefaultCountry) {
-            $constraints[] = new StringContains(
-                '$("' . $this->_element->getHtmlId() . '_inherit").observe("click", function () {'
-            );
-        }
-        $this->_jsHelper->expects($this->once())
-            ->method('getScript')
-            ->with(self::logicalAnd($constraints));
-        $this->_url->expects($this->once())
+        $this->_url->expects($this->at(0))
             ->method('getUrl')
             ->with(
                 '*/*/*',
@@ -142,6 +141,27 @@ public function testRender($requestCountry, $requestDefaultCountry, $canUseDefau
                     StructurePlugin::REQUEST_PARAM_COUNTRY => '__country__'
                 ]
             );
+        if ($canUseDefault && ($requestCountry == 'US') && $requestDefaultCountry) {
+            $this->helper->method('getDefaultCountry')->willReturn($requestDefaultCountry);
+            $constraints[] = new StringContains(
+                '$("' . $this->_element->getHtmlId() . '_inherit").observe("click", function () {'
+            );
+            $this->_url->expects($this->at(1))
+                ->method('getUrl')
+                ->with(
+                    '*/*/*',
+                    [
+                        'section' => 'section',
+                        'website' => 'website',
+                        'store' => 'store',
+                        StructurePlugin::REQUEST_PARAM_COUNTRY => '__country__',
+                        Country::REQUEST_PARAM_DEFAULT_COUNTRY => '__default__'
+                    ]
+                );
+        }
+        $this->_jsHelper->expects($this->once())
+            ->method('getScript')
+            ->with(self::logicalAnd(...$constraints));
         $this->_model->render($this->_element);
     }
 
diff --git a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
index cc5ef6b3ab554..0ee4233029105 100644
--- a/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
+++ b/app/code/Magento/Wishlist/view/adminhtml/layout/customer_index_wishlist.xml
@@ -112,5 +112,6 @@
                 </arguments>
             </block>
         </block>
+        <block class="Magento\Catalog\Block\Adminhtml\Product\Composite\Configure" template="Magento_Catalog::catalog/product/composite/configure.phtml" name="configure.popup"/>
     </container>
 </layout>

From 212c208bb3d8416ffaeaea950a66a3874f60c9e9 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 14 May 2020 14:56:17 -0500
Subject: [PATCH 147/307] MC-33823: Merge CE, EE and B2B changes

---
 .../templates/catalog/product/composite/configure.phtml       | 2 +-
 .../Magento/Backend/Block/Widget/Button/SplitButtonTest.php   | 2 +-
 .../testsuite/Magento/Backend/Block/Widget/ButtonTest.php     | 2 +-
 .../integration/testsuite/Magento/Cms/Controller/PageTest.php | 2 +-
 .../testsuite/Magento/Csp/Helper/InlineUtilTest.php           | 4 ++--
 .../Magento/Csp/Model/Collector/ControllerCollectorTest.php   | 2 +-
 .../Magento/Framework/View/Helper/SecureHtmlRendererTest.php  | 2 +-
 .../Magento/Framework/View/LayoutTestWithExceptions.php       | 2 +-
 .../testsuite/Magento/Ui/Component/Control/ButtonTest.php     | 2 +-
 .../Magento/Ui/Component/Control/SplitButtonTest.php          | 2 +-
 .../Magento/Framework/TestFramework/Unit/Block/Adminhtml.php  | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index af677202a6250..cc940a87bc051 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -62,7 +62,7 @@
             "mage/mage"
         ], function(jQuery){
             jQuery('.product_composite_configure_form').each(function () {
-                Jquery(this).mage('form').mage('validation');
+                jQuery(this).mage('form').mage('validation');
             });
         });
 script;
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
index d35b0802eb2f1..d8758b68a2995 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
@@ -28,7 +28,7 @@ class SplitButtonTest extends TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $objectManager = Bootstrap::getObjectManager();
         $this->layout = $objectManager->get(LayoutInterface::class);
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
index d0df81e8b2309..2e8ea31ce9369 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
@@ -27,7 +27,7 @@ class ButtonTest extends TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $objectManager = Bootstrap::getObjectManager();
         $this->layout = $objectManager->get(LayoutInterface::class);
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php
index f1cd475d202c1..d58aa4e049b78 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Controller/PageTest.php
@@ -18,7 +18,7 @@ class PageTest extends \Magento\TestFramework\TestCase\AbstractController
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         Bootstrap::getObjectManager()->configure([
             'preferences' => [
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php b/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
index e1b666bc351e6..0f31f0beccda9 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Helper/InlineUtilTest.php
@@ -38,7 +38,7 @@ class InlineUtilTest extends TestCase
     /**
      * @inheritDoc
      */
-    public function setUp()
+    public function setUp(): void
     {
         Bootstrap::getObjectManager()->configure([
             'preferences' => [
@@ -53,7 +53,7 @@ public function setUp()
     /**
      * @inheritDoc
      */
-    protected function tearDown()
+    protected function tearDown(): void
     {
         $this->util = null;
         $this->secureHtmlRenderer = null;
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php
index 87a307933a035..c3a5e58e7f9be 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ControllerCollectorTest.php
@@ -27,7 +27,7 @@ class ControllerCollectorTest extends TestCase
     /**
      * @inheritDoc
      */
-    public function setUp()
+    public function setUp(): void
     {
         $this->collector = Bootstrap::getObjectManager()->create(ControllerCollector::class);
     }
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
index a4ec5f0170e52..d06ced3dc0283 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
@@ -25,7 +25,7 @@ class SecureHtmlRendererTest extends TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $objectManager = Bootstrap::getObjectManager();
         //Clearing the processors list to ensure stable results.
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTestWithExceptions.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTestWithExceptions.php
index 7bb71a3d8b6b3..40f7853535068 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTestWithExceptions.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTestWithExceptions.php
@@ -14,7 +14,7 @@ class LayoutTestWithExceptions extends \PHPUnit\Framework\TestCase
      */
     protected $layout;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $layoutFactory = $objectManager->get(\Magento\Framework\View\LayoutFactory::class);
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
index 988d9a387add3..7c10adf147772 100644
--- a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
@@ -27,7 +27,7 @@ class ButtonTest extends TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $objectManager = Bootstrap::getObjectManager();
         $this->layout = $objectManager->get(LayoutInterface::class);
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
index e4a2d2809cf08..d9c92e12975c0 100644
--- a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
@@ -28,7 +28,7 @@ class SplitButtonTest extends TestCase
     /**
      * @inheritDoc
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $objectManager = Bootstrap::getObjectManager();
         $this->layout = $objectManager->get(LayoutInterface::class);
diff --git a/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php b/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php
index 0ad3916156231..f8bb912ea6c85 100644
--- a/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php
+++ b/lib/internal/Magento/Framework/TestFramework/Unit/Block/Adminhtml.php
@@ -109,7 +109,7 @@ class Adminhtml extends \PHPUnit\Framework\TestCase
 
     /**
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         // These mocks are accessed via context
         $this->_designMock          = $this->_makeMock(\Magento\Framework\View\DesignInterface::class);

From 37982f64734fe4fe6a81c1c40d23e7412bc327a9 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 14 May 2020 17:23:51 -0500
Subject: [PATCH 148/307] MC-33823: Merge CE, EE and B2B changes

---
 .../view/frontend/templates/inline.phtml       |  5 ++---
 .../Section/AdminCartPriceRulesFormSection.xml |  2 +-
 .../Block/Widget/Button/SplitButtonTest.php    | 14 +++++++-------
 .../Backend/Block/Widget/ButtonTest.php        | 14 +++++++-------
 .../Model/Collector/ConfigCollectorTest.php    |  2 +-
 .../Helper/SecureHtmlRendererTemplateTest.php  |  8 ++++----
 .../View/Helper/SecureHtmlRendererTest.php     | 18 +++++++++---------
 .../Ui/Component/Control/ButtonTest.php        | 14 +++++++-------
 .../Ui/Component/Control/SplitButtonTest.php   | 14 +++++++-------
 .../View/Test/Unit/Element/Html/LinkTest.php   |  5 -----
 10 files changed, 45 insertions(+), 51 deletions(-)

diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
index 45dc79aa99a13..b5d5377171413 100644
--- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
+++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
@@ -448,11 +448,10 @@ script;
             </dt>
         </dl>
     </fieldset>
+    <?php $entityId = (int) $block->getEntity()->getId(); ?>
     <script type="text/x-magento-init">
         {
-            "#allow_gift_options_<?= (int) $block->getEntity()->getId() ?>,
-             #allow_gift_options_for_order_<?= (int) $block->getEntity()->getId() ?>,
-              #allow_gift_options_for_items_<?= (int) $block->getEntity()->getId() ?>": {
+            "#allow_gift_options_<?= /* @noEscape */ $entityId ?>, #allow_gift_options_for_order_<?= /* @noEscape */ $entityId ?>, #allow_gift_options_for_items_<?= /* @noEscape */ $entityId ?>": {
                 "giftOptions": {}
             }
         }
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml
index b164cdde33248..1d27039ac4cba 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml
@@ -10,7 +10,7 @@
     <section name="AdminCartPriceRulesFormSection">
         <element name="save" type="button" selector="#save" timeout="30"/>
         <element name="saveAndContinue" type="button" selector="#save_and_continue" timeout="30"/>
-        <element name="delete" type="button" selector="#delete" timeout="30"/>
+        <element name="delete" type="button" selector="button#delete" timeout="30"/>
         <element name="modalAcceptButton" type="button" selector="button.action-accept" timeout="30"/>
 
         <!-- Rule Information (the main form on the page) -->
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
index d8758b68a2995..473caf1d6737e 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Button/SplitButtonTest.php
@@ -79,12 +79,12 @@ public function testToHtml(): void
         );
 
         $html = $block->toHtml();
-        $this->assertContains('<button ', $html);
-        $this->assertContains('<span>A button</span>', $html);
-        $this->assertNotContains('onclick=', $html);
-        $this->assertNotContains('style=', $html);
-        $this->assertRegExp('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
-        $this->assertContains('width', $html);
-        $this->assertContains('100px', $html);
+        $this->assertStringContainsString('<button ', $html);
+        $this->assertStringContainsString('<span>A button</span>', $html);
+        $this->assertStringNotContainsString('onclick=', $html);
+        $this->assertStringNotContainsString('style=', $html);
+        $this->assertMatchesRegularExpression('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
+        $this->assertStringContainsString('width', $html);
+        $this->assertStringContainsString('100px', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
index 2e8ea31ce9369..e48a6bae2ff80 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/ButtonTest.php
@@ -72,12 +72,12 @@ public function testToHtml(): void
         );
 
         $html = $block->toHtml();
-        $this->assertContains('<button ', $html);
-        $this->assertContains('<span>A button</span>', $html);
-        $this->assertNotContains('onclick=', $html);
-        $this->assertNotContains('style=', $html);
-        $this->assertRegExp('/\<script.*?\>.*?' .preg_quote($block->getOnClick()) .'.*?\<\/script\>/ims', $html);
-        $this->assertContains('height', $html);
-        $this->assertContains('200px', $html);
+        $this->assertStringContainsString('<button ', $html);
+        $this->assertStringContainsString('<span>A button</span>', $html);
+        $this->assertStringNotContainsString('onclick=', $html);
+        $this->assertStringNotContainsString('style=', $html);
+        $this->assertMatchesRegularExpression('/\<script.*?\>.*?' .preg_quote($block->getOnClick()) .'.*?\<\/script\>/ims', $html);
+        $this->assertStringContainsString('height', $html);
+        $this->assertStringContainsString('200px', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php
index 46156f0b83907..2d8cbbeedeab9 100644
--- a/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Csp/Model/Collector/ConfigCollectorTest.php
@@ -45,7 +45,7 @@ private function getExpectedPolicies(): array
                 'child-src',
                 false,
                 ['http://magento.com', 'http://devdocs.magento.com'],
-                ['http'],
+                ['http', 'https', 'blob'],
                 true,
                 true,
                 false,
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php
index 154c6832b045d..0d2b85b4ae20d 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTemplateTest.php
@@ -28,19 +28,19 @@ public function testTemplateUsage(): void
         $this->dispatch('securehtml/secure/helper');
         $content = $this->getResponse()->getContent();
 
-        $this->assertContains(
+        $this->assertStringContainsString(
             '<h1 onclick="alert()">Hello there!</h1>',
             $content
         );
-        $this->assertContains(
+        $this->assertStringContainsString(
             '<script src="http://my.magento.com/static/script.js"/>',
             $content
         );
-        $this->assertContains(
+        $this->assertStringContainsString(
             "<script>\n    let myVar = 1;\n</script>",
             $content
         );
-        $this->assertContains(
+        $this->assertStringContainsString(
             '<div>I am just <a> text</div>',
             $content
         );
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
index d06ced3dc0283..501bb9fddbac4 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
@@ -97,9 +97,9 @@ public function testRenderEventHandler(): void
     public function testRenderEventListenerAsTag(): void
     {
         $html = $this->helper->renderEventListenerAsTag('onclick', 'alert(1)', '#id');
-        $this->assertContains('alert(1)', $html);
-        $this->assertContains('#id', $html);
-        $this->assertContains('click', $html);
+        $this->assertStringContainsString('alert(1)', $html);
+        $this->assertStringContainsString('#id', $html);
+        $this->assertStringContainsString('click', $html);
     }
 
     /**
@@ -121,21 +121,21 @@ public function testInvalidEventListener(): void
     public function testRenderStyleAsTag(): void
     {
         $html = $this->helper->renderStyleAsTag('display: none; font-size: 3em;  ', '#id');
-        $this->assertContains('#id', $html);
-        $this->assertContains('display', $html);
-        $this->assertContains('none', $html);
-        $this->assertContains('fontSize', $html);
-        $this->assertContains('3em', $html);
+        $this->assertStringContainsString('#id', $html);
+        $this->assertStringContainsString('display', $html);
+        $this->assertStringContainsString('none', $html);
+        $this->assertStringContainsString('fontSize', $html);
+        $this->assertStringContainsString('3em', $html);
     }
 
     /**
      * Check style validation
      *
      * @return void
-     * @expectedException \InvalidArgumentException
      */
     public function testInvalidStyle(): void
     {
+        $this->expectException(\InvalidArgumentException::class);
         $this->helper->renderStyleAsTag('display;', '');
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
index 7c10adf147772..d5bfda2afcd48 100644
--- a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/ButtonTest.php
@@ -72,12 +72,12 @@ public function testToHtml(): void
         );
 
         $html = $block->toHtml();
-        $this->assertContains('<button ', $html);
-        $this->assertContains('<span>A button control</span>', $html);
-        $this->assertNotContains('onclick=', $html);
-        $this->assertNotContains('style=', $html);
-        $this->assertRegExp('/\<script.*?\>.*?' .preg_quote($onclick) .'.*?\<\/script\>/ims', $html);
-        $this->assertContains('height', $html);
-        $this->assertContains('200px', $html);
+        $this->assertStringContainsString('<button ', $html);
+        $this->assertStringContainsString('<span>A button control</span>', $html);
+        $this->assertStringNotContainsString('onclick=', $html);
+        $this->assertStringNotContainsString('style=', $html);
+        $this->assertMatchesRegularExpression('/\<script.*?\>.*?' .preg_quote($onclick) .'.*?\<\/script\>/ims', $html);
+        $this->assertStringContainsString('height', $html);
+        $this->assertStringContainsString('200px', $html);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
index d9c92e12975c0..48caf7ed8b859 100644
--- a/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
+++ b/dev/tests/integration/testsuite/Magento/Ui/Component/Control/SplitButtonTest.php
@@ -81,12 +81,12 @@ public function testToHtml(): void
         );
 
         $html = $block->toHtml();
-        $this->assertContains('<button ', $html);
-        $this->assertContains('<span>Split button control</span>', $html);
-        $this->assertNotContains('onclick=', $html);
-        $this->assertNotContains('style=', $html);
-        $this->assertRegExp('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
-        $this->assertContains('width', $html);
-        $this->assertContains('100px', $html);
+        $this->assertStringContainsString('<button ', $html);
+        $this->assertStringContainsString('<span>Split button control</span>', $html);
+        $this->assertStringNotContainsString('onclick=', $html);
+        $this->assertStringNotContainsString('style=', $html);
+        $this->assertMatchesRegularExpression('/\<script.*?\>.*?' . preg_quote($onclick) . '.*?\<\/script\>/ims', $html);
+        $this->assertStringContainsString('width', $html);
+        $this->assertStringContainsString('100px', $html);
     }
 }
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
index 892bda25d4e20..ac158be6f6fd7 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/LinkTest.php
@@ -33,11 +33,6 @@ class LinkTest extends TestCase
      */
     private $objectManager;
 
-    protected function setUp(): void
-    {
-        $this->objectManager = new ObjectManager($this);
-    }
-
     /**
      * @var array
      */

From cd58d3d601fa7e3817e9e1176c89317723d3ae42 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 15 May 2020 11:34:04 -0500
Subject: [PATCH 149/307] MC-33823: Merge CE, EE and B2B changes

---
 .../view/frontend/templates/inline.phtml      | 19 ++++---------------
 .../View/Helper/SecureHtmlRendererTest.php    |  2 +-
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
index b5d5377171413..f89657d3c5d90 100644
--- a/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
+++ b/app/code/Magento/GiftMessage/view/frontend/templates/inline.phtml
@@ -87,9 +87,7 @@ switch ($block->getCheckoutType()):
                                 <div class="control">
                                     <textarea id="gift-message-whole-message" class="input-text"
                                               name="giftmessage[quote][<?=(int)$block->getEntity()->getId()?>][message]"
-                                              title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="10">
-                                        <?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?>
-                                    </textarea>
+                                              title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="10"><?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?></textarea>
                                 </div>
                             </div>
                         </fieldset>
@@ -196,11 +194,7 @@ script;
                                                       name="giftmessage[quote_item][<?= (int) $_item->getId()
                                                         ?>][message]"
                                                       title="<?= $block->escapeHtmlAttr(__('Message')) ?>"
-                                                      rows="5" cols="40">
-                                                <?= /* @noEscape */ $block->getEscaped(
-                                                    $block->getMessage($_item)->getMessage()
-                                                ) ?>
-                                            </textarea>
+                                                      rows="5" cols="40"><?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getMessage()) ?></textarea>
                                          </div>
                                      </div>
                                 </fieldset>
@@ -322,9 +316,7 @@ script;
                                     <textarea id="gift-message-<?= (int) $block->getEntity()->getId() ?>-message"
                                               class="input-text" name="giftmessage[quote_address][<?= (int) $block
                                                 ->getEntity()->getId() ?>][message]"
-                                              title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="40">
-                                        <?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?>
-                                    </textarea>
+                                              title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5" cols="40"><?= /* @noEscape */ $block->getEscaped($block->getMessage()->getMessage()) ?></textarea>
                                 </div>
                             </div>
                         </fieldset>
@@ -429,10 +421,7 @@ script;
                                                           name="giftmessage[quote_address_item][<?= (int) $_item
                                                               ->getId() ?>][message]"
                                                           title="<?= $block->escapeHtmlAttr(__('Message')) ?>" rows="5"
-                                                          cols="10">
-                                                    <?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)
-                                                        ->getMessage()) ?>
-                                                </textarea>
+                                                          cols="10"><?= /* @noEscape */ $block->getEscaped($block->getMessage($_item)->getMessage()) ?></textarea>
                                             </div>
                                         </div>
                                  </fieldset>
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
index 501bb9fddbac4..8fcb464aec734 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Helper/SecureHtmlRendererTest.php
@@ -106,10 +106,10 @@ public function testRenderEventListenerAsTag(): void
      * Check handler validation
      *
      * @return void
-     * @expectedException \InvalidArgumentException
      */
     public function testInvalidEventListener(): void
     {
+        $this->expectException(\InvalidArgumentException::class);
         $this->helper->renderEventListenerAsTag('nonevent', '', '');
     }
 

From 6bd63e3d348abc096cd8a8f3024fe0b9c5274cb5 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 15 May 2020 12:19:05 -0500
Subject: [PATCH 150/307] MC-33823: Merge CE, EE and B2B changes

---
 .../onepage/review/item/price/row_excl_tax.phtml     |  6 +-----
 .../onepage/review/item/price/row_incl_tax.phtml     |  6 +-----
 .../onepage/review/item/price/unit_excl_tax.phtml    |  6 +-----
 .../onepage/review/item/price/unit_incl_tax.phtml    |  6 +-----
 .../view/frontend/templates/item/price/row.phtml     | 12 ++----------
 .../view/frontend/templates/item/price/unit.phtml    | 12 ++----------
 6 files changed, 8 insertions(+), 40 deletions(-)

diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml
index 3a2dd0557ef2b..b9b5a00d0a157 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_excl_tax.phtml
@@ -24,11 +24,7 @@ $_item = $block->getItem();
     </span>
 
 <?php if ($weeeHelper->getApplied($_item)): ?>
-    <span class="cart-tax-info" id="esubtotal-item-tax-details<?= (int) $_item->getId() ?>">
-        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-            'display: none',
-            'div#esubtotal-item-tax-details' . (int) $item->getId()
-        ) ?>
+    <span class="cart-tax-info no-display" id="esubtotal-item-tax-details<?= (int) $_item->getId() ?>">
     <?php if ($block->displayPriceWithWeeeDetails()): ?>
         <?php foreach ($weeeHelper->getApplied($_item) as $tax): ?>
             <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml
index 546b2ec7c04b3..38f2c528b15c9 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/row_incl_tax.phtml
@@ -24,7 +24,7 @@ $_weeeHelper = $block->getData('weeeHelper');
     </span>
 
 <?php if ($_weeeHelper->getApplied($_item)): ?>
-    <span class="cart-tax-info" id="subtotal-item-tax-details<?= (int) $_item->getId() ?>">
+    <span class="cart-tax-info no-display" id="subtotal-item-tax-details<?= (int) $_item->getId() ?>">
         <?php if ($block->displayPriceWithWeeeDetails()): ?>
             <?php foreach ($_weeeHelper->getApplied($_item) as $tax): ?>
                 <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
@@ -33,10 +33,6 @@ $_weeeHelper = $block->getData('weeeHelper');
             <?php endforeach; ?>
         <?php endif; ?>
     </span>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        'display: none',
-        'div#subtotal-item-tax-details' . (int) $item->getId()
-    ) ?>
 
     <?php if ($block->displayFinalPrice()): ?>
         <span class="cart-tax-total"
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml
index b9b43c8c5eac3..8bb331c109119 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_excl_tax.phtml
@@ -24,11 +24,7 @@ $_item = $block->getItem();
 <?= /* @noEscape */ $block->formatPrice($block->getUnitDisplayPriceExclTax()) ?>
     </span>
 <?php if ($weeeHelper->getApplied($_item)): ?>
-    <span class="cart-tax-info" id="eunit-item-tax-details<?= (int) $_item->getId() ?>">
-        <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-            'display: none',
-            'span#eunit-item-tax-details' . (int) $item->getId()
-        ) ?>
+    <span class="cart-tax-info no-display" id="eunit-item-tax-details<?= (int) $_item->getId() ?>">
     <?php if ($block->displayPriceWithWeeeDetails()): ?>
         <?php foreach ($weeeHelper->getApplied($_item) as $tax): ?>
             <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
diff --git a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml
index 24023c0088e3e..e667796825327 100644
--- a/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/checkout/onepage/review/item/price/unit_incl_tax.phtml
@@ -25,7 +25,7 @@ $_weeeHelper = $block->getData('weeeHelper');
     </span>
 
 <?php if ($_weeeHelper->getApplied($_item)): ?>
-    <span class="cart-tax-info" id="unit-item-tax-details<?= (int) $_item->getId() ?>">
+    <span class="cart-tax-info no-display" id="unit-item-tax-details<?= (int) $_item->getId() ?>">
         <?php if ($block->displayPriceWithWeeeDetails()): ?>
             <?php foreach ($_weeeHelper->getApplied($_item) as $tax): ?>
                 <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
@@ -34,10 +34,6 @@ $_weeeHelper = $block->getData('weeeHelper');
             <?php endforeach; ?>
         <?php endif; ?>
     </span>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        'display: none',
-        'span#unit-item-tax-details' . (int) $item->getId()
-    ) ?>
 
     <?php if ($block->displayFinalPrice()): ?>
         <span class="cart-tax-total"
diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml
index 05ff81be25c99..5bd2a2f81acbc 100644
--- a/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/item/price/row.phtml
@@ -26,17 +26,13 @@ $item = $block->getItem();
             </span>
 
         <?php if ($weeeHelper->getApplied($item)): ?>
-            <div class="cart-tax-info" id="subtotal-item-tax-details<?= (int) $item->getId() ?>">
+            <div class="cart-tax-info no-display" id="subtotal-item-tax-details<?= (int) $item->getId() ?>">
                 <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['row_amount_incl_tax'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </div>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display: none',
-                'div#subtotal-item-tax-details' . (int) $item->getId()
-            ) ?>
 
             <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
@@ -63,17 +59,13 @@ $item = $block->getItem();
             </span>
 
         <?php if ($weeeHelper->getApplied($item)): ?>
-            <span class="cart-tax-info" id="esubtotal-item-tax-details<?= (int) $item->getId() ?>">
+            <span class="cart-tax-info no-display" id="esubtotal-item-tax-details<?= (int) $item->getId() ?>">
                 <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['row_amount'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </span>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display: none',
-                'div#esubtotal-item-tax-details' . (int) $item->getId()
-            ) ?>
 
             <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
diff --git a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml
index 980f94b3ba80d..39d0bc59653d4 100644
--- a/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml
+++ b/app/code/Magento/Weee/view/frontend/templates/item/price/unit.phtml
@@ -26,17 +26,13 @@ $item = $block->getItem();
             </span>
 
         <?php if ($weeeHelper->getApplied($item)): ?>
-            <span class="cart-tax-info" id="unit-item-tax-details<?= (int) $item->getId() ?>">
+            <span class="cart-tax-info no-display" id="unit-item-tax-details<?= (int) $item->getId() ?>">
                 <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['amount_incl_tax'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </span>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display: none',
-                'span#unit-item-tax-details' . (int) $item->getId()
-            ) ?>
 
             <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
@@ -62,17 +58,13 @@ $item = $block->getItem();
             </span>
 
         <?php if ($weeeHelper->getApplied($item)): ?>
-            <span class="cart-tax-info" id="eunit-item-tax-details<?= (int) $item->getId() ?>">
+            <span class="cart-tax-info no-display" id="eunit-item-tax-details<?= (int) $item->getId() ?>">
                 <?php foreach ($weeeHelper->getApplied($item) as $tax): ?>
                     <span class="weee" data-label="<?= $block->escapeHtmlAttr($tax['title']) ?>">
                         <?= /* @noEscape */ $block->formatPrice($tax['amount'], true, true) ?>
                     </span>
                 <?php endforeach; ?>
             </span>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display: none',
-                'span#eunit-item-tax-details' . (int) $item->getId()
-            ) ?>
             <?php if ($block->displayFinalPrice()): ?>
                 <span class="cart-tax-total"
                       data-mage-init='{"taxToggle": {"itemTaxId" : "#eunit-item-tax-details<?=(int)$item->getId()?>"}}'>

From f53bc0f84186695c0cb38c4c8fbaa16b25fb73c7 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Mon, 18 May 2020 10:14:34 +0300
Subject: [PATCH 151/307] MC-33922: Improve email templates

---
 .../Framework/Filter/VariableResolver/LegacyResolverTest.php     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filter/VariableResolver/LegacyResolverTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filter/VariableResolver/LegacyResolverTest.php
index 6cd211be6f14d..e663b8ccedceb 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Filter/VariableResolver/LegacyResolverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Filter/VariableResolver/LegacyResolverTest.php
@@ -117,6 +117,7 @@ public function getThing()
                 ['foo' => $dataClassStub, 'g' => ['h' => ['i' => 'abc']]],
                 'abca=123,b=321,'
             ],
+            'disallow __callParent method' => ['foo.___callParent()',['foo' => $classStub], null],
         ];
     }
 }

From f999b269c3935101a23c45cf035e14ffbf32a032 Mon Sep 17 00:00:00 2001
From: Dmytro Voskoboinikov <voskoboi@adobe.com>
Date: Thu, 21 May 2020 18:30:03 -0500
Subject: [PATCH 152/307] MC-31733: Media gallery breaks in some filesystems

---
 .../Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
index 691675ee82f28..8f421ac3121fb 100644
--- a/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php
@@ -588,10 +588,13 @@ public function testDeleteRootDirectory()
 
     /**
      * cover \Magento\Theme\Model\Wysiwyg\Storage::deleteDirectory
-     * @expectedException \Magento\Framework\Exception\LocalizedException
      */
     public function testDeleteRootDirectoryRelative()
     {
+        $this->expectException(
+            \Magento\Framework\Exception\LocalizedException::class
+        );
+
         $directoryPath = $this->_storageRoot;
         $fakePath = 'fake/relative/path';
 

From b0de7b94712468e2adee1a013bc7fe1cf5cede63 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 22 May 2020 14:35:40 -0500
Subject: [PATCH 153/307] MC-33823: Merge CE, EE and B2B changes

---
 .../etc/csp_whitelist.xml                     | 18 --------------
 .../adminhtml/templates/payment/script.phtml  | 24 -------------------
 2 files changed, 42 deletions(-)
 delete mode 100644 app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml
 delete mode 100644 app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml

diff --git a/app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml b/app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml
deleted file mode 100644
index df6d02387d3d7..0000000000000
--- a/app/code/Magento/AuthorizenetAcceptjs/etc/csp_whitelist.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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="script-src">
-            <values>
-                <value id="authorize_net_js" type="host">js.authorize.net</value>
-                <value id="authorize_net_jstest" type="host">jstest.authorize.net</value>
-            </values>
-        </policy>
-    </policies>
-</csp_whitelist>
diff --git a/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml b/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
deleted file mode 100644
index 6be6008dba507..0000000000000
--- a/app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/payment/script.phtml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-
-/** @var Magento\AuthorizenetAcceptjs\Block\Payment $block */
-?>
-<script>
-    //<![CDATA[
-    require(
-        [
-            'Magento_AuthorizenetAcceptjs/js/authorizenet',
-            'jquery',
-            'domReady!'
-        ], function(AuthorizenetAcceptjs, $) {
-            var config = <?= /* @noEscape */ $block->getPaymentConfig() ?>,
-                form = $('#payment_form_<?= /* @noEscape */ $block->escapeJs($block->escapeHtml($block->getMethodCode())) ?>');
-
-            config.active = form.length > 0 && !form.is(':hidden');
-            new AuthorizenetAcceptjs(config);
-        });
-    //]]>
-</script>

From e5e5c788ffcb83bf5426deb6832c93e355a8f1bc Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 26 May 2020 16:18:52 -0500
Subject: [PATCH 154/307] MC-33823: Merge CE, EE and B2B changes

---
 .../Adminhtml/Order/Create/Search/Grid/Renderer/Product.php     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php
index c72d27c45cfc5..8c1ef5f56dac2 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Product.php
@@ -19,7 +19,7 @@ class Product extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
     /**
      * @var SecureHtmlRenderer
      */
-    protected $secureRenderer;
+    private $secureRenderer;
 
     /**
      * @param Context $context

From bf198bd17aab8570ac775436edf62d23ec397bf0 Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Wed, 27 May 2020 12:57:55 +0300
Subject: [PATCH 155/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 ...portGroupedProductWithSpecialPriceTest.xml |  4 ++--
 ...inStartMessageQueueConsumerActionGroup.xml | 24 +++++++++++++++++++
 .../Test/Mftf/Data/QueueConsumerData.xml      | 15 ++++++++++++
 3 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
 create mode 100644 app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml

diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
index 5078fa5c571db..c5152356632e3 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
@@ -48,7 +48,6 @@
                 <requiredEntity createDataKey="createSecondSimpleProduct"/>
             </updateData>
 
-            <magentoCron stepKey="runCron"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
@@ -68,7 +67,8 @@
         <!-- Export created below products -->
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
-        <magentoCron stepKey="runCronIndex" groups="index"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
new file mode 100644
index 0000000000000..5154c917390d8
--- /dev/null
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
@@ -0,0 +1,24 @@
+<?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="AdminStartMessageQueueConsumerActionGroup">
+        <annotations>
+            <description>Starts message queue for specific consumer.</description>
+        </annotations>
+        <arguments>
+            <argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
+        </arguments>
+
+        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}} --single-thread" stepKey="startMessageQueue"/>
+        <wait time="30" stepKey="waitForQueueStarting"/>
+        <reloadPage stepKey="refreshPage"/>
+        <waitForPageLoad stepKey="waitForPageLoaded"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
new file mode 100644
index 0000000000000..513e2ec3fc131
--- /dev/null
+++ b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /**
+  * Copyright © Magento, Inc. All rights reserved.
+  * See COPYING.txt for license details.
+  */
+-->
+
+<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
+    <entity name="AdminExportMessageConsumerData">
+        <data key="consumer_name">exportProcessor</data>
+        <data key="message_limit">1</data>
+    </entity>
+</entities>

From 3e5d058d36a1ed6376f85a6eaacddabd13ab2407 Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Wed, 27 May 2020 14:31:48 +0300
Subject: [PATCH 156/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 ...ebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml | 3 ++-
 .../ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
index 09f37a10fb14d..bb2bd44dec442 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
@@ -97,7 +97,8 @@
         <!-- Export created below products -->
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
-        <magentoCron stepKey="runCron"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
index 5154c917390d8..31391d38c5807 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
@@ -16,7 +16,7 @@
             <argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
         </arguments>
 
-        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}} --single-thread" stepKey="startMessageQueue"/>
+        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}}" stepKey="startMessageQueue"/>
         <wait time="30" stepKey="waitForQueueStarting"/>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>

From e15ff8fb57f14c70f1d7eb57f3f5242ad9892447 Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Wed, 27 May 2020 14:39:07 +0300
Subject: [PATCH 157/307] MC-34482: MFTF tests causing high load

---
 ...AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml | 4 ++--
 .../Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml    | 4 ++--
 .../Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
index 1c12b048e96d0..f8346f5a9dd5c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
@@ -38,8 +38,8 @@
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
             <!-- Run cron twice -->
-            <magentoCLI command="cron:run" stepKey="runCron1"/>
-            <magentoCLI command="cron:run" stepKey="runCron2"/>
+            <magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
+            <magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
         </before>
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
index ff30c46a51c3a..0aa89bdfd45b6 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
@@ -38,8 +38,8 @@
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
             <!-- Run cron twice -->
-            <magentoCLI command="cron:run" stepKey="runCron1"/>
-            <magentoCLI command="cron:run" stepKey="runCron2"/>
+            <magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
+            <magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
         </before>
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
index 2b4437aed1bb2..171d15fe6ed4f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
@@ -38,8 +38,8 @@
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
             <!-- Run cron twice -->
-            <magentoCLI command="cron:run" stepKey="runCron1"/>
-            <magentoCLI command="cron:run" stepKey="runCron2"/>
+            <magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
+            <magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
         </before>
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>

From 01d2c5cde824715a21ac093c903bc0c5a1af49ea Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Wed, 27 May 2020 15:46:28 +0300
Subject: [PATCH 158/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 ...nUpdateFlatCategoryIncludeInNavigationTest.xml | 15 ++++++---------
 ...ConfigurableProductsWithAssignedImagesTest.xml |  5 +++--
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
index 6ee1fd6a58e42..2abd7aecf4342 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
@@ -29,21 +29,15 @@
             <actionGroup ref="CreateStoreViewActionGroup" stepKey="createCustomStoreViewFr">
                 <argument name="storeView" value="customStoreFR"/>
             </actionGroup>
-            <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
             <!--Enable Flat Catalog Category -->
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
-            <!-- Run cron twice -->
-            <magentoCLI command="cron:run" stepKey="runCron1"/>
-            <magentoCLI command="cron:run" stepKey="runCron2"/>
+            <!-- Reindex invalidated indices and clear caches -->
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+            <magentoCLI command="cache:flush" stepKey="flushCache"/>
         </before>
         <after>
-            <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
-            <magentoCLI stepKey="setIndexersMode" command="indexer:set-mode" arguments="realtime" />
-            <magentoCLI stepKey="indexerReindex" command="indexer:reindex" />
             <deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
             <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
                 <argument name="customStore" value="customStoreEN"/>
@@ -52,6 +46,9 @@
                 <argument name="customStore" value="customStoreFR"/>
             </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
+            <magentoCLI command="config:set catalog/frontend/flat_catalog_category 0 " stepKey="setFlatCatalogCategory"/>
+            <magentoCLI command="indexer:set-mode" arguments="realtime" stepKey="setIndexersMode"/>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndicesAgain"/>
         </after>
         <!--Verify Category is not listed in navigation menu-->
         <amOnPage url="/{{CatNotIncludeInMenu.name_lwr}}.html"  stepKey="openCategoryPage"/>
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
index 744e51bfe8896..e9751ef0e982e 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
@@ -89,7 +89,7 @@
                 <requiredEntity createDataKey="createConfigProduct"/>
             </createData>
 
-            <magentoCron stepKey="runCronIndex" groups="index"/>
+            <magentoCron groups="index" stepKey="runCronIndex"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
@@ -113,7 +113,8 @@
             <argument name="attributeData" value="$$createConfigProduct.sku$$"/>
         </actionGroup>
 
-        <magentoCron stepKey="runCron"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 

From 5cf1f41889751b5c7adddb97b47ebdc43d8983b8 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Wed, 27 May 2020 09:03:15 -0500
Subject: [PATCH 159/307] MC-34518: Address SVC failures for 2.4.0 vs 2.3.5

---
 app/code/Magento/Downloadable/Model/Sample/Builder.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Downloadable/Model/Sample/Builder.php b/app/code/Magento/Downloadable/Model/Sample/Builder.php
index 368d190319766..ca1fab224f86f 100644
--- a/app/code/Magento/Downloadable/Model/Sample/Builder.php
+++ b/app/code/Magento/Downloadable/Model/Sample/Builder.php
@@ -76,7 +76,7 @@ public function __construct(
      * Init data for builder
      *
      * @param array $data
-     * @return $this;
+     * @return $this
      * @since 100.1.0
      */
     public function setData(array $data)

From 3ba7d03e2df215c59d2a99a2b4def21f19226326 Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Thu, 28 May 2020 10:29:34 +0300
Subject: [PATCH 160/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 ...UpdateProductAttributesGlobalScopeTest.xml | 24 ++++++++++---------
 .../Test/Mftf/Data/QueueConsumerData.xml      |  6 ++++-
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
index 31b5961edaaaa..089ce35b32f78 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
@@ -30,6 +30,7 @@
             <createData entity="ApiSimpleProduct" stepKey="createProductTwo">
                 <requiredEntity createDataKey="createCategory"/>
             </createData>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         </before>
         <after>
             <deleteData createDataKey="createProductOne" stepKey="deleteProductOne"/>
@@ -39,6 +40,7 @@
             <click selector="{{AdminStoresGridSection.resetButton}}" stepKey="resetSearchFilter"/>
             <actionGroup ref="ClearProductsFilterActionGroup" stepKey="clearProductFilter"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndicesAfterDelete"/>
         </after>
 
         <!-- Search and select products -->
@@ -59,22 +61,22 @@
         <actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchStoreViewActionGroup"/>
         <!-- Update attribute -->
         <checkOption selector="{{AdminEditProductAttributesSection.ChangeAttributePriceToggle}}" stepKey="toggleToChangePrice"/>
-        <fillField selector="{{AdminEditProductAttributesSection.AttributePrice}}" userInput="$$createProductOne.price$$0" stepKey="fillAttributeNameField"/>
+        <fillField selector="{{AdminEditProductAttributesSection.AttributePrice}}" userInput="$createProductOne.price$0" stepKey="fillAttributeNameField"/>
         <click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
         <waitForElementVisible selector="{{AdminMessagesSection.success}}" time="60" stepKey="waitForSuccessMessage"/>
         <see selector="{{AdminMessagesSection.success}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron1"/>
-        <magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron2"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <!-- Start message queue for product attribute consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
+            <argument name="consumer" value="AdminProductAttributeUpdateMessageConsumerData"/>
+        </actionGroup>
 
         <!-- Assert on storefront default view -->
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="searchByNameDefault">
-            <argument name="name" value=""$$createProductOne.name$$""/>
-            <argument name="priceFrom" value="$$createProductOne.price$$0"/>
-            <argument name="priceTo" value="$$createProductOne.price$$0"/>
+            <argument name="name" value=""$createProductOne.name$""/>
+            <argument name="priceFrom" value="$createProductOne.price$0"/>
+            <argument name="priceTo" value="$createProductOne.price$0"/>
         </actionGroup>
         <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault"/>
         <waitForElementVisible selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="waitForSearchResultInDefaultView"/>
@@ -84,9 +86,9 @@
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupCustom"/>
         <actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="StorefrontSwitchStoreViewActionGroup"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="searchByNameCustom">
-            <argument name="name" value=""$$createProductOne.name$$""/>
-            <argument name="priceFrom" value="$$createProductOne.price$$0"/>
-            <argument name="priceTo" value="$$createProductOne.price$$0"/>
+            <argument name="name" value=""$createProductOne.name$""/>
+            <argument name="priceFrom" value="$createProductOne.price$0"/>
+            <argument name="priceTo" value="$createProductOne.price$0"/>
         </actionGroup>
         <actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultCustom"/>
         <waitForElementVisible selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="waitForSearchResultInCustomView"/>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
index 513e2ec3fc131..2fca33979bc3c 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
@@ -10,6 +10,10 @@
           xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
     <entity name="AdminExportMessageConsumerData">
         <data key="consumer_name">exportProcessor</data>
-        <data key="message_limit">1</data>
+        <data key="message_limit">100</data>
+    </entity>
+    <entity name="AdminProductAttributeUpdateMessageConsumerData">
+        <data key="consumer_name">product_action_attribute.update</data>
+        <data key="message_limit">100</data>
     </entity>
 </entities>

From 4a6b4a488aba2c441ce24dc5f4f220afa5568d4d Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Thu, 28 May 2020 14:04:18 +0300
Subject: [PATCH 161/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 .../Test/AdminExportGroupedProductWithSpecialPriceTest.xml | 2 ++
 .../AdminExportImportConfigurableProductWithImagesTest.xml | 7 ++++---
 ...tSimpleAndConfigurableProductsWithCustomOptionsTest.xml | 5 ++++-
 ...roductAndConfigurableProductsWithAssignedImagesTest.xml | 2 ++
 ...teAndConfigurableProductAssignedToCustomWebsiteTest.xml | 2 ++
 .../AdminStartMessageQueueConsumerActionGroup.xml          | 2 --
 6 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
index c5152356632e3..e84700d39199b 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
@@ -69,6 +69,8 @@
 
         <!-- Start message queue for export consumer -->
         <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <reloadPage stepKey="refreshPage"/>
+        <waitForPageLoad stepKey="waitForPageLoaded"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
index 8eba6a39f6199..a26a5d9d7c5b0 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
@@ -164,9 +164,10 @@
             <argument name="attributeData" value="$$createExportImportConfigurableProduct.sku$$"/>
         </actionGroup>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" stepKey="runCronFirstTime"/>
-        <magentoCLI command="cron:run" stepKey="runCronSecondTime"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <reloadPage stepKey="refreshPage"/>
+        <waitForPageLoad stepKey="waitForPageLoaded"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
index 44f7b91324025..a7ce332d7318b 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
@@ -98,7 +98,10 @@
             <argument name="attributeData" value="$$createConfigProduct.sku$$"/>
         </actionGroup>
 
-        <magentoCron stepKey="runCron"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <reloadPage stepKey="refreshPage"/>
+        <waitForPageLoad stepKey="waitForPageLoaded"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
index e9751ef0e982e..1048684a9dd44 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
@@ -115,6 +115,8 @@
 
         <!-- Start message queue for export consumer -->
         <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <reloadPage stepKey="refreshPage"/>
+        <waitForPageLoad stepKey="waitForPageLoaded"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
index bb2bd44dec442..56c9f5e3e6390 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
@@ -99,6 +99,8 @@
 
         <!-- Start message queue for export consumer -->
         <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <reloadPage stepKey="refreshPage"/>
+        <waitForPageLoad stepKey="waitForPageLoaded"/>
 
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
index 31391d38c5807..4c423844b17fd 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
@@ -18,7 +18,5 @@
 
         <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}}" stepKey="startMessageQueue"/>
         <wait time="30" stepKey="waitForQueueStarting"/>
-        <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitForPageLoaded"/>
     </actionGroup>
 </actionGroups>

From 523c773e80dd9a911c46b6f9ddfe496bdf9bb33a Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Thu, 28 May 2020 14:52:54 +0300
Subject: [PATCH 162/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 ...sUpdateAttributesForBundleProductsTest.xml |  9 ++++----
 ...dateFlatCategoryNameAndDescriptionTest.xml |  9 +++-----
 .../Test/AdminExportBundleProductTest.xml     |  7 ++++--
 ...inStartMessageQueueConsumerActionGroup.xml | 22 ++++++++++++++++++
 .../Test/Mftf/Data/QueueConsumerData.xml      | 23 +++++++++++++++++++
 .../StorefrontAutoGeneratedCouponCodeTest.xml |  7 +++---
 6 files changed, 62 insertions(+), 15 deletions(-)
 create mode 100644 app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
 create mode 100644 app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml

diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
index caf500762883c..2338b44b186ab 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
@@ -34,7 +34,7 @@
                 <requiredEntity createDataKey="createBundleOption"/>
                 <requiredEntity createDataKey="createSimpleProduct"/>
             </createData>
-            <magentoCron stepKey="runCronIndex" groups="index"/>
+            <magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
         </before>
         <after>
             <!-- Delete Simple Product -->
@@ -56,9 +56,10 @@
         <actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
             <argument name="product" value="UpdateAttributeNameAndDescription"/>
         </actionGroup>
-        <!--Run cron twice-->
-        <magentoCLI command="cron:run" stepKey="cronRun"/>
-        <magentoCLI command="cron:run" stepKey="cronRunTwice"/>
+        <!-- Start message queue for product attribute consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
+            <argument name="consumer" value="AdminProductAttributeUpdateMessageConsumerData"/>
+        </actionGroup>
         <!-- Search for a product with a new name and Open Product -->
         <actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchWithNewProductName">
             <argument name="product" value="UpdateAttributeNameAndDescription"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
index dd79dd6824bbb..1aea42e0f7f63 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
@@ -30,16 +30,13 @@
             <actionGroup ref="CreateStoreViewActionGroup" stepKey="createCustomStoreViewFr">
                 <argument name="storeView" value="customStoreFR"/>
             </actionGroup>
-            <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
             <!--Enable Flat Catalog Category -->
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
-            <!-- Run cron twice -->
-            <magentoCLI command="cron:run" stepKey="runCron1"/>
-            <magentoCLI command="cron:run" stepKey="runCron2"/>
+            <!--Run full reindex and clear caches -->
+            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <magentoCLI command="cache:flush" stepKey="flushCache"/>
         </before>
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
index 97eac1ff723a0..3a6561e80c110 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
@@ -80,7 +80,10 @@
                 <requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
             </createData>
 
-            <magentoCron stepKey="runCron"/>
+            <!-- Start message queue for export consumer -->
+            <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+            <reloadPage stepKey="refreshPage"/>
+            <waitForPageLoad stepKey="waitForPageLoaded"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
@@ -96,7 +99,7 @@
             <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
 
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+            <magentoCLI command="cron:run --group=index" stepKey="reindexInvalidatedIndices"/>
         </after>
 
         <!-- Go to export page -->
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
new file mode 100644
index 0000000000000..032ef4549f943
--- /dev/null
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
@@ -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="AdminStartMessageQueueConsumerActionGroup">
+        <annotations>
+            <description>Starts message queue for specific consumer.</description>
+        </annotations>
+        <arguments>
+            <argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
+        </arguments>
+
+        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}} --single-thread" stepKey="startMessageQueue"/>
+        <wait time="30" stepKey="waitForQueueStarting"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
new file mode 100644
index 0000000000000..b5da26f6ae5b1
--- /dev/null
+++ b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /**
+  * Copyright © Magento, Inc. All rights reserved.
+  * See COPYING.txt for license details.
+  */
+-->
+
+<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
+    <entity name="AdminExportMessageConsumerData">
+        <data key="consumer_name">exportProcessor</data>
+        <data key="message_limit">100</data>
+    </entity>
+    <entity name="AdminProductAttributeUpdateMessageConsumerData">
+        <data key="consumer_name">product_action_attribute.update</data>
+        <data key="message_limit">100</data>
+    </entity>
+    <entity name="AdminCodeGeneratorMessageConsumerData">
+        <data key="consumer_name">codegeneratorProcessor</data>
+        <data key="message_limit">100</data>
+    </entity>
+</entities>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
index 09b45cd554056..bdf4b49b67621 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
@@ -59,9 +59,10 @@
         <see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="Message is added to queue, wait to get your coupons soon"
              stepKey="seeSuccessMessage"/>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" stepKey="runCron1"/>
-        <magentoCLI command="cron:run" stepKey="runCron2"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
+            <argument name="consumer" value="AdminCodeGeneratorMessageConsumerData"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitFormToReload1"/>
         <conditionalClick selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}"

From 18966220b9cc9cfccea4acf2b01697776d3eb1d4 Mon Sep 17 00:00:00 2001
From: Serhii Voloshkov <serhii.voloshkov@transoftgroup.com>
Date: Thu, 28 May 2020 15:41:52 +0300
Subject: [PATCH 163/307] MC-34482: MFTF tests causing high load

---
 .../AdminConfigurableProductBulkUpdateTest.xml            | 8 ++++----
 .../AdminCreateCartPriceRuleForGeneratedCouponTest.xml    | 7 ++++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
index bd409d0e4bfde..02e2520c04672 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
@@ -65,10 +65,10 @@
         <waitForElementVisible selector="{{AdminProductMessagesSection.successMessage}}" time="60" stepKey="waitForSuccessMessage"/>
         <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron1"/>
-        <magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron2"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <!-- Apply changes -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
+            <argument name="consumer" value="AdminProductAttributeUpdateMessageConsumerData"/>
+        </actionGroup>
 
         <!-- Check storefront for description -->
         <amOnPage url="{{StorefrontProductPage.url($$createProduct1.custom_attributes[url_key]$$)}}" stepKey="goToFirstProductPageOnStorefront"/>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
index 24c3a7cd44bc8..7b74e14c72f97 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
@@ -55,9 +55,10 @@
         <click selector="{{AdminCartPriceRulesFormSection.generateCouponsButton}}" stepKey="clickGenerate"/>
         <see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="Message is added to queue, wait to get your coupons soon" stepKey="seeGenerationSuccess"/>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" stepKey="runCron1"/>
-        <magentoCLI command="cron:run" stepKey="runCron2"/>
+        <!-- Apply changes -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
+            <argument name="consumer" value="AdminCodeGeneratorMessageConsumerData"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitFormToReload1"/>
         <click selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" stepKey="expandCouponSection2"/>

From caecffe4f848707788c1a4f6bebf1a2bbe2168d9 Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 28 May 2020 15:51:39 +0300
Subject: [PATCH 164/307] MC-34482: MFTF tests causing high load

---
 ...rtSimpleProductWithCustomAttributeTest.xml |  9 +++++---
 ...inStartMessageQueueConsumerActionGroup.xml | 22 +++++++++++++++++++
 .../Test/Mftf/Data/QueueConsumerData.xml      | 13 +++++++++++
 3 files changed, 41 insertions(+), 3 deletions(-)
 create mode 100644 app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
 create mode 100644 app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml

diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
index 8cea7985aa6d7..daa24362ebeae 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
@@ -28,7 +28,8 @@
                 <requiredEntity createDataKey="createAttributeSet"/>
             </createData>
 
-            <magentoCron stepKey="runCron"/>
+            <magentoCLI command="cron:run" arguments="--group index" stepKey="cronRun"/>
+            <magentoCLI command="cron:run" arguments="--group index" stepKey="cronRunToStartReindex"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
@@ -48,8 +49,10 @@
         <!-- Export created below products -->
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
-        <magentoCron stepKey="runCronIndex" groups="index"/>
-
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <reloadPage stepKey="pageReload" />
+        <waitForPageLoad stepKey="waitForPageLoaded" />
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Download product -->
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
new file mode 100644
index 0000000000000..4c423844b17fd
--- /dev/null
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
@@ -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="AdminStartMessageQueueConsumerActionGroup">
+        <annotations>
+            <description>Starts message queue for specific consumer.</description>
+        </annotations>
+        <arguments>
+            <argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
+        </arguments>
+
+        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}}" stepKey="startMessageQueue"/>
+        <wait time="30" stepKey="waitForQueueStarting"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
new file mode 100644
index 0000000000000..2cc8e9c420016
--- /dev/null
+++ b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /**
+  * Copyright © Magento, Inc. All rights reserved.
+  * See COPYING.txt for license details.
+  */
+-->
+<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
+    <entity name="AdminExportMessageConsumerData">
+        <data key="consumer_name">exportProcessor</data>
+        <data key="message_limit">100</data>
+    </entity>
+</entities>

From f20861208ad917fe57b93ed6c1b0706e2e091191 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <svitja@ukr.net>
Date: Thu, 28 May 2020 16:42:04 +0300
Subject: [PATCH 165/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platform

---
 .../Test/Mftf/Data/QueueConsumerData.xml      | 19 +++++++++++++++++++
 .../Test/AdminMassProductPriceUpdateTest.xml  | 11 ++++++-----
 .../AdminMoveProductBetweenCategoriesTest.xml |  4 ++--
 ...tributeIsUndefinedCatalogPriceRuleTest.xml |  6 ++----
 ...minUrlForProductRewrittenCorrectlyTest.xml | 11 ++++++-----
 5 files changed, 35 insertions(+), 16 deletions(-)
 create mode 100644 app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml

diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml
new file mode 100644
index 0000000000000..2c01b2a573f1e
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /**
+  * Copyright © Magento, Inc. All rights reserved.
+  * See COPYING.txt for license details.
+  */
+-->
+
+<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
+    <entity name="AdminProductAttributeUpdateConsumerData">
+        <data key="consumer_name">product_action_attribute.update</data>
+        <data key="message_limit">100</data>
+    </entity>
+    <entity name="AdminProductAttributeWebsiteUpdateConsumerData">
+        <data key="consumer_name">product_action_attribute.website.update</data>
+        <data key="message_limit">100</data>
+    </entity>
+</entities>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
index e8e0d449aee4e..ebf8d9acb851f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
@@ -56,11 +56,12 @@
         <waitForPageLoad stepKey="waitForUpdatedProductToSave" />
         <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" stepKey="runCron1"/>
-        <magentoCLI command="cron:run" stepKey="runCron2"/>
-        <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitFormToReload1"/>
+        <!-- Start message queue -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueueConsumer">
+            <argument name="consumer" value="AdminProductAttributeUpdateConsumerData"/>
+        </actionGroup>
+        <!-- Run cron -->
+        <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
 
         <!--Verify product name, sku and updated price-->
         <click stepKey="openFirstProduct" selector="{{AdminProductGridSection.productRowBySku($$simpleProduct1.sku$$)}}"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml
index fe31456aca334..055f4e23cd9e7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveProductBetweenCategoriesTest.xml
@@ -116,7 +116,7 @@
         <see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSuccessMessage"/>
 
         <!-- Run cron -->
-        <magentoCLI command="cron:run" stepKey="runCron"/>
+        <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
 
         <!-- Clear invalidated cache on System>Tools>Cache Management page  -->
         <amOnPage url="{{AdminCacheManagementPage.url}}" stepKey="onCachePage"/>
@@ -188,7 +188,7 @@
         <see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSaveMessage"/>
 
         <!-- Run cron -->
-        <magentoCLI command="cron:run" stepKey="runCron2"/>
+        <magentoCLI command="cron:run --group=index" stepKey="runCron2"/>
 
         <!-- Open frontend -->
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="onFrontendPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
index 6c436fee808a7..9d7607d7521c9 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
@@ -44,7 +44,7 @@
             <createData entity="productDropDownAttribute" stepKey="createSecondProductAttribute">
                 <field key="scope">website</field>
             </createData>
-            <magentoCron stepKey="runCronIndex" groups="index"/>
+            <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
         </before>
         <after>
 
@@ -64,7 +64,7 @@
             <deleteData createDataKey="createSecondProductAttribute" stepKey="deleteSecondProductAttribute"/>
 
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCron stepKey="runCronIndex" groups="index"/>
+            <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
         </after>
 
         <!--Create catalog price rule-->
@@ -80,7 +80,6 @@
             <argument name="targetSelectValue" value="is undefined"/>
         </actionGroup>
         <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="clickSaveAndApplyRules"/>
-        <wait time="60" stepKey="waitMinute"/>
         <magentoCLI command="indexer:reindex" stepKey="reindex"/>
         <magentoCLI command="cache:flush" stepKey="flushCache"/>
         <magentoCLI command="cache:flush" stepKey="flushCache3"/>
@@ -129,7 +128,6 @@
             <argument name="targetSelectValue" value="is undefined"/>
         </actionGroup>
         <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="clickSaveAndApplyRules1"/>
-        <wait time="60" stepKey="waitForMinute"/>
         <magentoCLI command="indexer:reindex" stepKey="reindex1"/>
         <magentoCLI command="cache:flush" stepKey="flushCache1"/>
         <magentoCLI command="cache:flush" stepKey="flushCache2"/>
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
index 75ae9d821c356..5190e007b668f 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
@@ -72,11 +72,12 @@
         <click selector="{{AdminUpdateAttributesSection.saveButton}}" stepKey="clickSave"/>
         <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeSaveSuccess"/>
 
-        <!-- Run cron twice -->
-        <magentoCLI command="cron:run" stepKey="runCron1"/>
-        <magentoCLI command="cron:run" stepKey="runCron2"/>
-        <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitFormToReload1"/>
+        <!-- Start message queue -->
+        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueueConsumer">
+            <argument name="consumer" value="AdminProductAttributeWebsiteUpdateConsumerData"/>
+        </actionGroup>
+        <!-- Run cron -->
+        <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
 
         <!--Got to Store front product page and check url-->
         <amOnPage url="{{StorefrontProductPage.url($$createProduct.sku$$-new)}}" stepKey="navigateToSimpleProductPage"/>

From 92fab51402ade1ffe078254b44adddd45452f3a2 Mon Sep 17 00:00:00 2001
From: Lyzun Oleksandr <alex.nuzil@gmail.com>
Date: Thu, 28 May 2020 18:12:15 +0200
Subject: [PATCH 166/307] Implement Asynchronous Operation status change based
 on a lookup key

---
 .../Model/BulkManagement.php                  |  14 ++-
 .../Model/MassSchedule.php                    |   2 -
 .../Model/OperationManagement.php             |  42 ++++---
 .../Model/OperationProcessor.php              |   1 +
 .../Model/ResourceModel/Operation.php         |   4 +-
 .../Operation/OperationRepository.php         |  17 ++-
 .../Test/Unit/Model/BulkManagementTest.php    |  33 +++--
 .../Unit/Model/OperationManagementTest.php    | 118 ++++++++++++------
 .../AsynchronousOperations/etc/db_schema.xml  |  16 +--
 .../etc/db_schema_whitelist.json              |   6 +-
 .../WebapiAsync/Model/OperationRepository.php |   9 +-
 .../Model/BulkManagementTest.php              |   3 -
 .../Model/OperationManagementTest.php         |  50 +++++---
 .../AsynchronousOperations/_files/bulk.php    |   9 +-
 .../_files/operation_searchable.php           |  10 +-
 .../Framework/Bulk/OperationInterface.php     |   2 +-
 .../Bulk/OperationManagementInterface.php     |   5 +-
 17 files changed, 215 insertions(+), 126 deletions(-)

diff --git a/app/code/Magento/AsynchronousOperations/Model/BulkManagement.php b/app/code/Magento/AsynchronousOperations/Model/BulkManagement.php
index b47bb26985df0..6cf0611eb28ec 100644
--- a/app/code/Magento/AsynchronousOperations/Model/BulkManagement.php
+++ b/app/code/Magento/AsynchronousOperations/Model/BulkManagement.php
@@ -140,8 +140,8 @@ public function scheduleBulk($bulkUuid, array $operations, $description, $userId
     public function retryBulk($bulkUuid, array $errorCodes)
     {
         $metadata = $this->metadataPool->getMetadata(BulkSummaryInterface::class);
-        $connection = $this->resourceConnection->getConnectionByName($metadata->getEntityConnectionName());
 
+        $connection = $this->resourceConnection->getConnectionByName($metadata->getEntityConnectionName());
         /** @var \Magento\AsynchronousOperations\Model\ResourceModel\Operation[] $retriablyFailedOperations */
         $retriablyFailedOperations = $this->operationCollectionFactory->create()
             ->addFieldToFilter('error_code', ['in' => $errorCodes])
@@ -157,23 +157,27 @@ public function retryBulk($bulkUuid, array $errorCodes)
             /** @var OperationInterface $operation */
             foreach ($retriablyFailedOperations as $operation) {
                 if ($currentBatchSize === $maxBatchSize) {
+                    $whereCondition = $connection->quoteInto('operation_key IN (?)', $operationIds)
+                        . " AND "
+                        . $connection->quoteInto('bulk_uuid = ?', $bulkUuid);
                     $connection->delete(
                         $this->resourceConnection->getTableName('magento_operation'),
-                        $connection->quoteInto('id IN (?)', $operationIds)
+                        $whereCondition
                     );
                     $operationIds = [];
                     $currentBatchSize = 0;
                 }
                 $currentBatchSize++;
                 $operationIds[] = $operation->getId();
-                // Rescheduled operations must be put in queue in 'open' state (i.e. without ID)
-                $operation->setId(null);
             }
             // remove operations from the last batch
             if (!empty($operationIds)) {
+                $whereCondition = $connection->quoteInto('operation_key IN (?)', $operationIds)
+                    . " AND "
+                    . $connection->quoteInto('bulk_uuid = ?', $bulkUuid);
                 $connection->delete(
                     $this->resourceConnection->getTableName('magento_operation'),
-                    $connection->quoteInto('id IN (?)', $operationIds)
+                    $whereCondition
                 );
             }
 
diff --git a/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php b/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php
index 4dcaf7279a570..d8efed5562131 100644
--- a/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php
+++ b/app/code/Magento/AsynchronousOperations/Model/MassSchedule.php
@@ -11,7 +11,6 @@
 use Magento\AsynchronousOperations\Api\Data\AsyncResponseInterfaceFactory;
 use Magento\AsynchronousOperations\Api\Data\ItemStatusInterface;
 use Magento\AsynchronousOperations\Api\Data\ItemStatusInterfaceFactory;
-use Magento\AsynchronousOperations\Model\ResourceModel\Operation\OperationRepository;
 use Magento\Authorization\Model\UserContextInterface;
 use Magento\Framework\Bulk\BulkManagementInterface;
 use Magento\Framework\DataObject\IdentityGeneratorInterface;
@@ -144,7 +143,6 @@ public function publishMass($topicName, array $entitiesArray, $groupId = null, $
         foreach ($entitiesArray as $key => $entityParams) {
             /** @var \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface $requestItem */
             $requestItem = $this->itemStatusInterfaceFactory->create();
-
             try {
                 $operation = $this->operationRepository->create($topicName, $entityParams, $groupId, $key);
                 $operations[] = $operation;
diff --git a/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php b/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php
index 74740cba9a6d8..7575257555fae 100644
--- a/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php
+++ b/app/code/Magento/AsynchronousOperations/Model/OperationManagement.php
@@ -7,17 +7,19 @@
 namespace Magento\AsynchronousOperations\Model;
 
 use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
-use Magento\Framework\EntityManager\EntityManager;
+use Magento\Framework\App\ResourceConnection;
+use Psr\Log\LoggerInterface;
+use Magento\Framework\Bulk\OperationManagementInterface;
 
 /**
  * Class for managing Bulk Operations
  */
-class OperationManagement implements \Magento\Framework\Bulk\OperationManagementInterface
+class OperationManagement implements OperationManagementInterface
 {
     /**
-     * @var EntityManager
+     * @var ResourceConnection
      */
-    private $entityManager;
+    private $connection;
 
     /**
      * @var OperationInterfaceFactory
@@ -32,25 +34,26 @@ class OperationManagement implements \Magento\Framework\Bulk\OperationManagement
     /**
      * OperationManagement constructor.
      *
-     * @param EntityManager $entityManager
      * @param OperationInterfaceFactory $operationFactory
-     * @param \Psr\Log\LoggerInterface $logger
+     * @param LoggerInterface $logger
+     * @param ResourceConnection $connection
      */
     public function __construct(
-        EntityManager $entityManager,
         OperationInterfaceFactory $operationFactory,
-        \Psr\Log\LoggerInterface $logger
+        LoggerInterface $logger,
+        ResourceConnection $connection
     ) {
-        $this->entityManager = $entityManager;
         $this->operationFactory = $operationFactory;
         $this->logger = $logger;
+        $this->connection = $connection;
     }
 
     /**
      * @inheritDoc
      */
     public function changeOperationStatus(
-        $operationId,
+        $bulkUuid,
+        $operationKey,
         $status,
         $errorCode = null,
         $message = null,
@@ -58,14 +61,17 @@ public function changeOperationStatus(
         $resultData = null
     ) {
         try {
-            $operationEntity = $this->operationFactory->create();
-            $this->entityManager->load($operationEntity, $operationId);
-            $operationEntity->setErrorCode($errorCode);
-            $operationEntity->setStatus($status);
-            $operationEntity->setResultMessage($message);
-            $operationEntity->setSerializedData($data);
-            $operationEntity->setResultSerializedData($resultData);
-            $this->entityManager->save($operationEntity);
+            $connection = $this->connection->getConnection();
+            $table = $this->connection->getTableName('magento_operation');
+            $bind = [
+                'error_code' => $errorCode,
+                'status' => $status,
+                'result_message' => $message,
+                'serialized_data' => $data,
+                'result_serialized_data' => $resultData
+            ];
+            $where = ['bulk_uuid = ?' => $bulkUuid, 'operation_key = ?' => $operationKey];
+            $connection->update($table, $bind, $where);
         } catch (\Exception $exception) {
             $this->logger->critical($exception->getMessage());
             return false;
diff --git a/app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php b/app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php
index 453f786bdf47b..5c5619a4b41d1 100644
--- a/app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php
+++ b/app/code/Magento/AsynchronousOperations/Model/OperationProcessor.php
@@ -163,6 +163,7 @@ public function process(string $encodedMessage)
 
         $serializedData = (isset($errorCode)) ? $operation->getSerializedData() : null;
         $this->operationManagement->changeOperationStatus(
+            $operation->getBulkUuid(),
             $operation->getId(),
             $status,
             $errorCode,
diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php
index 0eaa5315af614..b5c33af1470f3 100644
--- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php
+++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation.php
@@ -6,10 +6,12 @@
 
 namespace Magento\AsynchronousOperations\Model\ResourceModel;
 
+use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
+
 /**
  * Resource class for Bulk Operations
  */
-class Operation extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
+class Operation extends AbstractDb
 {
 
     public const TABLE_NAME = "magento_operation";
diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
index b189d81d31636..bbf8bde36e11d 100644
--- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
+++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
@@ -3,7 +3,6 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-
 declare(strict_types=1);
 
 namespace Magento\AsynchronousOperations\Model\ResourceModel\Operation;
@@ -11,6 +10,7 @@
 use Magento\AsynchronousOperations\Api\Data\OperationInterface;
 use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
 use Magento\AsynchronousOperations\Model\OperationRepositoryInterface;
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\MessageQueue\MessageValidator;
 use Magento\Framework\MessageQueue\MessageEncoder;
 use Magento\Framework\Serialize\Serializer\Json;
@@ -73,11 +73,13 @@ public function __construct(
      * @param string $topicName
      * @param array $entityParams
      * @param string $groupId
+     * @param string $operationId
      * @return OperationInterface
+     * @throws LocalizedException
      * @deprecated No longer used.
      * @see create()
      */
-    public function createByTopic($topicName, $entityParams, $groupId)
+    public function createByTopic($topicName, $entityParams, $groupId, $operationId)
     {
         $this->messageValidator->validate($topicName, $entityParams);
         $encodedMessage = $this->messageEncoder->encode($topicName, $entityParams);
@@ -89,10 +91,11 @@ public function createByTopic($topicName, $entityParams, $groupId)
         ];
         $data = [
             'data' => [
-                OperationInterface::BULK_ID         => $groupId,
-                OperationInterface::TOPIC_NAME      => $topicName,
+                OperationInterface::ID => $operationId,
+                OperationInterface::BULK_ID => $groupId,
+                OperationInterface::TOPIC_NAME => $topicName,
                 OperationInterface::SERIALIZED_DATA => $this->jsonSerializer->serialize($serializedData),
-                OperationInterface::STATUS          => OperationInterface::STATUS_TYPE_OPEN,
+                OperationInterface::STATUS => OperationInterface::STATUS_TYPE_OPEN,
             ],
         ];
 
@@ -103,9 +106,11 @@ public function createByTopic($topicName, $entityParams, $groupId)
 
     /**
      * @inheritDoc
+     *
+     * @throws LocalizedException
      */
     public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface
     {
-        return $this->createByTopic($topicName, $entityParams, $groupId);
+        return $this->createByTopic($topicName, $entityParams, $groupId, $operationId);
     }
 }
diff --git a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkManagementTest.php b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkManagementTest.php
index 724871f216472..14abb41c77fc4 100644
--- a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkManagementTest.php
+++ b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/BulkManagementTest.php
@@ -196,7 +196,7 @@ public function testRetryBulk()
         $bulkUuid = 'bulk-001';
         $errorCodes = ['errorCode'];
         $connectionName = 'default';
-        $operationId = 1;
+        $operationId = 0;
         $operationTable = 'magento_operation';
         $topicName = 'topic.name';
         $metadata = $this->getMockForAbstractClass(EntityMetadataInterface::class);
@@ -216,13 +216,20 @@ public function testRetryBulk()
         $operationCollection->expects($this->once())->method('getItems')->willReturn([$operation]);
         $connection->expects($this->once())->method('beginTransaction')->willReturnSelf();
         $operation->expects($this->once())->method('getId')->willReturn($operationId);
-        $operation->expects($this->once())->method('setId')->with(null)->willReturnSelf();
         $this->resourceConnection->expects($this->once())
             ->method('getTableName')->with($operationTable)->willReturn($operationTable);
+        $connection->expects($this->at(1))
+            ->method('quoteInto')
+            ->with('operation_key IN (?)', [$operationId])
+            ->willReturn('operation_key IN (' . $operationId . ')');
+        $connection->expects($this->at(2))
+            ->method('quoteInto')
+            ->with('bulk_uuid = ?', $bulkUuid)
+            ->willReturn("bulk_uuid = '$bulkUuid'");
         $connection->expects($this->once())
-            ->method('quoteInto')->with('id IN (?)', [$operationId])->willReturn('id IN (' . $operationId . ')');
-        $connection->expects($this->once())
-            ->method('delete')->with($operationTable, 'id IN (' . $operationId . ')')->willReturn(1);
+            ->method('delete')
+            ->with($operationTable, 'operation_key IN (' . $operationId . ') AND bulk_uuid = \'' . $bulkUuid . '\'')
+            ->willReturn(1);
         $connection->expects($this->once())->method('commit')->willReturnSelf();
         $operation->expects($this->once())->method('getTopicName')->willReturn($topicName);
         $this->publisher->expects($this->once())->method('publish')->with($topicName, [$operation])->willReturn(null);
@@ -239,7 +246,7 @@ public function testRetryBulkWithException()
         $bulkUuid = 'bulk-001';
         $errorCodes = ['errorCode'];
         $connectionName = 'default';
-        $operationId = 1;
+        $operationId = 0;
         $operationTable = 'magento_operation';
         $exceptionMessage = 'Exception message';
         $metadata = $this->getMockForAbstractClass(EntityMetadataInterface::class);
@@ -259,13 +266,19 @@ public function testRetryBulkWithException()
         $operationCollection->expects($this->once())->method('getItems')->willReturn([$operation]);
         $connection->expects($this->once())->method('beginTransaction')->willReturnSelf();
         $operation->expects($this->once())->method('getId')->willReturn($operationId);
-        $operation->expects($this->once())->method('setId')->with(null)->willReturnSelf();
         $this->resourceConnection->expects($this->once())
             ->method('getTableName')->with($operationTable)->willReturn($operationTable);
+        $connection->expects($this->at(1))
+            ->method('quoteInto')
+            ->with('operation_key IN (?)', [$operationId])
+            ->willReturn('operation_key IN (' . $operationId . ')');
+        $connection->expects($this->at(2))
+            ->method('quoteInto')
+            ->with('bulk_uuid = ?', $bulkUuid)
+            ->willReturn("bulk_uuid = '$bulkUuid'");
         $connection->expects($this->once())
-            ->method('quoteInto')->with('id IN (?)', [$operationId])->willReturn('id IN (' . $operationId . ')');
-        $connection->expects($this->once())
-            ->method('delete')->with($operationTable, 'id IN (' . $operationId . ')')
+            ->method('delete')
+            ->with($operationTable, 'operation_key IN (' . $operationId . ') AND bulk_uuid = \'' . $bulkUuid . '\'')
             ->willThrowException(new \Exception($exceptionMessage));
         $connection->expects($this->once())->method('rollBack')->willReturnSelf();
         $this->logger->expects($this->once())->method('critical')->with($exceptionMessage);
diff --git a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/OperationManagementTest.php b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/OperationManagementTest.php
index 476bad2d0ee04..0f437cefd3fca 100644
--- a/app/code/Magento/AsynchronousOperations/Test/Unit/Model/OperationManagementTest.php
+++ b/app/code/Magento/AsynchronousOperations/Test/Unit/Model/OperationManagementTest.php
@@ -7,11 +7,10 @@
 
 namespace Magento\AsynchronousOperations\Test\Unit\Model;
 
-use Magento\AsynchronousOperations\Api\Data\OperationInterface;
 use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
 use Magento\AsynchronousOperations\Model\OperationManagement;
-use Magento\Framework\EntityManager\EntityManager;
-use Magento\Framework\EntityManager\MetadataPool;
+use Magento\Framework\App\ResourceConnection;
+use Magento\Framework\DB\Adapter\AdapterInterface;
 use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 use Psr\Log\LoggerInterface;
@@ -24,79 +23,116 @@ class OperationManagementTest extends TestCase
     private $model;
 
     /**
-     * @var MockObject
-     */
-    private $entityManagerMock;
-
-    /**
-     * @var MockObject
+     * @var OperationInterfaceFactory|MockObject
      */
     private $operationFactoryMock;
 
     /**
-     * @var MockObject
-     */
-    private $operationMock;
-
-    /**
-     * @var MockObject
+     * @var LoggerInterface|MockObject
      */
     private $loggerMock;
+
     /**
-     * @var MetadataPool|MockObject
+     * @var ResourceConnection|MockObject
      */
-    private $metadataPoolMock;
+    private $resourceConnectionMock;
 
     protected function setUp(): void
     {
-        $this->entityManagerMock = $this->createMock(EntityManager::class);
-        $this->metadataPoolMock = $this->createMock(MetadataPool::class);
         $this->operationFactoryMock = $this->createPartialMock(
             OperationInterfaceFactory::class,
             ['create']
         );
-        $this->operationMock =
-            $this->getMockForAbstractClass(OperationInterface::class);
         $this->loggerMock = $this->getMockForAbstractClass(LoggerInterface::class);
+        $this->resourceConnectionMock = $this->getMockBuilder(ResourceConnection::class)
+            ->disableOriginalConstructor()
+            ->setMethods(['getConnection', 'getTableName'])
+            ->getMock();
+
         $this->model = new OperationManagement(
-            $this->entityManagerMock,
             $this->operationFactoryMock,
-            $this->loggerMock
+            $this->loggerMock,
+            $this->resourceConnectionMock
         );
     }
 
+    /**
+     * Test change operation status.
+     */
     public function testChangeOperationStatus()
     {
-        $operationId = 1;
+        $operationKey = 1;
         $status = 1;
         $message = 'Message';
         $data = 'data';
         $errorCode = 101;
-        $this->operationFactoryMock->expects($this->once())->method('create')->willReturn($this->operationMock);
-        $this->entityManagerMock->expects($this->once())->method('load')->with($this->operationMock, $operationId);
-        $this->operationMock->expects($this->once())->method('setStatus')->with($status)->willReturnSelf();
-        $this->operationMock->expects($this->once())->method('setResultMessage')->with($message)->willReturnSelf();
-        $this->operationMock->expects($this->once())->method('setSerializedData')->with($data)->willReturnSelf();
-        $this->operationMock->expects($this->once())->method('setErrorCode')->with($errorCode)->willReturnSelf();
-        $this->entityManagerMock->expects($this->once())->method('save')->with($this->operationMock);
-        $this->assertTrue($this->model->changeOperationStatus($operationId, $status, $errorCode, $message, $data));
+        $bulkUuid = '13f85e88-be1d-4ce7-8570-88637a589930';
+
+        $tableName = 'magento_operation';
+
+        $bind = [
+            'error_code' => $errorCode,
+            'status' => $status,
+            'result_message' => $message,
+            'serialized_data' => $data,
+            'result_serialized_data' => ''
+        ];
+        $where = ['bulk_uuid = ?' => $bulkUuid, 'operation_key = ?' => $operationKey];
+
+        $connection = $this->getMockBuilder(AdapterInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $this->resourceConnectionMock->expects($this->atLeastOnce())
+            ->method('getConnection')->with('default')
+            ->willReturn($connection);
+        $this->resourceConnectionMock->expects($this->once())->method('getTableName')->with($tableName)
+            ->willReturn($tableName);
+
+        $connection->expects($this->once())->method('update')->with($tableName, $bind, $where)
+            ->willReturn(1);
+        $this->assertTrue(
+            $this->model->changeOperationStatus($bulkUuid, $operationKey, $status, $errorCode, $message, $data)
+        );
     }
 
+    /**
+     * Test generic exception throw case.
+     */
     public function testChangeOperationStatusIfExceptionWasThrown()
     {
-        $operationId = 1;
+        $operationKey = 1;
         $status = 1;
         $message = 'Message';
         $data = 'data';
         $errorCode = 101;
-        $this->operationFactoryMock->expects($this->once())->method('create')->willReturn($this->operationMock);
-        $this->entityManagerMock->expects($this->once())->method('load')->with($this->operationMock, $operationId);
-        $this->operationMock->expects($this->once())->method('setStatus')->with($status)->willReturnSelf();
-        $this->operationMock->expects($this->once())->method('setResultMessage')->with($message)->willReturnSelf();
-        $this->operationMock->expects($this->once())->method('setSerializedData')->with($data)->willReturnSelf();
-        $this->operationMock->expects($this->once())->method('setErrorCode')->with($errorCode)->willReturnSelf();
-        $this->entityManagerMock->expects($this->once())->method('save')->willThrowException(new \Exception());
+        $bulkUuid = '13f85e88-be1d-4ce7-8570-88637a589930';
+
+        $tableName = 'magento_operation';
+
+        $bind = [
+            'error_code' => $errorCode,
+            'status' => $status,
+            'result_message' => $message,
+            'serialized_data' => $data,
+            'result_serialized_data' => ''
+        ];
+        $where = ['bulk_uuid = ?' => $bulkUuid, 'operation_key = ?' => $operationKey];
+
+        $connection = $this->getMockBuilder(AdapterInterface::class)
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $this->resourceConnectionMock->expects($this->atLeastOnce())
+            ->method('getConnection')->with('default')
+            ->willReturn($connection);
+        $this->resourceConnectionMock->expects($this->once())
+            ->method('getTableName')->with($tableName)
+            ->willReturn($tableName);
+
+        $connection->expects($this->once())->method('update')->with($tableName, $bind, $where)
+            ->willThrowException(new \Exception());
         $this->loggerMock->expects($this->once())->method('critical');
-        $this->assertFalse($this->model->changeOperationStatus($operationId, $status, $errorCode, $message, $data));
+        $this->assertFalse(
+            $this->model->changeOperationStatus($bulkUuid, $operationKey, $status, $errorCode, $message, $data)
+        );
     }
 }
diff --git a/app/code/Magento/AsynchronousOperations/etc/db_schema.xml b/app/code/Magento/AsynchronousOperations/etc/db_schema.xml
index f287a368c72fb..5d49d71ee46b0 100644
--- a/app/code/Magento/AsynchronousOperations/etc/db_schema.xml
+++ b/app/code/Magento/AsynchronousOperations/etc/db_schema.xml
@@ -9,15 +9,15 @@
         xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
     <table name="magento_bulk" resource="default" engine="innodb"
            comment="Bulk entity that represents set of related asynchronous operations">
-        <column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
+        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
                 comment="Bulk Internal ID (must not be exposed)"/>
         <column xsi:type="varbinary" name="uuid" nullable="true" length="39"
                 comment="Bulk UUID (can be exposed to reference bulk entity)"/>
-        <column xsi:type="int" name="user_id" unsigned="true" nullable="true" identity="false"
+        <column xsi:type="int" name="user_id" padding="10" unsigned="true" nullable="true" identity="false"
                 comment="ID of the WebAPI user that performed an action"/>
         <column xsi:type="int" name="user_type" nullable="true" comment="Which type of user"/>
         <column xsi:type="varchar" name="description" nullable="true" length="255" comment="Bulk Description"/>
-        <column xsi:type="int" name="operation_count" unsigned="true" nullable="false" identity="false"
+        <column xsi:type="int" name="operation_count" padding="10" unsigned="true" nullable="false" identity="false"
                 comment="Total number of operations scheduled within this bulk"/>
         <column xsi:type="timestamp" name="start_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
                 comment="Bulk start time"/>
@@ -32,8 +32,10 @@
         </index>
     </table>
     <table name="magento_operation" resource="default" engine="innodb" comment="Operation entity">
-        <column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
+        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
                 comment="Operation ID"/>
+        <column xsi:type="int" name="operation_key" padding="10" unsigned="true" nullable="false"
+                comment="Operation Key"/>
         <column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
         <column xsi:type="varchar" name="topic_name" nullable="true" length="255"
                 comment="Name of the related message queue topic"/>
@@ -41,9 +43,9 @@
                 comment="Data (serialized) required to perform an operation"/>
         <column xsi:type="blob" name="result_serialized_data" nullable="true"
                 comment="Result data (serialized) after perform an operation"/>
-        <column xsi:type="smallint" name="status" unsigned="false" nullable="true" identity="false"
+        <column xsi:type="smallint" name="status" padding="6" unsigned="false" nullable="true" identity="false"
                 default="0" comment="Operation status (OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED)"/>
-        <column xsi:type="smallint" name="error_code" unsigned="false" nullable="true" identity="false"
+        <column xsi:type="smallint" name="error_code" padding="6" unsigned="false" nullable="true" identity="false"
                 comment="Code of the error that appeared during operation execution (used to aggregate related failed operations)"/>
         <column xsi:type="varchar" name="result_message" nullable="true" length="255"
                 comment="Operation result message"/>
@@ -59,7 +61,7 @@
     </table>
     <table name="magento_acknowledged_bulk" resource="default" engine="innodb"
            comment="Bulk that was viewed by user from notification area">
-        <column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
+        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
                 comment="Internal ID"/>
         <column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
         <constraint xsi:type="primary" referenceId="PRIMARY">
diff --git a/app/code/Magento/AsynchronousOperations/etc/db_schema_whitelist.json b/app/code/Magento/AsynchronousOperations/etc/db_schema_whitelist.json
index 9b6c0709e1916..6cbb3c664a50f 100644
--- a/app/code/Magento/AsynchronousOperations/etc/db_schema_whitelist.json
+++ b/app/code/Magento/AsynchronousOperations/etc/db_schema_whitelist.json
@@ -22,6 +22,7 @@
     "magento_operation": {
         "column": {
             "id": true,
+            "operation_key": true,
             "bulk_uuid": true,
             "topic_name": true,
             "serialized_data": true,
@@ -35,7 +36,8 @@
         },
         "constraint": {
             "PRIMARY": true,
-            "MAGENTO_OPERATION_BULK_UUID_MAGENTO_BULK_UUID": true
+            "MAGENTO_OPERATION_BULK_UUID_MAGENTO_BULK_UUID": true,
+            "UUID": true
         }
     },
     "magento_acknowledged_bulk": {
@@ -49,4 +51,4 @@
             "MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID": true
         }
     }
-}
\ No newline at end of file
+}
diff --git a/app/code/Magento/WebapiAsync/Model/OperationRepository.php b/app/code/Magento/WebapiAsync/Model/OperationRepository.php
index 7af8ff877ebbc..87db3dfb59e2c 100644
--- a/app/code/Magento/WebapiAsync/Model/OperationRepository.php
+++ b/app/code/Magento/WebapiAsync/Model/OperationRepository.php
@@ -72,6 +72,7 @@ public function __construct(
      */
     public function create($topicName, $entityParams, $groupId, $operationId): OperationInterface
     {
+
         $this->messageValidator->validate($topicName, $entityParams);
         $requestData = $this->inputParamsResolver->getInputData();
         if ($operationId === null || !isset($requestData[$operationId])) {
@@ -88,13 +89,13 @@ public function create($topicName, $entityParams, $groupId, $operationId): Opera
         ];
         $data = [
             'data' => [
-                OperationInterface::BULK_ID         => $groupId,
-                OperationInterface::TOPIC_NAME      => $topicName,
+                OperationInterface::ID => $operationId,
+                OperationInterface::BULK_ID => $groupId,
+                OperationInterface::TOPIC_NAME => $topicName,
                 OperationInterface::SERIALIZED_DATA => $this->jsonSerializer->serialize($serializedData),
-                OperationInterface::STATUS          => OperationInterface::STATUS_TYPE_OPEN,
+                OperationInterface::STATUS => OperationInterface::STATUS_TYPE_OPEN,
             ],
         ];
-
         /** @var OperationInterface $operation */
         $operation = $this->operationFactory->create($data);
         return $operation;
diff --git a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/BulkManagementTest.php b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/BulkManagementTest.php
index 8c72977f6d8c8..3014fe37acb78 100644
--- a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/BulkManagementTest.php
+++ b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/BulkManagementTest.php
@@ -94,9 +94,6 @@ public function testRetryBulk()
             ->create()
             ->addFieldToFilter('bulk_uuid', ['eq' => $bulkUuid])
             ->getItems();
-        foreach ($operations as $operation) {
-            $operation->setId(null);
-        }
         $this->publisherMock->expects($this->once())
             ->method('publish')
             ->with($topicName, array_values($operations));
diff --git a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/OperationManagementTest.php b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/OperationManagementTest.php
index 7633a161253cd..4be795dd654cd 100644
--- a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/OperationManagementTest.php
+++ b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/OperationManagementTest.php
@@ -8,7 +8,11 @@
 
 use Magento\AsynchronousOperations\Api\Data\OperationInterface;
 use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
+use Magento\AsynchronousOperations\Model\BulkStatus;
+use Magento\AsynchronousOperations\Model\OperationManagement;
 use Magento\Framework\EntityManager\EntityManager;
+use Magento\Framework\App\ResourceConnection;
+use Magento\TestFramework\Helper\Bootstrap;
 
 class OperationManagementTest extends \PHPUnit\Framework\TestCase
 {
@@ -32,21 +36,18 @@ class OperationManagementTest extends \PHPUnit\Framework\TestCase
      */
     private $entityManager;
 
+    /**
+     * @var ResourceConnection
+     */
+    private $connection;
+
     protected function setUp(): void
     {
-        $this->model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            \Magento\AsynchronousOperations\Model\OperationManagement::class
-        );
-        $this->bulkStatusManagement = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            \Magento\AsynchronousOperations\Model\BulkStatus::class
-        );
-
-        $this->operationFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            OperationInterfaceFactory::class
-        );
-        $this->entityManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            EntityManager::class
-        );
+        $this->connection = Bootstrap::getObjectManager()->get(ResourceConnection::class);
+        $this->model = Bootstrap::getObjectManager()->get(OperationManagement::class);
+        $this->bulkStatusManagement = Bootstrap::getObjectManager()->get(BulkStatus::class);
+        $this->operationFactory = Bootstrap::getObjectManager()->get(OperationInterfaceFactory::class);
+        $this->entityManager = Bootstrap::getObjectManager()->get(EntityManager::class);
     }
 
     /**
@@ -62,13 +63,22 @@ public function testGetBulkStatus()
         $operation = array_shift($operations);
         $operationId = $operation->getId();
 
-        $this->assertTrue($this->model->changeOperationStatus($operationId, OperationInterface::STATUS_TYPE_OPEN));
+        $this->assertTrue($this->model->changeOperationStatus(
+            'bulk-uuid-5',
+            $operationId,
+            OperationInterface::STATUS_TYPE_OPEN
+        ));
+
+        $table = $this->connection->getTableName('magento_operation');
+        $connection = $this->connection->getConnection();
+        $select = $connection->select()
+            ->from($table)
+            ->where("bulk_uuid = ?", 'bulk-uuid-5')
+            ->where("operation_key = ?", $operationId);
+        $updatedOperation = $connection->fetchRow($select);
 
-        /** @var OperationInterface $updatedOperation */
-        $updatedOperation = $this->operationFactory->create();
-        $this->entityManager->load($updatedOperation, $operationId);
-        $this->assertEquals(OperationInterface::STATUS_TYPE_OPEN, $updatedOperation->getStatus());
-        $this->assertNull($updatedOperation->getResultMessage());
-        $this->assertNull($updatedOperation->getSerializedData());
+        $this->assertEquals(OperationInterface::STATUS_TYPE_OPEN, $updatedOperation['status']);
+        $this->assertNull($updatedOperation['result_message']);
+        $this->assertNull($updatedOperation['serialized_data']);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/bulk.php b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/bulk.php
index 9e215667903d3..576927184ba8a 100644
--- a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/bulk.php
+++ b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/bulk.php
@@ -60,6 +60,7 @@
         'status' => OperationInterface::STATUS_TYPE_COMPLETE,
         'error_code' => null,
         'result_message' => null,
+        'operation_key' => 0
     ],
     [
         'bulk_uuid' => 'bulk-uuid-3',
@@ -68,6 +69,7 @@
         'status' => OperationInterface::STATUS_TYPE_RETRIABLY_FAILED,
         'error_code' => 1111,
         'result_message' => 'Something went wrong during your request',
+        'operation_key' => 0
     ],
     [
         'bulk_uuid' => 'bulk-uuid-4',
@@ -76,6 +78,7 @@
         'status' => OperationInterface::STATUS_TYPE_COMPLETE,
         'error_code' => null,
         'result_message' => null,
+        'operation_key' => 0
     ],
     [
         'bulk_uuid' => 'bulk-uuid-5',
@@ -84,6 +87,7 @@
         'status' => OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED,
         'error_code' => 1111,
         'result_message' => 'Something went wrong during your request',
+        'operation_key' => 0
     ],
     [
         'bulk_uuid' => 'bulk-uuid-5',
@@ -92,6 +96,7 @@
         'status' => OperationInterface::STATUS_TYPE_RETRIABLY_FAILED,
         'error_code' => 2222,
         'result_message' => 'Entity with ID=4 does not exist',
+        'operation_key' => 1
     ],
 ];
 
@@ -102,8 +107,8 @@
 }
 
 $operationQuery = "INSERT INTO {$operationTable}"
-    . " (`bulk_uuid`, `topic_name`, `serialized_data`, `status`, `error_code`, `result_message`)"
-    . " VALUES (:bulk_uuid, :topic_name, :serialized_data, :status, :error_code, :result_message);";
+    . " (`bulk_uuid`, `topic_name`, `serialized_data`, `status`, `error_code`, `result_message`, `operation_key`)"
+    . " VALUES (:bulk_uuid, :topic_name, :serialized_data, :status, :error_code, :result_message, :operation_key);";
 foreach ($operations as $operation) {
     $connection->query($operationQuery, $operation);
 }
diff --git a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/operation_searchable.php b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/operation_searchable.php
index a3547566c4245..1e27df71d5709 100644
--- a/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/operation_searchable.php
+++ b/dev/tests/integration/testsuite/Magento/AsynchronousOperations/_files/operation_searchable.php
@@ -42,6 +42,7 @@
         'status' => OperationInterface::STATUS_TYPE_COMPLETE,
         'error_code' => null,
         'result_message' => null,
+        'operation_key' => 0
     ],
     [
         'bulk_uuid' => 'bulk-uuid-searchable-6',
@@ -50,6 +51,7 @@
         'status' => OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED,
         'error_code' => 1111,
         'result_message' => 'Something went wrong during your request',
+        'operation_key' => 1
     ],
     [
         'bulk_uuid' => 'bulk-uuid-searchable-6',
@@ -58,6 +60,7 @@
         'status' => OperationInterface::STATUS_TYPE_RETRIABLY_FAILED,
         'error_code' => 2222,
         'result_message' => 'Entity with ID=4 does not exist',
+        'operation_key' => 2
     ],
     [
         'bulk_uuid' => 'bulk-uuid-searchable-6',
@@ -66,6 +69,7 @@
         'status' => OperationInterface::STATUS_TYPE_OPEN,
         'error_code' => null,
         'result_message' => '',
+        'operation_key' => 3
     ],
     [
         'bulk_uuid' => 'bulk-uuid-searchable-6',
@@ -74,6 +78,7 @@
         'status' => OperationInterface::STATUS_TYPE_OPEN,
         'error_code' => null,
         'result_message' => '',
+        'operation_key' => 4
     ],
     [
         'bulk_uuid' => 'bulk-uuid-searchable-6',
@@ -82,6 +87,7 @@
         'status' => OperationInterface::STATUS_TYPE_REJECTED,
         'error_code' => null,
         'result_message' => '',
+        'operation_key' => 5
     ],
 ];
 
@@ -92,8 +98,8 @@
 }
 
 $operationQuery = "INSERT INTO {$operationTable}"
-    . " (`bulk_uuid`, `topic_name`, `serialized_data`, `status`, `error_code`, `result_message`)"
-    . " VALUES (:bulk_uuid, :topic_name, :serialized_data, :status, :error_code, :result_message);";
+    . " (`bulk_uuid`, `topic_name`, `serialized_data`, `status`, `error_code`, `result_message`, `operation_key`)"
+    . " VALUES (:bulk_uuid, :topic_name, :serialized_data, :status, :error_code, :result_message, :operation_key);";
 foreach ($operations as $operation) {
     $connection->query($operationQuery, $operation);
 }
diff --git a/lib/internal/Magento/Framework/Bulk/OperationInterface.php b/lib/internal/Magento/Framework/Bulk/OperationInterface.php
index c1cac9f171430..c9672a031c2dd 100644
--- a/lib/internal/Magento/Framework/Bulk/OperationInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/OperationInterface.php
@@ -15,7 +15,7 @@ interface OperationInterface extends \Magento\Framework\Api\ExtensibleDataInterf
     /**#@+
      * Constants for keys of data array. Identical to the name of the getter in snake case
      */
-    const ID = 'id';
+    const ID = 'operation_key';
     const BULK_ID = 'bulk_uuid';
     const TOPIC_NAME = 'topic_name';
     const SERIALIZED_DATA = 'serialized_data';
diff --git a/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php b/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php
index e86d3ca8c1624..886bd45aeaed0 100644
--- a/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php
@@ -16,7 +16,8 @@ interface OperationManagementInterface
     /**
      * Used by consumer to change status after processing operation
      *
-     * @param int $operationId
+     * @param string $bulkUuid
+     * @param int $operationKey
      * @param int $status
      * @param int|null $errorCode
      * @param string|null $message property to update Result Message
@@ -24,5 +25,5 @@ interface OperationManagementInterface
      * @return boolean
      * @since 100.2.0
      */
-    public function changeOperationStatus($operationId, $status, $errorCode = null, $message = null, $data = null);
+    public function changeOperationStatus($bulkUuid, $operationKey, $status, $errorCode = null, $message = null, $data = null); // @codingStandardsIgnoreLine
 }

From b29b43d3b074bb79e34451855faad50dc1e65eb4 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 28 May 2020 11:26:35 -0500
Subject: [PATCH 167/307] MC-33823: Merge CE, EE and B2B changes

---
 .../Magento/Framework/View/Helper/SecureHtmlRenderer.php    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index 22e53c5751f86..dc7085ab2e360 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -103,8 +103,10 @@ public function renderEventListenerAsTag(
         if (!$eventName || !$attributeJavascript || !$elementSelector || mb_strpos($eventName, 'on') !== 0) {
             throw new \InvalidArgumentException('Invalid JS event handler data provided');
         }
-        $listenerFunction = 'eventListener' .$this->random->getRandomString(32);
-        $elementName = 'listenedElement' .$this->random->getRandomString(32);
+
+        $random = $this->random->getRandomString(32);
+        $listenerFunction = 'eventListener' .$random;
+        $elementName = 'listenedElement' .$random;
         $script = <<<script
             function {$listenerFunction} () {
                 {$attributeJavascript};

From dd91179b6606bc542f178770cd07b2a6ff0c535f Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Tue, 19 May 2020 13:01:29 -0500
Subject: [PATCH 168/307] MC-34360: [Paypal Express Checkout] Can't place an
 order if the currency is euro

- add currency to skd url
---
 app/code/Magento/Paypal/Model/SmartButtonConfig.php | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/Paypal/Model/SmartButtonConfig.php b/app/code/Magento/Paypal/Model/SmartButtonConfig.php
index 88d68511ae5fe..b1bc05a8167c3 100644
--- a/app/code/Magento/Paypal/Model/SmartButtonConfig.php
+++ b/app/code/Magento/Paypal/Model/SmartButtonConfig.php
@@ -11,7 +11,7 @@
 use Magento\Framework\App\Config\ScopeConfigInterface;
 use Magento\Framework\Locale\ResolverInterface;
 use Magento\Store\Model\ScopeInterface;
-use Magento\Paypal\Model\Config as PayPalConfig;
+use Magento\Store\Model\StoreManagerInterface;
 
 /**
  * Provides configuration values for PayPal in-context checkout
@@ -50,6 +50,11 @@ class SmartButtonConfig
      */
     private $unsupportedPaymentMethods;
 
+    /**
+     * @var StoreManagerInterface
+     */
+    private $storeManager;
+
     /**
      * Base url for Paypal SDK
      */
@@ -59,6 +64,7 @@ class SmartButtonConfig
      * @param ResolverInterface $localeResolver
      * @param ConfigFactory $configFactory
      * @param ScopeConfigInterface $scopeConfig
+     * @param StoreManagerInterface $storeManager
      * @param array $defaultStyles
      * @param array $disallowedFundingMap
      * @param array $unsupportedPaymentMethods
@@ -67,6 +73,7 @@ public function __construct(
         ResolverInterface $localeResolver,
         ConfigFactory $configFactory,
         ScopeConfigInterface $scopeConfig,
+        StoreManagerInterface $storeManager,
         $defaultStyles = [],
         $disallowedFundingMap = [],
         $unsupportedPaymentMethods = []
@@ -75,6 +82,7 @@ public function __construct(
         $this->config = $configFactory->create();
         $this->config->setMethod(Config::METHOD_EXPRESS);
         $this->scopeConfig = $scopeConfig;
+        $this->storeManager = $storeManager;
         $this->defaultStyles = $defaultStyles;
         $this->disallowedFundingMap = $disallowedFundingMap;
         $this->unsupportedPaymentMethods = $unsupportedPaymentMethods;
@@ -123,6 +131,7 @@ private function generatePaypalSdkUrl(string $page): string
                 'merchant-id' => $this->config->getValue('merchant_id'),
                 'locale' => $this->localeResolver->getLocale(),
                 'intent' => $this->getIntent(),
+                'currency' => $this->storeManager->getStore()->getCurrentCurrencyCode(),
             ];
         if ($disallowedFunding) {
             $params['disable-funding'] = $disallowedFunding;

From 0605d535a36ced5050f9c6b14c9aed0be56f0896 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Tue, 19 May 2020 15:17:59 -0500
Subject: [PATCH 169/307] MC-34360: [Paypal Express Checkout] Can't place an
 order if the currency is euro

- fix SmartButtonConfigTest
---
 .../Test/Unit/Model/SmartButtonConfigTest.php      | 14 ++++++++++++++
 .../Test/Unit/Model/_files/expected_config.php     |  5 +++++
 2 files changed, 19 insertions(+)

diff --git a/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php b/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php
index fe7619e4166ba..a19b27d0ec97b 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php
@@ -12,6 +12,8 @@
 use Magento\Paypal\Model\Config;
 use Magento\Paypal\Model\ConfigFactory;
 use Magento\Paypal\Model\SmartButtonConfig;
+use Magento\Store\Model\Store;
+use Magento\Store\Model\StoreManagerInterface;
 use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 
@@ -56,10 +58,22 @@ protected function setUp(): void
             ->setMethods(['create'])
             ->getMock();
         $configFactoryMock->expects($this->once())->method('create')->willReturn($this->configMock);
+
+        /** @var Store|MockObject $storeMock */
+        $storeMock = $this->createMock(Store::class);
+        $storeMock->method('getCurrentCurrencyCode')
+            ->willReturn('USD');
+
+        /** @var StoreManagerInterface|MockObject $storeManagerMock */
+        $storeManagerMock = $this->getMockForAbstractClass(StoreManagerInterface::class);
+        $storeManagerMock->method('getStore')
+            ->willReturn($storeMock);
+
         $this->model = new SmartButtonConfig(
             $this->localeResolverMock,
             $configFactoryMock,
             $scopeConfigMock,
+            $storeManagerMock,
             $this->getDefaultStyles(),
             $this->getDisallowedFundingMap(),
             $this->getUnsupportedPaymentMethods()
diff --git a/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_config.php b/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_config.php
index 6089b8b20b1ac..a7bd43e53085f 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_config.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/_files/expected_config.php
@@ -46,6 +46,7 @@ function generateExpectedPaypalSdkUrl(array $params) : String
                     'merchant-id' => 'merchant',
                     'locale' => 'es_MX',
                     'intent' => 'authorize',
+                    'currency' => 'USD',
                     'disable-funding' => implode(
                         ',',
                         ['credit', 'venmo', 'bancontact', 'eps', 'giropay', 'ideal', 'mybank', 'p24', 'sofort']
@@ -84,6 +85,7 @@ function generateExpectedPaypalSdkUrl(array $params) : String
                     'merchant-id' => 'merchant',
                     'locale' => 'en_BR',
                     'intent' => 'authorize',
+                    'currency' => 'USD',
                     'disable-funding' => implode(
                         ',',
                         ['venmo', 'bancontact', 'eps', 'giropay', 'ideal', 'mybank', 'p24', 'sofort']
@@ -121,6 +123,7 @@ function generateExpectedPaypalSdkUrl(array $params) : String
                     'merchant-id' => 'merchant',
                     'locale' => 'en_US',
                     'intent' => 'authorize',
+                    'currency' => 'USD',
                     'disable-funding' => implode(
                         ',',
                         ['venmo', 'bancontact', 'eps', 'giropay', 'ideal', 'mybank', 'p24', 'sofort']
@@ -158,6 +161,7 @@ function generateExpectedPaypalSdkUrl(array $params) : String
                     'merchant-id' => 'merchant',
                     'locale' => 'en_US',
                     'intent' => 'authorize',
+                    'currency' => 'USD',
                     'disable-funding' => implode(
                         ',',
                         ['credit','venmo', 'bancontact', 'eps', 'giropay', 'ideal', 'mybank', 'p24', 'sofort']
@@ -196,6 +200,7 @@ function generateExpectedPaypalSdkUrl(array $params) : String
                     'merchant-id' => 'merchant',
                     'locale' => 'en_BR',
                     'intent' => 'authorize',
+                    'currency' => 'USD',
                     'disable-funding' => implode(
                         ',',
                         ['card','venmo', 'bancontact', 'eps', 'giropay', 'ideal', 'mybank', 'p24', 'sofort']

From c446aa3224440a0d7d1c1c6376b683f01d6e446b Mon Sep 17 00:00:00 2001
From: kphan <kphan@adobe.com>
Date: Tue, 19 May 2020 16:43:07 -0500
Subject: [PATCH 170/307] MC-34360: [Paypal Express Checkout] Can't place an
 order if the currency is euro

- Modified tests to have test coverage on global scope
---
 .../Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml   |  1 -
 ...StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml | 11 ++++++-----
 ...torefrontPaypalSmartButtonWithEuroCurrencyTest.xml |  6 ++++++
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml b/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml
index b52fc05ca5a11..31d388e5a64e4 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml
@@ -12,7 +12,6 @@
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
             <!--Config PayPal Express Checkout-->
             <actionGroup ref="ConfigPayPalExpressCheckoutActionGroup" stepKey="ConfigPayPalExpressCheckout"/>
-            <!-- Configure PayPal Express Checkout -->
             <magentoCLI command="cache:clean" arguments="config full_page" stepKey="cleanFullPageCache"/>
         </before>
         <after>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml
index 69ec26a8ea806..f949235e98025 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithAUDCurrencyTest.xml
@@ -22,7 +22,12 @@
             </skip>
         </annotations>
         <before>
-
+            <!--Set price scope global-->
+            <magentoCLI command="config:set {{CatalogPriceScopeGlobalConfigData.path}} {{CatalogPriceScopeGlobalConfigData.value}}" stepKey="setCatalogPriceScopeWebsite"/>
+            <!--Remove Currency options for Website-->
+            <remove keyForRemoval="setCurrencyBaseEURWebsites"/>
+            <remove keyForRemoval="setAllowedCurrencyWebsitesForEURandUSD"/>
+            <remove keyForRemoval="setCurrencyDefaultEURWebsites"/>
             <!--Enable Advanced Setting-->
             <magentoCLI command="config:set {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.value}}" stepKey="enableSkipOrderReview"/>
             <!--Set merchant country-->
@@ -31,10 +36,6 @@
             <magentoCLI command="config:set {{SetCurrencyAUDBaseConfig.path}} {{SetCurrencyAUDBaseConfig.value}}" stepKey="setCurrencyBaseEUR"/>
             <magentoCLI command="config:set {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForAUD.value}}" stepKey="setAllowedCurrencyEURandUSD"/>
             <magentoCLI command="config:set {{SetDefaultCurrencyAUDConfig.path}} {{SetDefaultCurrencyAUDConfig.value}}" stepKey="setCurrencyDefaultEUR"/>
-            <!--Set Currency options for Website-->
-            <magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseEURWebsites"/>
-            <magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForUSD.scope}} --scope-code={{SetAllowedCurrenciesConfigForUSD.scope_code}} {{SetAllowedCurrenciesConfigForUSD.path}} {{SetAllowedCurrenciesConfigForUSD.value}},{{SetAllowedCurrenciesConfigForAUD.value}}" stepKey="setAllowedCurrencyWebsitesForEURandUSD"/>
-            <magentoCLI command="config:set --scope={{SetDefaultCurrencyAUDConfig.scope}} --scope-code={{SetDefaultCurrencyAUDConfig.scope_code}} {{SetDefaultCurrencyAUDConfig.path}} {{SetDefaultCurrencyAUDConfig.value}}" stepKey="setCurrencyDefaultEURWebsites"/>
         </before>
         <after>
             <magentoCLI command="config:set {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.value}}" stepKey="disableSkipOrderReview"/>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml
index 5077544ea0b39..bd756e4df176d 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithEuroCurrencyTest.xml
@@ -22,6 +22,12 @@
             </skip>
         </annotations>
         <before>
+            <!--Set price scope global-->
+            <magentoCLI command="config:set {{CatalogPriceScopeGlobalConfigData.path}} {{CatalogPriceScopeGlobalConfigData.value}}" stepKey="setCatalogPriceScopeWebsite"/>
+            <!--Remove Currency options for Website-->
+            <remove keyForRemoval="setCurrencyBaseEURWebsites"/>
+            <remove keyForRemoval="setAllowedCurrencyWebsitesForEURandUSD"/>
+            <remove keyForRemoval="setCurrencyDefaultEURWebsites"/>
             <!--Set merchant country-->
             <magentoCLI command="config:set {{MerchantUnitedKingdom.path}} {{MerchantUnitedKingdom.value}}" stepKey="setMerchantCountryUK"/>
             <!--Enable Advanced Setting-->

From 12ce929735fa0f3df0bcae1e49863cd84686c5d7 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Fri, 22 May 2020 14:06:27 -0500
Subject: [PATCH 171/307] MC-34360: [Paypal Express Checkout] Can't place an
 order if the currency is euro

- use base currency code
---
 app/code/Magento/Paypal/Model/SmartButtonConfig.php             | 2 +-
 .../Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Paypal/Model/SmartButtonConfig.php b/app/code/Magento/Paypal/Model/SmartButtonConfig.php
index b1bc05a8167c3..8adff75df205b 100644
--- a/app/code/Magento/Paypal/Model/SmartButtonConfig.php
+++ b/app/code/Magento/Paypal/Model/SmartButtonConfig.php
@@ -131,7 +131,7 @@ private function generatePaypalSdkUrl(string $page): string
                 'merchant-id' => $this->config->getValue('merchant_id'),
                 'locale' => $this->localeResolver->getLocale(),
                 'intent' => $this->getIntent(),
-                'currency' => $this->storeManager->getStore()->getCurrentCurrencyCode(),
+                'currency' => $this->storeManager->getStore()->getBaseCurrencyCode(),
             ];
         if ($disallowedFunding) {
             $params['disable-funding'] = $disallowedFunding;
diff --git a/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php b/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php
index a19b27d0ec97b..f7ee15efa3ab9 100644
--- a/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php
+++ b/app/code/Magento/Paypal/Test/Unit/Model/SmartButtonConfigTest.php
@@ -61,7 +61,7 @@ protected function setUp(): void
 
         /** @var Store|MockObject $storeMock */
         $storeMock = $this->createMock(Store::class);
-        $storeMock->method('getCurrentCurrencyCode')
+        $storeMock->method('getBaseCurrencyCode')
             ->willReturn('USD');
 
         /** @var StoreManagerInterface|MockObject $storeManagerMock */

From 1e11a165ef2cde233042c8445e1722e39c50a44e Mon Sep 17 00:00:00 2001
From: kphan <kphan@adobe.com>
Date: Fri, 22 May 2020 17:47:07 -0500
Subject: [PATCH 172/307] MC-34360: [Paypal Express Checkout] Can't place an
 order if the currency is euro

- Update test to switch to different currency on Storefront
---
 .../StorefrontPaypalSmartButtonInCheckoutPageTest.xml |  3 ---
 ...PaypalSmartButtonWithFranceMerchantCountryTest.xml | 11 ++++++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
index 2cc94caf4c1b1..d27ac4c4a92f5 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
@@ -17,9 +17,6 @@
             <severity value="CRITICAL"/>
             <testCaseId value="MC-13690"/>
             <group value="paypalExpress"/>
-            <skip>
-                <issueId value="MC-33951"/>
-            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
index 22997b7005f91..99bd9721becc0 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
@@ -17,16 +17,16 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
-            <skip>
-                <issueId value="MC-33951"/>
-            </skip>
         </annotations>
         <before>
+            <!--Set price scope global-->
+            <magentoCLI command="config:set {{CatalogPriceScopeGlobalConfigData.path}} {{CatalogPriceScopeGlobalConfigData.value}}" stepKey="setCatalogPriceScopeWebsite"/>
             <!--Set merchant country-->
             <magentoCLI command="config:set {{MerchantFrance.path}} {{MerchantFrance.value}}" stepKey="setMerchantCountryUK"/>
             <!--Enable Advanced Setting-->
             <magentoCLI command="config:set {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.value}}" stepKey="enableSkipOrderReview"/>
             <createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/>
+            <magentoCLI command="cache:flush" stepKey="flushCache"/>
         </before>
         <after>
             <magentoCLI command="config:set {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.value}}" stepKey="disableSkipOrderReview"/>
@@ -34,6 +34,11 @@
             <magentoCLI command="config:set {{MerchantUnitedStates.path}} {{MerchantUnitedStates.value}}" stepKey="setMerchantCountryDefault"/>
             <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShippingMethod"/>
         </after>
+        <!-- Switch to USD-US Dollar-->
+        <actionGroup ref="StorefrontSwitchCurrencyActionGroup" after="waitForProductPagePageLoad" stepKey="switchCurrency">
+            <argument name="currency" value="USD"/>
+        </actionGroup>
+
         <!-- click on PayPal payment radio button -->
         <waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" after="guestCheckoutFillingShippingSection" stepKey="waitForPlaceOrderButton"/>
         <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="guestSelectCheckMoneyOrderPayment"/>

From 2be5602e0ffe4a3b4d83a66e7dccd5ccc102d8c0 Mon Sep 17 00:00:00 2001
From: kphan <kphan@adobe.com>
Date: Wed, 27 May 2020 12:34:01 -0500
Subject: [PATCH 173/307] MC-34360: [Paypal Express Checkout] Can't place an
 order if the currency is euro

- Added step to overwrite assertion rate
---
 ...refrontPaypalSmartButtonWithFranceMerchantCountryTest.xml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
index 99bd9721becc0..3fd5f44d5a4b6 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
@@ -57,5 +57,10 @@
         <actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" after="LoginToPayPal" stepKey="submitPayment"/>
 
         <waitForElement after="submitPayment" selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumber"/>
+        <see selector="{{AdminOrderDetailsInformationSection.orderInformationTable}}" userInput="USD / EUR rate" stepKey="seeEURandUSDRate"/>
+        <assertEquals stepKey="assertSelectedCategories">
+            <actualResult type="variable">grabRate</actualResult>
+            <expectedResult type="array">[USD / EUR rate:]</expectedResult>
+        </assertEquals>
     </test>
 </tests>

From 660af8f2bd2a7eeefd1327a55cce05cd5fbd2bba Mon Sep 17 00:00:00 2001
From: Dan Mooney <dmooney@adobe.com>
Date: Thu, 28 May 2020 15:02:42 -0500
Subject: [PATCH 174/307] MC-34738: MFTF tests generation is failed on
 2.4.0-develop

---
 .../Test/Mftf/ActionGroup/AdminDeleteRoleActionGroup.xml     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteRoleActionGroup.xml b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteRoleActionGroup.xml
index ba0f7aedabcd6..46ad2e228c6c1 100644
--- a/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteRoleActionGroup.xml
+++ b/app/code/Magento/User/Test/Mftf/ActionGroup/AdminDeleteRoleActionGroup.xml
@@ -12,6 +12,9 @@
         <annotations>
             <description>Deletes a User Role.</description>
         </annotations>
+        <arguments>
+            <argument name="role" defaultValue=""/>
+        </arguments>
 
         <click stepKey="clickResetFilterButtonBefore" selector="{{AdminRoleGridSection.resetButton}}"/>
         <waitForPageLoad stepKey="waitForRolesGridFilterResetBefore" time="10"/>
@@ -35,4 +38,4 @@
         <click stepKey="clickResetFilterButtonAfter" selector="{{AdminRoleGridSection.resetButton}}"/>
         <waitForPageLoad stepKey="waitForRolesGridFilterResetAfter" time="10"/>
     </actionGroup>
-</actionGroups>
\ No newline at end of file
+</actionGroups>

From 4d17348aa5886ab14c28ca8ab1574cc293b4180a Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Fri, 29 May 2020 12:52:10 -0500
Subject: [PATCH 175/307] MC-34416: Error in the CLI during upgrade

---
 setup/src/Magento/Setup/Model/SearchConfig.php | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/setup/src/Magento/Setup/Model/SearchConfig.php b/setup/src/Magento/Setup/Model/SearchConfig.php
index 5aac234bb6089..2b660077d1f5b 100644
--- a/setup/src/Magento/Setup/Model/SearchConfig.php
+++ b/setup/src/Magento/Setup/Model/SearchConfig.php
@@ -7,6 +7,7 @@
 
 namespace Magento\Setup\Model;
 
+use Magento\Framework\App\Config;
 use Magento\Framework\Setup\Option\AbstractConfigOption;
 use Magento\Framework\Validation\ValidationException;
 use Magento\Search\Model\SearchEngine\Validator;
@@ -33,19 +34,27 @@ class SearchConfig
      */
     private $installConfig;
 
+    /**
+     * @var Config
+     */
+    private $appConfig;
+
     /**
      * @param SearchConfigOptionsList $searchConfigOptionsList
      * @param Validator $searchValidator
      * @param CompositeInstallConfig $installConfig
+     * @param Config $appConfig
      */
     public function __construct(
         SearchConfigOptionsList $searchConfigOptionsList,
         Validator $searchValidator,
-        CompositeInstallConfig $installConfig
+        CompositeInstallConfig $installConfig,
+        Config $appConfig
     ) {
         $this->searchConfigOptionsList = $searchConfigOptionsList;
         $this->searchValidator = $searchValidator;
         $this->installConfig = $installConfig;
+        $this->appConfig = $appConfig;
     }
 
     /**
@@ -76,6 +85,9 @@ public function saveConfiguration(array $inputOptions)
      */
     public function validateSearchEngine()
     {
+        //Clean config cache prior to validation
+        $this->appConfig->clean();
+
         $validationErrors = $this->searchValidator->validate();
         if (!empty($validationErrors)) {
             throw new ValidationException(__(implode(PHP_EOL, $validationErrors)));

From 637e868535d31fdffc8a4dab266aa9c680c9eede Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Sun, 31 May 2020 21:16:44 +0300
Subject: [PATCH 176/307] MC-34711: [MFTF]
 AdminDisplayingCartAndCatalogPriceRulesGridsTest failed on Jenkins because of
 bad design (MC-17843)

---
 ...sUpdateProductStatusStoreViewScopeTest.xml | 57 +++++---------
 ...inMultipleWebsitesUseDefaultValuesTest.xml | 56 ++++++-------
 .../AdminRemoveImageAffectsAllScopesTest.xml  | 40 +++++-----
 ...ductWithCustomOptionsSecondWebsiteTest.xml | 43 ++++------
 ...inCatalogPriceRuleDeleteAllActionGroup.xml |  2 +-
 .../AdminDeleteCMSPageByUrlKeyActionGroup.xml | 33 ++++++++
 .../Section/CmsPagesPageActionsSection.xml    |  4 +-
 .../Test/Mftf/Test/CheckStaticBlocksTest.xml  | 34 ++++----
 ...bleProductPriceAdditionalStoreViewTest.xml | 78 ++++++++-----------
 ...wAccountNewsletterUncheckedActionGroup.xml |  3 +-
 ...erifySubscribedNewsletterDisplayedTest.xml | 28 +++----
 .../Rule/Test/Mftf/Helper/RuleHelper.php      | 62 +++++++++++++++
 ...AdminCartPriceRuleDeleteAllActionGroup.xml | 29 +++++++
 ...minCartPriceRuleFillActionsActionGroup.xml | 28 +++++++
 ...inCartPriceRuleFillMainInfoActionGroup.xml | 35 +++++++++
 .../AdminCartPriceRuleSaveActionGroup.xml     | 21 +++++
 .../AdminCartPriceRulesFormSection.xml        |  4 +
 17 files changed, 365 insertions(+), 192 deletions(-)
 create mode 100644 app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminDeleteCMSPageByUrlKeyActionGroup.xml
 create mode 100644 app/code/Magento/Rule/Test/Mftf/Helper/RuleHelper.php
 create mode 100644 app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleDeleteAllActionGroup.xml
 create mode 100644 app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillActionsActionGroup.xml
 create mode 100644 app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillMainInfoActionGroup.xml
 create mode 100644 app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleSaveActionGroup.xml

diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest/AdminMassUpdateProductStatusStoreViewScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest/AdminMassUpdateProductStatusStoreViewScopeTest.xml
index 54921d3fc2dda..bd2647c9c3a61 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest/AdminMassUpdateProductStatusStoreViewScopeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductStatusStoreViewScopeTest/AdminMassUpdateProductStatusStoreViewScopeTest.xml
@@ -14,7 +14,7 @@
             <title value="Admin should be able to mass update product statuses in store view scope"/>
             <description value="Admin should be able to mass update product statuses in store view scope"/>
             <severity value="AVERAGE"/>
-            <testCaseId value="MAGETWO-59361"/>
+            <testCaseId value="MC-28538"/>
             <group value="Catalog"/>
             <group value="Product Attributes"/>
             <group value="SearchEngineElasticsearch"/>
@@ -22,64 +22,47 @@
         <before>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
 
-            <!--Create Website -->
             <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
-                <argument name="newWebsiteName" value="Second Website"/>
-                <argument name="websiteCode" value="second_website"/>
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
             </actionGroup>
-
-            <!--Create Store -->
             <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
-                <argument name="website" value="Second Website"/>
-                <argument name="storeGroupName" value="Second Store"/>
-                <argument name="storeGroupCode" value="second_store"/>
+                <argument name="website" value="{{customWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
+                <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
+            </actionGroup>
+            <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
+                <argument name="StoreGroup" value="customStoreGroup"/>
+                <argument name="customStore" value="customStore"/>
             </actionGroup>
-
-            <!--Create Store view -->
-            <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
-            <waitForPageLoad stepKey="waitForSystemStorePage"/>
-            <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
-            <waitForPageLoad stepKey="waitForProductPageLoad"/>
-            <waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/>
-            <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
-            <fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/>
-            <fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/>
-            <selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="1" stepKey="enableStoreViewStatus"/>
-            <click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveStoreView"/>
-            <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/>
-            <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarning"/>
-            <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="dismissModal"/>
-            <waitForPageLoad stepKey="waitForPageLoad2" time="180"/>
-            <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" time="150" stepKey="waitForPageReolad"/>
-            <see userInput="You saved the store view." stepKey="seeSavedMessage"/>
 
             <!--Create a Simple Product 1 -->
             <actionGroup ref="CreateSimpleProductAndAddToWebsiteActionGroup" stepKey="createSimpleProduct1">
                 <argument name="product" value="simpleProductForMassUpdate"/>
-                <argument name="website" value="Second Website"/>
+                <argument name="website" value="{{customWebsite.name}}"/>
             </actionGroup>
 
             <!--Create a Simple Product 2 -->
             <actionGroup ref="CreateSimpleProductAndAddToWebsiteActionGroup" stepKey="createSimpleProduct2">
                 <argument name="product" value="simpleProductForMassUpdate2"/>
-                <argument name="website" value="Second Website"/>
+                <argument name="website" value="{{customWebsite.name}}"/>
             </actionGroup>
         </before>
         <after>
             <!--Delete website -->
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
-                <argument name="websiteName" value="Second Website"/>
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
-            <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
+            <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
 
             <!--Delete Products -->
-            <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct1">
-                <argument name="productName" value="simpleProductForMassUpdate.name"/>
+            <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct1">
+                <argument name="sku" value="{{simpleProductForMassUpdate.sku}}"/>
             </actionGroup>
-            <actionGroup ref="DeleteProductActionGroup" stepKey="deleteProduct2">
-                <argument name="productName" value="simpleProductForMassUpdate2.name"/>
+            <actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteProduct2">
+                <argument name="sku" value="{{simpleProductForMassUpdate2.sku}}"/>
             </actionGroup>
-            <actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
+            <actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
         </after>
 
         <!-- Search and select products -->
@@ -92,7 +75,7 @@
 
         <!-- Filter to Second Store View -->
         <actionGroup ref="AdminFilterStoreViewActionGroup" stepKey="filterStoreView">
-            <argument name="customStore" value="'Second Store View'"/>
+            <argument name="customStore" value="customStore.name"/>
         </actionGroup>
 
         <!-- Select Product 2 -->
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml
index c1cfcf7ebe10f..20c81f8244f3d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMultipleWebsitesUseDefaultValuesTest.xml
@@ -15,41 +15,35 @@
             <title value="Use Default Value checkboxes should be checked for new website scope"/>
             <description value="Use Default Value checkboxes for product attribute should be checked for new website scope"/>
             <severity value="BLOCKER"/>
-            <testCaseId value="MAGETWO-92454"/>
+            <testCaseId value="MC-25783"/>
             <group value="Catalog"/>
         </annotations>
+
+        <before>
+            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
+
+            <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
+            </actionGroup>
+            <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
+                <argument name="website" value="{{customWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
+                <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
+            </actionGroup>
+            <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
+                <argument name="StoreGroup" value="customStoreGroup"/>
+                <argument name="customStore" value="customStore"/>
+            </actionGroup>
+        </before>
+
         <after>
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
-                <argument name="websiteName" value="Second Website"/>
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
+            <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
         </after>
-        <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
-        <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
-            <argument name="newWebsiteName" value="Second Website"/>
-            <argument name="websiteCode" value="second_website"/>
-        </actionGroup>
-        <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
-            <argument name="website" value="Second Website"/>
-            <argument name="storeGroupName" value="Second Store"/>
-            <argument name="storeGroupCode" value="second_store"/>
-        </actionGroup>
-
-        <!--Create Store view -->
-        <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
-        <waitForPageLoad stepKey="waitForSystemStorePage"/>
-        <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
-        <waitForPageLoad stepKey="waitForProductPageLoad"/>
-        <waitForElementVisible selector="//legend[contains(., 'Store View Information')]" stepKey="waitForNewStorePageToOpen"/>
-        <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
-        <fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/>
-        <fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/>
-        <selectOption selector="{{AdminNewStoreSection.statusDropdown}}" userInput="1" stepKey="enableStoreViewStatus"/>
-        <click selector="{{AdminStoresMainActionsSection.saveButton}}" stepKey="clickStoreViewSaveButton"/>
-        <waitForElementVisible selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" stepKey="waitForAcceptNewStoreViewCreationModal" />
-        <conditionalClick selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" dependentSelector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" visible="true" stepKey="AcceptNewStoreViewCreation"/>
-        <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReload"/>
-        <see userInput="You saved the store view." stepKey="seeSaveMessage"/>
 
         <!--Create a Simple Product -->
         <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/>
@@ -63,17 +57,17 @@
 
         <!-- Add product to second website and save the product -->
         <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProductInWebsites"/>
-        <click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite"/>
+        <click selector="{{ProductInWebsitesSection.website(customWebsite.name)}}" stepKey="selectSecondWebsite"/>
         <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
         <waitForLoadingMaskToDisappear stepKey="waitForProductPageSave"/>
         <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
 
         <!-- switch to the second store view -->
         <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcher"/>
-        <click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView"/>
+        <click selector="{{AdminProductFormActionSection.selectStoreView(customStore.name)}}" stepKey="chooseStoreView"/>
         <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/>
         <waitForPageLoad time="30" stepKey="waitForPageLoad9"/>
-        <see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/>
+        <see userInput="{{customStore.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/>
 
         <!-- Check if Use Default Value checkboxes are checked -->
         <seeCheckboxIsChecked selector="{{AdminProductFormSection.productStatusUseDefault}}" stepKey="seeProductStatusCheckboxChecked"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
index 6cd76c4cc06b8..b4738fd7adeec 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
@@ -26,42 +26,42 @@
                 <requiredEntity createDataKey="category"/>
             </createData>
             <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite">
-                <argument name="newWebsiteName" value="FirstWebSite"/>
-                <argument name="websiteCode" value="FirstWebSiteCode"/>
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
             </actionGroup>
             <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore" after="createWebsite">
-                <argument name="website" value="FirstWebSite"/>
-                <argument name="storeGroupName" value="NewStore"/>
-                <argument name="storeGroupCode" value="Base1"/>
+                <argument name="website" value="{{customWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
+                <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
             </actionGroup>
             <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView" after="createNewStore">
-                <argument name="StoreGroup" value="staticFirstStoreGroup"/>
-                <argument name="customStore" value="staticStore"/>
+                <argument name="StoreGroup" value="customStoreGroup"/>
+                <argument name="customStore" value="customStore"/>
             </actionGroup>
 
             <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createSecondWebsite" after="createCustomStoreView">
-                <argument name="newWebsiteName" value="SecondWebSite"/>
-                <argument name="websiteCode" value="SecondWebSiteCode"/>
+                <argument name="newWebsiteName" value="{{secondCustomWebsite.name}}"/>
+                <argument name="websiteCode" value="{{secondCustomWebsite.code}}"/>
             </actionGroup>
             <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createSecondStore" after="createSecondWebsite">
-                <argument name="website" value="SecondWebSite"/>
-                <argument name="storeGroupName" value="SecondStore"/>
-                <argument name="storeGroupCode" value="Base2"/>
+                <argument name="website" value="{{secondCustomWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{SecondStoreGroupUnique.name}}"/>
+                <argument name="storeGroupCode" value="{{SecondStoreGroupUnique.code}}"/>
             </actionGroup>
             <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView2"  after="createSecondStore">
-                <argument name="StoreGroup" value="staticStoreGroup"/>
-                <argument name="customStore" value="staticSecondStore"/>
+                <argument name="StoreGroup" value="SecondStoreGroupUnique"/>
+                <argument name="customStore" value="SecondStoreUnique"/>
             </actionGroup>
         </before>
 
         <after>
             <actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
-                <argument name="websiteName" value="FirstWebSite"/>
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
 
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
-                <argument name="websiteName" value="SecondWebSite"/>
+                <argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
             </actionGroup>
             <deleteData createDataKey="category" stepKey="deletePreReqCategory"/>
             <deleteData createDataKey="product" stepKey="deleteFirstProduct"/>
@@ -90,10 +90,10 @@
         </actionGroup>
         <!--"Product in Websites": select both Websites-->
         <actionGroup ref="ProductSetWebsiteActionGroup" stepKey="ProductSetWebsite1">
-            <argument name="website" value="FirstWebSite"/>
+            <argument name="website" value="{{customWebsite.name}}"/>
         </actionGroup>
         <actionGroup ref="ProductSetWebsiteActionGroup" stepKey="ProductSetWebsite2">
-            <argument name="website" value="SecondWebSite"/>
+            <argument name="website" value="{{secondCustomWebsite.name}}"/>
         </actionGroup>
 
         <!--Go to "Catalog" -> "Products". Open created product-->
@@ -110,7 +110,7 @@
 
         <!--Switch to "Store view 1"-->
         <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="selectStoreView">
-            <argument name="storeViewName" value="Store View"/>
+            <argument name="storeViewName" value="{{customStore.name}}"/>
         </actionGroup>
 
         <!-- Assert product first image not in admin product form -->
@@ -120,7 +120,7 @@
 
         <!--Switch to "Store view 2"-->
         <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="selectSecondStoreView">
-            <argument name="storeViewName" value="Second Store View"/>
+            <argument name="storeViewName" value="{{SecondStoreUnique.name}}"/>
         </actionGroup>
 
         <!-- Verify that Image 1 is deleted from the Second Store View list -->
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml
index b206a33ebde88..15c1a5630626a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/SaveProductWithCustomOptionsSecondWebsiteTest.xml
@@ -15,48 +15,38 @@
             <title value="You should be able to save a product with custom options assigned to a different website"/>
             <description value="Custom Options should not be split when saving the product after assigning to a different website"/>
             <severity value="BLOCKER"/>
-            <testCaseId value="MAGETWO-91436"/>
+            <testCaseId value="MC-25687"/>
             <group value="product"/>
         </annotations>
         <before>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
-            <!--Create new website -->
+
             <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
-                <argument name="newWebsiteName" value="Second Website"/>
-                <argument name="websiteCode" value="second_website"/>
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
             </actionGroup>
-
-            <!--Create new Store Group -->
             <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
-                <argument name="website" value="Second Website"/>
-                <argument name="storeGroupName" value="Second Store"/>
-                <argument name="storeGroupCode" value="second_store"/>
+                <argument name="website" value="{{customWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
+                <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
+            </actionGroup>
+            <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
+                <argument name="StoreGroup" value="customStoreGroup"/>
+                <argument name="customStore" value="customStore"/>
             </actionGroup>
 
-            <!--Create Store view -->
-            <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
-            <waitForPageLoad stepKey="waitForAdminSystemStorePage"/>
-            <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
-            <waitForPageLoad stepKey="waitForProductPageLoad"/>
-            <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
-            <fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/>
-            <fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/>
-            <selectOption userInput="1" selector="{{AdminNewStoreSection.statusDropdown}}" stepKey="enableStoreViewStatus"/>
-            <click selector="{{AdminStoresMainActionsSection.saveButton}}" stepKey="clickStoreViewSaveButton"/>
-            <waitForElementVisible selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" stepKey="waitForAcceptNewStoreViewCreationModal" />
-            <conditionalClick selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" dependentSelector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" visible="true" stepKey="AcceptNewStoreViewCreation"/>
-            <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReolad"/>
-            <see userInput="You saved the store view." stepKey="seeSaveMessage" />
+            <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
         </before>
+
         <after>
             <actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteTestWebsite">
-                <argument name="websiteName" value="Second Website"/>
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
+            <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
         </after>
 
-        <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
         <!--Create a Simple Product with Custom Options -->
         <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/>
         <waitForPageLoad stepKey="waitForCatalogProductGrid"/>
@@ -94,13 +84,12 @@
 
         <!-- Add this product to second website -->
         <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProductInWebsitesSection1"/>
-        <click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite"/>
+        <click selector="{{ProductInWebsitesSection.website(customWebsite.name)}}" stepKey="selectSecondWebsite"/>
         <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
         <waitForLoadingMaskToDisappear stepKey="waitForProductPagetoSaveAgain"/>
         <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessageAgain"/>
 
         <click selector="{{AdminProductCustomizableOptionsSection.customizableOptions}}" stepKey="openCustomOptionsSection2"/>
         <seeNumberOfElements selector=".admin__dynamic-rows[data-index='values'] tr.data-row" userInput="3" stepKey="see4RowsOfOptions"/>
-
     </test>
 </tests>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
index 1170b08b1add9..27edab962033e 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
@@ -16,7 +16,7 @@
         <!-- It sometimes is loading too long for default 10s -->
         <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/>
         <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
-        <helper class="\Magento\CatalogRule\Test\Mftf\Helper\CatalogPriceRuleHelper" method="deleteAllCatalogPriceRules" stepKey="deleteAllCatalogPriceRulesOneByOne">
+        <helper class="\Magento\Rule\Test\Mftf\Helper\RuleHelper" method="deleteAllRulesOneByOne" stepKey="deleteAllRulesOneByOne">
             <argument name="firstNotEmptyRow">{{AdminDataGridTableSection.firstNotEmptyRow}}</argument>
             <argument name="modalAcceptButton">{{AdminConfirmationModalSection.ok}}</argument>
             <argument name="deleteButton">{{AdminMainActionsSection.delete}}</argument>
diff --git a/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminDeleteCMSPageByUrlKeyActionGroup.xml b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminDeleteCMSPageByUrlKeyActionGroup.xml
new file mode 100644
index 0000000000000..01e430807d7bd
--- /dev/null
+++ b/app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminDeleteCMSPageByUrlKeyActionGroup.xml
@@ -0,0 +1,33 @@
+<?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="AdminDeleteCMSPageByUrlKeyActionGroup">
+        <annotations>
+            <description>Goes to the Admin CMS Pages page. Filters the grid based on the provided Page url key. Deletes the Page via the grid.</description>
+        </annotations>
+        <arguments>
+            <argument name="pageUrlKey" type="string" defaultValue="cms_page"/>
+        </arguments>
+
+        <amOnPage url="{{CmsPagesPage.url}}" stepKey="navigateToCMSPagesGrid"/>
+        <waitForPageLoad stepKey="waitForPageLoad"/>
+        <conditionalClick selector="{{CmsPagesPageActionsSection.clearAllButton}}" dependentSelector="{{CmsPagesPageActionsSection.activeFilters}}" visible="true" stepKey="clickToResetFilter"/>
+        <waitForPageLoad stepKey="waitForPageLoadAfterClearFilters"/>
+        <click selector="{{CmsPagesPageActionsSection.filterButton}}" stepKey="clickFilterButton"/>
+        <fillField selector="{{CmsPagesPageActionsSection.URLKey}}" userInput="{{pageUrlKey}}" stepKey="fillPageUrlKeyFilter"/>
+        <click selector="{{CmsPagesPageActionsSection.ApplyFiltersBtn}}" stepKey="applyFilter"/>
+        <waitForElementVisible selector="{{CmsPagesPageActionsSection.select(pageUrlKey)}}" stepKey="waitItemAppears"/>
+        <click selector="{{CmsPagesPageActionsSection.select(pageUrlKey)}}" stepKey="clickSelect"/>
+        <click selector="{{CmsPagesPageActionsSection.delete(pageUrlKey)}}" stepKey="clickDelete"/>
+        <waitForElementVisible selector="{{CmsPagesPageActionsSection.deleteConfirm}}" stepKey="waitForOkButtonToBeVisible"/>
+        <click selector="{{CmsPagesPageActionsSection.deleteConfirm}}" stepKey="clickOkButton"/>
+        <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitSuccessMessageAppeared"/>
+        <see selector="{{AdminMessagesSection.success}}" userInput="The page has been deleted." stepKey="seeSuccessMessage"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml b/app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml
index 494c98ca44e7f..2389e8b5c5ca0 100644
--- a/app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Section/CmsPagesPageActionsSection.xml
@@ -11,14 +11,14 @@
     <section name="CmsPagesPageActionsSection">
         <element name="filterButton" type="input" selector="//button[text()='Filters']"/>
         <element name="URLKey" type="input" selector="//div[@class='admin__form-field-control']/input[@name='identifier']"/>
-        <element name="ApplyFiltersBtn" type="button" selector="//span[text()='Apply Filters']"/>
+        <element name="ApplyFiltersBtn" type="button" selector="//span[text()='Apply Filters']" timeout="60"/>
         <element name="searchInput" type="input" selector="//*[@id='fulltext']"/>
         <element name="searchButton" type="button" selector="//*[@id='fulltext']/parent::*/button"/>
         <element name="addNewPageButton" type="button" selector="#add" timeout="30"/>
         <element name="select" type="button" selector="//div[text()='{{var1}}']/parent::td//following-sibling::td[@class='data-grid-actions-cell']//button[text()='Select']" parameterized="true"/>
         <element name="edit" type="button" selector="//div[text()='{{var1}}']/parent::td//following-sibling::td[@class='data-grid-actions-cell']//a[text()='Edit']" parameterized="true"/>
         <element name="preview" type="button" selector="//div[text()='{{var1}}']/parent::td//following-sibling::td[@class='data-grid-actions-cell']//a[text()='View']" parameterized="true"/>
-        <element name="clearAllButton" type="button" selector="//div[@class='admin__data-grid-header']//button[contains(text(), 'Clear all')]"/>
+        <element name="clearAllButton" type="button" selector="//div[@class='admin__data-grid-header']//button[contains(text(), 'Clear all')]" timeout="60"/>
         <element name="activeFilters" type="button" selector="//div[@class='admin__data-grid-header']//span[contains(text(), 'Active filters:')]" />
         <element name="spinner" type="input" selector='//div[@data-component="cms_page_listing.cms_page_listing.cms_page_columns"]'/>
         <element name="firstItemSelectButton" type="button" selector=".data-grid .action-select-wrap button.action-select"/>
diff --git a/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml b/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml
index fe3e69880fc5c..eba7812e29a0c 100644
--- a/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml
+++ b/app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml
@@ -15,27 +15,37 @@
             <title value="Check static blocks: ID should be unique per Store View"/>
             <description value="Check static blocks: ID should be unique per Store View"/>
             <severity value="BLOCKER"/>
-            <testCaseId value="MAGETWO-94229"/>
+            <testCaseId value="MC-25828"/>
             <group value="Cms"/>
+            <group value="WYSIWYGDisabled"/>
         </annotations>
+
         <before>
-            <magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
-            <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="AdminCreateWebsite">
-                <argument name="newWebsiteName" value="secondWebsite"/>
-                <argument name="websiteCode" value="second_website"/>
+
+            <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
             </actionGroup>
-            <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="AdminCreateStore">
-                <argument name="website" value="secondWebsite"/>
+            <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
+                <argument name="website" value="{{customWebsite.name}}"/>
                 <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
                 <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
             </actionGroup>
-            <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="AdminCreateStoreView">
+            <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
                 <argument name="StoreGroup" value="customStoreGroup"/>
                 <argument name="customStore" value="customStore"/>
             </actionGroup>
         </before>
 
+        <after>
+            <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite">
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
+            </actionGroup>
+            <actionGroup ref="DeleteCMSBlockActionGroup" stepKey="DeleteCMSBlockActionGroup"/>
+            <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
+        </after>
+
         <!--Go to Cms blocks page-->
         <amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSPagesGrid"/>
         <waitForPageLoad stepKey="waitForPageLoad1"/>
@@ -73,13 +83,5 @@
         <click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock2"/>
         <waitForPageLoad stepKey="waitForPageLoad9"/>
         <see userInput="You saved the block." stepKey="VerifyBlockIsSaved2"/>
-
-        <after>
-            <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite">
-                <argument name="websiteName" value="secondWebsite"/>
-            </actionGroup>
-            <actionGroup ref="DeleteCMSBlockActionGroup" stepKey="DeleteCMSBlockActionGroup"/>
-            <magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/>
-        </after>
     </test>
 </tests>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml
index a34dfd06ce844..5ecc0c33ad7a2 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml
@@ -15,11 +15,10 @@
             <title value="Configurable product prices should not disappear on storefront for additional store"/>
             <description value="Configurable product price should not disappear for additional stores on frontEnd if disabled for default store"/>
             <severity value="CRITICAL"/>
-            <testCaseId value="MAGETWO-92247"/>
+            <testCaseId value="MC-25761"/>
             <group value="ConfigurableProduct"/>
         </annotations>
         <before>
-
             <createData entity="ApiCategory" stepKey="createCategory"/>
             <createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
                 <requiredEntity createDataKey="createCategory"/>
@@ -65,6 +64,22 @@
                 <requiredEntity createDataKey="createConfigChildProduct2"/>
             </createData>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/>
+
+            <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
+
+            <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
+            </actionGroup>
+            <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
+                <argument name="website" value="{{customWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
+                <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
+            </actionGroup>
+            <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createNewStoreView">
+                <argument name="StoreGroup" value="customStoreGroup"/>
+                <argument name="customStore" value="customStore"/>
+            </actionGroup>
         </before>
 
         <after>
@@ -75,46 +90,21 @@
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
             <actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteSecondWebsite">
-                <argument name="websiteName" value="Second Website"/>
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
+            <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
             <!-- Reindex invalidated indices after product attribute has been created/deleted -->
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         </after>
 
-        <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
-        <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="addNewWebsite">
-            <argument name="newWebsiteName" value="Second Website"/>
-            <argument name="websiteCode" value="second_website"/>
-        </actionGroup>
-        <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="addNewStoreGroup">
-            <argument name="website" value="Second Website"/>
-            <argument name="storeGroupName" value="Second Store"/>
-            <argument name="storeGroupCode" value="second_store"/>
-        </actionGroup>
-
-        <!--Create Store view -->
-        <amOnPage url="{{AdminSystemStorePage.url}}" stepKey="amOnAdminSystemStorePage"/>
-        <click selector="{{AdminStoresMainActionsSection.createStoreViewButton}}" stepKey="createStoreViewButton"/>
-        <waitForPageLoad stepKey="waitForProductPageLoad"/>
-        <selectOption userInput="Second Store" selector="{{AdminNewStoreSection.storeGrpDropdown}}" stepKey="selectStoreGroup"/>
-        <fillField userInput="Second Store View" selector="{{AdminNewStoreSection.storeNameTextField}}" stepKey="fillStoreViewName"/>
-        <fillField userInput="second_store_view" selector="{{AdminNewStoreSection.storeCodeTextField}}" stepKey="fillStoreViewCode"/>
-        <selectOption userInput="1" selector="{{AdminNewStoreSection.statusDropdown}}" stepKey="enableStoreViewStatus"/>
-        <click selector="{{AdminStoresMainActionsSection.saveButton}}" stepKey="clickStoreViewSaveButton"/>
-        <waitForElementVisible selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" stepKey="waitForAcceptNewStoreViewCreationModal" />
-        <conditionalClick selector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" dependentSelector="{{AdminNewStoreSection.acceptNewStoreViewCreation}}" visible="true" stepKey="AcceptNewStoreViewCreation"/>
-        <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReolad"/>
-        <see userInput="You saved the store view." stepKey="seeSaveMessage" />
-
         <!--go to admin and open product edit page to disable product all store view -->
         <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductEditPage">
-            <argument name="productId" value="$$createConfigProduct.id$$"/>
+            <argument name="productId" value="$createConfigProduct.id$"/>
         </actionGroup>
         <waitForPageLoad stepKey="waitEditPage"/>
         <click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="disableProductForAllStoreView"/>
-        <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton2"/>
-        <waitForLoadingMaskToDisappear stepKey="waitForProductPageSave1" />
+        <actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/>
         <dontSeeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="dontSeeCheckboxEnableProductIsChecked"/>
 
         <!-- Disable each of the child products for All Store views -->
@@ -126,17 +116,17 @@
 
         <!-- Add product to second website -->
         <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProductInWebsitesSection1"/>
-        <click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite"/>
+        <click selector="{{ProductInWebsitesSection.website(customWebsite.name)}}" stepKey="selectSecondWebsite"/>
         <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSave"/>
         <waitForLoadingMaskToDisappear stepKey="waitForProductPageSave"/>
         <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
 
         <!-- switch to the second store view -->
         <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcher"/>
-        <click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView"/>
+        <click selector="{{AdminProductFormActionSection.selectStoreView(customStore.name)}}" stepKey="chooseStoreView"/>
         <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage"/>
         <waitForPageLoad time="30" stepKey="waitForPageLoad9"/>
-        <see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/>
+        <see userInput="{{customStore.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName"/>
 
         <!-- enable the config product for the second store -->
        <waitForElementVisible selector="{{AdminProductFormSection.productStatusUseDefault}}" stepKey="waitForDefaultValueCheckBox"/>
@@ -152,10 +142,10 @@
         </actionGroup>
         <waitForPageLoad stepKey="waitEditPage2"/>
        <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcher1"/>
-        <click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView1"/>
+        <click selector="{{AdminProductFormActionSection.selectStoreView(customStore.name)}}" stepKey="chooseStoreView1"/>
         <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessage1"/>
         <waitForPageLoad time="30" stepKey="waitForPageLoad8"/>
-        <see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName1"/>
+        <see userInput="{{customStore.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewName1"/>
         <click selector="{{AdminProductFormConfigurationsSection.actionsBtn('1')}}" stepKey="clickToExpandActionsForFirstVariation2"/>
         <click selector="{{AdminProductFormConfigurationsSection.enableProductBtn}}" stepKey="clickEnableChildProduct1"/>
         <click selector="{{AdminProductFormConfigurationsSection.actionsBtn('2')}}" stepKey="clickToExpandActionsForSecondVariation2"/>
@@ -163,7 +153,7 @@
         <actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAll"/>
 
         <!-- assert second store view storefront category list page -->
-        <amOnPage url="/second_store_view/" stepKey="amOnsecondStoreFront1"/>
+        <amOnPage url="/{{customStore.code}}/" stepKey="amOnsecondStoreFront1"/>
         <waitForPageLoad stepKey="waitForPageLoad31"/>
         <click userInput="$$createCategory.name$$" stepKey="clickOnCategoryName1"/>
         <waitForPageLoad stepKey="waitForPageLoad41"/>
@@ -175,7 +165,7 @@
         </actionGroup>
         <waitForPageLoad stepKey="waitChild1EditPageToLoad"/>
         <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProduct1InWebsitesSection"/>
-        <click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite1"/>
+        <click selector="{{ProductInWebsitesSection.website(customWebsite.name)}}" stepKey="selectSecondWebsite1"/>
         <actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveUpdatedChild1Again"/>
 
         <!--go to admin again and open child product1 and enable for second store view-->
@@ -184,10 +174,10 @@
         </actionGroup>
         <waitForPageLoad stepKey="waitChild1EditPageToLoad1"/>
         <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcherP1"/>
-        <click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView2P1"/>
+        <click selector="{{AdminProductFormActionSection.selectStoreView(customStore.name)}}" stepKey="chooseStoreView2P1"/>
         <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessageP1"/>
         <waitForPageLoad time="30" stepKey="waitForStoreViewSwitchedP1"/>
-        <see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewNameP1"/>
+        <see userInput="{{customStore.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewNameP1"/>
         <waitForElementVisible selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="waitForProductEnableSliderP1"/>
         <seeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="seeThatProduct1IsEnabled"/>
         <actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="save2UpdatedChild1"/>
@@ -198,7 +188,7 @@
         </actionGroup>
         <waitForPageLoad stepKey="waitChild2EditPageToLoad"/>
         <click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProduct2InWebsitesSection"/>
-        <click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite2"/>
+        <click selector="{{ProductInWebsitesSection.website(customWebsite.name)}}" stepKey="selectSecondWebsite2"/>
         <actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveUpdatedChild2"/>
 
         <!--go to admin again and open child product2 and enable for second store view-->
@@ -207,16 +197,16 @@
         </actionGroup>
         <waitForPageLoad stepKey="waitChild2EditPageToLoad1"/>
         <click selector="{{AdminProductFormActionSection.changeStoreButton}}" stepKey="clickStoreviewSwitcherP2"/>
-        <click selector="{{AdminProductFormActionSection.selectStoreView('Second Store View')}}" stepKey="chooseStoreView2P2"/>
+        <click selector="{{AdminProductFormActionSection.selectStoreView(customStore.name)}}" stepKey="chooseStoreView2P2"/>
         <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptStoreSwitchingMessageP2"/>
         <waitForPageLoad time="30" stepKey="waitForStoreViewSwitchedP2"/>
-        <see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewNameP2"/>
+        <see userInput="{{customStore.name}}" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewNameP2"/>
         <waitForElementVisible selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="waitForProductEnableSliderP2"/>
         <seeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="seeThatProduct2IsEnabled"/>
         <actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="save2UpdatedChild2"/>
 
         <!-- assert storefront category list page -->
-        <amOnPage url="/second_store_view/" stepKey="amOnsecondStoreFront"/>
+        <amOnPage url="/{{customStore.code}}/" stepKey="amOnsecondStoreFront"/>
         <waitForPageLoad stepKey="waitForPageLoad3"/>
         <click userInput="$$createCategory.name$$" stepKey="clickOnCategoryName"/>
         <waitForPageLoad stepKey="waitForPageLoad4"/>
diff --git a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/StorefrontCreateNewAccountNewsletterUncheckedActionGroup.xml b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/StorefrontCreateNewAccountNewsletterUncheckedActionGroup.xml
index d6b0adff53a86..8037baa6b199c 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/StorefrontCreateNewAccountNewsletterUncheckedActionGroup.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/ActionGroup/StorefrontCreateNewAccountNewsletterUncheckedActionGroup.xml
@@ -15,10 +15,11 @@
         <arguments>
             <argument name="Customer"/>
             <argument name="Store"/>
+            <argument name="StoreGroup"/>
         </arguments>
 
         <amOnPage stepKey="amOnStorefrontPage" url="{{Store.code}}"/>
         <see stepKey="seeDescriptionNewsletter" userInput="You aren't subscribed to our newsletter." selector="{{CustomerMyAccountPage.DescriptionNewsletter}}"/>
-        <see stepKey="seeThankYouMessage" userInput="Thank you for registering with NewStore."/>
+        <see stepKey="seeThankYouMessage" userInput="Thank you for registering with {{StoreGroup.name}}."/>
     </actionGroup>
 </actionGroups>
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml
index a568fb1799ac2..d60034b8925d3 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml
@@ -16,37 +16,38 @@
             <title value="Newsletter subscription when user is registered on 2 stores"/>
             <description value="Newsletter subscription when user is registered on 2 stores"/>
             <severity value="MAJOR"/>
-            <testCaseId value="MAGETWO-93836"/>
+            <testCaseId value="MC-25840"/>
         </annotations>
 
         <before>
             <!--Log in to Magento as admin.-->
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
+
             <actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createWebsite">
-                <argument name="newWebsiteName" value="Second"/>
-                <argument name="websiteCode" value="Base2"/>
+                <argument name="newWebsiteName" value="{{customWebsite.name}}"/>
+                <argument name="websiteCode" value="{{customWebsite.code}}"/>
             </actionGroup>
-
             <actionGroup ref="AdminCreateNewStoreGroupActionGroup" stepKey="createNewStore">
-                <argument name="website" value="Second"/>
-                <argument name="storeGroupName" value="NewStore"/>
-                <argument name="storeGroupCode" value="Base12"/>
+                <argument name="website" value="{{customWebsite.name}}"/>
+                <argument name="storeGroupName" value="{{customStoreGroup.name}}"/>
+                <argument name="storeGroupCode" value="{{customStoreGroup.code}}"/>
             </actionGroup>
-
             <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
-                <argument name="StoreGroup" value="staticStoreGroup"/>
-                <argument name="customStore" value="staticStore"/>
+                <argument name="StoreGroup" value="customStoreGroup"/>
+                <argument name="customStore" value="customStore"/>
             </actionGroup>
+
             <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
             <magentoCLI command="cache:flush" stepKey="flushCache"/>
-
         </before>
+
         <after>
             <!--Delete created data and set Default Configuration-->
             <actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
-                <argument name="websiteName" value="Second"/>
+                <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
+            <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
             <magentoCLI command="indexer:reindex" stepKey="reindex"/>
             <magentoCLI command="cache:flush" stepKey="flushCache"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
@@ -62,7 +63,8 @@
         <!--Create new Account with the same email address. (unchecked Sign Up for Newsletter checkbox)-->
         <actionGroup ref="StorefrontCreateNewAccountNewsletterUncheckedActionGroup" stepKey="createNewAccountNewsletterUnchecked">
             <argument name="Customer" value="CustomerEntityOne"/>
-            <argument name="Store" value="staticStore"/>
+            <argument name="Store" value="customStore"/>
+            <argument name="StoreGroup" value="customStoreGroup"/>
         </actionGroup>
     </test>
 </tests>
diff --git a/app/code/Magento/Rule/Test/Mftf/Helper/RuleHelper.php b/app/code/Magento/Rule/Test/Mftf/Helper/RuleHelper.php
new file mode 100644
index 0000000000000..a8a9f78df7f28
--- /dev/null
+++ b/app/code/Magento/Rule/Test/Mftf/Helper/RuleHelper.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Rule\Test\Mftf\Helper;
+
+use Facebook\WebDriver\Remote\RemoteWebDriver as FacebookWebDriver;
+use Facebook\WebDriver\WebDriverBy;
+use Magento\FunctionalTestingFramework\Helper\Helper;
+use Magento\FunctionalTestingFramework\Module\MagentoWebDriver;
+
+/**
+ * Class for MFTF helpers for CatalogRule module.
+ */
+class RuleHelper extends Helper
+{
+    /**
+     * Delete all Catalog Price Rules obe by one.
+     *
+     * @param string $emptyRow
+     * @param string $modalAceptButton
+     * @param string $deleteButton
+     * @param string $successMessageContainer
+     * @param string $successMessage
+     *
+     * @return void
+     */
+    public function deleteAllRulesOneByOne(
+        string $firstNotEmptyRow,
+        string $modalAcceptButton,
+        string $deleteButton,
+        string $successMessageContainer,
+        string $successMessage
+    ): void {
+        try {
+            /** @var MagentoWebDriver $webDriver */
+            $magentoWebDriver = $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver');
+            /** @var FacebookWebDriver $webDriver */
+            $webDriver = $magentoWebDriver->webDriver;
+            $rows = $webDriver->findElements(WebDriverBy::cssSelector($firstNotEmptyRow));
+            while (!empty($rows)) {
+                $rows[0]->click();
+                $magentoWebDriver->waitForPageLoad(30);
+                $magentoWebDriver->click($deleteButton);
+                $magentoWebDriver->waitForPageLoad(30);
+                $magentoWebDriver->waitForElementVisible($modalAcceptButton, 10);
+                $magentoWebDriver->waitForPageLoad(60);
+                $magentoWebDriver->click($modalAcceptButton);
+                $magentoWebDriver->waitForPageLoad(60);
+                $magentoWebDriver->waitForLoadingMaskToDisappear();
+                $magentoWebDriver->waitForElementVisible($successMessageContainer, 10);
+                $magentoWebDriver->see($successMessage, $successMessageContainer);
+                $rows = $webDriver->findElements(WebDriverBy::cssSelector($firstNotEmptyRow));
+            }
+        } catch (\Exception $e) {
+            $this->fail($e->getMessage());
+        }
+    }
+}
diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleDeleteAllActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleDeleteAllActionGroup.xml
new file mode 100644
index 0000000000000..85437650efc35
--- /dev/null
+++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleDeleteAllActionGroup.xml
@@ -0,0 +1,29 @@
+<?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="AdminCartPriceRuleDeleteAllActionGroup">
+        <annotations>
+            <description>Open Cart Price Rule grid and delete all rules one by one. Need to avoid interference with other tests that test cart price rules.</description>
+        </annotations>
+
+        <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="goToAdminCartPriceRuleGridPage"/>
+        <!-- It sometimes is loading too long for default 10s -->
+        <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/>
+        <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
+        <helper class="\Magento\Rule\Test\Mftf\Helper\RuleHelper" method="deleteAllRulesOneByOne" stepKey="deleteAllRulesOneByOne">
+            <argument name="firstNotEmptyRow">{{AdminDataGridTableSection.firstNotEmptyRow}}</argument>
+            <argument name="modalAcceptButton">{{AdminConfirmationModalSection.ok}}</argument>
+            <argument name="deleteButton">{{AdminMainActionsSection.delete}}</argument>
+            <argument name="successMessageContainer">{{AdminMessagesSection.success}}</argument>
+            <argument name="successMessage">You deleted the rule.</argument>
+        </helper>
+        <waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
+        <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillActionsActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillActionsActionGroup.xml
new file mode 100644
index 0000000000000..391a11cd7f1dc
--- /dev/null
+++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillActionsActionGroup.xml
@@ -0,0 +1,28 @@
+<?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="AdminCartPriceRuleFillActionsActionGroup">
+        <annotations>
+            <description>Fill Cart Price Rule actions fields: Apply, Discount Amount, Discard subsequent rules.</description>
+        </annotations>
+        <arguments>
+            <argument name="apply" type="string" defaultValue="{{ApiSalesRule.simple_action}}"/>
+            <argument name="discountAmount" type="string" defaultValue="{{ApiSalesRule.discount_amount}}"/>
+            <argument name="discardSubsequentRules" type="string" defaultValue="1"/>
+        </arguments>
+
+        <conditionalClick selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" dependentSelector="{{AdminCartPriceRulesFormSection.actionsHeaderOpen}}" visible="false" stepKey="clickToExpandActions"/>
+        <scrollTo selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="scrollToActionsFieldset"/>
+        <waitForElementVisible selector="{{AdminCartPriceRulesFormSection.apply}}" stepKey="waitActionsFieldsetFullyOpened"/>
+        <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="{{apply}}" stepKey="fillDiscountType"/>
+        <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="{{discountAmount}}" stepKey="fillDiscountAmount"/>
+        <pressKey selector="{{AdminCartPriceRulesFormSection.discountAmount}}" parameterArray="[\Facebook\WebDriver\WebDriverKeys::TAB]" stepKey="pressTab"/>
+        <conditionalClick selector="{{AdminCartPriceRulesFormSection.discardSubsequentRulesLabel}}" dependentSelector="{{AdminCartPriceRulesFormSection.discardSubsequentRulesByStatus(discardSubsequentRules)}}" visible="false" stepKey="fillDiscardSubsequentRules"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillMainInfoActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillMainInfoActionGroup.xml
new file mode 100644
index 0000000000000..4624278d7f3f4
--- /dev/null
+++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleFillMainInfoActionGroup.xml
@@ -0,0 +1,35 @@
+<?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="AdminCartPriceRuleFillMainInfoActionGroup">
+        <annotations>
+            <description>Fill Cart Price Rule main info fields: Name, Description, Active (1/0), Priority.</description>
+        </annotations>
+        <arguments>
+            <argument name="name" type="string" defaultValue="{{ApiSalesRule.name}}"/>
+            <argument name="description" type="string" defaultValue="{{ApiSalesRule.description}}"/>
+            <argument name="active" type="string" defaultValue="1"/>
+            <argument name="websites" type="string" defaultValue="'Main Website'"/>
+            <argument name="groups" type="string" defaultValue="'NOT LOGGED IN','General','Wholesale','Retailer'"/>
+            <argument name="fromDate" type="string" defaultValue=""/>
+            <argument name="toDate" type="string" defaultValue=""/>
+            <argument name="priority" type="string" defaultValue=""/>
+        </arguments>
+
+        <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{name}}" stepKey="fillName"/>
+        <fillField selector="{{AdminCartPriceRulesFormSection.description}}" userInput="{{description}}" stepKey="fillDescription"/>
+        <conditionalClick selector="{{AdminCartPriceRulesFormSection.isActive}}" dependentSelector="{{AdminCartPriceRulesFormSection.activeByStatus(active)}}" visible="false" stepKey="fillActive"/>
+        <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" parameterArray="[{{websites}}]" stepKey="selectSpecifiedWebsites"/>
+        <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{groups}}]" stepKey="selectSpecifiedCustomerGroups"/>
+        <fillField selector="{{AdminCartPriceRulesFormSection.fromDate}}" userInput="{{fromDate}}" stepKey="fillFromDate"/>
+        <fillField selector="{{AdminCartPriceRulesFormSection.toDate}}" userInput="{{toDate}}" stepKey="fillToDate"/>
+        <fillField selector="{{AdminCartPriceRulesFormSection.priority}}" userInput="{{priority}}" stepKey="fillPriority"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleSaveActionGroup.xml b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleSaveActionGroup.xml
new file mode 100644
index 0000000000000..a94d5b4cf4889
--- /dev/null
+++ b/app/code/Magento/SalesRule/Test/Mftf/ActionGroup/AdminCartPriceRuleSaveActionGroup.xml
@@ -0,0 +1,21 @@
+<?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="AdminCartPriceRuleSaveActionGroup">
+        <annotations>
+            <description>Clicks Save and Apply on a Admin Cart Price Rule creation/edit page. Validates that the Success Message is present.</description>
+        </annotations>
+
+        <scrollToTopOfPage stepKey="scrollToTop"/>
+        <waitForElementVisible selector="{{AdminMainActionsSection.save}}" stepKey="waitForSaveButton"/>
+        <click selector="{{AdminMainActionsSection.save}}" stepKey="saveRule"/>
+        <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessageAppears"/>
+        <see selector="{{AdminMessagesSection.success}}" userInput="You saved the rule." stepKey="checkSuccessSaveMessage"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml
index b164cdde33248..02fcb26c635da 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Section/AdminCartPriceRulesFormSection.xml
@@ -18,6 +18,8 @@
         <element name="ruleName" type="input" selector="input[name='name']"/>
         <element name="description" type="textarea" selector="//div[@class='admin__field-control']/textarea[@name='description']"/>
         <element name="active" type="checkbox" selector="//div[@class='admin__actions-switch']/input[@name='is_active']/../label"/>
+        <element name="isActive" type="text" selector="input[name='is_active']+label"/>
+        <element name="activeByStatus" type="text" selector="div.admin__actions-switch input[name='is_active'][value='{{value}}']+label" parameterized="true"/>
         <element name="websites" type="multiselect" selector="select[name='website_ids']"/>
         <element name="websitesOptions" type="select" selector="[name='website_ids'] option"/>
         <element name="customerGroups" type="multiselect" selector="select[name='customer_group_ids']"/>
@@ -84,6 +86,8 @@
         <element name="discountStep" type="input" selector="input[name='discount_step']"/>
         <element name="applyToShippingAmount" type="checkbox" selector="//div[@class='admin__actions-switch']/input[@name='apply_to_shipping']/../label"/>
         <element name="discardSubsequentRules" type="checkbox" selector="//div[@class='admin__actions-switch']/input[@name='stop_rules_processing']/../label"/>
+        <element name="discardSubsequentRulesLabel" type="text" selector="div.admin__actions-switch input[name='stop_rules_processing']+label"/>
+        <element name="discardSubsequentRulesByStatus" type="text" selector="div.admin__actions-switch input[name='stop_rules_processing'][value='{{value}}']+label" parameterized="true"/>
         <element name="addRewardPoints" type="input" selector="input[name='extension_attributes[reward_points_delta]']"/>
         <element name="freeShipping" type="select" selector="//select[@name='simple_free_shipping']"/>
 

From 117fed74107485b35d320bfed2c423b6bcff90c1 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Sun, 31 May 2020 22:49:09 +0300
Subject: [PATCH 177/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platfor

---
 .../ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
index 032ef4549f943..4c423844b17fd 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
@@ -16,7 +16,7 @@
             <argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
         </arguments>
 
-        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}} --single-thread" stepKey="startMessageQueue"/>
+        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}}" stepKey="startMessageQueue"/>
         <wait time="30" stepKey="waitForQueueStarting"/>
     </actionGroup>
 </actionGroups>

From 7da7b7bf11bc0d6703f453eca0fc70d87ea4ac67 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Mon, 1 Jun 2020 12:18:33 +0300
Subject: [PATCH 178/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platfor

---
 .../ActionGroup/CliCacheCleanActionGroup.xml  | 21 +++++++++++++++++++
 .../ActionGroup/CliCacheFlushActionGroup.xml  | 21 +++++++++++++++++++
 ...sUpdateAttributesForBundleProductsTest.xml |  5 +++--
 .../Test/Mftf/Data/QueueConsumerData.xml      |  8 +++----
 .../Test/AdminMassProductPriceUpdateTest.xml  |  5 +++--
 ...UpdateProductAttributesGlobalScopeTest.xml |  5 +++--
 .../Test/AdminExportBundleProductTest.xml     |  2 +-
 ...portGroupedProductWithSpecialPriceTest.xml |  2 +-
 ...mportConfigurableProductWithImagesTest.xml |  2 +-
 ...figurableProductsWithCustomOptionsTest.xml |  2 +-
 ...igurableProductsWithAssignedImagesTest.xml |  2 +-
 ...ableProductAssignedToCustomWebsiteTest.xml |  2 +-
 ...rtSimpleProductWithCustomAttributeTest.xml |  2 +-
 ...minUrlForProductRewrittenCorrectlyTest.xml |  5 +++--
 ...AdminConfigurableProductBulkUpdateTest.xml |  5 +++--
 .../ActionGroup/CliReindexActionGroup.xml     | 20 ++++++++++++++++++
 ...iStartMessageQueueConsumerActionGroup.xml} | 10 ++++-----
 .../Test/Mftf/Data/QueueConsumerData.xml      | 12 +++++------
 ...ateCartPriceRuleForGeneratedCouponTest.xml |  5 +++--
 .../StorefrontAutoGeneratedCouponCodeTest.xml |  5 +++--
 20 files changed, 105 insertions(+), 36 deletions(-)
 create mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml
 create mode 100644 app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml
 create mode 100644 app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml
 rename app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/{AdminStartMessageQueueConsumerActionGroup.xml => CliStartMessageQueueConsumerActionGroup.xml} (52%)

diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml
new file mode 100644
index 0000000000000..5b1366e56361f
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml
@@ -0,0 +1,21 @@
+<?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="CliCacheCleanActionGroup">
+        <annotations>
+            <description>Run cache:clean by CLI with specified cache tags (space separated).</description>
+        </annotations>
+        <arguments>
+            <argument name="tags" type="string" defaultValue="full_page"/>
+        </arguments>
+
+        <magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml
new file mode 100644
index 0000000000000..3653e717cf123
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml
@@ -0,0 +1,21 @@
+<?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="CliCacheFlushActionGroup">
+        <annotations>
+            <description>Run cache:flush by CLI with specified cache tags (space separated).</description>
+        </annotations>
+        <arguments>
+            <argument name="tags" type="string" defaultValue="full_page"/>
+        </arguments>
+
+        <magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
index 2338b44b186ab..daa3351073e9b 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml
@@ -57,8 +57,9 @@
             <argument name="product" value="UpdateAttributeNameAndDescription"/>
         </actionGroup>
         <!-- Start message queue for product attribute consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
-            <argument name="consumer" value="AdminProductAttributeUpdateMessageConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <!-- Search for a product with a new name and Open Product -->
         <actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchWithNewProductName">
diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml
index 2c01b2a573f1e..cd53fede3ab58 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml
@@ -9,11 +9,11 @@
 <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
     <entity name="AdminProductAttributeUpdateConsumerData">
-        <data key="consumer_name">product_action_attribute.update</data>
-        <data key="message_limit">100</data>
+        <data key="consumerName">product_action_attribute.update</data>
+        <data key="messageLimit">100</data>
     </entity>
     <entity name="AdminProductAttributeWebsiteUpdateConsumerData">
-        <data key="consumer_name">product_action_attribute.website.update</data>
-        <data key="message_limit">100</data>
+        <data key="consumerName">product_action_attribute.website.update</data>
+        <data key="messageLimit">100</data>
     </entity>
 </entities>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
index ebf8d9acb851f..845ce340451d1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml
@@ -57,8 +57,9 @@
         <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/>
 
         <!-- Start message queue -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueueConsumer">
-            <argument name="consumer" value="AdminProductAttributeUpdateConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueueConsumer">
+            <argument name="consumerName" value="{{AdminProductAttributeUpdateConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminProductAttributeUpdateConsumerData.messageLimit}}"/>
         </actionGroup>
         <!-- Run cron -->
         <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
index 089ce35b32f78..cd34741b6a68c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml
@@ -67,8 +67,9 @@
         <see selector="{{AdminMessagesSection.success}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
 
         <!-- Start message queue for product attribute consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
-            <argument name="consumer" value="AdminProductAttributeUpdateMessageConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
         </actionGroup>
 
         <!-- Assert on storefront default view -->
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
index e94567f174f4f..6624bf4b1e8f8 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
@@ -81,7 +81,7 @@
             </createData>
 
             <!-- Start message queue for export consumer -->
-            <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+            <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
             <reloadPage stepKey="refreshPage"/>
             <waitForPageLoad stepKey="waitForPageLoaded"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
index e84700d39199b..0e419329d5a8a 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
@@ -68,7 +68,7 @@
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
index a26a5d9d7c5b0..a9688147dfbcd 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
@@ -165,7 +165,7 @@
         </actionGroup>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
index a7ce332d7318b..9f1ca707e0e9f 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
@@ -99,7 +99,7 @@
         </actionGroup>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
index 1048684a9dd44..08ece12df3721 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
@@ -114,7 +114,7 @@
         </actionGroup>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
index 56c9f5e3e6390..26a88c15a125d 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
@@ -98,7 +98,7 @@
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
index daa24362ebeae..514135f70f434 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
@@ -50,7 +50,7 @@
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
         <reloadPage stepKey="pageReload" />
         <waitForPageLoad stepKey="waitForPageLoaded" />
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
index 5190e007b668f..329f5e8cae3f6 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminUrlForProductRewrittenCorrectlyTest.xml
@@ -73,8 +73,9 @@
         <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeSaveSuccess"/>
 
         <!-- Start message queue -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueueConsumer">
-            <argument name="consumer" value="AdminProductAttributeWebsiteUpdateConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueueConsumer">
+            <argument name="consumerName" value="{{AdminProductAttributeWebsiteUpdateConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminProductAttributeWebsiteUpdateConsumerData.messageLimit}}"/>
         </actionGroup>
         <!-- Run cron -->
         <magentoCLI command="cron:run --group=index" stepKey="runCron"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
index 02e2520c04672..186799bf4626b 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductUpdateTest/AdminConfigurableProductBulkUpdateTest.xml
@@ -66,8 +66,9 @@
         <see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
 
         <!-- Apply changes -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
-            <argument name="consumer" value="AdminProductAttributeUpdateMessageConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
         </actionGroup>
 
         <!-- Check storefront for description -->
diff --git a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml
new file mode 100644
index 0000000000000..b6f9d7b5c0cf3
--- /dev/null
+++ b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml
@@ -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="CliReindexActionGroup">
+        <annotations>
+            <description>Run reindex by CLI with specified indexers (space separated).</description>
+        </annotations>
+        <arguments>
+            <argument name="indices" type="string" defaultValue="catalogsearch_fulltext"/>
+        </arguments>
+
+        <magentoCLI command="indexer:reindex" arguments="{{indices}}" stepKey="reindexSpecifiedIndexers"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliStartMessageQueueConsumerActionGroup.xml
similarity index 52%
rename from app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
rename to app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliStartMessageQueueConsumerActionGroup.xml
index 4c423844b17fd..e719c1f224949 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/AdminStartMessageQueueConsumerActionGroup.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliStartMessageQueueConsumerActionGroup.xml
@@ -8,15 +8,15 @@
 
 <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
-    <actionGroup name="AdminStartMessageQueueConsumerActionGroup">
+    <actionGroup name="CliConsumerStartActionGroup">
         <annotations>
-            <description>Starts message queue for specific consumer.</description>
+            <description>Starts message queue for specific consumer by CLI.</description>
         </annotations>
         <arguments>
-            <argument name="consumer" defaultValue="AdminExportMessageConsumerData"/>
+            <argument name="consumerName" type="string" defaultValue="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" type="string" defaultValue="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </arguments>
 
-        <magentoCLI command="queue:consumers:start {{consumer.consumer_name}} --max-messages={{consumer.message_limit}}" stepKey="startMessageQueue"/>
-        <wait time="30" stepKey="waitForQueueStarting"/>
+        <magentoCLI command="queue:consumers:start {{consumerName}} --max-messages={{maxMessages}}" stepKey="startMessageQueue"/>
     </actionGroup>
 </actionGroups>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
index b5da26f6ae5b1..ef989808eea60 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/Data/QueueConsumerData.xml
@@ -9,15 +9,15 @@
 <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
     <entity name="AdminExportMessageConsumerData">
-        <data key="consumer_name">exportProcessor</data>
-        <data key="message_limit">100</data>
+        <data key="consumerName">exportProcessor</data>
+        <data key="messageLimit">100</data>
     </entity>
     <entity name="AdminProductAttributeUpdateMessageConsumerData">
-        <data key="consumer_name">product_action_attribute.update</data>
-        <data key="message_limit">100</data>
+        <data key="consumerName">product_action_attribute.update</data>
+        <data key="messageLimit">100</data>
     </entity>
     <entity name="AdminCodeGeneratorMessageConsumerData">
-        <data key="consumer_name">codegeneratorProcessor</data>
-        <data key="message_limit">100</data>
+        <data key="consumerName">codegeneratorProcessor</data>
+        <data key="messageLimit">100</data>
     </entity>
 </entities>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
index 7b74e14c72f97..9f4168575595a 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/AdminCreateCartPriceRuleForGeneratedCouponTest.xml
@@ -56,8 +56,9 @@
         <see selector="{{AdminCartPriceRulesFormSection.successMessage}}" userInput="Message is added to queue, wait to get your coupons soon" stepKey="seeGenerationSuccess"/>
 
         <!-- Apply changes -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
-            <argument name="consumer" value="AdminCodeGeneratorMessageConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminCodeGeneratorMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminCodeGeneratorMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitFormToReload1"/>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
index bdf4b49b67621..b77cfaf02d232 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontAutoGeneratedCouponCodeTest.xml
@@ -60,8 +60,9 @@
              stepKey="seeSuccessMessage"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="AdminStartMessageQueueConsumerActionGroup" stepKey="startMessageQueue">
-            <argument name="consumer" value="AdminCodeGeneratorMessageConsumerData"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminCodeGeneratorMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminCodeGeneratorMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitFormToReload1"/>

From 51d645f86c7fc9c91d6d7c5eae1165f4d74750ea Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Mon, 1 Jun 2020 12:20:42 +0300
Subject: [PATCH 179/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platfor

---
 ...eueConsumerActionGroup.xml => CliConsumerStartActionGroup.xml} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/{CliStartMessageQueueConsumerActionGroup.xml => CliConsumerStartActionGroup.xml} (100%)

diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliStartMessageQueueConsumerActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml
similarity index 100%
rename from app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliStartMessageQueueConsumerActionGroup.xml
rename to app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml

From 3a7f19410672123492897227bc6d13105837db34 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Mon, 1 Jun 2020 19:49:04 +0300
Subject: [PATCH 180/307] MC-34482: MFTF tests causing high load on Jenkins
 agents in MTSv1 platfor

---
 .../Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml    | 2 +-
 .../Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml    | 2 +-
 .../AdminUpdateFlatCategoryIncludeInNavigationTest.xml    | 4 +++-
 .../AdminUpdateFlatCategoryNameAndDescriptionTest.xml     | 8 ++++++--
 .../Test/Mftf/Test/AdminExportBundleProductTest.xml       | 5 ++++-
 .../AdminExportGroupedProductWithSpecialPriceTest.xml     | 5 ++++-
 ...AdminExportImportConfigurableProductWithImagesTest.xml | 5 ++++-
 ...SimpleAndConfigurableProductsWithCustomOptionsTest.xml | 5 ++++-
 ...oductAndConfigurableProductsWithAssignedImagesTest.xml | 5 ++++-
 ...eAndConfigurableProductAssignedToCustomWebsiteTest.xml | 5 ++++-
 .../AdminExportSimpleProductWithCustomAttributeTest.xml   | 5 ++++-
 ...exActionGroup.xml => CliIndexerReindexActionGroup.xml} | 4 ++--
 .../Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml | 4 ++--
 13 files changed, 43 insertions(+), 16 deletions(-)
 rename app/code/Magento/Indexer/Test/Mftf/ActionGroup/{CliReindexActionGroup.xml => CliIndexerReindexActionGroup.xml} (82%)

diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml
index 5b1366e56361f..c6305531e1c5d 100644
--- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheCleanActionGroup.xml
@@ -13,7 +13,7 @@
             <description>Run cache:clean by CLI with specified cache tags (space separated).</description>
         </annotations>
         <arguments>
-            <argument name="tags" type="string" defaultValue="full_page"/>
+            <argument name="tags" type="string"/>
         </arguments>
 
         <magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
diff --git a/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml
index 3653e717cf123..4dc18d1215139 100644
--- a/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml
+++ b/app/code/Magento/Backend/Test/Mftf/ActionGroup/CliCacheFlushActionGroup.xml
@@ -13,7 +13,7 @@
             <description>Run cache:flush by CLI with specified cache tags (space separated).</description>
         </annotations>
         <arguments>
-            <argument name="tags" type="string" defaultValue="full_page"/>
+            <argument name="tags" type="string"/>
         </arguments>
 
         <magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
index 2abd7aecf4342..1214ba879f211 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
@@ -35,7 +35,9 @@
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
             <!-- Reindex invalidated indices and clear caches -->
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
index 1aea42e0f7f63..490f8dbdc4f81 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
@@ -35,8 +35,12 @@
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
             <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
index 6624bf4b1e8f8..bdb562ab0205d 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
@@ -81,7 +81,10 @@
             </createData>
 
             <!-- Start message queue for export consumer -->
-            <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+            <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+                <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+                <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+            </actionGroup>
             <reloadPage stepKey="refreshPage"/>
             <waitForPageLoad stepKey="waitForPageLoaded"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
index 0e419329d5a8a..5ae94f050eb30 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
@@ -68,7 +68,10 @@
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
index a9688147dfbcd..e0dfb8250c738 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
@@ -165,7 +165,10 @@
         </actionGroup>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
index 9f1ca707e0e9f..c82451eb9dbb5 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
@@ -99,7 +99,10 @@
         </actionGroup>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
index 08ece12df3721..dc556a6d0a899 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
@@ -114,7 +114,10 @@
         </actionGroup>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
index 26a88c15a125d..65f9ff80f7e39 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
@@ -98,7 +98,10 @@
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
         <reloadPage stepKey="refreshPage"/>
         <waitForPageLoad stepKey="waitForPageLoaded"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
index 514135f70f434..e684f80d8bd05 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
@@ -50,7 +50,10 @@
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
         <!-- Start message queue for export consumer -->
-        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue"/>
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
         <reloadPage stepKey="pageReload" />
         <waitForPageLoad stepKey="waitForPageLoaded" />
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
diff --git a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliIndexerReindexActionGroup.xml
similarity index 82%
rename from app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml
rename to app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliIndexerReindexActionGroup.xml
index b6f9d7b5c0cf3..5556707a4d494 100644
--- a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliReindexActionGroup.xml
+++ b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/CliIndexerReindexActionGroup.xml
@@ -7,12 +7,12 @@
 -->
 <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
-    <actionGroup name="CliReindexActionGroup">
+    <actionGroup name="CliIndexerReindexActionGroup">
         <annotations>
             <description>Run reindex by CLI with specified indexers (space separated).</description>
         </annotations>
         <arguments>
-            <argument name="indices" type="string" defaultValue="catalogsearch_fulltext"/>
+            <argument name="indices" type="string"/>
         </arguments>
 
         <magentoCLI command="indexer:reindex" arguments="{{indices}}" stepKey="reindexSpecifiedIndexers"/>
diff --git a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml
index e719c1f224949..204691f1ad5e5 100644
--- a/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml
+++ b/app/code/Magento/MessageQueue/Test/Mftf/ActionGroup/CliConsumerStartActionGroup.xml
@@ -13,8 +13,8 @@
             <description>Starts message queue for specific consumer by CLI.</description>
         </annotations>
         <arguments>
-            <argument name="consumerName" type="string" defaultValue="{{AdminExportMessageConsumerData.consumerName}}"/>
-            <argument name="maxMessages" type="string" defaultValue="{{AdminExportMessageConsumerData.messageLimit}}"/>
+            <argument name="consumerName" type="string"/>
+            <argument name="maxMessages" type="string"/>
         </arguments>
 
         <magentoCLI command="queue:consumers:start {{consumerName}} --max-messages={{maxMessages}}" stepKey="startMessageQueue"/>

From 86640641cc4ce1038ed736ecc0f4315331b95f97 Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Mon, 1 Jun 2020 12:23:46 -0500
Subject: [PATCH 181/307] Revert for public PR:22917

---
 .../Product/View/Options/AbstractOptions.php  |  30 +-
 .../Magento/Catalog/Model/Product/Option.php  |  32 +--
 .../Model/Product/Option/Type/DefaultType.php |  41 +--
 .../Model/Product/Option/Type/Select.php      |  31 +-
 .../Catalog/Model/Product/Option/Value.php    |  58 +---
 .../CalculateCustomOptionCatalogRule.php      | 119 --------
 .../Unit/Model/Product/Option/ValueTest.php   |  16 +-
 .../CalculateCustomOptionCatalogRuleTest.php  | 266 ------------------
 app/code/Magento/CatalogRule/Model/Rule.php   |  15 +-
 .../view/frontend/templates/form.phtml        |  13 +-
 .../Product/Option/DataProvider/Type/File.php | 120 ++++----
 .../Model/Product/BundlePriceAbstract.php     |  21 +-
 .../Block/Product/View/OptionsTest.php        |  62 +---
 13 files changed, 107 insertions(+), 717 deletions(-)
 delete mode 100644 app/code/Magento/Catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php
 delete mode 100644 app/code/Magento/Catalog/Test/Unit/Pricing/Price/CalculateCustomOptionCatalogRuleTest.php

diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
index 0bfdcc678e9f7..030b6e1d2204c 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
@@ -3,14 +3,16 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
+
+/**
+ * Product options abstract type block
+ *
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
 
 namespace Magento\Catalog\Block\Product\View\Options;
 
-use Magento\Catalog\Pricing\Price\BasePrice;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
 use Magento\Catalog\Pricing\Price\CustomOptionPriceInterface;
-use Magento\Framework\App\ObjectManager;
 
 /**
  * Product options section abstract block.
@@ -45,29 +47,20 @@ abstract class AbstractOptions extends \Magento\Framework\View\Element\Template
      */
     protected $_catalogHelper;
 
-    /**
-     * @var CalculateCustomOptionCatalogRule
-     */
-    private $calculateCustomOptionCatalogRule;
-
     /**
      * @param \Magento\Framework\View\Element\Template\Context $context
      * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
      * @param \Magento\Catalog\Helper\Data $catalogData
      * @param array $data
-     * @param CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule
      */
     public function __construct(
         \Magento\Framework\View\Element\Template\Context $context,
         \Magento\Framework\Pricing\Helper\Data $pricingHelper,
         \Magento\Catalog\Helper\Data $catalogData,
-        array $data = [],
-        CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule = null
+        array $data = []
     ) {
         $this->pricingHelper = $pricingHelper;
         $this->_catalogHelper = $catalogData;
-        $this->calculateCustomOptionCatalogRule = $calculateCustomOptionCatalogRule
-            ?? ObjectManager::getInstance()->get(CalculateCustomOptionCatalogRule::class);
         parent::__construct($context, $data);
     }
 
@@ -168,15 +161,6 @@ protected function _formatPrice($value, $flag = true)
         $priceStr = $sign;
 
         $customOptionPrice = $this->getProduct()->getPriceInfo()->getPrice('custom_option_price');
-
-        if (!$value['is_percent']) {
-            $value['pricing_value'] = $this->calculateCustomOptionCatalogRule->execute(
-                $this->getProduct(),
-                (float)$value['pricing_value'],
-                (bool)$value['is_percent']
-            );
-        }
-
         $context = [CustomOptionPriceInterface::CONFIGURATION_OPTION_FLAG => true];
         $optionAmount = $customOptionPrice->getCustomAmount($value['pricing_value'], null, $context);
         $priceStr .= $this->getLayout()->getBlock('product.price.render.default')->renderAmount(
diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php
index 128f420e033c2..3a0920fb1c530 100644
--- a/app/code/Magento/Catalog/Model/Product/Option.php
+++ b/app/code/Magento/Catalog/Model/Product/Option.php
@@ -3,7 +3,6 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
 
 namespace Magento\Catalog\Model\Product;
 
@@ -17,10 +16,8 @@
 use Magento\Catalog\Model\Product\Option\Type\File;
 use Magento\Catalog\Model\Product\Option\Type\Select;
 use Magento\Catalog\Model\Product\Option\Type\Text;
-use Magento\Catalog\Model\Product\Option\Value;
 use Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
-use Magento\Framework\App\ObjectManager;
+use Magento\Catalog\Pricing\Price\BasePrice;
 use Magento\Framework\EntityManager\MetadataPool;
 use Magento\Framework\Exception\LocalizedException;
 use Magento\Framework\Model\AbstractExtensibleModel;
@@ -126,11 +123,6 @@ class Option extends AbstractExtensibleModel implements ProductCustomOptionInter
      */
     private $customOptionValuesFactory;
 
-    /**
-     * @var CalculateCustomOptionCatalogRule
-     */
-    private $calculateCustomOptionCatalogRule;
-
     /**
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
@@ -146,7 +138,6 @@ class Option extends AbstractExtensibleModel implements ProductCustomOptionInter
      * @param ProductCustomOptionValuesInterfaceFactory|null $customOptionValuesFactory
      * @param array $optionGroups
      * @param array $optionTypesToGroups
-     * @param CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -163,17 +154,14 @@ public function __construct(
         array $data = [],
         ProductCustomOptionValuesInterfaceFactory $customOptionValuesFactory = null,
         array $optionGroups = [],
-        array $optionTypesToGroups = [],
-        CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule = null
+        array $optionTypesToGroups = []
     ) {
         $this->productOptionValue = $productOptionValue;
         $this->optionTypeFactory = $optionFactory;
         $this->string = $string;
         $this->validatorPool = $validatorPool;
         $this->customOptionValuesFactory = $customOptionValuesFactory ?:
-            ObjectManager::getInstance()->get(ProductCustomOptionValuesInterfaceFactory::class);
-        $this->calculateCustomOptionCatalogRule = $calculateCustomOptionCatalogRule ??
-            ObjectManager::getInstance()->get(CalculateCustomOptionCatalogRule::class);
+            \Magento\Framework\App\ObjectManager::getInstance()->get(ProductCustomOptionValuesInterfaceFactory::class);
         $this->optionGroups = $optionGroups ?: [
             self::OPTION_GROUP_DATE => Date::class,
             self::OPTION_GROUP_FILE => File::class,
@@ -474,12 +462,10 @@ public function afterSave()
      */
     public function getPrice($flag = false)
     {
-        if ($flag) {
-            return $this->calculateCustomOptionCatalogRule->execute(
-                $this->getProduct(),
-                (float)$this->getData(self::KEY_PRICE),
-                $this->getPriceType() === Value::TYPE_PERCENT
-            );
+        if ($flag && $this->getPriceType() == self::$typePercent) {
+            $basePrice = $this->getProduct()->getPriceInfo()->getPrice(BasePrice::PRICE_CODE)->getValue();
+            $price = $basePrice * ($this->_getData(self::KEY_PRICE) / 100);
+            return $price;
         }
         return $this->_getData(self::KEY_PRICE);
     }
@@ -966,7 +952,7 @@ public function setExtensionAttributes(
     private function getOptionRepository()
     {
         if (null === $this->optionRepository) {
-            $this->optionRepository = ObjectManager::getInstance()
+            $this->optionRepository = \Magento\Framework\App\ObjectManager::getInstance()
                 ->get(\Magento\Catalog\Model\Product\Option\Repository::class);
         }
         return $this->optionRepository;
@@ -980,7 +966,7 @@ private function getOptionRepository()
     private function getMetadataPool()
     {
         if (null === $this->metadataPool) {
-            $this->metadataPool = ObjectManager::getInstance()
+            $this->metadataPool = \Magento\Framework\App\ObjectManager::getInstance()
                 ->get(\Magento\Framework\EntityManager\MetadataPool::class);
         }
         return $this->metadataPool;
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
index be7f1921afccf..c998a015f3780 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
@@ -3,19 +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;
 
+use Magento\Framework\Exception\LocalizedException;
 use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
+use Magento\Catalog\Model\Product\Option;
 use Magento\Catalog\Model\Product;
-use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface;
 use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface;
-use Magento\Catalog\Model\Product\Option;
+use Magento\Catalog\Model\Product\Configuration\Item\ItemInterface;
 use Magento\Catalog\Model\Product\Option\Value;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
-use Magento\Framework\App\ObjectManager;
-use Magento\Framework\Exception\LocalizedException;
 
 /**
  * Catalog product option default type
@@ -63,30 +60,21 @@ class DefaultType extends \Magento\Framework\DataObject
      */
     protected $_checkoutSession;
 
-    /**
-     * @var CalculateCustomOptionCatalogRule
-     */
-    private $calculateCustomOptionCatalogRule;
-
     /**
      * Construct
      *
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param array $data
-     * @param CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        array $data = [],
-        CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule = null
+        array $data = []
     ) {
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($data);
         $this->_scopeConfig = $scopeConfig;
-        $this->calculateCustomOptionCatalogRule = $calculateCustomOptionCatalogRule ?? ObjectManager::getInstance()
-                ->get(CalculateCustomOptionCatalogRule::class);
     }
 
     /**
@@ -104,12 +92,12 @@ public function setOption($option)
     /**
      * Option Instance getter
      *
-     * @return Option
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @return Option
      */
     public function getOption()
     {
-        if ($this->_option instanceof Option) {
+        if ($this->_option instanceof \Magento\Catalog\Model\Product\Option) {
             return $this->_option;
         }
         throw new LocalizedException(__('The option instance type in options group is incorrect.'));
@@ -130,8 +118,8 @@ public function setProduct($product)
     /**
      * Product Instance getter
      *
-     * @return Product
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @return Product
      */
     public function getProduct()
     {
@@ -169,8 +157,7 @@ public function getConfigurationItemOption()
      */
     public function getConfigurationItem()
     {
-        if ($this->_getData('configuration_item') instanceof ItemInterface
-        ) {
+        if ($this->_getData('configuration_item') instanceof ItemInterface) {
             return $this->_getData('configuration_item');
         }
 
@@ -354,11 +341,7 @@ public function getOptionPrice($optionValue, $basePrice)
     {
         $option = $this->getOption();
 
-        return $this->calculateCustomOptionCatalogRule->execute(
-            $option->getProduct(),
-            (float)$option->getPrice(),
-            $option->getPriceType() === Value::TYPE_PERCENT
-        );
+        return $this->_getChargeableOptionPrice($option->getPrice(), $option->getPriceType() == 'percent', $basePrice);
     }
 
     /**
@@ -412,14 +395,12 @@ public function getProductOptions()
     }
 
     /**
-     * Return final chargeable price for option
-     *
      * @param float $price Price of option
      * @param boolean $isPercent Price type - percent or fixed
      * @param float $basePrice For percent price type
      * @return float
      * @deprecated 102.0.4 typo in method name
-     * @see CalculateCustomOptionCatalogRule::execute
+     * @see _getChargeableOptionPrice
      */
     protected function _getChargableOptionPrice($price, $isPercent, $basePrice)
     {
@@ -433,8 +414,6 @@ protected function _getChargableOptionPrice($price, $isPercent, $basePrice)
      * @param boolean $isPercent Price type - percent or fixed
      * @param float $basePrice For percent price type
      * @return float
-     * @deprecated
-     * @see CalculateCustomOptionCatalogRule::execute
      */
     protected function _getChargeableOptionPrice($price, $isPercent, $basePrice)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php b/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
index 8eebd3e91c2ee..d2766b1bbb054 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/Select.php
@@ -3,13 +3,9 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
 
 namespace Magento\Catalog\Model\Product\Option\Type;
 
-use Magento\Catalog\Model\Product\Option\Value;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
-use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Exception\LocalizedException;
 
 /**
@@ -41,11 +37,6 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      */
     private $singleSelectionTypes;
 
-    /**
-     * @var CalculateCustomOptionCatalogRule
-     */
-    private $calculateCustomOptionCatalogRule;
-
     /**
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
@@ -53,7 +44,6 @@ class Select extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      * @param \Magento\Framework\Escaper $escaper
      * @param array $data
      * @param array $singleSelectionTypes
-     * @param CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
@@ -61,8 +51,7 @@ public function __construct(
         \Magento\Framework\Stdlib\StringUtils $string,
         \Magento\Framework\Escaper $escaper,
         array $data = [],
-        array $singleSelectionTypes = [],
-        CalculateCustomOptionCatalogRule $calculateCustomOptionCatalogRule = null
+        array $singleSelectionTypes = []
     ) {
         $this->string = $string;
         $this->_escaper = $escaper;
@@ -72,8 +61,6 @@ public function __construct(
             'drop_down' => \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_DROP_DOWN,
             'radio' => \Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_TYPE_RADIO,
         ];
-        $this->calculateCustomOptionCatalogRule = $calculateCustomOptionCatalogRule ?? ObjectManager::getInstance()
-                ->get(CalculateCustomOptionCatalogRule::class);
     }
 
     /**
@@ -261,10 +248,10 @@ public function getOptionPrice($optionValue, $basePrice)
             foreach (explode(',', $optionValue) as $value) {
                 $_result = $option->getValueById($value);
                 if ($_result) {
-                    $result += $this->calculateCustomOptionCatalogRule->execute(
-                        $option->getProduct(),
-                        (float)$_result->getPrice(),
-                        $_result->getPriceType() === Value::TYPE_PERCENT
+                    $result += $this->_getChargeableOptionPrice(
+                        $_result->getPrice(),
+                        $_result->getPriceType() == 'percent',
+                        $basePrice
                     );
                 } else {
                     if ($this->getListener()) {
@@ -276,10 +263,10 @@ public function getOptionPrice($optionValue, $basePrice)
         } elseif ($this->_isSingleSelection()) {
             $_result = $option->getValueById($optionValue);
             if ($_result) {
-                $result = $this->calculateCustomOptionCatalogRule->execute(
-                    $option->getProduct(),
-                    (float)$_result->getPrice(),
-                    $_result->getPriceType() === Value::TYPE_PERCENT
+                $result = $this->_getChargeableOptionPrice(
+                    $_result->getPrice(),
+                    $_result->getPriceType() == 'percent',
+                    $basePrice
                 );
             } else {
                 if ($this->getListener()) {
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Product/Option/Value.php
index 783bda4699792..25e12e2fad865 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Value.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Value.php
@@ -3,16 +3,13 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
 
 namespace Magento\Catalog\Model\Product\Option;
 
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Model\Product\Option;
-use Magento\Catalog\Pricing\Price\BasePrice;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
-use Magento\Framework\App\ObjectManager;
 use Magento\Framework\Model\AbstractModel;
+use Magento\Catalog\Pricing\Price\BasePrice;
 use Magento\Catalog\Pricing\Price\CustomOptionPriceCalculator;
 use Magento\Catalog\Pricing\Price\RegularPrice;
 
@@ -72,11 +69,6 @@ class Value extends AbstractModel implements \Magento\Catalog\Api\Data\ProductCu
      */
     private $customOptionPriceCalculator;
 
-    /**
-     * @var CalculateCustomOptionCatalogRule
-     */
-    private $calculateCustomOptionCatalogRule;
-
     /**
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
@@ -85,7 +77,6 @@ class Value extends AbstractModel implements \Magento\Catalog\Api\Data\ProductCu
      * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
      * @param array $data
      * @param CustomOptionPriceCalculator|null $customOptionPriceCalculator
-     * @param CalculateCustomOptionCatalogRule|null $CalculateCustomOptionCatalogRule
      */
     public function __construct(
         \Magento\Framework\Model\Context $context,
@@ -94,14 +85,11 @@ public function __construct(
         \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
         array $data = [],
-        CustomOptionPriceCalculator $customOptionPriceCalculator = null,
-        CalculateCustomOptionCatalogRule $CalculateCustomOptionCatalogRule = null
+        CustomOptionPriceCalculator $customOptionPriceCalculator = null
     ) {
         $this->_valueCollectionFactory = $valueCollectionFactory;
         $this->customOptionPriceCalculator = $customOptionPriceCalculator
-            ?? ObjectManager::getInstance()->get(CustomOptionPriceCalculator::class);
-        $this->calculateCustomOptionCatalogRule = $CalculateCustomOptionCatalogRule
-            ?? ObjectManager::getInstance()->get(CalculateCustomOptionCatalogRule::class);
+            ?? \Magento\Framework\App\ObjectManager::getInstance()->get(CustomOptionPriceCalculator::class);
 
         parent::__construct(
             $context,
@@ -123,8 +111,6 @@ protected function _construct()
     }
 
     /**
-     * Add value.
-     *
      * @codeCoverageIgnoreStart
      * @param mixed $value
      * @return $this
@@ -136,8 +122,6 @@ public function addValue($value)
     }
 
     /**
-     * Get values.
-     *
      * @return array
      */
     public function getValues()
@@ -146,8 +130,6 @@ public function getValues()
     }
 
     /**
-     * Set values.
-     *
      * @param array $values
      * @return $this
      */
@@ -158,8 +140,6 @@ public function setValues($values)
     }
 
     /**
-     * Unset values.
-     *
      * @return $this
      */
     public function unsetValues()
@@ -169,8 +149,6 @@ public function unsetValues()
     }
 
     /**
-     * Set option.
-     *
      * @param Option $option
      * @return $this
      */
@@ -181,8 +159,6 @@ public function setOption(Option $option)
     }
 
     /**
-     * Unset option.
-     *
      * @return $this
      */
     public function unsetOption()
@@ -192,7 +168,7 @@ public function unsetOption()
     }
 
     /**
-     * Get option.
+     * Enter description here...
      *
      * @return Option
      */
@@ -202,8 +178,6 @@ public function getOption()
     }
 
     /**
-     * Set product.
-     *
      * @param Product $product
      * @return $this
      */
@@ -216,8 +190,6 @@ public function setProduct($product)
     //@codeCoverageIgnoreEnd
 
     /**
-     * Get product.
-     *
      * @return Product
      */
     public function getProduct()
@@ -229,10 +201,7 @@ public function getProduct()
     }
 
     /**
-     * Save values.
-     *
      * @return $this
-     * @throws \Exception
      */
     public function saveValues()
     {
@@ -258,9 +227,8 @@ public function saveValues()
     }
 
     /**
-     * Return price.
-     *
-     * If $flag is true and price is percent return converted percent to price
+     * Return price. If $flag is true and price is percent
+     *  return converted percent to price
      *
      * @param bool $flag
      * @return float|int
@@ -268,11 +236,7 @@ public function saveValues()
     public function getPrice($flag = false)
     {
         if ($flag) {
-            return $this->calculateCustomOptionCatalogRule->execute(
-                $this->getProduct(),
-                (float)$this->getData(self::KEY_PRICE),
-                $this->getPriceType() === self::TYPE_PERCENT
-            );
+            return $this->customOptionPriceCalculator->getOptionPriceByPriceCode($this, BasePrice::PRICE_CODE);
         }
         return $this->_getData(self::KEY_PRICE);
     }
@@ -288,7 +252,7 @@ public function getRegularPrice()
     }
 
     /**
-     * Get values collection.
+     * Enter description here...
      *
      * @param Option $option
      * @return \Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection
@@ -306,8 +270,6 @@ public function getValuesCollection(Option $option)
     }
 
     /**
-     * Get values by option.
-     *
      * @param array $optionIds
      * @param int $option_id
      * @param int $store_id
@@ -327,8 +289,6 @@ public function getValuesByOption($optionIds, $option_id, $store_id)
     }
 
     /**
-     * Delete value.
-     *
      * @param int $option_id
      * @return $this
      */
@@ -339,8 +299,6 @@ public function deleteValue($option_id)
     }
 
     /**
-     * Delete values.
-     *
      * @param int $option_type_id
      * @return $this
      */
diff --git a/app/code/Magento/Catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php b/app/code/Magento/Catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php
deleted file mode 100644
index b3f3ac7bf68ef..0000000000000
--- a/app/code/Magento/Catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-declare(strict_types=1);
-
-namespace Magento\Catalog\Pricing\Price;
-
-use Magento\Catalog\Model\Product;
-use Magento\Catalog\Model\Product\PriceModifierInterface;
-use Magento\CatalogRule\Pricing\Price\CatalogRulePrice;
-use Magento\Framework\Pricing\Price\BasePriceProviderInterface;
-use Magento\Framework\Pricing\PriceCurrencyInterface;
-
-/**
- * Calculates prices of custom options of the product with catalog rules applied.
- */
-class CalculateCustomOptionCatalogRule
-{
-    /**
-     * @var PriceCurrencyInterface
-     */
-    private $priceCurrency;
-
-    /**
-     * @var PriceModifierInterface
-     */
-    private $priceModifier;
-
-    /**
-     * @param PriceCurrencyInterface $priceCurrency
-     * @param PriceModifierInterface $priceModifier
-     */
-    public function __construct(
-        PriceCurrencyInterface $priceCurrency,
-        PriceModifierInterface $priceModifier
-    ) {
-        $this->priceModifier = $priceModifier;
-        $this->priceCurrency = $priceCurrency;
-    }
-
-    /**
-     * Calculate prices of custom options of the product with catalog rules applied.
-     *
-     * @param Product $product
-     * @param float $optionPriceValue
-     * @param bool $isPercent
-     * @return float
-     */
-    public function execute(
-        Product $product,
-        float $optionPriceValue,
-        bool $isPercent
-    ): float {
-        $regularPrice = (float)$product->getPriceInfo()
-            ->getPrice(RegularPrice::PRICE_CODE)
-            ->getValue();
-        $catalogRulePrice = $this->priceModifier->modifyPrice(
-            $regularPrice,
-            $product
-        );
-        $basePriceWithOutCatalogRules = (float)$this->getGetBasePriceWithOutCatalogRules($product);
-        // Apply catalog price rules to product options only if catalog price rules are applied to product.
-        if ($catalogRulePrice < $basePriceWithOutCatalogRules) {
-            $optionPrice = $this->getOptionPriceWithoutPriceRule($optionPriceValue, $isPercent, $regularPrice);
-            $totalCatalogRulePrice = $this->priceModifier->modifyPrice(
-                $regularPrice + $optionPrice,
-                $product
-            );
-            $finalOptionPrice = $totalCatalogRulePrice - $catalogRulePrice;
-        } else {
-            $finalOptionPrice = $this->getOptionPriceWithoutPriceRule(
-                $optionPriceValue,
-                $isPercent,
-                $this->getGetBasePriceWithOutCatalogRules($product)
-            );
-        }
-
-        return $this->priceCurrency->convertAndRound($finalOptionPrice);
-    }
-
-    /**
-     * Get product base price without catalog rules applied.
-     *
-     * @param Product $product
-     * @return float
-     */
-    private function getGetBasePriceWithOutCatalogRules(Product $product): float
-    {
-        $basePrice = null;
-        foreach ($product->getPriceInfo()->getPrices() as $price) {
-            if ($price instanceof BasePriceProviderInterface
-                && $price->getPriceCode() !== CatalogRulePrice::PRICE_CODE
-                && $price->getValue() !== false
-            ) {
-                $basePrice = min(
-                    $price->getValue(),
-                    $basePrice ?? $price->getValue()
-                );
-            }
-        }
-
-        return $basePrice ?? $product->getPrice();
-    }
-
-    /**
-     * Calculate option price without catalog price rule discount.
-     *
-     * @param float $optionPriceValue
-     * @param bool $isPercent
-     * @param float $basePrice
-     * @return float
-     */
-    private function getOptionPriceWithoutPriceRule(float $optionPriceValue, bool $isPercent, float $basePrice): float
-    {
-        return $isPercent ? $basePrice * $optionPriceValue / 100 : $optionPriceValue;
-    }
-}
diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/ValueTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/ValueTest.php
index e03ea8c79cc8a..e46884d1637da 100644
--- a/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/ValueTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Model/Product/Option/ValueTest.php
@@ -12,13 +12,11 @@
 use Magento\Catalog\Model\Product\Option\Value;
 use Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection;
 use Magento\Catalog\Model\ResourceModel\Product\Option\Value\CollectionFactory;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
 use Magento\Catalog\Pricing\Price\CustomOptionPriceCalculator;
 
 use Magento\Framework\Pricing\Price\PriceInterface;
 use Magento\Framework\Pricing\PriceInfoInterface;
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
-use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 
 /**
@@ -36,11 +34,6 @@ class ValueTest extends TestCase
      */
     private $customOptionPriceCalculatorMock;
 
-    /**
-     * @var CalculateCustomOptionCatalogRule|MockObject
-     */
-    private $CalculateCustomOptionCatalogRule;
-
     protected function setUp(): void
     {
         $mockedResource = $this->getMockedResource();
@@ -50,10 +43,6 @@ protected function setUp(): void
             CustomOptionPriceCalculator::class
         );
 
-        $this->CalculateCustomOptionCatalogRule = $this->createMock(
-            CalculateCustomOptionCatalogRule::class
-        );
-
         $helper = new ObjectManager($this);
         $this->model = $helper->getObject(
             Value::class,
@@ -61,7 +50,6 @@ protected function setUp(): void
                 'resource' => $mockedResource,
                 'valueCollectionFactory' => $mockedCollectionFactory,
                 'customOptionPriceCalculator' => $this->customOptionPriceCalculatorMock,
-                'CalculateCustomOptionCatalogRule' => $this->CalculateCustomOptionCatalogRule
             ]
         );
         $this->model->setOption($this->getMockedOption());
@@ -89,8 +77,8 @@ public function testGetPrice()
         $this->assertEquals($price, $this->model->getPrice(false));
 
         $percentPrice = 100.0;
-        $this->CalculateCustomOptionCatalogRule->expects($this->atLeastOnce())
-            ->method('execute')
+        $this->customOptionPriceCalculatorMock->expects($this->atLeastOnce())
+            ->method('getOptionPriceByPriceCode')
             ->willReturn($percentPrice);
         $this->assertEquals($percentPrice, $this->model->getPrice(true));
     }
diff --git a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CalculateCustomOptionCatalogRuleTest.php b/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CalculateCustomOptionCatalogRuleTest.php
deleted file mode 100644
index 894408048b536..0000000000000
--- a/app/code/Magento/Catalog/Test/Unit/Pricing/Price/CalculateCustomOptionCatalogRuleTest.php
+++ /dev/null
@@ -1,266 +0,0 @@
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-declare(strict_types=1);
-
-namespace Magento\Catalog\Test\Unit\Pricing\Price;
-
-use Magento\Catalog\Model\Product;
-use Magento\Catalog\Model\Product\PriceModifier\Composite as PriceModifier;
-use Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule;
-use Magento\Catalog\Pricing\Price\RegularPrice;
-use Magento\Catalog\Pricing\Price\SpecialPrice;
-use Magento\CatalogRule\Pricing\Price\CatalogRulePrice;
-use Magento\Directory\Model\PriceCurrency;
-use Magento\Framework\Pricing\PriceInfo\Base;
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
-use PHPUnit\Framework\MockObject\MockObject;
-use PHPUnit\Framework\TestCase;
-
-/**
- * Test for CalculateCustomOptionCatalogRule class.
- */
-class CalculateCustomOptionCatalogRuleTest extends TestCase
-{
-    /**
-     * @var Product|MockObject
-     */
-    private $saleableItemMock;
-
-    /**
-     * @var RegularPrice|MockObject
-     */
-    private $regularPriceMock;
-
-    /**
-     * @var SpecialPrice|MockObject
-     */
-    private $specialPriceMock;
-
-    /**
-     * @var CatalogRulePrice|MockObject
-     */
-    private $catalogRulePriceMock;
-
-    /**
-     * @var PriceModifier|MockObject
-     */
-    private $priceModifierMock;
-
-    /**
-     * @var CalculateCustomOptionCatalogRule
-     */
-    private $calculateCustomOptionCatalogRule;
-
-    /**
-     * @inheritdoc
-     */
-    protected function setUp(): void
-    {
-        $objectManager = new ObjectManager($this);
-        $this->saleableItemMock = $this->createMock(Product::class);
-        $this->regularPriceMock = $this->createMock(RegularPrice::class);
-        $this->specialPriceMock = $this->createMock(SpecialPrice::class);
-        $this->catalogRulePriceMock = $this->createMock(CatalogRulePrice::class);
-        $priceInfoMock = $this->createMock(Base::class);
-        $this->saleableItemMock->expects($this->any())
-            ->method('getPriceInfo')
-            ->willReturn($priceInfoMock);
-        $this->regularPriceMock->expects($this->any())
-            ->method('getPriceCode')
-            ->willReturn(RegularPrice::PRICE_CODE);
-        $this->specialPriceMock->expects($this->any())
-            ->method('getPriceCode')
-            ->willReturn(SpecialPrice::PRICE_CODE);
-        $this->catalogRulePriceMock->expects($this->any())
-            ->method('getPriceCode')
-            ->willReturn(CatalogRulePrice::PRICE_CODE);
-        $priceInfoMock->expects($this->any())
-            ->method('getPrices')
-            ->willReturn(
-                [
-                    'regular_price' => $this->regularPriceMock,
-                    'special_price' => $this->specialPriceMock,
-                    'catalog_rule_price' => $this->catalogRulePriceMock
-                ]
-            );
-        $priceInfoMock->expects($this->any())
-            ->method('getPrice')
-            ->willReturnMap(
-                [
-                    ['regular_price', $this->regularPriceMock],
-                    ['special_price', $this->specialPriceMock],
-                    ['catalog_rule_price', $this->catalogRulePriceMock],
-                ]
-            );
-        $priceCurrencyMock = $this->createMock(PriceCurrency::class);
-        $priceCurrencyMock->expects($this->any())
-            ->method('convertAndRound')
-            ->willReturnArgument(0);
-        $this->priceModifierMock = $this->createMock(PriceModifier::class);
-
-        $this->calculateCustomOptionCatalogRule = $objectManager->getObject(
-            CalculateCustomOptionCatalogRule::class,
-            [
-                'priceCurrency' => $priceCurrencyMock,
-                'priceModifier' => $this->priceModifierMock,
-            ]
-        );
-    }
-
-    /**
-     * Tests correct option price calculation with different catalog rules and special prices combination.
-     *
-     * @dataProvider executeDataProvider
-     * @param array $prices
-     * @param float $catalogRulePriceModifier
-     * @param float $optionPriceValue
-     * @param bool $isPercent
-     * @param float $expectedResult
-     */
-    public function testExecute(
-        array $prices,
-        float $catalogRulePriceModifier,
-        float $optionPriceValue,
-        bool $isPercent,
-        float $expectedResult
-    ) {
-        $this->regularPriceMock->expects($this->any())
-            ->method('getValue')
-            ->willReturn($prices['regularPriceValue']);
-        $this->specialPriceMock->expects($this->any())
-            ->method('getValue')
-            ->willReturn($prices['specialPriceValue']);
-        $this->priceModifierMock->expects($this->any())
-            ->method('modifyPrice')
-            ->willReturnCallback(
-                function ($price) use ($catalogRulePriceModifier) {
-                    return $price * $catalogRulePriceModifier;
-                }
-            );
-
-        $finalPrice = $this->calculateCustomOptionCatalogRule->execute(
-            $this->saleableItemMock,
-            $optionPriceValue,
-            $isPercent
-        );
-
-        $this->assertSame($expectedResult, $finalPrice);
-    }
-
-    /**
-     * Data provider for testExecute.
-     *
-     * "Active" means this price type has biggest discount, so other prices doesn't count.
-     *
-     * @return array
-     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
-     */
-    public function executeDataProvider(): array
-    {
-        return [
-            'No special price, no catalog price rules, fixed option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 1000,
-                ],
-                'catalogRulePriceModifier' => 1.0,
-                'optionPriceValue' => 100.0,
-                'isPercent' => false,
-                'expectedResult' => 100.0
-            ],
-            'No special price, no catalog price rules, percent option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 1000,
-                ],
-                'catalogRulePriceModifier' => 1.0,
-                'optionPriceValue' => 100.0,
-                'isPercent' => true,
-                'expectedResult' => 1000.0
-            ],
-            'No special price, catalog price rule set, fixed option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 1000,
-                ],
-                'catalogRulePriceModifier' => 0.9,
-                'optionPriceValue' => 100.0,
-                'isPercent' => false,
-                'expectedResult' => 90.0
-            ],
-            'No special price, catalog price rule set, percent option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 1000,
-                ],
-                'catalogRulePriceModifier' => 0.9,
-                'optionPriceValue' => 100.0,
-                'isPercent' => true,
-                'expectedResult' => 900.0
-            ],
-            'Special price set, no catalog price rule, fixed option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 900,
-                ],
-                'catalogRulePriceModifier' => 1.0,
-                'optionPriceValue' => 100.0,
-                'isPercent' => false,
-                'expectedResult' => 100.0
-            ],
-            'Special price set, no catalog price rule, percent option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 900,
-                ],
-                'catalogRulePriceModifier' => 1.0,
-                'optionPriceValue' => 100.0,
-                'isPercent' => true,
-                'expectedResult' => 900.0
-            ],
-            'Special price set and active, catalog price rule set, fixed option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 800,
-                ],
-                'catalogRulePriceModifier' => 0.9,
-                'optionPriceValue' => 100.0,
-                'isPercent' => false,
-                'expectedResult' => 100.0
-            ],
-            'Special price set and active, catalog price rule set, percent option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 800,
-                ],
-                'catalogRulePriceModifier' => 0.9,
-                'optionPriceValue' => 100.0,
-                'isPercent' => true,
-                'expectedResult' => 800.0
-            ],
-            'Special price set, catalog price rule set and active, fixed option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 950,
-                ],
-                'catalogRulePriceModifier' => 0.9,
-                'optionPriceValue' => 100.0,
-                'isPercent' => false,
-                'expectedResult' => 90.0
-            ],
-            'Special price set, catalog price rule set and active, percent option price' => [
-                'prices' => [
-                    'regularPriceValue' => 1000,
-                    'specialPriceValue' => 950,
-                ],
-                'catalogRulePriceModifier' => 0.9,
-                'optionPriceValue' => 100.0,
-                'isPercent' => true,
-                'expectedResult' => 900.0
-            ],
-        ];
-    }
-}
diff --git a/app/code/Magento/CatalogRule/Model/Rule.php b/app/code/Magento/CatalogRule/Model/Rule.php
index cd24201963f25..f2e8e54d34665 100644
--- a/app/code/Magento/CatalogRule/Model/Rule.php
+++ b/app/code/Magento/CatalogRule/Model/Rule.php
@@ -3,8 +3,6 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
-
 namespace Magento\CatalogRule\Model;
 
 use Magento\Catalog\Model\Product;
@@ -15,7 +13,6 @@
 use Magento\CatalogRule\Helper\Data;
 use Magento\CatalogRule\Model\Data\Condition\Converter;
 use Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor;
-use Magento\CatalogRule\Model\ResourceModel\Product\ConditionsToCollectionApplier;
 use Magento\CatalogRule\Model\ResourceModel\Rule as RuleResourceModel;
 use Magento\CatalogRule\Model\Rule\Action\CollectionFactory as RuleCollectionFactory;
 use Magento\CatalogRule\Model\Rule\Condition\CombineFactory;
@@ -36,6 +33,7 @@
 use Magento\Framework\Stdlib\DateTime;
 use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
 use Magento\Store\Model\StoreManagerInterface;
+use Magento\CatalogRule\Model\ResourceModel\Product\ConditionsToCollectionApplier;
 
 /**
  * Catalog Rule data model
@@ -501,8 +499,7 @@ public function calcProductPriceRule(Product $product, $price)
         } else {
             $customerGroupId = $this->_customerSession->getCustomerGroupId();
         }
-        $currentDateTime = new \DateTime();
-        $dateTs = $currentDateTime->getTimestamp();
+        $dateTs = $this->_localeDate->scopeTimeStamp($storeId);
         $cacheKey = date('Y-m-d', $dateTs) . "|{$websiteId}|{$customerGroupId}|{$productId}|{$price}";
 
         if (!array_key_exists($cacheKey, self::$_priceRulesData)) {
@@ -898,12 +895,4 @@ public function getIdentities()
     {
         return ['price'];
     }
-
-    /**
-     * Clear price rules cache.
-     */
-    public function clearPriceRulesData(): void
-    {
-        self::$_priceRulesData = [];
-    }
 }
diff --git a/app/code/Magento/Contact/view/frontend/templates/form.phtml b/app/code/Magento/Contact/view/frontend/templates/form.phtml
index d218e650657ac..f3a1884b02831 100644
--- a/app/code/Magento/Contact/view/frontend/templates/form.phtml
+++ b/app/code/Magento/Contact/view/frontend/templates/form.phtml
@@ -61,13 +61,12 @@ $viewModel = $block->getViewModel();
             </label>
             <div class="control">
                 <textarea name="comment" 
-                          id="comment" 
-                          title="<?= $block->escapeHtmlAttr(__('What’s on your mind?')) ?>" 
-                          class="input-text" 
-                          cols="5" 
-                          rows="3" 
-                          data-validate="{required:true}"><?= $block->escapeHtml($viewModel->getUserComment()) ?>
-                </textarea>
+                     id="comment"
+                     title="<?= $block->escapeHtmlAttr(__('What’s on your mind?')) ?>"
+                     class="input-text"
+                     cols="5"
+                     rows="3"
+                     data-validate="{required:true}"><?= $block->escapeHtml($viewModel->getUserComment()) ?></textarea>
             </div>
         </div>
         <?= $block->getChildHtml('form.additional.info') ?>
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Catalog/Model/Product/Option/DataProvider/Type/File.php b/dev/tests/integration/framework/Magento/TestFramework/Catalog/Model/Product/Option/DataProvider/Type/File.php
index d2aa20a005ec4..35f449a404410 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Catalog/Model/Product/Option/DataProvider/Type/File.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Catalog/Model/Product/Option/DataProvider/Type/File.php
@@ -8,7 +8,7 @@
 namespace Magento\TestFramework\Catalog\Model\Product\Option\DataProvider\Type;
 
 use Magento\Catalog\Api\Data\ProductCustomOptionInterface;
-use Magento\Catalog\Model\Product\Option;
+use Magento\TestFramework\Catalog\Model\Product\Option\DataProvider\Type\AbstractBase;
 
 /**
  * Data provider for options from file group with type "file".
@@ -20,44 +20,41 @@ class File extends AbstractBase
      */
     public function getDataForCreateOptions(): array
     {
-        return $this->injectFileExtension(
-            array_merge_recursive(
-                parent::getDataForCreateOptions(),
-                [
-                    "type_{$this->getType()}_option_file_extension" => [
-                        [
-                            'record_id' => 0,
-                            'sort_order' => 1,
-                            'is_require' => 1,
-                            'sku' => 'test-option-title-1',
-                            'max_characters' => 30,
-                            'title' => 'Test option title 1',
-                            'type' => $this->getType(),
-                            'price' => 10,
-                            'price_type' => 'fixed',
-                            'file_extension' => 'gif',
-                            'image_size_x' => 10,
-                            'image_size_y' => 20,
-                        ],
+        return array_merge_recursive(
+            parent::getDataForCreateOptions(),
+            [
+                "type_{$this->getType()}_option_file_extension" => [
+                    [
+                        'record_id' => 0,
+                        'sort_order' => 1,
+                        'is_require' => 1,
+                        'sku' => 'test-option-title-1',
+                        'max_characters' => 30,
+                        'title' => 'Test option title 1',
+                        'type' => $this->getType(),
+                        'price' => 10,
+                        'price_type' => 'fixed',
+                        'file_extension' => 'gif',
+                        'image_size_x' => 10,
+                        'image_size_y' => 20,
                     ],
-                    "type_{$this->getType()}_option_maximum_file_size" => [
-                        [
-                            'record_id' => 0,
-                            'sort_order' => 1,
-                            'is_require' => 1,
-                            'sku' => 'test-option-title-1',
-                            'title' => 'Test option title 1',
-                            'type' => $this->getType(),
-                            'price' => 10,
-                            'price_type' => 'fixed',
-                            'file_extension' => 'gif',
-                            'image_size_x' => 10,
-                            'image_size_y' => 20,
-                        ],
+                ],
+                "type_{$this->getType()}_option_maximum_file_size" => [
+                    [
+                        'record_id' => 0,
+                        'sort_order' => 1,
+                        'is_require' => 1,
+                        'sku' => 'test-option-title-1',
+                        'title' => 'Test option title 1',
+                        'type' => $this->getType(),
+                        'price' => 10,
+                        'price_type' => 'fixed',
+                        'file_extension' => 'gif',
+                        'image_size_x' => 10,
+                        'image_size_y' => 20,
                     ],
-                ]
-            ),
-            'png'
+                ],
+            ]
         );
     }
 
@@ -66,24 +63,21 @@ public function getDataForCreateOptions(): array
      */
     public function getDataForUpdateOptions(): array
     {
-        return $this->injectFileExtension(
-            array_merge_recursive(
-                parent::getDataForUpdateOptions(),
-                [
-                    "type_{$this->getType()}_option_file_extension" => [
-                        [
-                            'file_extension' => 'jpg',
-                        ],
+        return array_merge_recursive(
+            parent::getDataForUpdateOptions(),
+            [
+                "type_{$this->getType()}_option_file_extension" => [
+                    [
+                        'file_extension' => 'jpg',
                     ],
-                    "type_{$this->getType()}_option_maximum_file_size" => [
-                        [
-                            'image_size_x' => 300,
-                            'image_size_y' => 815,
-                        ],
+                ],
+                "type_{$this->getType()}_option_maximum_file_size" => [
+                    [
+                        'image_size_x' => 300,
+                        'image_size_y' => 815,
                     ],
-                ]
-            ),
-            ''
+                ],
+            ]
         );
     }
 
@@ -94,24 +88,4 @@ protected function getType(): string
     {
         return ProductCustomOptionInterface::OPTION_TYPE_FILE;
     }
-
-    /**
-     * Add 'file_extension' value to each option.
-     *
-     * @param array $data
-     * @param string $extension
-     * @return array
-     */
-    private function injectFileExtension(array $data, string $extension): array
-    {
-        foreach ($data as &$caseData) {
-            foreach ($caseData as &$option) {
-                if (!isset($option[Option::KEY_FILE_EXTENSION])) {
-                    $option[Option::KEY_FILE_EXTENSION] = $extension;
-                }
-            }
-        }
-
-        return $data;
-    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php b/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php
index 572a526da07da..3ce2711a25d37 100644
--- a/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php
+++ b/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php
@@ -3,13 +3,11 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
 
 namespace Magento\Bundle\Model\Product;
 
 /**
  * Abstract class for testing bundle prices
- *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 abstract class BundlePriceAbstract extends \PHPUnit\Framework\TestCase
@@ -31,14 +29,6 @@ abstract class BundlePriceAbstract extends \PHPUnit\Framework\TestCase
      */
     protected $productCollectionFactory;
 
-    /**
-     * @var \Magento\CatalogRule\Model\RuleFactory
-     */
-    private $ruleFactory;
-
-    /**
-     * @inheritdoc
-     */
     protected function setUp(): void
     {
         $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
@@ -52,19 +42,15 @@ protected function setUp(): void
             true,
             \Magento\Store\Model\ScopeInterface::SCOPE_STORE
         );
-        $this->ruleFactory = $this->objectManager->get(\Magento\CatalogRule\Model\RuleFactory::class);
     }
 
     /**
-     * Get test cases.
-     *
+     * Get test cases
      * @return array
      */
     abstract public function getTestCases();
 
     /**
-     * Prepare fixture.
-     *
      * @param array $strategyModifiers
      * @param string $productSku
      * @return void
@@ -75,14 +61,11 @@ abstract public function getTestCases();
      */
     protected function prepareFixture($strategyModifiers, $productSku)
     {
-        $this->ruleFactory->create()->clearPriceRulesData();
-
         $bundleProduct = $this->productRepository->get($productSku);
 
         foreach ($strategyModifiers as $modifier) {
             if (method_exists($this, $modifier['modifierName'])) {
                 array_unshift($modifier['data'], $bundleProduct);
-                // phpcs:ignore Magento2.Functions.DiscouragedFunction
                 $bundleProduct = call_user_func_array([$this, $modifier['modifierName']], $modifier['data']);
             } else {
                 throw new \Magento\Framework\Exception\InputException(
@@ -130,8 +113,6 @@ protected function addSimpleProduct(\Magento\Catalog\Model\Product $bundleProduc
     }
 
     /**
-     * Add custom option.
-     *
      * @param \Magento\Catalog\Model\Product $bundleProduct
      * @param array $optionsData
      * @return \Magento\Catalog\Model\Product
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php
index 28357919ed566..57782fc17c9f5 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/OptionsTest.php
@@ -3,12 +3,8 @@
  * Copyright © Magento, Inc. All rights reserved.
  * See COPYING.txt for license details.
  */
-declare(strict_types=1);
-
 namespace Magento\Catalog\Block\Product\View;
 
-use Magento\CatalogRule\Model\Indexer\IndexBuilder;
-
 /**
  * Test class for \Magento\Catalog\Block\Product\View\Options.
  */
@@ -34,19 +30,12 @@ class OptionsTest extends \PHPUnit\Framework\TestCase
      */
     protected $productRepository;
 
-    /**
-     * @var IndexBuilder
-     */
-    private $indexBuilder;
-
     protected function setUp(): void
     {
         $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 
         $this->productRepository = $this->objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
 
-        $this->indexBuilder = $this->objectManager->create(IndexBuilder::class);
-
         try {
             $this->product = $this->productRepository->get('simple');
         } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
@@ -124,7 +113,9 @@ private function getExpectedJsonConfig()
     {
         return [
             0 => [
-                'prices' => ['oldPrice' => ['amount' => 10, 'adjustments' => []],
+                'prices' =>
+                    ['oldPrice' =>
+                        ['amount' => 10, 'adjustments' => []],
                         'basePrice' => ['amount' => 10],
                         'finalPrice' => ['amount' => 10]
                     ],
@@ -132,7 +123,9 @@ private function getExpectedJsonConfig()
                 'name' => 'drop_down option 1',
             ],
             1 => [
-                'prices' => ['oldPrice' => ['amount' => 40, 'adjustments' => []],
+                'prices' =>
+                    ['oldPrice' =>
+                        ['amount' => 40, 'adjustments' => []],
                         'basePrice' => ['amount' => 40],
                         'finalPrice' => ['amount' => 40],
                     ],
@@ -141,47 +134,4 @@ private function getExpectedJsonConfig()
             ],
         ];
     }
-
-    /**
-     * Test option prices with catalog price rules applied.
-     *
-     * @magentoDbIsolation disabled
-     * @magentoDataFixture Magento/CatalogRule/_files/two_rules.php
-     * @magentoDataFixture Magento/Catalog/_files/product_with_dropdown_option.php
-     */
-    public function testGetJsonConfigWithCatalogRules()
-    {
-        $this->indexBuilder->reindexFull();
-        sleep(1);
-        $config = json_decode($this->block->getJsonConfig(), true);
-        $configValues = array_values($config);
-        $this->assertEquals($this->getExpectedJsonConfigWithCatalogRules(), array_values($configValues[0]));
-    }
-
-    /**
-     * Expected data for testGetJsonConfigWithCatalogRules
-     *
-     * @return array
-     */
-    private function getExpectedJsonConfigWithCatalogRules()
-    {
-        return [
-            0 => [
-                'prices' => ['oldPrice' => ['amount' => 10, 'adjustments' => []],
-                        'basePrice' => ['amount' => 9.5],
-                        'finalPrice' => ['amount' => 9.5],
-                    ],
-                'type' => 'fixed',
-                'name' => 'drop_down option 1',
-            ],
-            1 => [
-                'prices' => ['oldPrice' => ['amount' => 40, 'adjustments' => []],
-                        'basePrice' => ['amount' => 38],
-                        'finalPrice' => ['amount' => 38],
-                    ],
-                'type' => 'percent',
-                'name' => 'drop_down option 2',
-            ],
-        ];
-    }
 }

From 89f7d95a608790ff7ef8f664d9ed857affa4f778 Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Mon, 1 Jun 2020 14:41:14 -0500
Subject: [PATCH 182/307] Revert for public PR:22917

---
 .../Model/Product/Option/Type/DefaultType.php |  2 ++
 .../Catalog/Model/Product/Option/Value.php    | 24 +++++++++++++++++++
 .../Model/Product/BundlePriceAbstract.php     |  2 ++
 3 files changed, 28 insertions(+)

diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
index c998a015f3780..7f9181e9181b6 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
@@ -395,6 +395,8 @@ public function getProductOptions()
     }
 
     /**
+     * Return final chargeable price for option
+     *
      * @param float $price Price of option
      * @param boolean $isPercent Price type - percent or fixed
      * @param float $basePrice For percent price type
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Product/Option/Value.php
index 25e12e2fad865..e9630adc3497c 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Value.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Value.php
@@ -111,6 +111,8 @@ protected function _construct()
     }
 
     /**
+     * Add value to values array
+     *
      * @codeCoverageIgnoreStart
      * @param mixed $value
      * @return $this
@@ -122,6 +124,8 @@ public function addValue($value)
     }
 
     /**
+     * Returns array of values
+     *
      * @return array
      */
     public function getValues()
@@ -130,6 +134,8 @@ public function getValues()
     }
 
     /**
+     * Set values array
+     *
      * @param array $values
      * @return $this
      */
@@ -140,6 +146,8 @@ public function setValues($values)
     }
 
     /**
+     * Unset all from values array
+     *
      * @return $this
      */
     public function unsetValues()
@@ -149,6 +157,8 @@ public function unsetValues()
     }
 
     /**
+     * Set option
+     *
      * @param Option $option
      * @return $this
      */
@@ -159,6 +169,8 @@ public function setOption(Option $option)
     }
 
     /**
+     * Unset option
+     *
      * @return $this
      */
     public function unsetOption()
@@ -178,6 +190,8 @@ public function getOption()
     }
 
     /**
+     * Set product
+     *
      * @param Product $product
      * @return $this
      */
@@ -190,6 +204,8 @@ public function setProduct($product)
     //@codeCoverageIgnoreEnd
 
     /**
+     * Get product
+     *
      * @return Product
      */
     public function getProduct()
@@ -201,6 +217,8 @@ public function getProduct()
     }
 
     /**
+     * Save array of values
+     *
      * @return $this
      */
     public function saveValues()
@@ -270,6 +288,8 @@ public function getValuesCollection(Option $option)
     }
 
     /**
+     * Returns values by option
+     *
      * @param array $optionIds
      * @param int $option_id
      * @param int $store_id
@@ -289,6 +309,8 @@ public function getValuesByOption($optionIds, $option_id, $store_id)
     }
 
     /**
+     * Delete value by option
+     *
      * @param int $option_id
      * @return $this
      */
@@ -299,6 +321,8 @@ public function deleteValue($option_id)
     }
 
     /**
+     * Delete values by option
+     *
      * @param int $option_type_id
      * @return $this
      */
diff --git a/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php b/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php
index 3ce2711a25d37..bf369ed28167b 100644
--- a/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php
+++ b/dev/tests/integration/testsuite/Magento/Bundle/Model/Product/BundlePriceAbstract.php
@@ -8,6 +8,7 @@
 
 /**
  * Abstract class for testing bundle prices
+ * @codingStandardsIgnoreStart
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 abstract class BundlePriceAbstract extends \PHPUnit\Framework\TestCase
@@ -142,3 +143,4 @@ protected function addCustomOption(\Magento\Catalog\Model\Product $bundleProduct
         return $bundleProduct;
     }
 }
+// @codingStandardsIgnoreEnd

From 99b14a21ddfabe96b76683985e3454a2a3c635c3 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Tue, 2 Jun 2020 08:39:11 -0500
Subject: [PATCH 183/307] MC-34416: Error in the CLI during upgrade

---
 setup/src/Magento/Setup/Model/SearchConfig.php | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/setup/src/Magento/Setup/Model/SearchConfig.php b/setup/src/Magento/Setup/Model/SearchConfig.php
index 2b660077d1f5b..0f26736fb686e 100644
--- a/setup/src/Magento/Setup/Model/SearchConfig.php
+++ b/setup/src/Magento/Setup/Model/SearchConfig.php
@@ -7,7 +7,7 @@
 
 namespace Magento\Setup\Model;
 
-use Magento\Framework\App\Config;
+use Magento\Framework\Config\CacheInterface;
 use Magento\Framework\Setup\Option\AbstractConfigOption;
 use Magento\Framework\Validation\ValidationException;
 use Magento\Search\Model\SearchEngine\Validator;
@@ -35,26 +35,26 @@ class SearchConfig
     private $installConfig;
 
     /**
-     * @var Config
+     * @var CacheInterface
      */
-    private $appConfig;
+    private $cache;
 
     /**
      * @param SearchConfigOptionsList $searchConfigOptionsList
      * @param Validator $searchValidator
      * @param CompositeInstallConfig $installConfig
-     * @param Config $appConfig
+     * @param CacheInterface $cache
      */
     public function __construct(
         SearchConfigOptionsList $searchConfigOptionsList,
         Validator $searchValidator,
         CompositeInstallConfig $installConfig,
-        Config $appConfig
+        CacheInterface $cache
     ) {
         $this->searchConfigOptionsList = $searchConfigOptionsList;
         $this->searchValidator = $searchValidator;
         $this->installConfig = $installConfig;
-        $this->appConfig = $appConfig;
+        $this->cache = $cache;
     }
 
     /**
@@ -85,8 +85,8 @@ public function saveConfiguration(array $inputOptions)
      */
     public function validateSearchEngine()
     {
-        //Clean config cache prior to validation
-        $this->appConfig->clean();
+        // Clean config cache prior to validation
+        $this->cache->clean();
 
         $validationErrors = $this->searchValidator->validate();
         if (!empty($validationErrors)) {

From a63aaa342bcb71ef0b5c61b19d63897d08ddca5a Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 2 Jun 2020 10:43:32 -0500
Subject: [PATCH 184/307] MC-34764: Fix performance degradation cause by CSP

---
 .../Magento/Backend/Block/Widget/Button.php   |  2 +-
 .../Block/Widget/Button/SplitButton.php       |  2 +-
 .../Widget/Grid/Column/Renderer/Action.php    |  2 +-
 .../Widget/Grid/Column/Renderer/Checkbox.php  |  2 +-
 .../catalog/product/composite/configure.phtml | 38 +++++++------------
 .../product/image_with_borders.phtml          | 17 +++++----
 .../Block/Adminhtml/Edit/Renderer/Region.php  |  3 +-
 .../Adminhtml/Grid/Renderer/Multiaction.php   |  2 +-
 .../account/authentication-popup.phtml        |  3 +-
 .../Widget/Grid/Column/Renderer/Button.php    |  2 +-
 .../templates/product/layered/renderer.phtml  | 35 +++++++++++------
 .../frontend/templates/js/cookie_status.phtml |  5 ++-
 .../Magento/Ui/Component/Control/Button.php   |  2 +-
 .../Ui/Component/Control/SplitButton.php      |  2 +-
 .../Data/Form/Element/AbstractElement.php     |  2 +-
 .../Data/Form/Element/Editablemultiselect.php |  2 +-
 .../Framework/Data/Form/Element/Editor.php    |  2 +-
 .../Framework/Data/Form/Element/Gallery.php   |  2 +-
 .../Framework/Data/Form/Element/Image.php     |  2 +-
 .../Data/Form/Element/Multiselect.php         |  7 ++--
 .../Framework/Data/Form/Element/Select.php    |  2 +-
 .../Framework/View/Element/Html/Link.php      |  2 +-
 .../View/Helper/SecureHtmlRenderer.php        | 17 ++++-----
 23 files changed, 79 insertions(+), 76 deletions(-)

diff --git a/app/code/Magento/Backend/Block/Widget/Button.php b/app/code/Magento/Backend/Block/Widget/Button.php
index 6dba39bdee7e8..3b5eca6a61779 100644
--- a/app/code/Magento/Backend/Block/Widget/Button.php
+++ b/app/code/Magento/Backend/Block/Widget/Button.php
@@ -162,7 +162,7 @@ protected function _beforeToHtml()
     {
         parent::_beforeToHtml();
 
-        $buttonId = 'buttonId' .$this->random->getRandomString(32);
+        $buttonId = 'buttonId' .$this->random->getRandomString(10);
         $this->setData('backend_button_widget_hook_id', $buttonId);
 
         $afterHtml = $this->getAfterHtml();
diff --git a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
index 0e3d51dfe3721..8075139368ab1 100644
--- a/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
+++ b/app/code/Magento/Backend/Block/Widget/Button/SplitButton.php
@@ -243,7 +243,7 @@ private function identifyOption(array $option): string
             ? $this->getId() .'-' .$option['id']
             : (isset($option['id_attribute']) ?
                 $option['id_attribute']
-                : $this->getId() .'-optId' .$this->random->getRandomString(32));
+                : $this->getId() .'-optId' .$this->random->getRandomString(10));
     }
 
     /**
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
index c12b0c0e11b7b..0da7e4db9b983 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php
@@ -132,7 +132,7 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
         }
 
         if (empty($action['id'])) {
-            $action['id'] = 'id' .$this->random->getRandomString(32);
+            $action['id'] = 'id' .$this->random->getRandomString(10);
         }
         $actionAttributes->setData($action);
         $onclick = $actionAttributes->getData('onclick');
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
index 6609e03baeed3..013c3b7e105f5 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Checkbox.php
@@ -176,7 +176,7 @@ public function renderHeader()
         if ($this->getColumn()->getDisabled()) {
             $disabled = ' disabled="disabled"';
         }
-        $id = 'id' .$this->random->getRandomString(32);
+        $id = 'id' .$this->random->getRandomString(10);
         $html = '<th class="data-grid-th data-grid-actions-cell"><input type="checkbox" ';
         $html .= 'id="' .$id .'" ';
         $html .= 'name="' . $this->getColumn()->getFieldName() . '" ';
diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index cc940a87bc051..24aa060e3259a 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -13,10 +13,6 @@
         "window.productConfigure && productConfigure.onLoadIFrame()",
         'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
     ) ?>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        "width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px",
-        'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
-    ) ?>
 
     <form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data"
           target="product_composite_configure_iframe" class="product_composite_configure_form">
@@ -24,22 +20,10 @@
             <div id="product_composite_configure_messages" class="product_composite_configure_messages">
                 <div class="messages"><div class="message message-error error"><div></div></div></div>
             </div>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display:none;',
-                '.product_composite_configure_messages:last-of-type'
-            ) ?>
             <div id="product_composite_configure_form_fields" class="content product-composite-configure-inner"></div>
             <div id="product_composite_configure_form_additional" class="product_composite_configure_form_additional">
             </div>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display:none;',
-                '.product_composite_configure_form_additional:last-of-type'
-            ) ?>
             <div id="product_composite_configure_form_confirmed" class="product_composite_configure_form_confirmed"></div>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                'display:none;',
-                '.product_composite_configure_form_confirmed:last-of-type'
-            ) ?>
         </div>
         <input type="hidden" name="as_js_varname" value="iFrameResponse" />
         <input type="hidden" name="form_key" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" />
@@ -51,12 +35,21 @@
     ) ?>
 
     <div id="product_composite_configure_confirmed" class="product_composite_configure_confirmed"></div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        'display:none;',
-        '.product_composite_configure_confirmed:last-of-type'
-    ) ?>
 
     <?php $scriptString = <<<script
+        prodCompConfIframe = document.querySelector("iframe[name='product_composite_configure_iframe']:last-of-type");
+        prodCompConfIframe.style.width = 0;
+        prodCompConfIframe.style.height = 0;
+        prodCompConfIframe.style.border = "0px solid #fff";
+        prodCompConfIframe.style.position = "absolute";
+        prodCompConfIframe.style.top = "-1000px";
+        prodCompConfIframe.style.left = "-1000px";
+        document.querySelector(".product_composite_configure_messages:last-of-type").style.display = "none";
+        document.querySelector(".product_composite_configure_form_additional:last-of-type").style.display = "none";
+        document.querySelector(".product_composite_configure_form_confirmed:last-of-type").style.display = "none";
+        document.querySelector(".product_composite_configure_confirmed:last-of-type").style.display = "none";
+        document.querySelector(".product-configure-popup:last-of-type").style.display = "none";
+
         require([
             "jquery",
             "mage/mage"
@@ -69,8 +62,3 @@ script;
     ?>
     <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
 </div>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'display:none',
-    '.product-configure-popup:last-of-type'
-) ?>
-
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index ce21a2473f7a5..ead23a150629b 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -18,6 +18,8 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
     'enable_lazy_loading_for_images_without_borders',
     'Magento_Catalog'
 );
+$width = (int)$block->getWidth();
+$padding = $block->getRatio() * 100;
 ?>
 <span class="product-image-container" id="product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
     <span class="product-image-wrapper">
@@ -36,11 +38,10 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
             <?php endif; ?>
             alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
 </span>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'width:' . (int)$block->getWidth() . 'px;',
-    '#product-image-container-' . $block->getProductId()
-) ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'padding-bottom: '. ($block->getRatio() * 100) . '%;',
-    '#product-image-container-' . $block->getProductId() . ' span.product-image-wrapper'
-) ?>
+<?php
+$script = <<<SCRIPT
+document.querySelector('#product-image-container-{$block->getProductId()}').style.width = '{$width}px';
+document.querySelector('#product-image-container-{$block->getProductId()} span.product-image-wrapper').style.paddingBottom = '{$padding}%'
+SCRIPT;
+echo /* @noEscape */$secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false);
+?>
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
index afe040ee28a95..ad1e7989239f3 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
@@ -74,9 +74,8 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
             '" class="select required-entry admin__control-select">';
         $html .= '<option value="">' . __('Please select') . '</option>';
         $html .= '</select>';
-        $html .= $this->secureRenderer->renderStyleAsTag("display:none", '#region');
 
-        $scriptString = "\n";
+        $scriptString = "\ndocument.querySelector('#$selectId').style.display = 'none';\n";
         $scriptString .= 'require(["prototype", "mage/adminhtml/form"], function(){';
         $scriptString .= '$("' . $selectId . '").setAttribute("defaultValue", "' . $regionId . '");' . "\n";
         $scriptString .= 'new regionUpdater("' .
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
index 5de36c60f0212..726daf69dc587 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Grid/Renderer/Multiaction.php
@@ -85,7 +85,7 @@ protected function _toLinkHtml($action, \Magento\Framework\DataObject $row)
 
         if (isset($action['process']) && $action['process'] == 'configurable') {
             if ($product->canConfigure()) {
-                $id = 'id' .$this->random->getRandomString(32);
+                $id = 'id' .$this->random->getRandomString(10);
                 $onClick = sprintf('return %s.configureItem(%s)', $action['control_object'], $row->getId());
                 return sprintf(
                     '<a href="%s" id="%s" class="configure-item-link">%s</a>%s',
diff --git a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
index 55ff54a519afd..edeaf5667b9cf 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
@@ -7,7 +7,7 @@
 /** @var \Magento\Customer\Block\Account\AuthenticationPopup $block */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
 ?>
-<div id="authenticationPopup" data-bind="scope:'authenticationPopup'">
+<div id="authenticationPopup" data-bind="scope:'authenticationPopup', style: {display: 'none'}">
     <?php $scriptString = 'window.authenticationPopup = ' . /* @noEscape */ $block->getSerializedConfig(); ?>
     <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>;
     <!-- ko template: getTemplate() --><!-- /ko -->
@@ -24,4 +24,3 @@
         }
     </script>
 </div>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#authenticationPopup'); ?>
diff --git a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
index e5f5870c0154a..b34858d098494 100644
--- a/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
+++ b/app/code/Magento/Integration/Block/Adminhtml/Widget/Grid/Column/Renderer/Button.php
@@ -53,7 +53,7 @@ public function __construct(
     public function render(DataObject $row)
     {
         $attributes = $this->extractAttributes($row);
-        $attributes['button-renderer-hook-id'] = 'hook' .$this->random->getRandomString(32);
+        $attributes['button-renderer-hook-id'] = 'hook' .$this->random->getRandomString(10);
 
         return sprintf('<button %s>%s</button>', $this->renderAttributes($attributes), $this->_getValue($row))
             .$this->renderSpecialAttributes($attributes);
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index 2f113230e28cf..f72f914233134 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -9,6 +9,7 @@
 
 /** @var $block \Magento\Swatches\Block\LayeredNavigation\RenderLayered */
 /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
+/** @var \Magento\Framework\Escaper $escaper */
 ?>
 <?php $swatchData = $block->getSwatchData(); ?>
 <div class="swatch-attribute swatch-layered <?= $block->escapeHtmlAttr($swatchData['attribute_code']) ?>"
@@ -52,11 +53,16 @@
                                  data-option-tooltip-thumb="<?= $block->escapeUrl($swatchThumbPath) ?>"
                                  data-option-tooltip-value="">
                             </div>
-                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                'background: url(' . /*  @noEscape */ $escapedUrl .
-                                ') no-repeat center; background-size: initial;',
-                                'div[data-option-id="' . $block->escapeHtmlAttr($option) . '"]'
-                            ) ?>
+                            <?php
+                            $element = 'swatchImageOption' .$escaper->escapeJs($option);
+                            $script = 'let ' .$element
+                                .' = document.querySelector(\'div[data-option-id="' .$escaper->escapeJs($option)
+                                .'"]\');' .PHP_EOL;
+                            $script .= $element .'.style.background = "background: url(\''
+                                .$escapedUrl .'\') no-repeat center";' .PHP_EOL;
+                            $script .= $element .'.style.backgroundSize = "initial";';
+                            echo /* @noEscape*/ $secureRenderer->renderTag('script', [], $script, false);
+                            ?>
                             <?php break;
                         case '1':
                             ?>
@@ -70,12 +76,19 @@
                                      $swatchData['swatches'][$option]['value']
                                  ) ?>">
                             </div>
-                            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                                'background: ' . $block->escapeHtml(
-                                    $swatchData['swatches'][$option]['value']
-                                ) . ' no-repeat center; background-size: initial;',
-                                'div[data-option-id="' . $block->escapeHtmlAttr($option) . '"]'
-                            ) ?>
+                            <?php
+                            $element = 'swatchImageOption' .$escaper->escapeJs($option);
+                            $backgroundValue = $escaper->escapeJs(
+                                str_replace('\'', '\\\'', $swatchData['swatches'][$option]['value'])
+                            );
+                            $script = 'let ' .$element
+                                .' = document.querySelector(\'div[data-option-id="' .$escaper->escapeJs($option)
+                                .'"]\');' .PHP_EOL;
+                            $script .= $element .'.style.background = "background: ' .$backgroundValue
+                                .' no-repeat center";' .PHP_EOL;
+                            $script .= $element .'.style.backgroundSize = "initial";';
+                            echo /* @noEscape*/ $secureRenderer->renderTag('script', [], $script, false);
+                            ?>
                             <?php break;
                         case '0':
                         default:
diff --git a/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml b/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
index ad6c88fc2108d..084b2b54c7188 100644
--- a/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
@@ -10,7 +10,10 @@
 <div id="cookie-status">
     <?= $block->escapeHtml(__('The store will not work correctly in the case when cookies are disabled.')); ?>
 </div>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display:none', '#cookie-status'); ?>
+<?php
+$script = 'document.querySelector("#cookie-status").style.display = "none";';
+echo /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false);
+?>
 
 <script type="text/x-magento-init">
     {
diff --git a/app/code/Magento/Ui/Component/Control/Button.php b/app/code/Magento/Ui/Component/Control/Button.php
index 0944b9d17a7e5..fbbf0e1f0fa61 100644
--- a/app/code/Magento/Ui/Component/Control/Button.php
+++ b/app/code/Magento/Ui/Component/Control/Button.php
@@ -129,7 +129,7 @@ protected function _beforeToHtml()
     {
         parent::_beforeToHtml();
 
-        $this->setData('ui_button_widget_hook_id', 'buttonId' .$this->random->getRandomString(32));
+        $this->setData('ui_button_widget_hook_id', 'buttonId' .$this->random->getRandomString(10));
 
         return $this;
     }
diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php
index 38ff5e4473b54..64ca6cf3dfee6 100644
--- a/app/code/Magento/Ui/Component/Control/SplitButton.php
+++ b/app/code/Magento/Ui/Component/Control/SplitButton.php
@@ -211,7 +211,7 @@ private function identifyOption(array $option): string
             ? $this->getId() .'-' .$option['id']
             : (isset($option['id_attribute']) ?
                 $option['id_attribute']
-                : $this->getId() .'-optId' .$this->random->getRandomString(32));
+                : $this->getId() .'-optId' .$this->random->getRandomString(10));
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
index 08c94a9c310d0..fc1f2dd890cab 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
@@ -108,7 +108,7 @@ public function __construct(
     private function generateElementId(): string
     {
         if (!$this->hasData('formelementhookid')) {
-            $this->setData('formelementhookid', 'elemId' .$this->random->getRandomString(32));
+            $this->setData('formelementhookid', 'elemId' .$this->random->getRandomString(10));
         }
 
         return $this->getData('formelementhookid');
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
index a5a8ac8b7c52d..5847ab6eedd0b 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editablemultiselect.php
@@ -146,7 +146,7 @@ function check( tries, delay ){
      */
     protected function _optionToHtml($option, $selected)
     {
-        $optionId = 'optId' .$this->random->getRandomString(32);
+        $optionId = 'optId' .$this->random->getRandomString(8);
         $html = '<option value="' . $this->_escape($option['value']) . '" id="' . $optionId . '" ';
         $html .= isset($option['title']) ? 'title="' . $this->_escape($option['title']) . '"' : '';
         if (in_array((string)$option['value'], $selected)) {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
index e461d0e3bfb78..7eaf7f0f4af37 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Editor.php
@@ -420,7 +420,7 @@ protected function _prepareOptions($options)
      */
     protected function _getButtonHtml($data)
     {
-        $id = empty($data['id']) ? 'buttonId' .$this->random->getRandomString(32) : $data['id'];
+        $id = empty($data['id']) ? 'buttonId' .$this->random->getRandomString(10) : $data['id'];
 
         $html = '<button type="button"';
         $html .= ' class="scalable ' . (isset($data['class']) ? $data['class'] : '') . '"';
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php
index aaa48611b02c5..4d62a3f667dfe 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Gallery.php
@@ -96,7 +96,7 @@ public function getElementHtml()
                 $i++;
                 $html .= '<tr class="gallery">';
                 foreach ($this->getValue()->getAttributeBackend()->getImageTypes() as $type) {
-                    $linkId = 'linkId' .$this->random->getRandomString(32);
+                    $linkId = 'linkId' .$this->random->getRandomString(8);
                     $url = $image->setType($type)->getSourceUrl();
                     $html .= '<td class="gallery vertical-gallery-cell" align="center">';
                     $html .= '<a previewlinkid="' .$linkId .'" href="' .
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Image.php b/lib/internal/Magento/Framework/Data/Form/Element/Image.php
index 65c8424a75051..5a0cab45d44d6 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Image.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Image.php
@@ -76,7 +76,7 @@ public function getElementHtml()
                 $url = $this->_urlBuilder->getBaseUrl(['_type' => UrlInterface::URL_TYPE_MEDIA]) . $url;
             }
 
-            $linkId = 'linkId' .$this->random->getRandomString(32);
+            $linkId = 'linkId' .$this->random->getRandomString(8);
             $html = '<a previewlinkid="' .$linkId .'" href="' .
                 $url .
                 '" ' .
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
index f8984de7a647a..794be28f4bbec 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php
@@ -153,8 +153,9 @@ public function getDefaultHtml()
         $result .= $this->getElementHtml();
 
         if ($this->getSelectAll() && $this->getDeselectAll()) {
-            $selectAllId = 'selId' .$this->random->getRandomString(32);
-            $deselectAllId = 'deselId' .$this->random->getRandomString(32);
+            $random = $this->random->getRandomString(4);
+            $selectAllId = 'selId' .$random;
+            $deselectAllId = 'deselId' .$random;
             $result .= '<a href="#" id="' .$selectAllId .'">' .$this->getSelectAll()
                 .'</a> <span class="separator"> | </span>';
             $result .= '<a href="#" id="' .$deselectAllId .'">' .$this->getDeselectAll() .'</a>';
@@ -218,7 +219,7 @@ public function getJsObjectName()
      */
     protected function _optionToHtml($option, $selected)
     {
-        $optionId = 'optId' .$this->random->getRandomString(32);
+        $optionId = 'optId' .$this->random->getRandomString(8);
         $html = '<option value="' . $this->_escape($option['value']) . '" id="' . $optionId . '" ';
         $html .= isset($option['title']) ? 'title="' . $this->_escape($option['title']) . '"' : '';
         if (in_array((string)$option['value'], $selected)) {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Select.php b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
index e50db9271d5a9..c9529af80124f 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Select.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
@@ -125,7 +125,7 @@ protected function _optionToHtml($option, $selected)
             }
             $html .= '</optgroup>' . "\n";
         } else {
-            $optionId = 'optId' .$this->random->getRandomString(32);
+            $optionId = 'optId' .$this->random->getRandomString(8);
             $html = '<option value="' . $this->_escape($option['value']) . '" id="' .$optionId .'" ';
             $html .= isset($option['title']) ? 'title="' . $this->_escape($option['title']) . '"' : '';
             if (in_array($option['value'], $selected)) {
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php
index f92c35ddedd6d..ab0d44b16fe42 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link.php
@@ -140,7 +140,7 @@ protected function _toHtml()
         }
 
         if (!$this->getDataUsingMethod('id')) {
-            $this->setDataUsingMethod('id', 'id' .$this->random->getRandomString(32));
+            $this->setDataUsingMethod('id', 'id' .$this->random->getRandomString(8));
         }
 
         return '<li><a ' . $this->getLinkAttributes() . ' >' . $this->escapeHtml($this->getLabel()) . '</a></li>'
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index dc7085ab2e360..4c9bdaa5a68d4 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -104,7 +104,7 @@ public function renderEventListenerAsTag(
             throw new \InvalidArgumentException('Invalid JS event handler data provided');
         }
 
-        $random = $this->random->getRandomString(32);
+        $random = $this->random->getRandomString(10);
         $listenerFunction = 'eventListener' .$random;
         $elementName = 'listenedElement' .$random;
         $script = <<<script
@@ -140,30 +140,29 @@ public function renderStyleAsTag(string $style, string $selector): string
             throw new \InvalidArgumentException('Invalid style data given');
         }
 
-        $elementVariable = 'elem' .$this->random->getRandomString(32);
+        $elementVariable = 'elem' .$this->random->getRandomString(8);
         /** @var string[] $styles */
-        $stylesAssignments = [];
+        $stylesAssignments = '';
         foreach ($stylePairs as $stylePair) {
             $exploded = array_map('trim', explode(':', $stylePair));
             if (count($exploded) < 2) {
                 throw new \InvalidArgumentException('Invalid CSS given');
             }
-            $styleAttribute = SimpleDataObjectConverter::snakeCaseToCamelCase(
-                str_replace('-', '_', trim($exploded[0]))
-            );
+            //Converting to camelCase
+            $styleAttribute = lcfirst(str_replace(' ', '', ucwords(str_replace('-', ' ', $exploded[0]))));
             if (count($exploded) > 2) {
                 //For cases when ":" is encountered in the style's value.
                 $exploded[1] = join('', array_slice($exploded, 1));
             }
-            $styleValue = trim($exploded[1]);
-            $stylesAssignments[] = "$elementVariable.style.$styleAttribute = '$styleValue';";
+            $styleValue = str_replace('\'', '\\\'', trim($exploded[1]));
+            $stylesAssignments .= "$elementVariable.style.$styleAttribute = '$styleValue';\n";
         }
 
         return $this->renderTag(
             'script',
             ['type' => 'text/javascript'],
             "let $elementVariable = document.querySelector('$selector');\n"
-            ."if ($elementVariable) {\n" .join("\n", $stylesAssignments) ." }",
+            ."if ($elementVariable) {\n{$stylesAssignments}}",
             false
         );
     }

From 0f4c707e26b259a986fe2a97898f4cc9dbe0623f Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Tue, 2 Jun 2020 10:53:37 -0500
Subject: [PATCH 185/307] Revert for public PR:22917 - fix static

---
 app/code/Magento/Catalog/Model/Product/Option/Value.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/code/Magento/Catalog/Model/Product/Option/Value.php b/app/code/Magento/Catalog/Model/Product/Option/Value.php
index e9630adc3497c..313513a9151dc 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Value.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Value.php
@@ -245,8 +245,7 @@ public function saveValues()
     }
 
     /**
-     * Return price. If $flag is true and price is percent
-     *  return converted percent to price
+     * Return price. If $flag is true and price is percent return converted percent to price
      *
      * @param bool $flag
      * @return float|int

From 7ba05f065cf767077449a6a68f4f49913ec3af50 Mon Sep 17 00:00:00 2001
From: ruslankostiv <rkostiv@adobe.com>
Date: Tue, 2 Jun 2020 11:22:08 -0500
Subject: [PATCH 186/307] MC-34379: Guest can't do reorder

---
 .../Model/GuestCart/GuestCartResolver.php     | 82 +++++++++++++++++++
 .../Controller/AbstractController/Reorder.php | 15 +++-
 .../Magento/Sales/Model/Reorder/Reorder.php   | 24 +++---
 .../StorefrontGuestOrderViewSection.xml       |  1 +
 .../Test/StorefrontReorderAsGuestTest.xml     | 82 +++++++++++++++++++
 5 files changed, 192 insertions(+), 12 deletions(-)
 create mode 100644 app/code/Magento/Quote/Model/GuestCart/GuestCartResolver.php
 create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsGuestTest.xml

diff --git a/app/code/Magento/Quote/Model/GuestCart/GuestCartResolver.php b/app/code/Magento/Quote/Model/GuestCart/GuestCartResolver.php
new file mode 100644
index 0000000000000..45d2e60d103c1
--- /dev/null
+++ b/app/code/Magento/Quote/Model/GuestCart/GuestCartResolver.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+namespace Magento\Quote\Model\GuestCart;
+
+use Magento\Quote\Api\GuestCartManagementInterface;
+use Magento\Quote\Model\QuoteIdMaskFactory;
+use Magento\Quote\Model\ResourceModel\Quote\QuoteIdMask as QuoteIdMaskResourceModel;
+use Magento\Quote\Model\Quote;
+
+/**
+ * Return empty cart for guest
+ */
+class GuestCartResolver
+{
+    /**
+     * @var GuestCartManagementInterface
+     */
+    private $guestCartManagement;
+
+    /**
+     * @var QuoteIdMaskFactory
+     */
+    private $quoteIdMaskFactory;
+
+    /**
+     * @var QuoteIdMaskResourceModel
+     */
+    private $quoteIdMaskResourceModel;
+
+    /**
+     * @var \Magento\Quote\Api\GuestCartRepositoryInterface
+     */
+    private $guestCartRepository;
+
+    /**
+     * @param GuestCartManagementInterface $guestCartManagement
+     * @param QuoteIdMaskFactory $quoteIdMaskFactory
+     * @param QuoteIdMaskResourceModel $quoteIdMaskResourceModel
+     * @param \Magento\Quote\Api\GuestCartRepositoryInterface $guestCartRepository
+     */
+    public function __construct(
+        GuestCartManagementInterface $guestCartManagement,
+        QuoteIdMaskFactory $quoteIdMaskFactory,
+        QuoteIdMaskResourceModel $quoteIdMaskResourceModel,
+        \Magento\Quote\Api\GuestCartRepositoryInterface $guestCartRepository
+    ) {
+        $this->guestCartManagement = $guestCartManagement;
+        $this->quoteIdMaskFactory = $quoteIdMaskFactory;
+        $this->quoteIdMaskResourceModel = $quoteIdMaskResourceModel;
+        $this->guestCartRepository = $guestCartRepository;
+    }
+
+    /**
+     * Create empty cart for guest
+     *
+     * @param string|null $predefinedMaskedQuoteId
+     * @return Quote
+     * @throws \Magento\Framework\Exception\AlreadyExistsException
+     * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     */
+    public function resolve(string $predefinedMaskedQuoteId = null): Quote
+    {
+        $maskedQuoteId = $this->guestCartManagement->createEmptyCart();
+
+        if ($predefinedMaskedQuoteId !== null) {
+            $quoteIdMask = $this->quoteIdMaskFactory->create();
+            $this->quoteIdMaskResourceModel->load($quoteIdMask, $maskedQuoteId, 'masked_id');
+
+            $quoteIdMask->setMaskedId($predefinedMaskedQuoteId);
+            $this->quoteIdMaskResourceModel->save($quoteIdMask);
+            $maskedQuoteId = $predefinedMaskedQuoteId;
+        }
+
+        return $this->guestCartRepository->get($maskedQuoteId);
+    }
+}
diff --git a/app/code/Magento/Sales/Controller/AbstractController/Reorder.php b/app/code/Magento/Sales/Controller/AbstractController/Reorder.php
index 062ad78e5001d..5eb485e262193 100644
--- a/app/code/Magento/Sales/Controller/AbstractController/Reorder.php
+++ b/app/code/Magento/Sales/Controller/AbstractController/Reorder.php
@@ -8,6 +8,7 @@
 
 namespace Magento\Sales\Controller\AbstractController;
 
+use Magento\Checkout\Model\Session as CheckoutSession;
 use Magento\Framework\App\Action;
 use Magento\Framework\App\Action\HttpPostActionInterface;
 use Magento\Framework\App\ObjectManager;
@@ -35,6 +36,11 @@ abstract class Reorder extends Action\Action implements HttpPostActionInterface
      */
     private $reorder;
 
+    /**
+     * @var CheckoutSession
+     */
+    private $checkoutSession;
+
     /**
      * Constructor
      *
@@ -43,6 +49,7 @@ abstract class Reorder extends Action\Action implements HttpPostActionInterface
      * @param Registry $registry
      * @param ReorderHelper|null $reorderHelper
      * @param \Magento\Sales\Model\Reorder\Reorder|null $reorder
+     * @param CheckoutSession|null $checkoutSession
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function __construct(
@@ -50,12 +57,14 @@ public function __construct(
         OrderLoaderInterface $orderLoader,
         Registry $registry,
         ReorderHelper $reorderHelper = null,
-        \Magento\Sales\Model\Reorder\Reorder $reorder = null
+        \Magento\Sales\Model\Reorder\Reorder $reorder = null,
+        CheckoutSession $checkoutSession = null
     ) {
         $this->orderLoader = $orderLoader;
         $this->_coreRegistry = $registry;
         parent::__construct($context);
         $this->reorder = $reorder ?: ObjectManager::getInstance()->get(\Magento\Sales\Model\Reorder\Reorder::class);
+        $this->checkoutSession = $checkoutSession ?: ObjectManager::getInstance()->get(CheckoutSession::class);
     }
 
     /**
@@ -81,6 +90,10 @@ public function execute()
             return $resultRedirect->setPath('checkout/cart');
         }
 
+        // Set quote id for guest session: \Magento\Quote\Api\CartRepositoryInterface::save doesn't set quote id
+        // to session for guest customer, as it does \Magento\Checkout\Model\Cart::save which is deprecated.
+        $this->checkoutSession->setQuoteId($reorderOutput->getCart()->getId());
+
         $errors = $reorderOutput->getErrors();
         if (!empty($errors)) {
             $useNotice = $this->_objectManager->get(\Magento\Checkout\Model\Session::class)->getUseNotice(true);
diff --git a/app/code/Magento/Sales/Model/Reorder/Reorder.php b/app/code/Magento/Sales/Model/Reorder/Reorder.php
index a1a8d6e8c9928..0baef79daee28 100644
--- a/app/code/Magento/Sales/Model/Reorder/Reorder.php
+++ b/app/code/Magento/Sales/Model/Reorder/Reorder.php
@@ -7,7 +7,6 @@
 namespace Magento\Sales\Model\Reorder;
 
 use Magento\Catalog\Api\Data\ProductInterface;
-use Magento\Catalog\Api\ProductRepositoryInterface;
 use Magento\Catalog\Model\Product;
 use Magento\Catalog\Model\ResourceModel\Product\Collection;
 use Magento\Framework\Exception\InputException;
@@ -15,7 +14,8 @@
 use Magento\Quote\Api\CartRepositoryInterface;
 use Magento\Quote\Api\Data\CartInterface;
 use Magento\Quote\Model\Cart\CustomerCartResolver;
-use Magento\Quote\Model\Quote as Quote;
+use Magento\Quote\Model\Quote;
+use Magento\Quote\Model\GuestCart\GuestCartResolver;
 use Magento\Sales\Api\Data\OrderItemInterface;
 use Magento\Sales\Helper\Reorder as ReorderHelper;
 use Magento\Sales\Model\Order\Item;
@@ -72,11 +72,6 @@ class Reorder
      */
     private $cartRepository;
 
-    /**
-     * @var ProductRepositoryInterface
-     */
-    private $productRepository;
-
     /**
      * @var Data\Error[]
      */
@@ -92,11 +87,16 @@ class Reorder
      */
     private $productCollectionFactory;
 
+    /**
+     * @var GuestCartResolver
+     */
+    private $guestCartResolver;
+
     /**
      * @param OrderFactory $orderFactory
      * @param CustomerCartResolver $customerCartProvider
+     * @param GuestCartResolver $guestCartResolver
      * @param CartRepositoryInterface $cartRepository
-     * @param ProductRepositoryInterface $productRepository
      * @param ReorderHelper $reorderHelper
      * @param \Psr\Log\LoggerInterface $logger
      * @param ProductCollectionFactory $productCollectionFactory
@@ -104,18 +104,18 @@ class Reorder
     public function __construct(
         OrderFactory $orderFactory,
         CustomerCartResolver $customerCartProvider,
+        GuestCartResolver $guestCartResolver,
         CartRepositoryInterface $cartRepository,
-        ProductRepositoryInterface $productRepository,
         ReorderHelper $reorderHelper,
         \Psr\Log\LoggerInterface $logger,
         ProductCollectionFactory $productCollectionFactory
     ) {
         $this->orderFactory = $orderFactory;
         $this->cartRepository = $cartRepository;
-        $this->productRepository = $productRepository;
         $this->reorderHelper = $reorderHelper;
         $this->logger = $logger;
         $this->customerCartProvider = $customerCartProvider;
+        $this->guestCartResolver = $guestCartResolver;
         $this->productCollectionFactory = $productCollectionFactory;
     }
 
@@ -141,7 +141,9 @@ public function execute(string $orderNumber, string $storeId): Data\ReorderOutpu
         $customerId = (int)$order->getCustomerId();
         $this->errors = [];
 
-        $cart = $this->customerCartProvider->resolve($customerId);
+        $cart = $customerId === 0
+            ? $this->guestCartResolver->resolve()
+            : $this->customerCartProvider->resolve($customerId);
         if (!$this->reorderHelper->isAllowed($order->getStore())) {
             $this->addError((string)__('Reorders are not allowed.'), self::ERROR_REORDER_NOT_AVAILABLE);
             return $this->prepareOutput($cart);
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/StorefrontGuestOrderViewSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/StorefrontGuestOrderViewSection.xml
index 70f37352fb183..085eea12e2243 100644
--- a/app/code/Magento/Sales/Test/Mftf/Section/StorefrontGuestOrderViewSection.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Section/StorefrontGuestOrderViewSection.xml
@@ -11,5 +11,6 @@
     <section name="StorefrontGuestOrderViewSection">
         <element name="orderInformationTab" type="text" selector="//*[@class='nav item current']/strong[contains(text(), 'Order Information')]"/>
         <element name="printOrder" type="button" selector=".order-actions-toolbar .actions .print" timeout="30"/>
+        <element name="reorder" type="button" selector=".order-actions-toolbar .actions .order" timeout="30"/>
     </section>
 </sections>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsGuestTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsGuestTest.xml
new file mode 100644
index 0000000000000..0718783534925
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontReorderAsGuestTest.xml
@@ -0,0 +1,82 @@
+<?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="StorefrontReorderAsGuestTest">
+        <annotations>
+            <stories value="Reorder"/>
+            <title value="Make reorder as guest on Frontend"/>
+            <description value="Make reorder as guest on Frontend"/>
+            <severity value="CRITICAL"/>
+            <testCaseId value="MC-34465"/>
+            <group value="sales"/>
+        </annotations>
+        <before>
+            <!--Create simple product.-->
+            <createData entity="SimpleSubCategory" stepKey="createCategory"/>
+            <createData entity="SimpleProduct" stepKey="createSimpleProduct">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <!-- Create Customer Account -->
+            <createData entity="Simple_US_Customer" stepKey="createCustomer"/>
+            <!-- Reindex and flush cache -->
+            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        </before>
+        <after>
+            <deleteData createDataKey="createCustomer" stepKey="deleteCreateCustomer"/>
+            <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
+            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+
+            <!-- Reindex invalidated indices after product attribute has been created/deleted -->
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+        </after>
+
+        <!-- Order a product -->
+        <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToPDP"/>
+        <actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="cartAddSimpleProductToCart">
+            <argument name="product" value="$$createSimpleProduct$$"/>
+            <argument name="productCount" value="1"/>
+        </actionGroup>
+        <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="navigateToCheckout"/>
+        <waitForPageLoad stepKey="waitFroPaymentSelectionPageLoad"/>
+        <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="fillAddress">
+            <argument name="customerVar" value="$$createCustomer$$"/>
+            <argument name="customerAddressVar" value="US_Address_TX"/>
+        </actionGroup>
+        <waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30"
+                        stepKey="waitForPlaceOrderButtonVisible"/>
+        <click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="placeOrder"/>
+        <waitForPageLoad stepKey="waitUntilOrderPlaced"/>
+        <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="getOrderId"/>
+        <assertNotEmpty stepKey="assertOrderIdIsNotEmpty" after="getOrderId">
+            <actualResult type="const">$getOrderId</actualResult>
+        </assertNotEmpty>
+
+        <!-- Find the Order on frontend > Navigate to: Orders and Returns -->
+        <amOnPage url="{{StorefrontGuestOrderSearchPage.url}}" stepKey="amOnOrdersAndReturns"/>
+        <waitForPageLoad stepKey="waiForStorefrontPage"/>
+
+        <!-- Fill the form with correspondent Order data -->
+        <actionGroup ref="StorefrontFillOrdersAndReturnsFormActionGroup" stepKey="fillOrder">
+            <argument name="orderNumber" value="{$getOrderId}"/>
+            <argument name="customer" value="$$createCustomer$$"/>
+        </actionGroup>
+
+        <!-- Click on the "Continue" button -->
+        <click selector="{{StorefrontGuestOrderSearchSection.continue}}" stepKey="clickContinue"/>
+        <waitForPageLoad stepKey="waitForPageLoad"/>
+
+        <!-- Click 'Reorder' link -->
+        <click selector="{{StorefrontGuestOrderViewSection.reorder}}" stepKey="clickReturnLink"/>
+        <waitForPageLoad stepKey="waitForPageLoad2"/>
+
+        <!--Check that product from order is visible in cart after reorder -->
+        <seeElement selector="{{CheckoutCartProductSection.ProductLinkByName($$createSimpleProduct.name$$)}}" stepKey="seeProductInCart"/>
+    </test>
+</tests>

From 0dc68f0f4624ac2466bc16de009dd30532fdf796 Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Tue, 2 Jun 2020 22:52:07 +0300
Subject: [PATCH 187/307] MC-34810: [2.4.0][MFTF] fix export tests consumer run

---
 .../Mftf/Test/AdminExportBundleProductTest.xml | 18 +++++++-----------
 ...xportGroupedProductWithSpecialPriceTest.xml |  5 ++---
 ...ImportConfigurableProductWithImagesTest.xml |  5 ++---
 ...nfigurableProductsWithCustomOptionsTest.xml |  6 ++----
 ...figurableProductsWithAssignedImagesTest.xml |  6 ++----
 ...rableProductAssignedToCustomWebsiteTest.xml |  6 ++----
 ...ortSimpleProductWithCustomAttributeTest.xml |  4 ++--
 7 files changed, 19 insertions(+), 31 deletions(-)

diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
index bdb562ab0205d..785d19c000af0 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml
@@ -79,14 +79,6 @@
                 <requiredEntity createDataKey="createBundleOptionWithAttribute"/>
                 <requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
             </createData>
-
-            <!-- Start message queue for export consumer -->
-            <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
-                <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
-                <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
-            </actionGroup>
-            <reloadPage stepKey="refreshPage"/>
-            <waitForPageLoad stepKey="waitForPageLoaded"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
@@ -100,9 +92,8 @@
             <deleteData createDataKey="firstSimpleProductForFixedWithAttribute" stepKey="deleteFirstSimpleProductForFixedWithAttribute"/>
             <deleteData createDataKey="secondSimpleProductForFixedWithAttribute" stepKey="deleteSecondSimpleProductForFixedWithAttribute"/>
             <deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
-
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCLI command="cron:run --group=index" stepKey="reindexInvalidatedIndices"/>
         </after>
 
         <!-- Go to export page -->
@@ -111,7 +102,12 @@
         <!-- Export created below products -->
         <actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
 
-        <magentoCron stepKey="runCronIndex" groups="index"/>
+        <!-- Start message queue for export consumer -->
+        <actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
+            <argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
+            <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
+        </actionGroup>
+        <reloadPage stepKey="refreshPage"/>
         <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
index 5ae94f050eb30..9f8d65968d741 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml
@@ -55,7 +55,7 @@
             <deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
             <deleteData createDataKey="createGroupedProduct" stepKey="deleteGroupedProduct"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
-
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
             <!-- Log out -->
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
@@ -73,8 +73,7 @@
             <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitForPageLoaded"/>
-
+        <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Download product -->
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
index e0dfb8250c738..d2517fa28cdd1 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml
@@ -150,9 +150,9 @@
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
             <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
             <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
             <!-- Admin logout-->
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
-            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         </after>
 
         <!-- Go to System > Export -->
@@ -170,8 +170,7 @@
             <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitForPageLoaded"/>
-
+        <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Save exported file: file successfully downloaded -->
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
index c82451eb9dbb5..94478e63aa92a 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml
@@ -83,9 +83,8 @@
             <deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
             <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
-
-            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
         <!-- Go to export page -->
@@ -104,8 +103,7 @@
             <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitForPageLoaded"/>
-
+        <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Download product -->
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
index dc556a6d0a899..95cfe2c87bffb 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml
@@ -99,9 +99,8 @@
             <deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
             <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
-
-            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
         <!-- Go to export page -->
@@ -119,8 +118,7 @@
             <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitForPageLoaded"/>
-
+        <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Download product -->
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
index 65f9ff80f7e39..2f57d94113d38 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml
@@ -85,9 +85,8 @@
             <deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
             <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
-
-            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
         <!-- Go to export page -->
@@ -103,8 +102,7 @@
             <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="refreshPage"/>
-        <waitForPageLoad stepKey="waitForPageLoaded"/>
-
+        <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Download product -->
diff --git a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
index e684f80d8bd05..dac97a61a967b 100644
--- a/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
+++ b/app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml
@@ -37,7 +37,7 @@
             <deleteData createDataKey="createSimpleProductWithCustomAttributeSet" stepKey="deleteSimpleProductWithCustomAttributeSet"/>
             <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
-
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
             <!-- Log out -->
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
@@ -55,7 +55,7 @@
             <argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
         </actionGroup>
         <reloadPage stepKey="pageReload" />
-        <waitForPageLoad stepKey="waitForPageLoaded" />
+        <waitForElementVisible selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="waitForFileName"/>
         <grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
 
         <!-- Download product -->

From e44d2eeddc5aab2801a42089eb95d48b82d1fb08 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 2 Jun 2020 17:37:17 -0500
Subject: [PATCH 188/307] MC-33823: Merge CE, EE and B2B changes

---
 .../Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml  | 1 +
 nginx.conf.sample                                               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
index a6e3dfd7eaad4..339349541c115 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
@@ -25,6 +25,7 @@
         <see userInput="{{MinMaxQueryLength.Hint}}" selector="{{AdminCatalogSearchConfigurationSection.maxQueryLengthHint}}" stepKey="seeHint2"/>
         <uncheckOption selector="{{AdminCatalogSearchConfigurationSection.minQueryLengthInherit}}" stepKey="uncheckSystemValue"/>
         <fillField selector="{{AdminCatalogSearchConfigurationSection.minQueryLength}}" userInput="{{minLength}}" stepKey="setMinQueryLength"/>
+        <scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="scrollToCollapseTab"/>
         <click selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="collapseTab"/>
         <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/>
         <waitForPageLoad stepKey="waitForConfigSaved"/>
diff --git a/nginx.conf.sample b/nginx.conf.sample
index 25f1a4ef37625..ead80ccb22ece 100644
--- a/nginx.conf.sample
+++ b/nginx.conf.sample
@@ -181,7 +181,7 @@ location /errors/ {
 location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
     try_files $uri =404;
     fastcgi_pass   fastcgi_backend;
-    fastcgi_buffers 1024 4k;
+    fastcgi_buffers 16 16k;
     fastcgi_buffer_size 32k;
 
     fastcgi_param  PHP_FLAG  "session.auto_start=off \n suhosin.session.cryptua=off";

From c84d2e0c8eb790fee24f56d035ef1df1ed2f955f Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Wed, 3 Jun 2020 12:32:16 +0300
Subject: [PATCH 189/307] MC-34247: After upgrade Magento with 2.3.4 to
 2.4.0-alph2 Simple Product missing in mini-cart

---
 .../view/frontend/web/template/minicart/item/default.html     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html b/app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html
index 5489089452d85..131745d840528 100644
--- a/app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html
+++ b/app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html
@@ -112,7 +112,7 @@
             </div>
         </div>
     </div>
-    <div class="message notice" if="message">
-        <div data-bind="text: message"></div>
+    <div class="message notice" if="$data.message">
+        <div data-bind="text: $data.message"></div>
     </div>
 </li>

From b74db3dec5c07c075f7efc186da184974657994d Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Wed, 3 Jun 2020 13:06:13 +0300
Subject: [PATCH 190/307] MC-34457: [2.4][Integration Tests Failed]:
 Magento.Elasticsearch6.Controller.QuickSearchTest.testQuickSearchWithImprovedPriceRangeCalculation

---
 .../Magento/Elasticsearch6/Controller/QuickSearchTest.php       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/tests/integration/testsuite/Magento/Elasticsearch6/Controller/QuickSearchTest.php b/dev/tests/integration/testsuite/Magento/Elasticsearch6/Controller/QuickSearchTest.php
index 200360b7340bd..1d640e62dc5d4 100644
--- a/dev/tests/integration/testsuite/Magento/Elasticsearch6/Controller/QuickSearchTest.php
+++ b/dev/tests/integration/testsuite/Magento/Elasticsearch6/Controller/QuickSearchTest.php
@@ -64,6 +64,6 @@ public function testQuickSearchWithImprovedPriceRangeCalculation()
             $this->storeManager->setCurrentStore($defaultStore);
         }
 
-        $this->assertContains('search product 1', $responseBody);
+        $this->assertStringContainsString('search product 1', $responseBody);
     }
 }

From 0a5488a76b908be6b0d7a0ec583f9acd2179f7e8 Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Wed, 3 Jun 2020 17:22:27 +0300
Subject: [PATCH 191/307] MC-33593: The style of cart icon is broken

---
 .../Ui/view/base/web/js/block-loader.js       | 20 +++--
 .../Ui/base/templates/block-loader.html       |  5 ++
 .../Magento/Ui/base/js/block-loader.test.js   | 80 +++++++++++++++++++
 3 files changed, 97 insertions(+), 8 deletions(-)
 create mode 100644 dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
 create mode 100644 dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js

diff --git a/app/code/Magento/Ui/view/base/web/js/block-loader.js b/app/code/Magento/Ui/view/base/web/js/block-loader.js
index 531591b41b0d8..e509f7dc23fea 100644
--- a/app/code/Magento/Ui/view/base/web/js/block-loader.js
+++ b/app/code/Magento/Ui/view/base/web/js/block-loader.js
@@ -15,14 +15,18 @@ define([
         blockContentLoadingClass = '_block-content-loading',
         blockLoader,
         blockLoaderClass,
-        loaderImageHref;
+        blockLoaderElement = $.Deferred(),
+        loaderImageHref = $.Deferred();
 
     templateLoader.loadTemplate(blockLoaderTemplatePath).done(function (blockLoaderTemplate) {
-        blockLoader = template($.trim(blockLoaderTemplate), {
-            loaderImageHref: loaderImageHref
+        loaderImageHref.done(function (loaderHref) {
+            blockLoader = template($.trim(blockLoaderTemplate), {
+                loaderImageHref: loaderHref
+            });
+            blockLoader = $(blockLoader);
+            blockLoaderClass = '.' + blockLoader.attr('class');
+            blockLoaderElement.resolve();
         });
-        blockLoader = $(blockLoader);
-        blockLoaderClass = '.' + blockLoader.attr('class');
     });
 
     /**
@@ -70,7 +74,7 @@ define([
     }
 
     return function (loaderHref) {
-        loaderImageHref = loaderHref;
+        loaderImageHref.resolve(loaderHref);
         ko.bindingHandlers.blockLoader = {
             /**
              * Process loader for block
@@ -81,9 +85,9 @@ define([
                 element = $(element);
 
                 if (ko.unwrap(displayBlockLoader())) {
-                    addBlockLoader(element);
+                    blockLoaderElement.done(addBlockLoader(element));
                 } else {
-                    removeBlockLoader(element);
+                    blockLoaderElement.done(removeBlockLoader(element));
                 }
             }
         };
diff --git a/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html b/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
new file mode 100644
index 0000000000000..778c8894ec61e
--- /dev/null
+++ b/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
@@ -0,0 +1,5 @@
+<div data-role="loader" class="loading-mask" style="position: absolute;">
+    <div class="loader">
+        <img src="<%= loaderImageHref %>" alt="Loading..." title="Loading..." style="position: absolute;">
+    </div>
+</div>
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
new file mode 100644
index 0000000000000..f8130fbd44143
--- /dev/null
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
@@ -0,0 +1,80 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+    'squire',
+    'jquery',
+    'text!tests/assets/app/code/Magento/Ui/base/templates/block-loader.html'
+], function (Squire, $, blockLoaderTmpl) {
+    'use strict';
+
+    var injector = new Squire(),
+        mocks = {
+            'Magento_Ui/js/lib/knockout/template/loader': {
+                /** Method stub. */
+                loadTemplate: function () {
+                    var defer = $.Deferred();
+
+                    defer.resolve(blockLoaderTmpl);
+
+                    return defer;
+                }
+            }
+        },
+        obj,
+        ko;
+
+    beforeEach(function (done) {
+        injector.mock(mocks);
+        injector.require(['Magento_Ui/js/block-loader', 'ko'], function (blockLoader, knockout) {
+            obj = blockLoader;
+            ko = knockout;
+            done();
+        });
+    });
+
+    afterEach(function () {
+        try {
+            injector.clean();
+            injector.remove();
+        } catch (e) {
+        }
+    });
+
+    describe('Magento_Ui/js/block-loader', function () {
+        var blockContentLoadingClass = '_block-content-loading',
+            loaderImageUrl = 'https://static.magento.com/loader.gif',
+            element = $('<span data-bind="blockLoader: isLoading"/>'),
+            isLoading,
+            context;
+
+        beforeEach(function () {
+            isLoading = ko.observable();
+            context = ko.bindingContext.prototype.createChildContext({
+                isLoading: isLoading
+            });
+            obj(loaderImageUrl);
+            $('body').append(element);
+            ko.applyBindings(context, element[0]);
+        });
+
+        afterEach(function () {
+            element.remove();
+        });
+
+        it('Check adding loader block to element', function () {
+            isLoading(true);
+            expect(element.hasClass(blockContentLoadingClass)).toBeTruthy();
+            expect(element.children().attr('class')).toEqual('loading-mask');
+            expect(element.find('img').attr('src')).toEqual(loaderImageUrl);
+        });
+
+        it('Check removing loader block from element', function () {
+            isLoading(false);
+            expect(element.hasClass(blockContentLoadingClass)).toBeFalsy();
+            expect(element.children().length).toEqual(0);
+        });
+    });
+});

From 2d324a8460f81924de302446fd673d23a279b805 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 3 Jun 2020 09:39:33 -0500
Subject: [PATCH 192/307] MC-33823: Merge CE, EE and B2B changes

---
 .../ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml     | 3 ++-
 .../Test/Mftf/Section/CatalogSearchAdminConfigSection.xml     | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
index 339349541c115..43fa9108633da 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
@@ -25,7 +25,8 @@
         <see userInput="{{MinMaxQueryLength.Hint}}" selector="{{AdminCatalogSearchConfigurationSection.maxQueryLengthHint}}" stepKey="seeHint2"/>
         <uncheckOption selector="{{AdminCatalogSearchConfigurationSection.minQueryLengthInherit}}" stepKey="uncheckSystemValue"/>
         <fillField selector="{{AdminCatalogSearchConfigurationSection.minQueryLength}}" userInput="{{minLength}}" stepKey="setMinQueryLength"/>
-        <scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="scrollToCollapseTab"/>
+        <scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" y="-50" stepKey="scrollToCollapseTab"/>
+        <waitForElementVisible selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="seeCollapseTab" />
         <click selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="collapseTab"/>
         <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/>
         <waitForPageLoad stepKey="waitForConfigSaved"/>
diff --git a/app/code/Magento/Config/Test/Mftf/Section/CatalogSearchAdminConfigSection.xml b/app/code/Magento/Config/Test/Mftf/Section/CatalogSearchAdminConfigSection.xml
index e82ad4670f9b3..9b54697e2d6ba 100644
--- a/app/code/Magento/Config/Test/Mftf/Section/CatalogSearchAdminConfigSection.xml
+++ b/app/code/Magento/Config/Test/Mftf/Section/CatalogSearchAdminConfigSection.xml
@@ -7,9 +7,9 @@
 -->
 <sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
     <section name="AdminCatalogSearchConfigurationSection">
-        <element name="catalogSearchTab" type="button" selector="#catalog_search-head"/>
+        <element name="catalogSearchTab" type="button" selector="a#catalog_search-head"/>
         <element name="checkIfCatalogSearchTabExpand" type="button" selector="#catalog_search-head:not(.open)"/>
         <element name="searchEngineDefaultSystemValue" type="checkbox" selector="#catalog_search_engine_inherit"/>
         <element name="searchEngine" type="select" selector="#catalog_search_engine"/>
     </section>
-</sections>
\ No newline at end of file
+</sections>

From ace26a1dbbdee56fc9cb3898cdb254e31cbd9a6f Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 3 Jun 2020 13:10:26 -0500
Subject: [PATCH 193/307] MC-33823: Merge CE, EE and B2B changes

---
 .../Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
index 43fa9108633da..1dc57cd083435 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/ActionGroup/AdminSetMinimalQueryLengthActionGroup.xml
@@ -25,9 +25,6 @@
         <see userInput="{{MinMaxQueryLength.Hint}}" selector="{{AdminCatalogSearchConfigurationSection.maxQueryLengthHint}}" stepKey="seeHint2"/>
         <uncheckOption selector="{{AdminCatalogSearchConfigurationSection.minQueryLengthInherit}}" stepKey="uncheckSystemValue"/>
         <fillField selector="{{AdminCatalogSearchConfigurationSection.minQueryLength}}" userInput="{{minLength}}" stepKey="setMinQueryLength"/>
-        <scrollTo selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" y="-50" stepKey="scrollToCollapseTab"/>
-        <waitForElementVisible selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="seeCollapseTab" />
-        <click selector="{{AdminCatalogSearchConfigurationSection.catalogSearchTab}}" stepKey="collapseTab"/>
         <click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig"/>
         <waitForPageLoad stepKey="waitForConfigSaved"/>
         <see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>

From 1982e0c0dc71982e33e249374ef5883b5e35bc79 Mon Sep 17 00:00:00 2001
From: Krissy Hiserote <khiserote@magento.com>
Date: Wed, 3 Jun 2020 13:33:30 -0500
Subject: [PATCH 194/307] MC-34416: Error in the CLI during upgrade

---
 .../Setup/Console/Command/UpgradeCommand.php       | 12 +++++++++++-
 setup/src/Magento/Setup/Model/SearchConfig.php     | 14 +-------------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php
index 4a0cd3bc9a69a..4a4e0dcd972c7 100644
--- a/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php
+++ b/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php
@@ -9,6 +9,7 @@
 use Magento\Framework\App\State as AppState;
 use Magento\Framework\App\DeploymentConfig;
 use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Config\CacheInterface;
 use Magento\Framework\Setup\ConsoleLogger;
 use Magento\Framework\Setup\Declaration\Schema\DryRunLogger;
 use Magento\Framework\Setup\Declaration\Schema\OperationsExecutor;
@@ -52,22 +53,30 @@ class UpgradeCommand extends AbstractSetupCommand
      */
     private $searchConfigFactory;
 
+    /*
+     * @var CacheInterface
+     */
+    private $cache;
+
     /**
      * @param InstallerFactory $installerFactory
      * @param SearchConfigFactory $searchConfigFactory
      * @param DeploymentConfig $deploymentConfig
      * @param AppState|null $appState
+     * @param CacheInterface|null $cache
      */
     public function __construct(
         InstallerFactory $installerFactory,
         SearchConfigFactory $searchConfigFactory,
         DeploymentConfig $deploymentConfig = null,
-        AppState $appState = null
+        AppState $appState = null,
+        CacheInterface $cache = null
     ) {
         $this->installerFactory = $installerFactory;
         $this->searchConfigFactory = $searchConfigFactory;
         $this->deploymentConfig = $deploymentConfig ?: ObjectManager::getInstance()->get(DeploymentConfig::class);
         $this->appState = $appState ?: ObjectManager::getInstance()->get(AppState::class);
+        $this->cache = $cache ?: ObjectManager::getInstance()->get(CacheInterface::class);
         parent::__construct();
     }
 
@@ -129,6 +138,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
             $installer = $this->installerFactory->create(new ConsoleLogger($output));
             $installer->updateModulesSequence($keepGenerated);
             $searchConfig = $this->searchConfigFactory->create();
+            $this->cache->clean();
             $searchConfig->validateSearchEngine();
             $installer->installSchema($request);
             $installer->installDataFixtures($request);
diff --git a/setup/src/Magento/Setup/Model/SearchConfig.php b/setup/src/Magento/Setup/Model/SearchConfig.php
index 0f26736fb686e..5aac234bb6089 100644
--- a/setup/src/Magento/Setup/Model/SearchConfig.php
+++ b/setup/src/Magento/Setup/Model/SearchConfig.php
@@ -7,7 +7,6 @@
 
 namespace Magento\Setup\Model;
 
-use Magento\Framework\Config\CacheInterface;
 use Magento\Framework\Setup\Option\AbstractConfigOption;
 use Magento\Framework\Validation\ValidationException;
 use Magento\Search\Model\SearchEngine\Validator;
@@ -34,27 +33,19 @@ class SearchConfig
      */
     private $installConfig;
 
-    /**
-     * @var CacheInterface
-     */
-    private $cache;
-
     /**
      * @param SearchConfigOptionsList $searchConfigOptionsList
      * @param Validator $searchValidator
      * @param CompositeInstallConfig $installConfig
-     * @param CacheInterface $cache
      */
     public function __construct(
         SearchConfigOptionsList $searchConfigOptionsList,
         Validator $searchValidator,
-        CompositeInstallConfig $installConfig,
-        CacheInterface $cache
+        CompositeInstallConfig $installConfig
     ) {
         $this->searchConfigOptionsList = $searchConfigOptionsList;
         $this->searchValidator = $searchValidator;
         $this->installConfig = $installConfig;
-        $this->cache = $cache;
     }
 
     /**
@@ -85,9 +76,6 @@ public function saveConfiguration(array $inputOptions)
      */
     public function validateSearchEngine()
     {
-        // Clean config cache prior to validation
-        $this->cache->clean();
-
         $validationErrors = $this->searchValidator->validate();
         if (!empty($validationErrors)) {
             throw new ValidationException(__(implode(PHP_EOL, $validationErrors)));

From 759286fe1ec5bbe8aa6691b177e227d3d6da8960 Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Wed, 3 Jun 2020 22:04:41 +0300
Subject: [PATCH 195/307] MC-33593: The style of cart icon is broken

---
 .../tests/app/code/Magento/Ui/base/js/block-loader.test.js       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
index f8130fbd44143..02f62bca70a4e 100644
--- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
@@ -61,6 +61,7 @@ define([
         });
 
         afterEach(function () {
+            ko.cleanNode(element[0]);
             element.remove();
         });
 

From c3846e2a5151e59897bba35801d7edaec4cc7139 Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Thu, 4 Jun 2020 00:13:21 +0300
Subject: [PATCH 196/307] MC-33593: The style of cart icon is broken

---
 .../app/code/Magento/Ui/base/templates/block-loader.html    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html b/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
index 778c8894ec61e..cb28b09e4da83 100644
--- a/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
+++ b/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
@@ -1,3 +1,9 @@
+<!--
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+-->
 <div data-role="loader" class="loading-mask" style="position: absolute;">
     <div class="loader">
         <img src="<%= loaderImageHref %>" alt="Loading..." title="Loading..." style="position: absolute;">

From 7911d9b3224c9cc50941f685d411bc9ab596c8fd Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Wed, 3 Jun 2020 19:08:06 -0500
Subject: [PATCH 197/307] MC-33823: Merge CE, EE and B2B changes

---
 .../AdminCatalogPriceRuleDeleteAllActionGroup.xml        | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
index 27edab962033e..609efc2afe9d0 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
@@ -25,5 +25,14 @@
         </helper>
         <waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
         <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage2"/>
+        <!-- It sometimes is loading too long for default 10s -->
+        <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded2"/>
     </actionGroup>
 </actionGroups>

From 0f5bc54920070210d30d58c259b1456dbba00547 Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Thu, 4 Jun 2020 12:53:19 +0300
Subject: [PATCH 198/307] MC-33593: The style of cart icon is broken

---
 .../code/Magento/Ui/base/templates/block-loader.html | 11 -----------
 .../app/code/Magento/Ui/base/js/block-loader.test.js | 12 ++++++++----
 2 files changed, 8 insertions(+), 15 deletions(-)
 delete mode 100644 dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html

diff --git a/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html b/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
deleted file mode 100644
index cb28b09e4da83..0000000000000
--- a/dev/tests/js/jasmine/assets/app/code/Magento/Ui/base/templates/block-loader.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
--->
-<div data-role="loader" class="loading-mask" style="position: absolute;">
-    <div class="loader">
-        <img src="<%= loaderImageHref %>" alt="Loading..." title="Loading..." style="position: absolute;">
-    </div>
-</div>
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
index 02f62bca70a4e..03ac8322e8560 100644
--- a/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/block-loader.test.js
@@ -5,12 +5,16 @@
 
 define([
     'squire',
-    'jquery',
-    'text!tests/assets/app/code/Magento/Ui/base/templates/block-loader.html'
-], function (Squire, $, blockLoaderTmpl) {
+    'jquery'
+], function (Squire, $) {
     'use strict';
 
-    var injector = new Squire(),
+    var blockLoaderTmpl = '<div data-role="loader" class="loading-mask" style="position: absolute;">\n' +
+        '    <div class="loader">\n' +
+        '        <img src="<%= loaderImageHref %>" alt="Loading..." title="Loading..." style="position: absolute;">\n' +
+        '    </div>\n' +
+        '</div>',
+        injector = new Squire(),
         mocks = {
             'Magento_Ui/js/lib/knockout/template/loader': {
                 /** Method stub. */

From 77ba2af0ea9f21f5924955f304ced64eadf33913 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 4 Jun 2020 10:41:10 -0500
Subject: [PATCH 199/307] MC-33823: Merge CE, EE and B2B changes

---
 .../AdminCatalogPriceRuleDeleteAllActionGroup.xml      |  9 ---------
 .../AdminReorderWithCatalogPriceRuleDiscountTest.xml   | 10 ++++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
index 609efc2afe9d0..27edab962033e 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/ActionGroup/AdminCatalogPriceRuleDeleteAllActionGroup.xml
@@ -25,14 +25,5 @@
         </helper>
         <waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
         <see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
-        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
-            <argument name="tags" value=""/>
-        </actionGroup>
-        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
-            <argument name="indices" value=""/>
-        </actionGroup>
-        <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage2"/>
-        <!-- It sometimes is loading too long for default 10s -->
-        <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded2"/>
     </actionGroup>
 </actionGroups>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml
index 0ff5080bd8df2..4799984b76745 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceRuleDiscountTest.xml
@@ -25,6 +25,16 @@
             <createData entity="SimpleProduct2" stepKey="createSimpleProductApi"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
             <actionGroup ref="AdminCatalogPriceRuleDeleteAllActionGroup" stepKey="deleteAllCatalogPriceRule"/>
+            <!-- Clearing cache just in case -->
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage2"/>
+            <!-- It sometimes is loading too long for default 10s -->
+            <waitForPageLoad time="60" stepKey="waitForPageFullyLoaded2"/>
             <!--Create the catalog price rule -->
             <createData entity="CatalogRuleToPercent" stepKey="createCatalogRule"/>
             <!--Create order via API-->

From 004ab248dc68eed637526f47e82f98ab3d74ecaf Mon Sep 17 00:00:00 2001
From: Viktor Petryk <victor.petryk@transoftgroup.com>
Date: Fri, 5 Jun 2020 17:44:28 +0300
Subject: [PATCH 200/307] MC-34941: [MFTF] Replace magentoCli calls with
 appropriate AG calls

---
 .../AdminLoginAfterChangeCookieDomainTest.xml |  8 +++++--
 .../AdminLoginAfterJSMinificationTest.xml     |  4 +++-
 .../AdminMenuNavigationWithSecretKeysTest.xml |  8 +++++--
 ...dminPersistentShoppingCartSettingsTest.xml |  8 +++++--
 ...inAssociateBundleProductToWebsitesTest.xml |  4 +++-
 .../MassEnableDisableBundleProductsTest.xml   |  8 +++++--
 ...ProductWithZeroPriceToShoppingCartTest.xml |  4 +++-
 ...omerSearchBundleProductsByKeywordsTest.xml |  4 +++-
 ...torefrontSortBundleProductsByPriceTest.xml |  4 +++-
 ...ontSpecialPriceBundleProductInCartTest.xml |  4 +++-
 ...oductPricesForCombinationOfOptionsTest.xml |  4 +++-
 .../Test/UpdateBundleProductViaImportTest.xml | 16 +++++++++----
 .../Mftf/Test/AdminLoginWithCaptchaTest.xml   |  8 +++++--
 ...StorefrontCaptchaEditCustomerEmailTest.xml |  8 +++++--
 .../Test/StorefrontCaptchaOnContactUsTest.xml |  8 +++++--
 .../StorefrontCaptchaOnCustomerLoginTest.xml  |  8 +++++--
 ...orefrontCaptchaRegisterNewCustomerTest.xml |  8 +++++--
 .../AddOutOfStockProductToCompareListTest.xml | 16 +++++++++----
 .../AdminAddInStockProductToTheCartTest.xml   |  8 +++++--
 ...inBackorderAllowedAddProductToCartTest.xml |  4 +++-
 ...tomAttributeValuesAfterProductSaveTest.xml |  4 +++-
 ...tOfStockProductIsVisibleInCategoryTest.xml |  4 +++-
 ...AdminCreateCategoryWithAnchorFieldTest.xml |  8 +++++--
 ...ibleInStorefrontAdvancedSearchFormTest.xml |  4 +++-
 ...iveFlatCategoryAndUpdateAsInactiveTest.xml | 20 ++++++++++++----
 .../AdminCreateInactiveFlatCategoryTest.xml   | 20 ++++++++++++----
 ...inCreateInactiveInMenuFlatCategoryTest.xml | 20 ++++++++++++----
 ...ibleInStorefrontAdvancedSearchFormTest.xml |  4 +++-
 ...ateProductAttributeFromProductPageTest.xml |  4 +++-
 ...SimpleProductWithDatetimeAttributeTest.xml |  4 +++-
 ...dminCreateSimpleProductWithUnicodeTest.xml |  8 +++++--
 ...CustomOptionsSuiteAndImportOptionsTest.xml |  8 +++++--
 ...nCreateVirtualProductWithTierPriceTest.xml |  8 +++++--
 ...roductsImageInCaseOfMultipleStoresTest.xml | 16 +++++++++----
 ...CustomizableOptionToProductWithSKUTest.xml |  8 +++++--
 ...eAnchoredCategoryToDefaultCategoryTest.xml |  8 +++++--
 ...minMoveCategoryAndCheckUrlRewritesTest.xml |  8 +++++--
 ...CategoryFromParentAnchoredCategoryTest.xml |  4 +++-
 ...ignedToCategoryWithoutCustomURLKeyTest.xml |  8 +++++--
 .../AdminRemoveImageAffectsAllScopesTest.xml  |  8 +++++--
 .../AdminSimpleProductImagesTest.xml          |  8 +++++--
 .../Mftf/Test/AdminSortingByWebsitesTest.xml  | 12 +++++++---
 .../AdminUpdateCategoryWithProductsTest.xml   |  8 +++++--
 ...inUpdateFlatCategoryAndAddProductsTest.xml | 24 ++++++++++++++-----
 ...ateFlatCategoryIncludeInNavigationTest.xml |  8 +++++--
 ...dateFlatCategoryNameAndDescriptionTest.xml | 12 +++++++---
 ...dminUpdateSimpleProductTieredPriceTest.xml |  8 +++++--
 ...ceInStockVisibleInCatalogAndSearchTest.xml |  4 +++-
 ...arPriceInStockVisibleInCatalogOnlyTest.xml |  4 +++-
 .../Test/CheckTierPricingOfProductsTest.xml   | 12 +++++++---
 .../Test/Mftf/Test/DeleteCategoriesTest.xml   |  4 +++-
 ...cheAfterChangingCategoryPageLayoutTest.xml |  8 +++++--
 .../EndToEndB2CGuestUserTest.xml              |  4 +++-
 ...vailableAfterEnablingSubCategoriesTest.xml |  4 +++-
 ...tProductsDisplayUsingElasticSearchTest.xml |  8 +++++--
 ...oreFrontRecentlyViewedAtStoreLevelTest.xml | 12 +++++++---
 ...rontRecentlyViewedAtStoreViewLevelTest.xml | 12 +++++++---
 ...rontCategoryPageWithCategoryFilterTest.xml |  4 +++-
 ...tCategoryPageWithoutCategoryFilterTest.xml |  4 +++-
 ...heckDefaultNumberProductsToDisplayTest.xml |  8 +++++--
 ...orefrontProductNameWithDoubleQuoteTest.xml |  4 +++-
 ...refrontProductNameWithHTMLEntitiesTest.xml |  4 +++-
 ...orefrontRememberCategoryPaginationTest.xml |  4 +++-
 ...ctAndProductCategoryPartialReindexTest.xml |  4 +++-
 .../AdminApplyCatalogRuleByCategoryTest.xml   |  8 +++++--
 ...nfigurableProductWithSpecialPricesTest.xml |  8 +++++--
 ...minCreateCatalogPriceRuleByPercentTest.xml |  8 +++++--
 ...teCatalogPriceRuleForCustomerGroupTest.xml |  8 +++++--
 ...eRuleEntityFromConfigurableProductTest.xml | 16 +++++++++----
 ...ogPriceRuleEntityFromSimpleProductTest.xml |  8 +++++--
 .../Test/AdminDeleteCatalogPriceRuleTest.xml  |  8 +++++--
 ...tributeIsUndefinedCatalogPriceRuleTest.xml | 18 +++++++++-----
 ...CatalogPriceRuleByProductAttributeTest.xml |  4 +++-
 ...uleForSimpleAndConfigurableProductTest.xml |  8 +++++--
 ...RuleForSimpleProductAndFixedMethodTest.xml |  8 +++++--
 ...orSimpleProductForNewCustomerGroupTest.xml |  4 +++-
 ...eForSimpleProductWithCustomOptionsTest.xml |  8 +++++--
 ...hipArePersistedUnderLongTermCookieTest.xml |  4 +++-
 .../StorefrontInactiveCatalogRuleTest.xml     |  4 +++-
 ...ogSearchSimpleProductByDescriptionTest.xml |  8 +++++--
 ...ceCatalogSearchSimpleProductByNameTest.xml |  8 +++++--
 ...eCatalogSearchSimpleProductByPriceTest.xml |  8 +++++--
 ...rchSimpleProductByShortDescriptionTest.xml |  8 +++++--
 ...nceCatalogSearchSimpleProductBySkuTest.xml |  8 +++++--
 ...ickSearchAndAddToCartBundleDynamicTest.xml |  8 +++++--
 ...QuickSearchAndAddToCartBundleFixedTest.xml |  8 +++++--
 ...uickSearchAndAddToCartConfigurableTest.xml |  8 +++++--
 ...uickSearchAndAddToCartDownloadableTest.xml |  8 +++++--
 .../QuickSearchAndAddToCartGroupedTest.xml    |  8 +++++--
 .../QuickSearchAndAddToCartTest.xml           |  8 +++++--
 .../QuickSearchAndAddToCartVirtualTest.xml    |  8 +++++--
 .../QuickSearchEmptyResultsTest.xml           |  8 +++++--
 .../QuickSearchProductBySkuTest.xml           |  8 +++++--
 ...tAdvancedSearchEntitySimpleProductTest.xml |  8 +++++--
 ...ontQuickSearchConfigurableChildrenTest.xml |  4 +++-
 .../StorefrontUpdateSearchTermEntityTest.xml  |  8 +++++--
 .../AdminRewriteProductWithTwoStoreTest.xml   |  8 +++++--
 ...CategoryAccessibleWhenSuffixIsNullTest.xml |  8 +++++--
 ...ldShouldNotAcceptJustIntegerValuesTest.xml |  8 +++++--
 ...sNotAffectedStartedCheckoutProcessTest.xml |  4 +++-
 ...ndleDynamicProductFromShoppingCartTest.xml |  4 +++-
 ...BundleFixedProductFromShoppingCartTest.xml |  4 +++-
 ...EditShippingAddressOnePageCheckoutTest.xml |  8 +++++--
 ...koutForProductsDeletedFromMiniCartTest.xml |  8 +++++--
 ...OnePageCheckoutWithAllProductTypesTest.xml |  4 +++-
 ...CartAndMiniShoppingCartPerCustomerTest.xml |  4 +++-
 ...oppingCartWithoutAnySelectedOptionTest.xml |  4 +++-
 ...ontCheckCustomerInfoCreatedByGuestTest.xml |  4 +++-
 ...gRecalculationAfterCouponCodeAddedTest.xml |  9 +++++--
 ...BundleDynamicProductToShoppingCartTest.xml |  8 +++++--
 ...pingCartWithDisableMiniCartSidebarTest.xml | 12 +++++++---
 ...dConfigurableProductToShoppingCartTest.xml |  8 +++++--
 ...dDownloadableProductToShoppingCartTest.xml |  8 +++++--
 ...ontAddGroupedProductToShoppingCartTest.xml |  4 +++-
 ...MultiSelectOptionToTheShoppingCartTest.xml |  8 +++++--
 ...pesOfCustomOptionToTheShoppingCartTest.xml |  4 +++-
 ...ultiSelectOptionsToTheShoppingCartTest.xml |  8 +++++--
 ...isplayWithDefaultDisplayLimitationTest.xml |  4 +++-
 ...edToTheCartThanDefaultDisplayLimitTest.xml |  8 +++++--
 ...isplayLimitAndDefaultTotalQuantityTest.xml |  4 +++-
 ...rtItemDisplayWithDefaultLimitationTest.xml |  4 +++-
 ...playWithCustomDisplayConfigurationTest.xml |  4 +++-
 ...frontCheckoutDisabledBundleProductTest.xml |  8 +++++--
 ...ingAddressAndProductWithTierPricesTest.xml |  4 +++-
 ...ntCheckoutWithSpecialPriceProductsTest.xml |  8 +++++--
 .../StorefrontCustomerCheckoutTest.xml        |  4 +++-
 ...stWithMultipleAddressesAndTaxRatesTest.xml |  8 +++++--
 ...tWithRestrictedCountriesForPaymentTest.xml |  8 +++++--
 ...eBundleProductFromMiniShoppingCartTest.xml |  4 +++-
 ...gurableProductFromMiniShoppingCartTest.xml |  8 +++++--
 ...oadableProductFromMiniShoppingCartTest.xml |  8 +++++--
 .../StorefrontGuestCheckoutTest.xml           |  8 +++++--
 ...tWithRestrictedCountriesForPaymentTest.xml |  8 +++++--
 ...tCheckoutUsingFreeShippingAndTaxesTest.xml |  8 +++++--
 ...riceInShoppingCartAfterProductSaveTest.xml |  4 +++-
 ...ontVerifySecureURLRedirectCheckoutTest.xml |  8 +++++--
 ...untryDropDownWithOneAllowedCountryTest.xml |  8 +++++--
 .../AdminConfigurableProductLongSkuTest.xml   |  4 +++-
 ...ctWithCreatingCategoryAndAttributeTest.xml |  4 +++-
 ...roductWithDisabledChildrenProductsTest.xml |  4 +++-
 ...reateConfigurableProductWithImagesTest.xml |  4 +++-
 ...eeProductDisplayOutOfStockProductsTest.xml |  4 +++-
 ...oductDontDisplayOutOfStockProductsTest.xml |  4 +++-
 ...ctWithTwoOptionsAssignedToCategoryTest.xml |  4 +++-
 ...woOptionsWithoutAssignedToCategoryTest.xml |  4 +++-
 .../Mftf/Test/EndToEndB2CLoggedInUserTest.xml |  8 +++++--
 ...rontConfigurableProductChildSearchTest.xml |  8 +++++--
 ...refrontConfigurableProductGridViewTest.xml |  8 +++++--
 ...uctChildAssignedToSeparateCategoryTest.xml |  4 +++-
 ...ConfigurableWithCatalogRuleAppliedTest.xml |  8 +++++--
 ...nfigurableProductLayeredNavigationTest.xml |  4 +++-
 ...efrontVisibilityOfDuplicateProductTest.xml |  8 +++++--
 ...rontVerifySecureURLRedirectContactTest.xml |  8 +++++--
 ...nCurrencyConverterAPIConfigurationTest.xml |  8 +++++--
 ...ultValueDisableAutoGroupChangeIsNoTest.xml |  4 +++-
 ...ltValueDisableAutoGroupChangeIsYesTest.xml |  8 +++++--
 .../Mftf/Test/AdminCreateCustomerTest.xml     |  8 +++++--
 ...AdminCreateCustomerWithCustomGroupTest.xml |  4 +++-
 ...DeleteCustomerAddressesFromTheGridTest.xml |  4 +++-
 ...AddressesFromTheGridViaMassActionsTest.xml |  4 +++-
 ...eleteDefaultBillingCustomerAddressTest.xml |  4 +++-
 .../Test/AdminResetCustomerPasswordTest.xml   |  8 +++++--
 ...dminSearchCustomerAddressByKeywordTest.xml |  4 +++-
 .../AdminDeleteCustomerAddressTest.xml        |  4 +++-
 ...ustomerInfoFromDefaultToNonDefaultTest.xml |  4 +++-
 ...CountriesRestrictionApplyOnBackendTest.xml | 12 +++++++---
 .../StorefrontClearAllCompareProductsTest.xml |  8 +++++--
 ...frontCreateCustomerWithDateOfBirthTest.xml |  4 +++-
 ...ontVerifySecureURLRedirectCustomerTest.xml |  8 +++++--
 ...loadableProductWithDefaultSetLinksTest.xml | 16 +++++++++----
 ...erifySecureURLRedirectDownloadableTest.xml |  8 +++++--
 .../Suite/SearchEngineElasticsearchSuite.xml  |  8 +++++--
 ...CheckAdvancedSearchOnElasticSearchTest.xml |  4 +++-
 ...DecimalAttributeUsingElasticSearchTest.xml | 16 +++++++++----
 ...frontElasticSearchForChineseLocaleTest.xml |  4 +++-
 ...ontElasticsearchSearchInvalidValueTest.xml | 24 ++++++++++++++-----
 ...oductQuickSearchUsingElasticSearchTest.xml |  4 +++-
 .../Test/AdminCreatingShippingLabelTest.xml   | 16 +++++++++----
 ...nAssociateGroupedProductToWebsitesTest.xml |  4 +++-
 ...gSearchGroupedProductByDescriptionTest.xml |  8 +++++--
 ...eCatalogSearchGroupedProductByNameTest.xml |  8 +++++--
 ...CatalogSearchGroupedProductByPriceTest.xml |  8 +++++--
 ...chGroupedProductByShortDescriptionTest.xml |  8 +++++--
 ...ceCatalogSearchGroupedProductBySkuTest.xml |  8 +++++--
 ...earchGroupedProductBySkuWithHyphenTest.xml |  8 +++++--
 ...inSystemIndexManagementGridChangesTest.xml | 16 +++++++++----
 .../Mftf/Test/ShopByButtonInMobileTest.xml    |  8 +++++--
 ...hMapAssignedConfigProductIsCorrectTest.xml |  4 +++-
 ...rifySecureURLRedirectMultishippingTest.xml |  8 +++++--
 ...tVerifySecureURLRedirectNewsletterTest.xml |  8 +++++--
 ...erifySubscribedNewsletterDisplayedTest.xml | 12 +++++++---
 ...dAreaSessionMustNotAffectAdminAreaTest.xml |  4 +++-
 .../Test/Mftf/Suite/InContextPaypalSuite.xml  |  8 +++++--
 ...uttonWithPayPalLabelOnCheckoutPageTest.xml |  4 +++-
 ...frontVerifySecureURLRedirectPaypalTest.xml |  8 +++++--
 ...efrontGuestCheckoutDisabledProductTest.xml |  4 +++-
 ...frontVerifySecureURLRedirectReviewTest.xml |  8 +++++--
 ...vailabilityCreditMemoWithNoPaymentTest.xml |  8 +++++--
 ...erWithCheckMoneyOrderPaymentMethodTest.xml |  8 +++++--
 ...rderWithPurchaseOrderPaymentMethodTest.xml |  8 +++++--
 ...ectnessInvoicedItemInBundleProductTest.xml |  4 +++-
 ...reateOrderWithCustomerWithoutEmailTest.xml |  8 +++++--
 ...nimumOrderAmountNotMatchOrderTotalTest.xml |  8 +++++--
 .../CreateOrderFromEditCustomerPageTest.xml   |  8 +++++--
 ...iewedBundleFixedProductOnOrderPageTest.xml |  4 +++-
 .../StorefrontOrderPagerDisplayedTest.xml     |  8 +++++--
 .../Test/StorefrontPrintOrderGuestTest.xml    |  8 +++++--
 ...efrontVerifySecureURLRedirectSalesTest.xml |  8 +++++--
 ...ValueWithFullDiscountUsingCartRuleTest.xml |  8 +++++--
 ...ngElasticSearchWithWeightAttributeTest.xml |  4 +++-
 ...archSuggestionByProductDescriptionTest.xml |  8 +++++--
 ...erifySearchSuggestionByProductNameTest.xml |  8 +++++--
 ...uggestionByProductShortDescriptionTest.xml |  8 +++++--
 ...VerifySearchSuggestionByProductSkuTest.xml |  8 +++++--
 ...ustomStoreShippingMethodTableRatesTest.xml |  4 +++-
 .../AdminCreatePartialShipmentEntityTest.xml  |  4 +++-
 .../Test/AdminCreateShipmentEntityTest.xml    |  4 +++-
 .../Test/AdminDisablingSwatchTooltipsTest.xml |  8 +++++--
 ...ntDisplayAllCharactersOnTextSwatchTest.xml |  4 +++-
 .../StorefrontFilterByImageSwatchTest.xml     |  4 +++-
 .../Test/StorefrontFilterByTextSwatchTest.xml |  4 +++-
 .../StorefrontFilterByVisualSwatchTest.xml    |  4 +++-
 ...tImageColorWhenFilterByColorFilterTest.xml |  8 +++++--
 ...refrontInlineTranslationOnCheckoutTest.xml |  8 +++++--
 ...wsProductImportWithConfigTurnedOffTest.xml | 12 +++++++---
 ...lKeyForStoreViewAndMovingCategory2Test.xml |  4 +++-
 ...tesForProductInCategoriesSwitchOffTest.xml | 12 +++++++---
 ...CreateUrlRewriteForCustomStoreViewTest.xml |  4 +++-
 ...riesTestWithConfigurationTurnedOffTest.xml | 12 +++++++---
 ...ProductsWithConfigurationTurnedOffTest.xml | 12 +++++++---
 .../Test/AdminLockAdminUserEntityTest.xml     |  8 +++++--
 ...efrontVerifySecureURLRedirectVaultTest.xml |  8 +++++--
 ...FixedTaxValSavedForSpecificWebsiteTest.xml | 16 +++++++++----
 ...uctsToCartFromWishlistUsingSidebarTest.xml | 16 +++++++++----
 ...leteBundleFixedProductFromWishlistTest.xml |  8 +++++--
 ...eteConfigurableProductFromWishlistTest.xml |  8 +++++--
 ...eProductFromShoppingCartToWishlistTest.xml |  8 +++++--
 ...veProductsFromWishlistUsingSidebarTest.xml |  8 +++++--
 .../Test/StorefrontUpdateWishlistTest.xml     |  8 +++++--
 ...ontVerifySecureURLRedirectWishlistTest.xml |  8 +++++--
 240 files changed, 1333 insertions(+), 446 deletions(-)

diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml
index be734205e1f5b..c5b4e8c34bfec 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterChangeCookieDomainTest.xml
@@ -21,11 +21,15 @@
         </annotations>
         <before>
             <magentoCLI command="config:set {{ChangedCookieDomainForMainWebsiteConfigData.path}} --scope={{ChangedCookieDomainForMainWebsiteConfigData.scope}} --scope-code={{ChangedCookieDomainForMainWebsiteConfigData.scope_code}} {{ChangedCookieDomainForMainWebsiteConfigData.value}}" stepKey="changeDomainForMainWebsiteBeforeTestRun"/>
-            <magentoCLI command="cache:flush config" stepKey="flushCacheBeforeTestRun"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheBeforeTestRun">
+                <argument name="tags" value="config"/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set {{EmptyCookieDomainForMainWebsiteConfigData.path}} --scope={{EmptyCookieDomainForMainWebsiteConfigData.scope}} --scope-code={{EmptyCookieDomainForMainWebsiteConfigData.scope_code}} {{EmptyCookieDomainForMainWebsiteConfigData.value}}" stepKey="changeDomainForMainWebsiteAfterTestComplete"/>
-            <magentoCLI command="cache:flush config" stepKey="flushCacheAfterTestComplete"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterTestComplete">
+                <argument name="tags" value="config"/>
+            </actionGroup>
         </after>
         <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         <actionGroup ref="AssertAdminDashboardPageIsVisibleActionGroup" stepKey="seeDashboardPage"/>
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml
index d2c628ed13701..fb58b59b0ccaa 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.xml
@@ -21,7 +21,9 @@
         </annotations>
         <before>
             <magentoCLI command="config:set {{MinifyJavaScriptFilesEnableConfigData.path}} {{MinifyJavaScriptFilesEnableConfigData.value}}" stepKey="enableJsMinification"/>
-            <magentoCLI command="cache:clean config" stepKey="cleanCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml
index 812158948d85f..aa246cb5f9d22 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminMenuNavigationWithSecretKeysTest.xml
@@ -20,12 +20,16 @@
         </annotations>
         <before>
             <magentoCLI command="config:set admin/security/use_form_key 1" stepKey="enableUrlSecretKeys"/>
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches1"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches1">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
             <magentoCLI command="config:set admin/security/use_form_key 0" stepKey="disableUrlSecretKeys"/>
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches2"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches2">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
diff --git a/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml b/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml
index 387e81cb71546..bb69aa218e77a 100644
--- a/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml
+++ b/app/code/Magento/Backend/Test/Mftf/Test/AdminPersistentShoppingCartSettingsTest.xml
@@ -21,11 +21,15 @@
         <before>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
             <magentoCLI stepKey="enablePersistentShoppingCart" command="config:set persistent/options/enabled 1"/>
-            <magentoCLI stepKey="cacheClean" command="cache:clean config"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI stepKey="disablePersistentShoppingCart" command="config:set persistent/options/enabled 0"/>
-            <magentoCLI stepKey="cacheClean" command="cache:clean config"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml
index 30922839a191d..f73941c375a41 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/AdminAssociateBundleProductToWebsitesTest.xml
@@ -43,7 +43,9 @@
             </createData>
 
             <!-- Reindex -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
 
             <!-- Login as admin -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
index fd94ca93b1600..8b598b61ccee7 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml
@@ -138,8 +138,12 @@
         <click selector="{{AdminProductFiltersSection.enable}}" stepKey="ClickOnEnable"/>
 
         <!--Clear Cache - reindex - resets products according to enabled/disabled view-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex2"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache2"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Confirm bundle products have been enabled-->
         <amOnPage url="{{BundleProduct.urlKey2}}.html" stepKey="GoToProductPageEnabled"/>
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml
index b3c542af7bbc9..93fac3171e9fb 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleProductWithZeroPriceToShoppingCartTest.xml
@@ -40,7 +40,9 @@
                 <requiredEntity createDataKey="bundleOption"/>
                 <requiredEntity createDataKey="apiSimple"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShipping"/>
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSearchBundleProductsByKeywordsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSearchBundleProductsByKeywordsTest.xml
index de6718dfd9f31..5997cdc14ade8 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSearchBundleProductsByKeywordsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontCustomerSearchBundleProductsByKeywordsTest.xml
@@ -39,7 +39,9 @@
                 <requiredEntity createDataKey="fixedBundleOption"/>
                 <requiredEntity createDataKey="createSimpleProductTwo"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createDynamicBundle" stepKey="deleteDynamicBundleProduct"/>
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSortBundleProductsByPriceTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSortBundleProductsByPriceTest.xml
index 1c7cb39d7746f..7049299987dff 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSortBundleProductsByPriceTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSortBundleProductsByPriceTest.xml
@@ -95,7 +95,9 @@
             </createData>
 
             <!-- Perform CLI reindex -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete all created data -->
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSpecialPriceBundleProductInCartTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSpecialPriceBundleProductInCartTest.xml
index 32662321a611e..58fae75a6fc6b 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSpecialPriceBundleProductInCartTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontSpecialPriceBundleProductInCartTest.xml
@@ -36,7 +36,9 @@
                     <requiredEntity createDataKey="simpleProduct"/>
                 </createData>
                 <!-- Run reindex stock status -->
-                <magentoCLI command="indexer:reindex" arguments="cataloginventory_stock" stepKey="reindex"/>
+                <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                    <argument name="indices" value="cataloginventory_stock"/>
+                </actionGroup>
             </before>
             <after>
                 <deleteData createDataKey="bundleProduct" stepKey="deleteBundleProduct"/>
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml
index ac2ab4806fd44..faea327a07d12 100644
--- a/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml
+++ b/app/code/Magento/Bundle/Test/Mftf/Test/StorefrontVerifyDynamicBundleProductPricesForCombinationOfOptionsTest.xml
@@ -167,7 +167,9 @@
             <waitForPageLoad stepKey="waitForTaxSaved"/>
             <see userInput="You saved the configuration." selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccess"/>
 
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- navigate to the tax configuration page -->
diff --git a/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml b/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml
index 9bd9c784b39f2..515c2bc56f067 100644
--- a/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml
+++ b/app/code/Magento/BundleImportExport/Test/Mftf/Test/UpdateBundleProductViaImportTest.xml
@@ -38,8 +38,12 @@
             <argument name="importFile" value="catalog_product_import_bundle.csv"/>
             <argument name="importNoticeMessage" value="Created: 2, Updated: 0, Deleted: 0"/>
         </actionGroup>
-        <magentoCLI command="cache:flush" arguments="full_page" stepKey="flushCacheAfterCreate"/>
-        <magentoCLI command="indexer:reindex" stepKey="indexerReindexAfterCreate"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterCreate">
+            <argument name="tags" value="full_page"/>
+        </actionGroup>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindexAfterCreate">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Check Bundle product is visible on the storefront-->
         <actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openCategoryPageAfterCreation">
@@ -56,8 +60,12 @@
             <argument name="importFile" value="catalog_product_import_bundle.csv"/>
             <argument name="importNoticeMessage" value="Created: 0, Updated: 2, Deleted: 0"/>
         </actionGroup>
-        <magentoCLI command="cache:flush" arguments="full_page" stepKey="flushCacheAfterUpdate"/>
-        <magentoCLI command="indexer:reindex" stepKey="indexerReindexAfterUpdate"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterUpdate">
+            <argument name="tags" value="full_page"/>
+        </actionGroup>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindexAfterUpdate">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Check Bundle product is still visible on the storefront-->
         <actionGroup ref="StorefrontGoToCategoryPageActionGroup" stepKey="openCategoryPageAfterUpdate">
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml
index 28253fb3c00ef..58cfd7aacd631 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/AdminLoginWithCaptchaTest.xml
@@ -23,12 +23,16 @@
         <before>
             <magentoCLI command="config:set {{AdminCaptchaLength3ConfigData.path}} {{AdminCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" />
             <magentoCLI command="config:set {{AdminCaptchaSymbols1ConfigData.path}} {{AdminCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set {{AdminCaptchaDefaultLengthConfigData.path}} {{AdminCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" />
             <magentoCLI command="config:set {{AdminCaptchaDefaultSymbolsConfigData.path}} {{AdminCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </after>
 
         <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdminWithWrongCredentialsFirstAttempt">
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaEditCustomerEmailTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaEditCustomerEmailTest.xml
index 54237087227d8..2736888154483 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaEditCustomerEmailTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaEditCustomerEmailTest.xml
@@ -24,7 +24,9 @@
             <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" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
 
             <createData entity="Simple_US_Customer" stepKey="customer"/>
             <!-- Sign in as customer -->
@@ -37,7 +39,9 @@
             <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" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
 
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnContactUsTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnContactUsTest.xml
index 0c6a3f31c1df2..22f1ed1af3e28 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnContactUsTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnContactUsTest.xml
@@ -23,13 +23,17 @@
             <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"/>
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </before>
         <after>
             <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" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </after>
 
         <!-- Open storefront contact us form -->
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnCustomerLoginTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnCustomerLoginTest.xml
index 5a1be68d3f251..332d7eb6067b5 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnCustomerLoginTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaOnCustomerLoginTest.xml
@@ -22,13 +22,17 @@
         <before>
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" />
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaSymbols1ConfigData.path}} {{StorefrontCustomerCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <createData entity="Simple_US_Customer" stepKey="customer"/>
         </before>
         <after>
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultLengthConfigData.path}} {{StorefrontCustomerCaptchaDefaultLengthConfigData.value}}" stepKey="setDefaultCaptchaLength" />
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.path}} {{StorefrontCustomerCaptchaDefaultSymbolsConfigData.value}}" stepKey="setDefaultCaptchaSymbols" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
 
diff --git a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaRegisterNewCustomerTest.xml b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaRegisterNewCustomerTest.xml
index 2c331f958e467..b7d5b60ddc632 100644
--- a/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaRegisterNewCustomerTest.xml
+++ b/app/code/Magento/Captcha/Test/Mftf/Test/StorefrontCaptchaRegisterNewCustomerTest.xml
@@ -25,7 +25,9 @@
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaModeAlwaysConfigData.path}} {{StorefrontCustomerCaptchaModeAlwaysConfigData.value}}" stepKey="alwaysEnableCaptcha" />
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaLength3ConfigData.path}} {{StorefrontCustomerCaptchaLength3ConfigData.value}}" stepKey="setCaptchaLength" />
             <magentoCLI command="config:set {{StorefrontCustomerCaptchaSymbols1ConfigData.path}} {{StorefrontCustomerCaptchaSymbols1ConfigData.value}}" stepKey="setCaptchaSymbols" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </before>
         <after>
             <!-- Set default configuration. -->
@@ -33,7 +35,9 @@
             <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" />
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </after>
 
         <!-- Open Customer registration page -->
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml
index e42dd8b8ab12e..92be79fdfe720 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AddOutOfStockProductToCompareListTest.xml
@@ -22,7 +22,9 @@
         <before>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
             <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <createData entity="SimpleSubCategory" stepKey="category"/>
             <createData entity="SimpleProduct4" stepKey="product">
                 <requiredEntity createDataKey="category"/>
@@ -30,7 +32,9 @@
         </before>
         <after>
             <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="product" stepKey="deleteProduct"/>
             <deleteData createDataKey="category" stepKey="deleteCategory"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
@@ -47,8 +51,12 @@
         <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockEnable.path}} {{CatalogInventoryOptionsShowOutOfStockEnable.value}}" stepKey="setConfigShowOutOfStockTrue"/>
         <!--Clear cache and reindex-->
         <comment userInput="Clear cache and reindex" stepKey="cleanCache"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+    <argument name="indices" value=""/>
+</actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+    <argument name="tags" value=""/>
+</actionGroup>
         <!--Open product page-->
         <comment userInput="Open product page" stepKey="openProductPage"/>
         <amOnPage url="{{StorefrontProductPage.url($$product.custom_attributes[url_key]$$)}}" stepKey="goToSimpleProductPage2"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml
index 52da8c70a3bc8..9dbec6bbaf51c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminAddInStockProductToTheCartTest.xml
@@ -61,8 +61,12 @@
         <waitForLoadingMaskToDisappear stepKey="waitForLoading"/>
         <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
         <!--Clear cache and reindex-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Verify product is visible in category front page -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="openCategoryStoreFrontPage"/>
         <waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminBackorderAllowedAddProductToCartTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminBackorderAllowedAddProductToCartTest.xml
index 96d0c209aba34..077765bd5c15a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminBackorderAllowedAddProductToCartTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminBackorderAllowedAddProductToCartTest.xml
@@ -31,7 +31,9 @@
             <!-- Set Magento back to default configuration -->
             <magentoCLI command="config:set {{CatalogInventoryOptionsShowOutOfStockDisable.path}} {{CatalogInventoryOptionsShowOutOfStockDisable.value}}" stepKey="setConfigShowOutOfStockFalse"/>
             <magentoCLI command="config:set {{CatalogInventoryItemOptionsBackordersDisable.path}} {{CatalogInventoryItemOptionsBackordersDisable.value}}" stepKey="setConfigAllowBackordersFalse"/>
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
         </after>
 
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml
index b3f7f0e6eb42a..0bdf19c9b8950 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckCustomAttributeValuesAfterProductSaveTest.xml
@@ -33,7 +33,9 @@
             </createData>
             <!-- Create simple product -->
             <createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
-            <magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext" stepKey="reindexCatalogSearch"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexCatalogSearch">
+                <argument name="indices" value="catalogsearch_fulltext"/>
+            </actionGroup>
             <!-- Login to Admin page -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml
index e64707a895fd4..c3b54dbbba141 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCheckOutOfStockProductIsVisibleInCategoryTest.xml
@@ -65,7 +65,9 @@
         <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
 
         <!--Run re-index task -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Verify product is visible in category front page -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="openCategoryStoreFrontPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml
index 4c1993eb803b3..a640b5a02790c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateCategoryWithAnchorFieldTest.xml
@@ -72,8 +72,12 @@
         </actionGroup>
 
         <!--Clear cache and reindex-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Verify Product in store front page-->
         <amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name_lwr)}}"  stepKey="amOnCategoryPage"/>
         <waitForPageLoad stepKey="waitForPageToBeLoaded"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
index fef69edde23e8..93a8633c51854 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
@@ -83,7 +83,9 @@
         <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Go to store's advanced catalog search page -->
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
index f8346f5a9dd5c..6b0c8f418db9c 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryAndUpdateAsInactiveTest.xml
@@ -31,8 +31,12 @@
                 <argument name="storeView" value="customStoreFR"/>
             </actionGroup>
             <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <!--Enable Flat Catalog Category -->
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
@@ -44,7 +48,9 @@
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
-            <magentoCLI stepKey="indexerReindex" command="indexer:reindex" />
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
             <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
                 <argument name="customStore" value="customStoreEN"/>
@@ -65,8 +71,12 @@
         <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{CatNotActive.name}}" stepKey="seeUpdatedCategoryTitle"/>
         <dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"  stepKey="verifyInactiveCategory"/>
         <!--Run full reindex and clear caches -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Open Index Management Page -->
         <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="openIndexManagementPage"/>
         <waitForPageLoad stepKey="waitForIndexPageToBeLoaded"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
index 0aa89bdfd45b6..6ae7f2ad5a308 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveFlatCategoryTest.xml
@@ -31,8 +31,12 @@
                 <argument name="storeView" value="customStoreFR"/>
             </actionGroup>
             <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <!--Enable Flat Catalog Category -->
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
@@ -44,7 +48,9 @@
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
-            <magentoCLI stepKey="indexerReindex" command="indexer:reindex" />
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
             <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
                 <argument name="customStore" value="customStoreEN"/>
@@ -66,8 +72,12 @@
         <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{SimpleSubCategory.name}}" stepKey="seeUpdatedCategoryTitle"/>
         <dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}"  stepKey="verifyInactiveIncludeInMenu"/>
         <!--Run full reindex and clear caches -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Open Index Management Page -->
         <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="openIndexManagementPage"/>
         <waitForPageLoad stepKey="waitForIndexPageToBeLoaded"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
index 171d15fe6ed4f..6cce3586fd443 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateInactiveInMenuFlatCategoryTest.xml
@@ -31,8 +31,12 @@
                 <argument name="storeView" value="customStoreFR"/>
             </actionGroup>
             <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <!--Enable Flat Catalog Category -->
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
@@ -44,7 +48,9 @@
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
-            <magentoCLI stepKey="indexerReindex" command="indexer:reindex" />
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
                 <argument name="customStore" value="customStoreEN"/>
             </actionGroup>
@@ -67,8 +73,12 @@
         <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{SimpleSubCategory.name}}" stepKey="seeUpdatedCategoryTitle"/>
         <dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}"  stepKey="verifyInactiveIncludeInMenu"/>
         <!--Run full reindex and clear caches -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Open Index Management Page -->
         <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="openIndexManagementPage"/>
         <waitForPageLoad stepKey="waitForIndexPageToBeLoaded"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
index caacfde89d1cb..ebd98e85ac89b 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateMultipleSelectProductAttributeVisibleInStorefrontAdvancedSearchFormTest.xml
@@ -87,7 +87,9 @@
         <seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Go to store's advanced catalog search page -->
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml
index 7fdab11d0a050..b27988a81b63e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductAttributeFromProductPageTest.xml
@@ -91,7 +91,9 @@
         <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
 
         <!--Run Re-Index task -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Verify product attribute added in product form -->
         <scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml
index 2141f44113057..079e81535e16f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithDatetimeAttributeTest.xml
@@ -49,7 +49,9 @@
         <!-- Save the product -->
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
         <!-- Flush config cache to reset product attributes in attribute set -->
-        <magentoCLI command="cache:flush" arguments="config" stepKey="flushConfigCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushConfigCache">
+            <argument name="tags" value="config"/>
+        </actionGroup>
         <reloadPage stepKey="reloadProductEditPage"/>
         <!-- Check default value -->
         <waitForElementVisible selector="{{AdminProductAttributesSection.sectionHeader}}" stepKey="waitAttributesSectionAppears"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml
index 8de84867241a8..54c3a05651c44 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductWithUnicodeTest.xml
@@ -31,8 +31,12 @@
             <argument name="category" value="$$createPreReqCategory$$"/>
             <argument name="simpleProduct" value="ProductWithUnicode"/>
         </actionGroup>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">
             <argument name="category" value="$$createPreReqCategory$$"/>
             <argument name="product" value="ProductWithUnicode"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml
index 8bb3391b5240b..200f6d6849fdc 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithCustomOptionsSuiteAndImportOptionsTest.xml
@@ -117,8 +117,12 @@
 
         <!-- Verify we see success message -->
         <see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Verify customer see created virtual product with custom options suite and import options(from above step) on storefront page and is searchable by sku -->
         <amOnPage url="{{StorefrontProductPage.url(virtualProductCustomImportOptions.urlKey)}}" stepKey="goToProductPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml
index faae6a371db24..259f1312f6cb4 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateVirtualProductWithTierPriceTest.xml
@@ -98,8 +98,12 @@
         <see selector="{{StorefrontCategoryMainSection.productLink}}" userInput="{{virtualProductBigQty.name}}" stepKey="seeVirtualProductNameOnCategoryPage"/>
 
         <!--Run full reindex and clear caches -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Verify customer see created virtual product with tier price(from above step) on storefront page and is searchable by sku -->
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml
index e0375728f316f..79cb0fc0cd2f1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminDeleteProductsImageInCaseOfMultipleStoresTest.xml
@@ -65,8 +65,12 @@
             <actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
                 <argument name="websiteName" value="{{NewWebSiteData.name}}"/>
             </actionGroup>
-            <magentoCLI stepKey="reindex" command="indexer:reindex"/>
-            <magentoCLI stepKey="flushCache" command="cache:flush"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="createSubCategory" stepKey="deleteSubCategory"/>
             <deleteData createDataKey="createRootCategory" stepKey="deleteRootCategory"/>
             <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
@@ -94,8 +98,12 @@
         </actionGroup>
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct2"/>
         <!--Reindex and flush cache-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Switch to 'Default Store View' scope and open product page-->
         <actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreView">
             <argument name="storeViewName" value="'Default Store View'"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml
index c319116bf075c..af31b7c1d5c07 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminImportCustomizableOptionToProductWithSKUTest.xml
@@ -32,8 +32,12 @@
             </createData>
 
             <!-- TODO: REMOVE AFTER FIX MC-21717 -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml
index bf5fde3b85bba..c078606a1cfe7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveAnchoredCategoryToDefaultCategoryTest.xml
@@ -69,8 +69,12 @@
         <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage2"/>
 
         <!-- TODO: REMOVE AFTER FIX MC-21717 -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Open Category in store front page-->
         <amOnPage url="/$$createDefaultCategory.name$$/{{FirstLevelSubCat.name}}/{{SimpleSubCategory.name}}.html" stepKey="seeTheCategoryInStoreFrontPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml
index 4dbbdc8f4399e..08e2b58e8381f 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryAndCheckUrlRewritesTest.xml
@@ -23,8 +23,12 @@
                 <field key="is_active">true</field>
             </createData>
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createDefaultCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml
index 116df566f2bd0..ff2a3ff8bcc22 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminMoveCategoryFromParentAnchoredCategoryTest.xml
@@ -59,7 +59,9 @@
         <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
 
         <!--Run re-index task -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Verify category displayed in store front page-->
         <amOnPage url="/$$createDefaultCategory.name$$/{{SimpleSubCategory.name}}.html" stepKey="seeTheCategoryInStoreFrontPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml
index 1c536df7c2efb..8e728fc6e1f27 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminProductCustomURLKeyPreservedWhenAssignedToCategoryWithoutCustomURLKeyTest.xml
@@ -35,8 +35,12 @@
             </actionGroup>
 
             <!--Run full reindex and clear caches -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" arguments="full_page" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProductFirst" stepKey="deleteFirstSimpleProduct"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
index b4738fd7adeec..cfd1ad6f607a8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminRemoveImageAffectsAllScopesTest.xml
@@ -65,8 +65,12 @@
             </actionGroup>
             <deleteData createDataKey="category" stepKey="deletePreReqCategory"/>
             <deleteData createDataKey="product" stepKey="deleteFirstProduct"/>
-            <magentoCLI stepKey="reindex" command="indexer:reindex"/>
-            <magentoCLI stepKey="flushCache" command="cache:flush"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml
index 9819890ed3751..9c0264a15a45d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSimpleProductImagesTest/AdminSimpleProductImagesTest.xml
@@ -143,8 +143,12 @@
 
         <!-- Save the second product -->
         <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct2"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Go to the admin grid and see the uploaded image -->
         <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndex3"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml
index 71e827a64ae2d..8daf9133e3244 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminSortingByWebsitesTest.xml
@@ -31,7 +31,9 @@
                 <argument name="websiteCode" value="{{customWebsite.code}}"/>
             </actionGroup>
             <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
-            <magentoCLI command="cache:flush" stepKey="flushCacheAfterEnableWebUrlOptions"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterEnableWebUrlOptions">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
@@ -43,8 +45,12 @@
             <actionGroup ref="GoToProductCatalogPageActionGroup" stepKey="goToProductCatalogPage"/>
             <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
             <actionGroup ref="ResetWebUrlOptionsActionGroup" stepKey="resetUrlOption"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml
index 9b827550a6817..683ca19d1226d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateCategoryWithProductsTest.xml
@@ -64,8 +64,12 @@
         <see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seePageTitle" />
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Verify Category in store front page-->
         <amOnPage url="{{StorefrontCategoryPage.url(_defaultCategory.name)}}" stepKey="seeDefaultProductPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml
index 1950b385c4a68..8d3e2b56431ac 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml
@@ -32,8 +32,12 @@
                 <argument name="storeView" value="customStoreFR"/>
             </actionGroup>
             <!--Run full reindex and clear caches -->
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <!--Enable Flat Catalog Category -->
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
@@ -45,7 +49,9 @@
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
             <magentoCLI stepKey="setIndexersMode" command="indexer:set-mode" arguments="realtime" />
-            <magentoCLI stepKey="indexerReindex" command="indexer:reindex" />
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
                 <argument name="customStore" value="customStoreEN"/>
             </actionGroup>
@@ -57,7 +63,9 @@
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
         <!-- Select Created Category-->
-        <magentoCLI command="indexer:reindex" stepKey="reindexBeforeFlow"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexBeforeFlow">
+            <argument name="indices" value=""/>
+        </actionGroup>
         <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
         <click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="clickOnExpandTree"/>
         <click selector="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleSubCategory.name)}}" stepKey="selectCreatedCategory"/>
@@ -77,8 +85,12 @@
         <waitForPageLoad stepKey="waitForSecondCategoryToSave"/>
         <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
         <!--Open Index Management Page and verify flat categoryIndex status-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Open Index Management Page -->
         <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="openIndexManagementPage"/>
         <waitForPageLoad stepKey="waitForIndexPageToLoad"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
index 1214ba879f211..658440f22b50d 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryIncludeInNavigationTest.xml
@@ -66,8 +66,12 @@
         <waitForPageLoad stepKey="waitForSecondCategoryToSave"/>
         <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
         <!--Run full reindex and clear caches -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Open Index Management Page -->
         <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="openIndexManagementPage"/>
         <waitForPageLoad stepKey="waitForIndexPageToBeLoaded"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
index 490f8dbdc4f81..e9b61d4f4d5eb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryNameAndDescriptionTest.xml
@@ -45,7 +45,9 @@
         <after>
             <magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
             <magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
-            <magentoCLI stepKey="indexerReindex" command="indexer:reindex" />
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <deleteData stepKey="deleteCategory" createDataKey="createCategory" />
             <actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreViewEn">
                 <argument name="customStore" value="customStoreEN"/>
@@ -69,8 +71,12 @@
         <waitForPageLoad stepKey="waitForSecondCategoryToSave"/>
         <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
         <!--Run full reindex and clear caches -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Open Index Management Page -->
         <amOnPage url="{{AdminIndexManagementPage.url}}" stepKey="openIndexManagementPage"/>
         <waitForPageLoad stepKey="waitForIndexPageToLoad"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml
index f5b0fb8054dc1..fb162033f830e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml
@@ -27,8 +27,12 @@
             <createData entity="SimpleSubCategory" stepKey="categoryEntity"/>
 
             <!--TODO: REMOVE AFTER FIX MC-21717 -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush full_page" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml
index 58db163bed720..42e1949e78327 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogAndSearchTest.xml
@@ -95,7 +95,9 @@
         <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice245InStock.urlKey}}" stepKey="seeUrlKey"/>
 
         <!--Run re-index task -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Verify customer see updated simple product link on category page -->
         <amOnPage url="{{StorefrontCategoryPage.url($$categoryEntity.name$$)}}" stepKey="openCategoryPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml
index 5e9a48f659d6b..ea5a2df3733d7 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateSimpleProductWithRegularPriceInStockVisibleInCatalogOnlyTest.xml
@@ -95,7 +95,9 @@
         <seeInField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice32501InStock.urlKey}}" stepKey="seeUrlKey"/>
 
         <!--Run re-index task -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Verify customer see updated simple product link on category page -->
         <amOnPage url="{{StorefrontCategoryPage.url($$categoryEntity.name$$)}}" stepKey="openCategoryPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml
index 3eaae60d789f5..55d697e35deba 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/CheckTierPricingOfProductsTest.xml
@@ -110,7 +110,9 @@
         <actionGroup ref="ClearProductsFilterActionGroup" stepKey="ClearProductsFilterActionGroup"/>
 
         <!--Flush cache-->
-        <magentoCLI command="cache:flush" stepKey="cleanCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
 
         <!--Edit customer info-->
@@ -333,8 +335,12 @@
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
 
             <!--Do reindex and flush cache-->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
     </test>
 </tests>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
index ce9ff3af18607..1b93f1db19a57 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
@@ -75,7 +75,9 @@
 
         <!-- @TODO: Uncomment commented below code after MQE-903 is fixed -->
         <!-- Perform cli reindex. -->
-        <!--<magentoCLI command="indexer:reindex" stepKey="magentoCli"/>-->
+        <!--<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">-->
+        <!--    <argument name="indices" value=""/>-->
+        <!--</actionGroup>-->
 
         <!-- Delete Default Root Category. -->
         <actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToCategoryPageAfterCLIReindexCommand"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml
index f6ede46578f33..e679402740398 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/DisplayRefreshCacheAfterChangingCategoryPageLayoutTest.xml
@@ -24,14 +24,18 @@
             <comment userInput="Create category, flush cache and log in" stepKey="createCategoryAndLogIn"/>
             <createData entity="SimpleSubCategory" stepKey="simpleCategory"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="logInAsAdmin"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete category and log out -->
             <comment userInput="Delete category and log out" stepKey="deleteCategoryAndLogOut"/>
             <deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logOutFromAdmin"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <!-- Navigate to category details page -->
         <comment userInput="Navigate to category details page" stepKey="navigateToAdminCategoryPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest/EndToEndB2CGuestUserTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest/EndToEndB2CGuestUserTest.xml
index 441c9cd5eab8b..ff68bba78cae8 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest/EndToEndB2CGuestUserTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/EndToEndB2CGuestUserTest/EndToEndB2CGuestUserTest.xml
@@ -57,7 +57,9 @@
         </after>
 
         <!--Re-index-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Step 1: User browses catalog -->
         <comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml
index 9b5fa25085e1a..95f263ad8e1cb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/ProductAvailableAfterEnablingSubCategoriesTest.xml
@@ -50,7 +50,9 @@
         <actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="seeSuccessMessage"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryStorefront"/>
         <waitForPageLoad stepKey="waitForCategoryStorefrontPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml
index e109dcb0deea5..cde7b14614f8e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontProductsDisplayUsingElasticSearchTest.xml
@@ -114,8 +114,12 @@
             </createData>
 
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
-            <magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext" stepKey="performReindex"/>
-            <magentoCLI command="cache:clean" arguments="full_page" stepKey="cleanFullPageCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="performReindex">
+                <argument name="indices" value="catalogsearch_fulltext"/>
+            </actionGroup>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml
index 489be97a9927a..e1b5aca6382e9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreLevelTest.xml
@@ -74,8 +74,12 @@
             </actionGroup>
             <!-- Logout Admin -->
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCacheAfterDeletion"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterDeletion">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <!--Create widget for recently viewed products-->
         <actionGroup ref="AdminEditCMSPageContentActionGroup" stepKey="clearRecentlyViewedWidgetsFromCMSContentBefore">
@@ -95,7 +99,9 @@
             <argument name="buttonToShowSection2" value="3"/>
         </actionGroup>
         <!-- Warm up cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCacheAfterWidgetCreated"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterWidgetCreated">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!-- Navigate to product 3 on store front -->
         <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStoreOneProductPageTwo"/>
         <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct3.name$)}}" stepKey="goToStoreOneProductPageThree"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml
index bc93b3e6e3c45..0117493906de1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StoreFrontRecentlyViewedAtStoreViewLevelTest.xml
@@ -66,8 +66,12 @@
 
             <!-- Logout Admin -->
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCacheAfterDeletion"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterDeletion">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
 
         <!--Create widget for recently viewed products-->
@@ -88,7 +92,9 @@
             <argument name="buttonToShowSection2" value="3"/>
         </actionGroup>
 
-        <magentoCLI command="cache:flush" stepKey="flushCacheAfterWidgetCreated"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterWidgetCreated">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Navigate to product 3 on store front -->
         <amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore1ProductPage2"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml
index 8955f43e1b335..3ff477070cc30 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithCategoryFilterTest.xml
@@ -44,7 +44,9 @@
             <!-- Set the category filter to be present on the category page layered navigation -->
             <magentoCLI command="config:set {{EnableCategoryFilterOnCategoryPageConfigData.path}} {{EnableCategoryFilterOnCategoryPageConfigData.value}}" stepKey="setCategoryFilterVisibleOnStorefront"/>
 
-            <magentoCLI command="cache:flush" stepKey="clearCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml
index 7900a712e0664..a2316efb3a743 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCategoryPageWithoutCategoryFilterTest.xml
@@ -44,7 +44,9 @@
             <!-- Set the category filter to NOT be present on the category page layered navigation -->
             <magentoCLI command="config:set {{DisableCategoryFilterOnCategoryPageConfigData.path}} {{DisableCategoryFilterOnCategoryPageConfigData.value}}" stepKey="hideCategoryFilterOnStorefront"/>
 
-            <magentoCLI command="cache:flush" stepKey="clearCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml
index b13c3827c6727..a73bd5a533ad0 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckDefaultNumberProductsToDisplayTest.xml
@@ -188,8 +188,12 @@
         <seeInField selector="{{AdminCatalogStorefrontConfigSection.productsPerPageDefaultValue}}" userInput="12" stepKey="seeDefaultValueProductPerPage"/>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Open storefront on the category page -->
         <comment userInput="Open storefront on the category page" stepKey="commentOpenStorefront"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml
index bcd5d7b851db3..c43efe9d9e442 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithDoubleQuoteTest.xml
@@ -41,7 +41,9 @@
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Check product in category listing-->
         <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="goToCategoryPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml
index bd2c22c90318a..e280bd7f1889a 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml
@@ -33,7 +33,9 @@
         </after>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Check product in category listing-->
         <amOnPage url="{{StorefrontCategoryPage.url($$createCategoryOne.name$$)}}" stepKey="navigateToCategoryPage"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml
index c8872425552be..78fbed1aef3a9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/StorefrontRememberCategoryPaginationTest.xml
@@ -61,7 +61,9 @@
             <deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/>
             <deleteData createDataKey="defaultCategory2" stepKey="deleteCategory2"/>
 
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
         </after>
     </test>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
index b4514c9b53736..b7ae6559b8dfb 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
@@ -62,7 +62,9 @@
         <after>
             <!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode -->
             <magentoCLI command="indexer:set-mode" arguments="realtime" stepKey="setRealtimeMode"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
 
             <!-- Delete data -->
             <deleteData createDataKey="productA" stepKey="deleteProductA"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml
index d1f9ebd4c99a4..fa71ffaca26e1 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml
@@ -78,8 +78,12 @@
 
         <!-- 3. Save and apply the new catalog price rule -->
         <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- 4. Verify the storefront -->
         <amOnPage url="$$createCategoryOne.name$$.html" stepKey="goToCategoryOne"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml
index 882a92a2ee433..1de036d1026dd 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleForConfigurableProductWithSpecialPricesTest.xml
@@ -127,8 +127,12 @@
         <actionGroup ref="SaveAndApplyCatalogPriceRuleActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
 
         <!-- Reindex and flash cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Open Storefront product page and assert created configurable product -->
         <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage">
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml
index fcae0065f1b53..0290feffc54af 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleByPercentTest.xml
@@ -25,8 +25,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <!-- log in and create the price rule -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
index b9318f72bee9e..162c94e262e4a 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
@@ -47,8 +47,12 @@
         <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="assertSuccess"/>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- As a NOT LOGGED IN user, go to the storefront category page and should see the discount -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategory1"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml
index 6b34fd1e67e9b..f6428bcc0d529 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromConfigurableProductTest.xml
@@ -72,8 +72,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/>
 
@@ -115,8 +119,12 @@
         <see selector="{{AdminMessagesSection.success}}" userInput="You deleted the rule." stepKey="seeDeletedRuleMessage1"/>
 
         <!-- Reindex -->
-        <magentoCLI command="cache:flush" stepKey="flushCache1"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex1"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Assert that the rule isn't present on the Category page -->
         <amOnPage url="$$createCategory1.name$$.html" stepKey="goToStorefrontCategoryPage1"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml
index 59fa4fde1c88a..db8a6e2c75644 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleEntityTest/AdminDeleteCatalogPriceRuleEntityFromSimpleProductTest.xml
@@ -61,8 +61,12 @@
         <see selector="{{AdminMessagesSection.success}}" userInput="You deleted the rule." stepKey="seeDeletedRuleMessage1"/>
 
         <!-- Reindex -->
-        <magentoCLI command="cache:flush" stepKey="flushCache1"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex1"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Assert that the rule isn't present on the Category page -->
         <amOnPage url="$$createCategory1.name$$.html" stepKey="goToStorefrontCategoryPage1"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml
index 69508490774dd..bdb633be94738 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminDeleteCatalogPriceRuleTest.xml
@@ -79,8 +79,12 @@
 
         <!-- Apply and flush the cache -->
         <click selector="{{AdminCatalogPriceRuleGrid.applyRules}}" stepKey="clickApplyRules"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Verify that category page shows the original prices -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="goToCategoryPage2"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
index 9d7607d7521c9..10c5a2798d7ba 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminEnableAttributeIsUndefinedCatalogPriceRuleTest.xml
@@ -80,9 +80,12 @@
             <argument name="targetSelectValue" value="is undefined"/>
         </actionGroup>
         <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="clickSaveAndApplyRules"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache3"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Check Catalog Price Rule for first product-->
         <amOnPage url="{{StorefrontProductPage.url($$createFirstProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToFirstProductPage"/>
@@ -128,9 +131,12 @@
             <argument name="targetSelectValue" value="is undefined"/>
         </actionGroup>
         <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="clickSaveAndApplyRules1"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex1"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache1"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache2"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexSecondTime">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheSecondTime">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Check Catalog Price Rule for third product-->
         <amOnPage url="{{StorefrontProductPage.url($$createThirdProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToThirdProductPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml
index 1919f7d5cc544..0afdc906f7918 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogPriceRuleByProductAttributeTest.xml
@@ -235,7 +235,9 @@
         <!-- Run cron twice -->
         <magentoCLI command="cron:run" stepKey="runCron1"/>
         <magentoCLI command="cron:run" stepKey="runCron2"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Go to Frontend and open the simple product -->
         <amOnPage url="{{StorefrontProductPage.url($$createFirstProduct.sku$$)}}" stepKey="amOnSimpleProductPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml
index 23fc7e1a9ffba..948a15c71eb18 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleAndConfigurableProductTest.xml
@@ -112,8 +112,12 @@
         <!-- Save and apply the new catalog price rule -->
         <actionGroup ref="SaveAndApplyCatalogPriceRuleActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
 
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Navigate to category on store front -->
         <amOnPage url="{{StorefrontProductPage.url($createCategory.name$)}}" stepKey="goToCategoryPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml
index dfd34181108b8..061eea568d9a0 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductAndFixedMethodTest.xml
@@ -61,8 +61,12 @@
 
         <!-- Save and apply the new catalog price rule -->
         <actionGroup ref="SaveAndApplyCatalogPriceRuleActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Navigate to category on store front -->
         <amOnPage url="{{StorefrontProductPage.url($createCategory.name$)}}" stepKey="goToCategoryPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml
index 25351ca650db9..63f48b0a70156 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductForNewCustomerGroupTest.xml
@@ -69,7 +69,9 @@
         <!-- Save and apply the new catalog price rule -->
         <actionGroup ref="SaveAndApplyCatalogPriceRuleActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
 
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Navigate to category on store front -->
         <amOnPage url="{{StorefrontProductPage.url($createCategory.name$)}}" stepKey="goToCategoryPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml
index 59976fbac1724..7056cacfb70c6 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/ApplyCatalogRuleForSimpleProductWithCustomOptionsTest.xml
@@ -68,8 +68,12 @@
 
         <!-- Save and apply the new catalog price rule -->
         <actionGroup ref="SaveAndApplyCatalogPriceRuleActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Navigate to category on store front -->
         <amOnPage url="{{StorefrontProductPage.url($createCategory.name$)}}" stepKey="goToCategoryPage"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml
index 6ac9f713e2844..b678e379a603d 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/CatalogPriceRuleAndCustomerGroupMembershipArePersistedUnderLongTermCookieTest.xml
@@ -41,7 +41,9 @@
             <actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="clickSaveAndApplyRule"/>
 
             <!-- Perform reindex -->
-            <magentoCLI command="indexer:reindex" arguments="catalogrule_rule" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value="catalogrule_rule"/>
+            </actionGroup>
         </before>
         <after>
             <createData entity="PersistentConfigDefault" stepKey="setDefaultPersistentState"/>
diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml
index 2df891b24223b..264c55ba43390 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml
@@ -34,7 +34,9 @@
             <actionGroup ref="AdminCatalogPriceRuleFillActionsActionGroup" stepKey="fillActionsForThirdPriceRule"/>
             <actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyFirstPriceRule"/>
             <!-- Perform reindex -->
-            <magentoCLI command="indexer:reindex" arguments="catalogrule_rule" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value="catalogrule_rule"/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByDescriptionTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByDescriptionTest.xml
index d23663d43dcd0..c02ef4957ad3d 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByDescriptionTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByDescriptionTest.xml
@@ -13,8 +13,12 @@
             <group value="CatalogSearch"/>
         </annotations>
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByDescriptionActionGroup" stepKey="search">
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml
index 0b3fb2fa42532..0c8e192f9366e 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByNameTest.xml
@@ -14,8 +14,12 @@
         </annotations>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameActionGroup" stepKey="search">
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml
index 517e200f8ce11..99c09b5ba93a5 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByPriceTest.xml
@@ -14,8 +14,12 @@
         </annotations>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="search">
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByShortDescriptionTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByShortDescriptionTest.xml
index 0bd08d31e8ffa..1e18c5ea4d0a9 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByShortDescriptionTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductByShortDescriptionTest.xml
@@ -14,8 +14,12 @@
         </annotations>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByShortDescriptionActionGroup" stepKey="search">
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductBySkuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductBySkuTest.xml
index d273f9828dc95..34e0a73e91fe0 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductBySkuTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/AdvanceCatalogSearchSimpleProductTest/AdvanceCatalogSearchSimpleProductBySkuTest.xml
@@ -14,8 +14,12 @@
         </annotations>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroup"/>
         <actionGroup ref="StorefrontAdvancedCatalogSearchByProductSkuActionGroup" stepKey="search">
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml
index 49fce41fddf05..1b4fc69b0fa6f 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleDynamicTest.xml
@@ -44,8 +44,12 @@
             <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml
index 4b0a5c84ac360..8cca19d870586 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartBundleFixedTest.xml
@@ -55,8 +55,12 @@
             <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteBundleProduct" createDataKey="createBundleProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml
index 35db90363b1ae..9a0466e2f0963 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartConfigurableTest.xml
@@ -26,8 +26,12 @@
             </actionGroup>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteCategory" createDataKey="createCategory"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartDownloadableTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartDownloadableTest.xml
index 79a2fc8646c04..77cb58183b076 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartDownloadableTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartDownloadableTest.xml
@@ -28,8 +28,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml
index cf30e4d06e8e7..2001064518dc5 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartGroupedTest.xml
@@ -28,8 +28,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteGroupedProduct" createDataKey="createProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartTest.xml
index ba6fa813367c3..fd2d60022e19e 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartTest.xml
@@ -24,8 +24,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartVirtualTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartVirtualTest.xml
index b71388f5f409b..fc7f15229cd36 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartVirtualTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchAndAddToCartVirtualTest.xml
@@ -24,8 +24,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteProduct" createDataKey="createVirtualProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchEmptyResultsTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchEmptyResultsTest.xml
index 566b4d204751d..61985aea6ddb2 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchEmptyResultsTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchEmptyResultsTest.xml
@@ -25,8 +25,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchProductBySkuTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchProductBySkuTest.xml
index 814e27182799f..a0522df443e95 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchProductBySkuTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/SearchEntityResultsTest/QuickSearchProductBySkuTest.xml
@@ -24,8 +24,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData stepKey="deleteProduct" createDataKey="createSimpleProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml
index 968435747bdbb..14ae988e6ce79 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontAdvancedSearchEntitySimpleProductTest.xml
@@ -32,8 +32,12 @@
         </after>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- 1. Navigate to Frontend -->
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml
index 6f510fa315d7d..cc267adcbeb54 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontQuickSearchConfigurableChildrenTest.xml
@@ -73,7 +73,9 @@
             </createData>
 
             <!-- Perform reindex -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createConfigurableProduct" stepKey="deleteConfigurableProduct"/>
diff --git a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
index 8a0d91ae05b34..b42313fc14773 100644
--- a/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
+++ b/app/code/Magento/CatalogSearch/Test/Mftf/Test/StorefrontUpdateSearchTermEntityTest.xml
@@ -26,8 +26,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStorefrontPage1"/>
         </before>
         <after>
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
index 9e4689bd8aa4f..0e4ee26a462e6 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/AdminRewriteProductWithTwoStoreTest.xml
@@ -17,7 +17,9 @@
 
         <before>
             <magentoCLI command="config:set {{EnableCategoriesPathProductUrls.path}} {{EnableCategoriesPathProductUrls.value}}" stepKey="enableUseCategoriesPath"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
             <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView" />
@@ -36,7 +38,9 @@
             <deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
             <deleteData createDataKey="defaultCategory" stepKey="deleteNewRootCategory"/>
             <magentoCLI command="config:set {{DisableCategoriesPathProductUrls.path}} {{DisableCategoriesPathProductUrls.value}}" stepKey="disableUseCategoriesPath"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
 
         <actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="navigateToCreatedDefaultCategory">
diff --git a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml
index 99037a5c89af1..4880d438373f4 100644
--- a/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml
+++ b/app/code/Magento/CatalogUrlRewrite/Test/Mftf/Test/StorefrontCategoryAccessibleWhenSuffixIsNullTest.xml
@@ -21,7 +21,9 @@
             <magentoCLI command="config:set catalog/seo/category_url_suffix ''" stepKey="setCategoryUrlSuffix"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0"
                         stepKey="setCategoryProductRewrites"/>
-            <magentoCLI command="cache:flush" stepKey="flushCacheBefore"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheBefore">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <createData entity="_defaultCategory" stepKey="createCategory"/>
         </before>
         <after>
@@ -30,7 +32,9 @@
                         stepKey="restoreCategoryUrlSuffix"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1"
                         stepKey="restoreCategoryProductRewrites"/>
-            <magentoCLI command="cache:flush" stepKey="flushCacheAfter"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfter">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
 
         <amOnPage url="/$$createCategory.name$$" stepKey="onCategoryPage"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml
index dd454d7aca10b..12e1a6e9872d3 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/AddressStateFieldShouldNotAcceptJustIntegerValuesTest.xml
@@ -23,8 +23,12 @@
             <createData entity="ApiSimpleProduct" stepKey="createProduct">
                 <requiredEntity createDataKey="createCategory"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml
index ab0453e1faa18..a1065daedd4f8 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/AdminCheckConfigsChangesIsNotAffectedStartedCheckoutProcessTest.xml
@@ -84,7 +84,9 @@
         <actionGroup ref="AdminChangeFlatRateShippingMethodStatusActionGroup" stepKey="enableFlatRateShippingStatus"/>
 
         <!-- Flush cache -->
-        <magentoCLI command="cache:flush" stepKey="cacheFlush"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Back to the Checkout and refresh the page -->
         <switchToPreviousTab stepKey="switchToPreviousTab"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleDynamicProductFromShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleDynamicProductFromShoppingCartTest.xml
index 5fd201290655a..96a236336993f 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleDynamicProductFromShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleDynamicProductFromShoppingCartTest.xml
@@ -38,7 +38,9 @@
                 <requiredEntity createDataKey="bundleOption"/>
                 <requiredEntity createDataKey="createSimpleProduct"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete category -->
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleFixedProductFromShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleFixedProductFromShoppingCartTest.xml
index 603ee1ecea4df..b64b59ef6109c 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleFixedProductFromShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/DeleteBundleFixedProductFromShoppingCartTest.xml
@@ -33,7 +33,9 @@
                 <requiredEntity createDataKey="createBundleOption"/>
                 <requiredEntity createDataKey="createSimpleProduct"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete bundle product data -->
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml
index c61545e51d535..f34becdd35af1 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/EditShippingAddressOnePageCheckoutTest.xml
@@ -26,8 +26,12 @@
             </createData>
             <createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
             <!--Clear cache and reindex-->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml
index ceaf72fff83bb..313f5997e0af0 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml
@@ -26,8 +26,12 @@
                 <field key="price">100.00</field>
                 <requiredEntity createDataKey="createCategory"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml
index e678bb0d2a87b..a64ed22315b42 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutWithAllProductTypesTest.xml
@@ -88,7 +88,9 @@
             <!-- Create customer -->
             <createData entity="Simple_Customer_Without_Address" stepKey="createCustomer"/>
 
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove static.magento.com"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/ShoppingCartAndMiniShoppingCartPerCustomerTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/ShoppingCartAndMiniShoppingCartPerCustomerTest.xml
index 571aa24209389..70faa3721efe9 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/ShoppingCartAndMiniShoppingCartPerCustomerTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/ShoppingCartAndMiniShoppingCartPerCustomerTest.xml
@@ -20,7 +20,9 @@
         </annotations>
         <before>
             <!-- Flush cache -->
-            <magentoCLI command="cache:flush" stepKey="clearCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <!-- Create two customers -->
             <createData entity="Simple_US_Customer" stepKey="createFirstCustomer"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartWithoutAnySelectedOptionTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartWithoutAnySelectedOptionTest.xml
index a5c8eb0da6530..b65cfe0eb574f 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartWithoutAnySelectedOptionTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartWithoutAnySelectedOptionTest.xml
@@ -23,7 +23,9 @@
                 <requiredEntity createDataKey="createCategory"/>
             </createData>
             <updateData createDataKey="createProduct" entity="productWithOptions" stepKey="updateProductWithCustomOptions"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData  createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
index bd81a1cfab604..ec02c999d6703 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
@@ -25,7 +25,9 @@
             <createData entity="_defaultProduct" stepKey="product">
                 <requiredEntity createDataKey="category"/>
             </createData>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml
index af3a2e6870cd7..8d508f381c765 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontFreeShippingRecalculationAfterCouponCodeAddedTest.xml
@@ -33,7 +33,9 @@
             <createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/>
             <createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>
             <createData entity="MinimumOrderAmount90" stepKey="minimumOrderAmount90"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminCreateCartPriceRuleWithCouponCodeActionGroup" stepKey="createCartPriceRule">
                 <argument name="ruleName" value="CatPriceRule"/>
                 <argument name="couponCode" value="CatPriceRule.coupon_code"/>
@@ -50,7 +52,10 @@
             <createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/>
             <createData entity="DefaultMinimumOrderAmount" stepKey="defaultMinimumOrderAmount"/>
             <deleteData createDataKey="createSimpleUsCustomer" stepKey="deleteCustomer"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache2"/>
+
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule">
                 <argument name="ruleName" value="{{CatPriceRule.name}}"/>
             </actionGroup>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartTest.xml
index e82f3c0588835..38597d690ad37 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartTest.xml
@@ -46,8 +46,12 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct2"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartWithDisableMiniCartSidebarTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartWithDisableMiniCartSidebarTest.xml
index 5d5e2b3a91f49..edb6f8ba97b27 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartWithDisableMiniCartSidebarTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddBundleDynamicProductToShoppingCartWithDisableMiniCartSidebarTest.xml
@@ -49,8 +49,12 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct2"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
@@ -111,7 +115,9 @@
 
         <!--Enabled Mini Cart -->
         <magentoCLI stepKey="enableShoppingCartSidebar" command="config:set checkout/sidebar/display 1"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <reloadPage stepKey="reloadThePage"/>
 
         <!--Click on mini cart-->
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddConfigurableProductToShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddConfigurableProductToShoppingCartTest.xml
index 21e785de6cab3..146ecde047016 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddConfigurableProductToShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddConfigurableProductToShoppingCartTest.xml
@@ -110,8 +110,12 @@
                 <requiredEntity createDataKey="createConfigProduct"/>
                 <requiredEntity createDataKey="createConfigChildProduct3"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteSimpleProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml
index bbc0a29000a77..4f54363bd8dc4 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddDownloadableProductToShoppingCartTest.xml
@@ -28,8 +28,12 @@
             <createData entity="downloadableLink2" stepKey="addDownloadableLink2">
                 <requiredEntity createDataKey="createDownloadableProduct"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddGroupedProductToShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddGroupedProductToShoppingCartTest.xml
index 3e2f32a4ab055..13a179fe52444 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddGroupedProductToShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddGroupedProductToShoppingCartTest.xml
@@ -43,7 +43,9 @@
                 <requiredEntity createDataKey="product"/>
                 <requiredEntity createDataKey="simple3"/>
             </updateData>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddOneBundleMultiSelectOptionToTheShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddOneBundleMultiSelectOptionToTheShoppingCartTest.xml
index af12aecb6345a..eff18f9081b67 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddOneBundleMultiSelectOptionToTheShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddOneBundleMultiSelectOptionToTheShoppingCartTest.xml
@@ -46,8 +46,12 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct2"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartTest.xml
index e8a72b6e88109..6cf5a390a964d 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddProductWithAllTypesOfCustomOptionToTheShoppingCartTest.xml
@@ -23,7 +23,9 @@
                 <requiredEntity createDataKey="createCategory"/>
             </createData>
             <updateData createDataKey="createProduct" entity="productWithOptions" stepKey="updateProductWithCustomOptions"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData  createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddTwoBundleMultiSelectOptionsToTheShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddTwoBundleMultiSelectOptionsToTheShoppingCartTest.xml
index 265f9a7cbbc98..cd1c0542c5c5b 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddTwoBundleMultiSelectOptionsToTheShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontAddTwoBundleMultiSelectOptionsToTheShoppingCartTest.xml
@@ -46,8 +46,12 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct2"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndSummaryBlockItemDisplayWithDefaultDisplayLimitationTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndSummaryBlockItemDisplayWithDefaultDisplayLimitationTest.xml
index 0b52caa7165af..4c0484f88d549 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndSummaryBlockItemDisplayWithDefaultDisplayLimitationTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartAndSummaryBlockItemDisplayWithDefaultDisplayLimitationTest.xml
@@ -51,7 +51,9 @@
             <createData entity="SimpleProduct2" stepKey="simpleProduct10">
                 <field key="price">100.00</field>
             </createData>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWhenMoreItemsAddedToTheCartThanDefaultDisplayLimitTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWhenMoreItemsAddedToTheCartThanDefaultDisplayLimitTest.xml
index a496ff68c0cd0..b399d76e86e2f 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWhenMoreItemsAddedToTheCartThanDefaultDisplayLimitTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWhenMoreItemsAddedToTheCartThanDefaultDisplayLimitTest.xml
@@ -54,8 +54,12 @@
             <createData entity="SimpleProduct2" stepKey="simpleProduct11">
                 <field key="price">110.00</field>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWithDefaultDisplayLimitAndDefaultTotalQuantityTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWithDefaultDisplayLimitAndDefaultTotalQuantityTest.xml
index 8e84deafea9f2..e0aeb2f93d30c 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWithDefaultDisplayLimitAndDefaultTotalQuantityTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCartItemDisplayWithDefaultDisplayLimitAndDefaultTotalQuantityTest.xml
@@ -49,7 +49,9 @@
             <createData entity="SimpleProduct2" stepKey="simpleProduct10">
                 <field key="price">100.00</field>
             </createData>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckSimpleProductCartItemDisplayWithDefaultLimitationTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckSimpleProductCartItemDisplayWithDefaultLimitationTest.xml
index 79e46d093c2f6..ce6d465408382 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckSimpleProductCartItemDisplayWithDefaultLimitationTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckSimpleProductCartItemDisplayWithDefaultLimitationTest.xml
@@ -54,7 +54,9 @@
             <createData entity="SimpleProduct2" stepKey="simpleProduct11">
                 <field key="price">110.00</field>
             </createData>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckVirtualProductCountDisplayWithCustomDisplayConfigurationTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckVirtualProductCountDisplayWithCustomDisplayConfigurationTest.xml
index 9f3eacbf5f455..c1dc0b7e62ba7 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckVirtualProductCountDisplayWithCustomDisplayConfigurationTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckVirtualProductCountDisplayWithCustomDisplayConfigurationTest.xml
@@ -34,7 +34,9 @@
             <createData entity="VirtualProduct" stepKey="virtualProduct4">
                 <field key="price">40.00</field>
             </createData>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="virtualProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml
index 27d4e4c207ae7..e25fec16e0ca5 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutDisabledBundleProductTest.xml
@@ -36,8 +36,12 @@
                 <requiredEntity createDataKey="bundleOption"/>
                 <requiredEntity createDataKey="createSimpleProduct"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="cacheFlush"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete category -->
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml
index 38efc9d7eca24..2cfb4ad3d1989 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithDifferentShippingAndBillingAddressAndProductWithTierPricesTest.xml
@@ -33,7 +33,9 @@
                 <argument name="price" value="Fixed"/>
                 <argument name="amount" value="24.00"/>
             </actionGroup>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set {{DisablePaymentBankTransferConfigData.path}} {{DisablePaymentBankTransferConfigData.value}}" stepKey="enableGuestCheckout"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml
index 0042c73b13826..e97f17ab5f917 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckoutWithSpecialPriceProductsTest.xml
@@ -90,8 +90,12 @@
             <click selector="{{AdminProductFormAdvancedPricingSection.save}}" stepKey="clickSaveProduct1"/>
             <waitForPageLoad time='60' stepKey="waitForSpecialPriceProductSaved"/>
             <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSaveSuccessMessage1"/>
-            <magentoCLI command="indexer:reindex"  stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml
index b5f573aba7561..e97f7f0d3e8e4 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml
@@ -23,7 +23,9 @@
                 <requiredEntity createDataKey="createCategory"/>
             </createData>
             <createData entity="Simple_US_Customer" stepKey="createCustomer"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml
index 4c3c1561a2445..03ca968c9a000 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithMultipleAddressesAndTaxRatesTest.xml
@@ -44,8 +44,12 @@
             <click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>
 
             <!--TODO: REMOVE AFTER FIX MC-21717 -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush full_page" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
         </before>
         <after>
             <!-- Go to the tax rule page and delete the row we created-->
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest.xml
index d042a15e3c958..5e5c37cc9e486 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTestWithRestrictedCountriesForPaymentTest.xml
@@ -28,8 +28,12 @@
             <createData entity="Simple_US_Customer" stepKey="simpleuscustomer"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml
index d116d0049c9df..6e304ff9cfb50 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteBundleProductFromMiniShoppingCartTest.xml
@@ -40,7 +40,9 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct1"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml
index eb8b047b57288..d012d44d84052 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromMiniShoppingCartTest.xml
@@ -63,8 +63,12 @@
                 <requiredEntity createDataKey="createConfigProduct"/>
                 <requiredEntity createDataKey="createConfigChildProduct1"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData  createDataKey="createConfigChildProduct1" stepKey="deleteSimpleProduct1"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml
index 8a52fa7740b95..d2bcaedb74fd1 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontDeleteDownloadableProductFromMiniShoppingCartTest.xml
@@ -27,8 +27,12 @@
             <createData entity="downloadableLink1" stepKey="addDownloadableLink1">
                 <requiredEntity createDataKey="createDownloadableProduct"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI stepKey="removeDownloadableDomain" command="downloadable:domains:remove example.com static.magento.com"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml
index 0d69306a4b1ba..be5cf143f13dc 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml
@@ -24,8 +24,12 @@
             </createData>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest.xml
index 0520accdd4b84..7660df18407d5 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTestWithRestrictedCountriesForPaymentTest.xml
@@ -24,8 +24,12 @@
             </createData>
             <magentoCLI stepKey="allowSpecificValue" command="config:set payment/checkmo/allowspecific 1"/>
             <magentoCLI stepKey="specificCountryValue" command="config:set payment/checkmo/specificcountry GB"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml
index dbb695fb4fb00..53155a34336a6 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutUsingFreeShippingAndTaxesTest.xml
@@ -90,8 +90,12 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct2"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule">
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml
index 12e2820821c87..a7a0917532dcb 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontUpdatePriceInShoppingCartAfterProductSaveTest.xml
@@ -30,7 +30,9 @@
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
             <actionGroup ref="SetCustomerDataLifetimeActionGroup" stepKey="setDefaultCustomerDataLifetime"/>
-            <magentoCLI command="indexer:reindex customer_grid" stepKey="reindexCustomerGrid"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexCustomerGrid">
+                <argument name="indices" value="customer_grid"/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
         <!--Go to product page-->
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml
index 778967c187f65..b7c1d7b83e9b7 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCheckoutTest.xml
@@ -36,11 +36,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="product" stepKey="deleteProduct"/>
             <deleteData createDataKey="category" stepKey="deleteCategory"/>
         </after>
diff --git a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml
index 5327979154389..d0edd4cf1cb64 100644
--- a/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml
+++ b/app/code/Magento/Config/Test/Mftf/Test/CheckingCountryDropDownWithOneAllowedCountryTest.xml
@@ -22,7 +22,9 @@
             <createData entity="EnableAdminAccountAllowCountry" stepKey="setAllowedCountries"/>
         </before>
         <after>
-            <magentoCLI stepKey="flushCache" command="cache:flush"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <createData entity="DisableAdminAccountAllowCountry" stepKey="setDefaultValueForAllowCountries"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
             <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
@@ -33,7 +35,9 @@
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
          <!--Flush Magento Cache-->
-        <magentoCLI stepKey="flushCache" command="cache:flush"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
          <!--Create a customer account from Storefront-->
         <actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
         <actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml
index 10cdcea2855d6..8362fcd980d65 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductLongSkuTest.xml
@@ -91,7 +91,9 @@
         <see selector="{{AdminProductFormConfigurationsSection.currentVariationsPriceCells}}" userInput="{{ProductWithLongNameSku.price}}" stepKey="seeConfigurationsPrice"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
          <!--Assert storefront category list page-->
         <amOnPage url="/" stepKey="amOnStorefront"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml
index 32117fdfe4366..f53465b6536d7 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithCreatingCategoryAndAttributeTest.xml
@@ -102,7 +102,9 @@
         </actionGroup>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Assert configurable product in category -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml
index 3bf5666d5a997..2d6692c22310a 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithDisabledChildrenProductsTest.xml
@@ -111,7 +111,9 @@
         <actionGroup ref="DisplayOutOfStockProductActionGroup" stepKey="displayOutOfStockProduct"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Assert configurable product is not present in category -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml
index fa8866fa7d91c..f2d419d4789fa 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithImagesTest.xml
@@ -133,7 +133,9 @@
         <actionGroup ref="SaveConfigurableProductAddToCurrentAttributeSetActionGroup" stepKey="saveProduct"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Assert configurable product in category -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml
index e76d14f3a6aae..6c23478bde44a 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDisplayOutOfStockProductsTest.xml
@@ -125,7 +125,9 @@
         <actionGroup ref="DisplayOutOfStockProductActionGroup" stepKey="displayOutOfStockProduct"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Assert configurable product in category -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml
index 9516216d4a62e..7edf2575e55d6 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithThreeProductDontDisplayOutOfStockProductsTest.xml
@@ -121,7 +121,9 @@
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveConfigurableProduct"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Assert configurable product in category -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml
index f2a8e78523758..245c93e865323 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsAssignedToCategoryTest.xml
@@ -106,7 +106,9 @@
         <click selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="clickClearFiltersAfter"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Assert configurable product in category -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml
index 273e37089973b..e9f0ac9a2e88b 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateConfigurableProductWithTwoOptionsWithoutAssignedToCategoryTest.xml
@@ -96,7 +96,9 @@
         <click selector="{{AdminProductGridFilterSection.clearFilters}}" stepKey="clickClearFiltersAfter"/>
 
         <!-- Flash cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Assert configurable product on product page -->
         <amOnPage url="{{ApiConfigurableProduct.urlKey}}.html" stepKey="amOnProductPage"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
index 13c4cad312188..e34bf7c22f06b 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/EndToEndB2CLoggedInUserTest.xml
@@ -78,8 +78,12 @@
 
             <!-- Reindex invalidated indices after product attribute has been created/deleted -->
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindexAll"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexAll">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
 
         <!-- Verify Configurable Product in checkout cart items -->
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml
index fbf23597a3927..0a781069b2f8c 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductChildSearchTest.xml
@@ -145,8 +145,12 @@
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         </after>
 
-        <magentoCLI command="indexer:reindex" stepKey="reindexAll"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexAll">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Quick search the storefront for the first attribute option -->
         <amOnPage stepKey="goToStoreFront" url="{{StorefrontHomePage.url}}"/>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml
index ca0426f1b97d5..e20a6dcfa09b8 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductViewTest/StorefrontConfigurableProductGridViewTest.xml
@@ -27,8 +27,12 @@
                 <argument name="category" value="$$createCategory$$"/>
             </actionGroup>
             <!-- TODO: REMOVE AFTER FIX MC-21717 -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush eav" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="eav"/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml
index 7662779a6955f..3519503c1e287 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontShouldSeeOnlyConfigurableProductChildAssignedToSeparateCategoryTest.xml
@@ -112,7 +112,9 @@
             <argument name="categoryName" value="$$secondCategory.name$$"/>
         </actionGroup>
 
-        <magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext" stepKey="reindexSearchIndex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexSearchIndex">
+            <argument name="indices" value="catalogsearch_fulltext"/>
+        </actionGroup>
 
         <!-- Go to storefront to view child product -->
         <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goToSecondCategoryStorefront">
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml
index ef9f71da0ebca..363a8ea4d4fd6 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontSortingByPriceForConfigurableWithCatalogRuleAppliedTest.xml
@@ -153,8 +153,12 @@
             <argument name="discountAmount" value="{{CatalogRuleByPercentWith96Amount.discount_amount}}"/>
         </actionGroup>
         <actionGroup ref="AdminCatalogPriceRuleSaveAndApplyActionGroup" stepKey="saveAndApplyCatalogPriceRule"/>
-        <magentoCLI command="indexer:reindex" arguments="catalogsearch_fulltext catalog_category_product catalog_product_price catalogrule_rule" stepKey="reindexIndices"/>
-        <magentoCLI command="cache:clean" arguments="full_page" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexIndices">
+            <argument name="indices" value="catalogsearch_fulltext catalog_category_product catalog_product_price catalogrule_rule"/>
+        </actionGroup>
+        <actionGroup ref="CliCacheCleanActionGroup" stepKey="fullCache">
+            <argument name="tags" value="full_page"/>
+        </actionGroup>
 
         <!--Reopen category with products and Sort by price desc-->
         <actionGroup ref="GoToStorefrontCategoryPageByParametersActionGroup" stepKey="goToStorefrontCategoryPage2">
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml
index 7acece767760d..9777722b6faf5 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVerifyConfigurableProductLayeredNavigationTest.xml
@@ -139,7 +139,9 @@
         <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Open Category in Store Front and select product attribute option from sidebar -->
         <actionGroup ref="SelectStorefrontSideBarAttributeOption" stepKey="selectStorefrontProductAttributeOption">
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml
index 801dfdb8540e8..976be77122547 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml
@@ -190,8 +190,12 @@
         <click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="generateConfigsForDuplicatedProduct"/>
         <waitForPageLoad stepKey="waitForDuplicatedProductPageLoad"/>
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveDuplicatedProduct"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Assert configurable product in category-->
         <comment userInput="Assert configurable product in category" stepKey="commentAssertProductInCategoryPage"/>
         <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onStorefrontCategoryPage"/>
diff --git a/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml b/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml
index 0c46ed4729d66..2300740f23c7d 100644
--- a/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml
+++ b/app/code/Magento/Contact/Test/Mftf/Test/StorefrontVerifySecureURLRedirectContactTest.xml
@@ -25,11 +25,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
         <amOnUrl url="http://{$hostname}/contact" stepKey="goToUnsecureContactURL"/>
diff --git a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml
index f7e6e05347345..5cfb4b8f0bb2e 100644
--- a/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml
+++ b/app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminCurrencyConverterAPIConfigurationTest.xml
@@ -26,7 +26,9 @@
             <!--Set currency allow config-->
             <magentoCLI command="config:set currency/options/allow RHD,CHW,CHE,AMD,EUR,USD" stepKey="setCurrencyAllow"/>
             <!--TODO: Add Api key-->
-            <magentoCLI command="cache:flush" stepKey="clearCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <!--Create product-->
             <createData entity="SimpleSubCategory" stepKey="createCategory"/>
             <createData entity="SimpleProduct" stepKey="createProduct">
@@ -68,7 +70,9 @@
         <see selector="{{StorefrontCategoryMainSection.productPrice}}" userInput="€" stepKey="seeEURInPrice"/>
         <!--Set allowed currencies greater then 10-->
         <magentoCLI command="config:set currency/options/allow RHD,CHW,YER,ZMK,CHE,EUR,USD,AMD,RUB,DZD,ARS,AWG" stepKey="setCurrencyAllow"/>
-        <magentoCLI command="cache:flush" stepKey="clearCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Import rates from Currency Converter API with currencies greater then 10-->
         <amOnPage url="{{AdminCurrencyRatesPage.url}}" stepKey="onCurrencyRatePageSecondTime"/>
         <actionGroup ref="AdminImportCurrencyRatesActionGroup" stepKey="importCurrencyRatesGreaterThen10">
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml
index ab5e332aeed64..6aec5440193a2 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsNoTest.xml
@@ -20,7 +20,9 @@
         </annotations>
         <before>
             <magentoCLI command="config:set customer/create_account/viv_disable_auto_group_assign_default 0" stepKey="setConfigDefaultIsNo"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml
index 0bf221d49ab74..d48fb90b24ec2 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCheckDefaultValueDisableAutoGroupChangeIsYesTest.xml
@@ -20,12 +20,16 @@
         </annotations>
         <before>
             <magentoCLI command="config:set customer/create_account/viv_disable_auto_group_assign_default 1" stepKey="setConfigDefaultIsYes"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/>
         </before>
         <after>
             <magentoCLI command="config:set customer/create_account/viv_disable_auto_group_assign_default 0" stepKey="setConfigDefaultIsNo"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
         </after>
 
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml
index 64e8520323184..cb003ed837294 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerTest.xml
@@ -20,7 +20,9 @@
             <group value="create"/>
         </annotations>
         <before>
-            <magentoCLI command="indexer:reindex customer_grid" stepKey="reindexCustomerGrid"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexCustomerGrid">
+                <argument name="indices" value="customer_grid"/>
+            </actionGroup>
         </before>
         <after>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
@@ -35,7 +37,9 @@
         <fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminCustomerAccountInformationSection.email}}" stepKey="fillEmail"/>
         <click selector="{{AdminCustomerMainActionsSection.saveButton}}" stepKey="saveCustomer"/>
         <seeElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="assertSuccessMessage"/>
-        <magentoCLI stepKey="reindex" command="indexer:reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
         <reloadPage stepKey="reloadPage"/>
         <waitForPageLoad stepKey="waitForLoad2"/>
         <click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilter"/>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml
index 52a2483096aaf..61d82ab010afa 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminCreateCustomerWithCustomGroupTest.xml
@@ -39,7 +39,9 @@
         <fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminCustomerAccountInformationSection.email}}" stepKey="fillEmail"/>
         <click selector="{{AdminCustomerMainActionsSection.saveButton}}" stepKey="saveCustomer"/>
         <seeElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="assertSuccessMessage"/>
-        <magentoCLI stepKey="flushMagentoCache" command="cache:flush" />
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <reloadPage stepKey="reloadPage"/>
 
         <!--Verify Customer in grid -->
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml
index 8494a94f0c122..615a6ebcf24cc 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridTest.xml
@@ -20,7 +20,9 @@
 
         <before>
             <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml
index 340295df04da2..57446a1ee0c72 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml
@@ -20,7 +20,9 @@
 
         <before>
             <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml
index 1630743da4922..f08ea83a70da6 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminDeleteDefaultBillingCustomerAddressTest.xml
@@ -20,7 +20,9 @@
 
         <before>
             <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml
index 5721c46d5e4b9..257d4c9b2e3c2 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminResetCustomerPasswordTest.xml
@@ -25,8 +25,12 @@
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--Edit customer info-->
         <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="OpenEditCustomerFrom">
             <argument name="customer" value="$$customer$$"/>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml
index 10da9284d45dc..b13a06b9ef858 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminSearchCustomerAddressByKeywordTest.xml
@@ -20,7 +20,9 @@
 
         <before>
             <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml
index c9805ebcc90ed..3f95e55c56132 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminDeleteCustomerAddressTest.xml
@@ -20,7 +20,9 @@
         </annotations>
         <before>
             <createData stepKey="customer" entity="Simple_US_Customer_Multiple_Addresses"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml
index 0d550416167aa..8af07bc2c2d53 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AdminUpdateCustomerTest/AdminUpdateCustomerInfoFromDefaultToNonDefaultTest.xml
@@ -20,7 +20,9 @@
         </annotations>
         <before>
             <createData stepKey="customer" entity="Simple_Customer_Without_Address"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
         </before>
         <after>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml
index 60caaf64f05b7..9b26391d0b162 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/AllowedCountriesRestrictionApplyOnBackendTest.xml
@@ -42,7 +42,9 @@
             <!--Set account sharing option - Default value is 'Per Website'-->
             <comment userInput="Set account sharing option - Default value is 'Per Website'" stepKey="setAccountSharingOption"/>
             <createData entity="CustomerAccountSharingDefault" stepKey="setToAccountSharingToDefault"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!--delete all created data and set main website country options to default-->
@@ -60,8 +62,12 @@
             <actionGroup ref="SetWebsiteCountryOptionsToDefaultActionGroup" stepKey="setCountryOptionsToDefault"/>
             <createData entity="CustomerAccountSharingSystemValue" stepKey="setAccountSharingToSystemValue"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <!--Check that all countries are allowed initially and get amount-->
         <comment userInput="Check that all countries are allowed initially and get amount" stepKey="checkAllCountriesAreAllowed"/>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml
index 317f2c2825ca7..81208da18373c 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontClearAllCompareProductsTest.xml
@@ -102,8 +102,12 @@
                 <requiredEntity createDataKey="createDownloadableProduct1"/>
             </createData>
 
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <!-- Login -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin1"/>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml
index 8cd35f4147636..47b61b332f571 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateCustomerWithDateOfBirthTest.xml
@@ -35,7 +35,9 @@
             <argument name="Customer" value="CustomerEntityOne"/>
             <argument name="dob" value="{{EN_US_DATE.short4DigitYear}}"/>
         </actionGroup>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
         <actionGroup ref="DeleteCustomerByEmailActionGroup" stepKey="deleteNewUser">
             <argument name="email" value="{{CustomerEntityOne.email}}"/>
         </actionGroup>
diff --git a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml
index f504af2334e10..410070234b9c0 100644
--- a/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml
+++ b/app/code/Magento/Customer/Test/Mftf/Test/StorefrontVerifySecureURLRedirectCustomerTest.xml
@@ -25,11 +25,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
         <amOnUrl url="http://{$hostname}/customer" stepKey="goToUnsecureCustomerURL"/>
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml
index 850a73cd354a5..2c9cf38ab50ae 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithDefaultSetLinksTest.xml
@@ -24,8 +24,12 @@
             <!-- Create category -->
             <createData entity="SimpleSubCategory" stepKey="createCategory"/>
             <!-- Reindex and clear page cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" arguments="full_page" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
             <!-- Login as admin -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
         </before>
@@ -76,8 +80,12 @@
 
         <!-- Save product -->
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Find downloadable product in grid -->
         <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml
index d7e0ce3b2ca22..5f89db581a7c1 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/StorefrontVerifySecureURLRedirectDownloadableTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml
index d612f5bd17a2f..c2c8644a6fcf5 100644
--- a/app/code/Magento/Elasticsearch/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml
+++ b/app/code/Magento/Elasticsearch/Test/Mftf/Suite/SearchEngineElasticsearchSuite.xml
@@ -9,8 +9,12 @@
     <suite name="SearchEngineElasticsearchSuite">
         <before>
             <magentoCLI stepKey="setSearchEngineToElasticsearch" command="config:set {{SearchEngineElasticsearchConfigData.path}} {{SearchEngineElasticsearchConfigData.value}}"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after></after>
         <include>
diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml
index a94a6a2e3d133..1e067f1560404 100644
--- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml
+++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontCheckAdvancedSearchOnElasticSearchTest.xml
@@ -36,7 +36,9 @@
 
             <!-- Reindex invalidated indices after product attribute has been created/deleted -->
             <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
-            <magentoCLI command="cache:flush" arguments="full_page" stepKey="flushFullPageCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushFullPageCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml
index d9988577009bc..1c4d53b273661 100644
--- a/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml
+++ b/app/code/Magento/Elasticsearch/Test/Mftf/Test/StorefrontProductQuickSearchWithDecimalAttributeUsingElasticSearchTest.xml
@@ -55,8 +55,12 @@
             <!--Delete attribute-->
             <deleteData createDataKey="customAttribute" stepKey="deleteCustomAttribute"/>
             <!--Reindex and clear cache-->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:clean" stepKey="cleanCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
         </after>
         <!--Navigate to backend and update value for custom attribute -->
@@ -77,8 +81,12 @@
         </actionGroup>
 
         <!--Reindex and clear cache-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:clean" stepKey="cleanCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
 
         <!-- Navigate to Storefront and search -->
diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml
index a15c8f5e30e86..75e355126ff2b 100644
--- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml
+++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticSearchForChineseLocaleTest.xml
@@ -26,7 +26,9 @@
             <magentoCLI command="config:set --scope={{GeneralLocalCodeConfigsForChina.scope}} --scope-code={{GeneralLocalCodeConfigsForChina.scope_code}} {{GeneralLocalCodeConfigsForChina.path}} {{GeneralLocalCodeConfigsForChina.value}}" stepKey="setLocaleToChina"/>
             <comment userInput="Moved to appropriate test suite" stepKey="enableElasticsearch6"/>
             <comment userInput="Moved to appropriate test suite" stepKey="checkConnection"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <createData entity="ApiCategory" stepKey="createCategory"/>
             <createData entity="ApiSimpleProduct" stepKey="createProduct">
                 <requiredEntity createDataKey="createCategory"/>
diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearchSearchInvalidValueTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearchSearchInvalidValueTest.xml
index e173090bfa318..fa05908b29639 100644
--- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearchSearchInvalidValueTest.xml
+++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontElasticsearchSearchInvalidValueTest.xml
@@ -26,8 +26,12 @@
             <!--Set Minimal Query Length-->
             <magentoCLI command="config:set {{SetMinQueryLength2Config.path}} {{SetMinQueryLength2Config.value}}" stepKey="setMinQueryLength"/>
             <!--Reindex indexes and clear cache-->
-            <magentoCLI command="indexer:reindex catalogsearch_fulltext" stepKey="reindex"/>
-            <magentoCLI command="cache:flush config" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value="catalogsearch_fulltext"/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
         </before>
         <after>
             <!--Set configs to default-->
@@ -48,8 +52,12 @@
             <waitForPageLoad stepKey="waitForProductIndexPage"/>
             <actionGroup ref="DeleteProductsIfTheyExistActionGroup" stepKey="deleteProduct"/>
             <actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetFiltersIfExist"/>
-            <magentoCLI command="indexer:reindex catalogsearch_fulltext" stepKey="reindex"/>
-            <magentoCLI command="cache:flush config" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value="catalogsearch_fulltext"/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
         <!--Create new searchable product attribute-->
@@ -80,8 +88,12 @@
         <fillField selector="{{AdminProductFormSection.attributeRequiredInput(textProductAttribute.attribute_code)}}" userInput="searchable" stepKey="fillTheAttributeRequiredInputField"/>
         <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
         <!-- TODO: REMOVE AFTER FIX MC-21717 -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush eav" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value="eav"/>
+        </actionGroup>
         <!--Assert search results on storefront-->
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
         <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchForFirstSearchTerm">
diff --git a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontProductQuickSearchUsingElasticSearchTest.xml b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontProductQuickSearchUsingElasticSearchTest.xml
index 9a025a6d04b14..653c460733976 100644
--- a/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontProductQuickSearchUsingElasticSearchTest.xml
+++ b/app/code/Magento/Elasticsearch6/Test/Mftf/Test/StorefrontProductQuickSearchUsingElasticSearchTest.xml
@@ -31,7 +31,9 @@
             </createData>
             <magentoCLI command="config:set {{CustomGridPerPageValuesConfigData.path}} {{CustomGridPerPageValuesConfigData.value}}" stepKey="setCustomGridPerPageValues"/>
             <magentoCLI command="config:set {{CustomGridPerPageDefaultConfigData.path}} {{CustomGridPerPageDefaultConfigData.value}}" stepKey="setCustomGridPerPageDefaults"/>
-            <magentoCLI stepKey="flushConfigCache" command="cache:flush config"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushConfigCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
             <magentoCron groups="index" stepKey="runCronIndex"/>
         </before>
 
diff --git a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml
index 1c61bd290f005..aea5fcf683ce2 100644
--- a/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml
+++ b/app/code/Magento/Fedex/Test/Mftf/Test/AdminCreatingShippingLabelTest.xml
@@ -50,8 +50,12 @@
             <magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} {{DE_Address_Berlin_Not_Default_Address.postcode}}" stepKey="setOriginZipCode"/>
             <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} '{{DE_Address_Berlin_Not_Default_Address.street[0]}}'" stepKey="setOriginStreetAddress"/>
             <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} '{{US_Address_California.street[0]}}'" stepKey="setOriginStreetAddress2"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!--Reset configs-->
@@ -70,8 +74,12 @@
             <magentoCLI command="config:set {{AdminShippingSettingsOriginZipCodeConfigData.path}} ''" stepKey="setOriginZipCode"/>
             <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddressConfigData.path}} ''" stepKey="setOriginStreetAddress"/>
             <magentoCLI command="config:set {{AdminShippingSettingsOriginStreetAddress2ConfigData.path}} ''" stepKey="setOriginStreetAddress2"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <!--Delete created data-->
             <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml
index bd6785eb5e41b..a909582c32b3d 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdminAssociateGroupedProductToWebsitesTest.xml
@@ -53,7 +53,9 @@
             </actionGroup>
 
             <!-- Reindex -->
-            <magentoCLI command="indexer:reindex" stepKey="reindexAllIndexes"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexAllIndexes">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByDescriptionTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByDescriptionTest.xml
index 599736e7e817e..4aa4e99e79489 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByDescriptionTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByDescriptionTest.xml
@@ -30,8 +30,12 @@
                 <requiredEntity createDataKey="product"/>
                 <requiredEntity createDataKey="simple2"/>
             </updateData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByNameTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByNameTest.xml
index 853304c557c8f..06dde74de20f9 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByNameTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByNameTest.xml
@@ -30,8 +30,12 @@
                 <requiredEntity createDataKey="product"/>
                 <requiredEntity createDataKey="simple2"/>
             </updateData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByPriceTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByPriceTest.xml
index 4e67f2bd50439..66e1b60331e97 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByPriceTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByPriceTest.xml
@@ -39,8 +39,12 @@
             <getData entity="GetProduct" stepKey="arg3">
                 <requiredEntity createDataKey="simple2"/>
             </getData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByShortDescriptionTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByShortDescriptionTest.xml
index 4b86a2c085003..79b465abe2ac6 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByShortDescriptionTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductByShortDescriptionTest.xml
@@ -30,8 +30,12 @@
                 <requiredEntity createDataKey="product"/>
                 <requiredEntity createDataKey="simple2"/>
             </updateData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductBySkuTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductBySkuTest.xml
index 6e67e41fa447b..c196abbce99ed 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductBySkuTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/AdvanceCatalogSearchGroupedProductTest/AdvanceCatalogSearchGroupedProductBySkuTest.xml
@@ -29,8 +29,12 @@
                 <requiredEntity createDataKey="product"/>
                 <requiredEntity createDataKey="simple2"/>
             </updateData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest.xml
index aaa9cf5b2f925..35f6d625b8ab3 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/StorefrontAdvanceCatalogSearchGroupedProductBySkuWithHyphenTest.xml
@@ -35,8 +35,12 @@
                 <requiredEntity createDataKey="product"/>
                 <requiredEntity createDataKey="simple2"/>
             </updateData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
diff --git a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml
index 84619a5213128..51cf4aa26a1b1 100644
--- a/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml
+++ b/app/code/Magento/Indexer/Test/Mftf/Test/AdminSystemIndexManagementGridChangesTest.xml
@@ -23,15 +23,23 @@
 
             <!--Open Index Management Page and Select Index mode "Update by Schedule" -->
             <magentoCLI command="indexer:set-mode" arguments="schedule" stepKey="setIndexerModeSchedule"/>
-            <magentoCLI command="indexer:reindex" stepKey="indexerReindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/></before>
         <after>
             <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
             <magentoCLI command="indexer:set-mode" arguments="realtime" stepKey="setIndexerModeRealTime"/>
-            <magentoCLI command="indexer:reindex" stepKey="indexerReindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="indexerReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
 
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml
index cdd692763d399..49f2294b978ee 100644
--- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/ShopByButtonInMobileTest.xml
@@ -50,8 +50,12 @@
         </actionGroup>
         <selectOption selector="{{AdminProductFormSection.customSelectField($$attribute.attribute[attribute_code]$$)}}" userInput="option1" stepKey="selectAttribute"/>
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/>
-        <magentoCLI command="indexer:reindex" stepKey="reindexAll"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexAll">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!-- Check storefront mobile view for shop by button is functioning as expected -->
         <comment userInput="Check storefront mobile view for shop by button is functioning as expected" stepKey="commentCheckShopByButton" />
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
diff --git a/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml b/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml
index 2bfb1239cba60..1a27bf5aa56a2 100644
--- a/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml
+++ b/app/code/Magento/Msrp/Test/Mftf/Test/StorefrontProductWithMapAssignedConfigProductIsCorrectTest.xml
@@ -132,7 +132,9 @@
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
 
         <!--Clear cache-->
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Go to store front and check msrp for products-->
         <amOnPage url="{{StorefrontProductPage.url($$createConfigProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToConfigProductPage"/>
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml
index e65747f4d63d0..494259e0ead9d 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontVerifySecureURLRedirectMultishippingTest.xml
@@ -41,11 +41,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
             <deleteData createDataKey="product" stepKey="deleteProduct"/>
             <deleteData createDataKey="category" stepKey="deleteCategory"/>
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml
index c38725f263525..8ae592a17d620 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/StorefrontVerifySecureURLRedirectNewsletterTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
diff --git a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml
index d60034b8925d3..63b2741e7bd15 100644
--- a/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml
+++ b/app/code/Magento/Newsletter/Test/Mftf/Test/VerifySubscribedNewsletterDisplayedTest.xml
@@ -38,7 +38,9 @@
             </actionGroup>
 
             <actionGroup ref="EnableWebUrlOptionsActionGroup" stepKey="addStoreCodeToUrls"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
 
         <after>
@@ -48,8 +50,12 @@
                 <argument name="websiteName" value="{{customWebsite.name}}"/>
             </actionGroup>
             <actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
         </after>
 
diff --git a/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml b/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml
index d2c738398aae1..2d714e9ce5372 100644
--- a/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml
+++ b/app/code/Magento/PageCache/Test/Mftf/Test/AdminFrontendAreaSessionMustNotAffectAdminAreaTest.xml
@@ -39,7 +39,9 @@
                 <requiredEntity createDataKey="createCategoryA"/>
             </createData>
 
-            <magentoCLI command="cache:clean" arguments="full_page" stepKey="clearCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
             <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
             <resetCookie userInput="PHPSESSID" stepKey="resetSessionCookie"/>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml b/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml
index b52fc05ca5a11..44ec500722e58 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Suite/InContextPaypalSuite.xml
@@ -13,7 +13,9 @@
             <!--Config PayPal Express Checkout-->
             <actionGroup ref="ConfigPayPalExpressCheckoutActionGroup" stepKey="ConfigPayPalExpressCheckout"/>
             <!-- Configure PayPal Express Checkout -->
-            <magentoCLI command="cache:clean" arguments="config full_page" stepKey="cleanFullPageCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </before>
         <after>
             <!-- Cleanup Paypal configurations -->
@@ -21,7 +23,9 @@
             <magentoCLI command="config:set {{StorefrontPaypalDisableInContextCheckoutConfigData.path}} {{StorefrontPaypalDisableInContextCheckoutConfigData.value}}" stepKey="disableInContextPayPal"/>
             <magentoCLI command="config:set {{StorefrontPaypalDisableConfigData.path}} {{StorefrontPaypalDisableConfigData.value}}" stepKey="disablePaypal"/>
             <createData entity="SamplePaypalConfig" stepKey="setDefaultPaypalConfig"/>
-            <magentoCLI command="cache:clean" arguments="config full_page" stepKey="cleanFullPageCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
         </after>
         <include>
             <group name="paypalExpress"/>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckPayPalSmartButtonWithPayPalLabelOnCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckPayPalSmartButtonWithPayPalLabelOnCheckoutPageTest.xml
index cae67f411200c..e21655763e7a3 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckPayPalSmartButtonWithPayPalLabelOnCheckoutPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontCheckPayPalSmartButtonWithPayPalLabelOnCheckoutPageTest.xml
@@ -36,7 +36,9 @@
             <magentoCLI command="config:set {{StorefrontPaypalCheckoutPageButtonVerticalLayoutConfigData.path}} {{StorefrontPaypalCheckoutPageButtonVerticalLayoutConfigData.value}}" stepKey="setLayoutForPayPalSmartButton"/>
             <magentoCLI command="config:set {{StorefrontPaypalCheckoutPageButtonPillShapeConfigData.path}} {{StorefrontPaypalCheckoutPageButtonPillShapeConfigData.value}}" stepKey="setShapeForPayPalSmartButton"/>
             <magentoCLI command="config:set {{StorefrontPaypalCheckoutPageButtonBlueColorConfigData.path}} {{StorefrontPaypalCheckoutPageButtonBlueColorConfigData.value}}" stepKey="setColorForPayPalSmartButton"/>
-            <magentoCLI command="cache:clean" arguments="full_page" stepKey="cleanFullPageCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
+                <argument name="tags" value="full_page"/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set {{StorefrontPaypalCheckoutPageDisableCustomizeButtonConfigData.path}} {{StorefrontPaypalCheckoutPageDisableCustomizeButtonConfigData.value}}" stepKey="disableCustomizeButton"/>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml
index cf0e4b3d0b370..f17fa203af9f5 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontVerifySecureURLRedirectPaypalTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
diff --git a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
index 904a07d72035f..8fd0ed7f17a4d 100644
--- a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
+++ b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
@@ -75,7 +75,9 @@
             </createData>
             <magentoCLI command="config:set customer/online_customers/section_data_lifetime 1"
                         stepKey="setConfigForCartLifetime"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache" />
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/>
diff --git a/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml b/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml
index 8a2f441e5c4e8..4fc316b000c17 100644
--- a/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml
+++ b/app/code/Magento/Review/Test/Mftf/Test/StorefrontVerifySecureURLRedirectReviewTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml
index 11a9957fe0041..0eb8d71223276 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminAvailabilityCreditMemoWithNoPaymentTest.xml
@@ -25,7 +25,9 @@
             </createData>
             <!-- Enable *Free Shipping* -->
             <createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
         </before>
         <after>
@@ -37,7 +39,9 @@
             <actionGroup ref="AdminDeleteCustomerActionGroup" stepKey="deleteCustomer">
                 <argument name="customerEmail" value="Simple_US_Customer.email"/>
             </actionGroup>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+    <argument name="tags" value=""/>
+</actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logOut"/>
         </after>
 
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml
index c0ebbe450119e..a92befe95077d 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithCheckMoneyOrderPaymentMethodTest.xml
@@ -94,8 +94,12 @@
                 <requiredEntity createDataKey="createConfigProduct"/>
                 <requiredEntity createDataKey="createConfigChildProduct1"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml
index 477676085cf2e..0b873de34e279 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCancelTheCreatedOrderWithPurchaseOrderPaymentMethodTest.xml
@@ -35,8 +35,12 @@
             <createData entity="SimpleProduct2" stepKey="simpleProduct">
                 <field key="price">10.00</field>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set {{DisablePurchaseOrderConfigData.path}} {{DisablePurchaseOrderConfigData.value}}" stepKey="disablePurchaseOrderPayment"/>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml
index b8612f7f795fb..1b61ccf7fb7f0 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCorrectnessInvoicedItemInBundleProductTest.xml
@@ -58,7 +58,9 @@
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!--Go to bundle product page-->
         <amOnPage url="{{StorefrontProductPage.url($$createCategory.name$$)}}" stepKey="navigateToBundleProductPage"/>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml
index 0be7e20be5aea..68a8e9d347ddd 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminCreateOrderWithCustomerWithoutEmailTest.xml
@@ -24,7 +24,9 @@
                 <requiredEntity createDataKey="category"/>
             </createData>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!--Clean up created test data.-->
@@ -33,7 +35,9 @@
             <!--Enable required 'email' field on create order page.-->
             <magentoCLI command="config:set {{EnableEmailRequiredForOrder.path}} {{EnableEmailRequiredForOrder.value}}" stepKey="enableRequiredFieldEmailForAdminOrderCreation"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
 
         <!--Create order.-->
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml
index 1c59f6f936cef..f6196c3a911ef 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminFreeShippingNotAvailableIfMinimumOrderAmountNotMatchOrderTotalTest.xml
@@ -28,7 +28,9 @@
             <createData entity="FreeShippinMethodConfig" stepKey="enableFreeShippingMethod"/>
             <createData entity="setFreeShippingSubtotal" stepKey="setFreeShippingSubtotal"/>
             <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
@@ -38,7 +40,9 @@
             <createData entity="FreeShippinMethodDefault" stepKey="disableFreeShippingMethod"/>
             <createData entity="setFreeShippingSubtotalToDefault" stepKey="setFreeShippingSubtotalToDefault"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache2"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <!--Create new order with existing customer-->
         <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="goToCreateOrderPage">
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
index 776d84ac230b8..842faeb32cc33 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
@@ -75,8 +75,12 @@
                 <requiredEntity createDataKey="createConfigProduct"/>
                 <requiredEntity createDataKey="createConfigChildProduct1"/>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/>
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml
index f374741c247d4..c3fc7a4952143 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/MoveRecentlyViewedBundleFixedProductOnOrderPageTest.xml
@@ -57,7 +57,9 @@
             <!-- Change configuration -->
             <magentoCLI command="config:set reports/options/enabled 1" stepKey="enableReportModule"/>
 
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Admin logout -->
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml
index 5cc4fae330d05..7b3de80782cf7 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.xml
@@ -90,8 +90,12 @@
             <createData entity="Simple_US_Customer" stepKey="createCustomer"/>
 
             <!-- Reindex and flush the cache to display products on the category page -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete category and products -->
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml
index 00117c56de439..4445a865f17b5 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontPrintOrderGuestTest.xml
@@ -164,8 +164,12 @@
             <!-- Create Customer Account -->
             <createData entity="Simple_US_Customer" stepKey="createCustomer"/>
 
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <!-- Place order with options according to dataset -->
             <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="newOrder">
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml
index d49ea4cfcbec7..ecf71e2bc80b3 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/StorefrontVerifySecureURLRedirectSalesTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
diff --git a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml
index 9b5f8fbb2912d..73d444a778d7e 100644
--- a/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml
+++ b/app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontCartTotalValueWithFullDiscountUsingCartRuleTest.xml
@@ -57,8 +57,12 @@
             <createData entity="SimpleProduct2" stepKey="createSimpleProductThird">
                 <field key="price">5.50</field>
             </createData>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Removed created Data -->
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml
index 18f623288621d..b082014c7b120 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontUsingElasticSearchWithWeightAttributeTest.xml
@@ -49,7 +49,9 @@
         <!-- Step 3 -->
         <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         <!-- Step 4 -->
-        <magentoCLI command="cache:clean" arguments="full_page" stepKey="clearFPC"/>
+        <actionGroup ref="CliCacheCleanActionGroup" stepKey="clearFPC">
+            <argument name="tags" value="full_page"/>
+        </actionGroup>
         <!-- Step 5 -->
         <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefront"/>
         <!-- Step 6 -->
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml
index 3bfa777ac27d8..22fcbfc2920ff 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml
@@ -24,8 +24,12 @@
             <createData entity="SimpleProductWithDescription" stepKey="simpleProduct"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete created product -->
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml
index 93a3c8ca8e4a2..0b02b49433dda 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductNameTest.xml
@@ -26,8 +26,12 @@
             <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete create product -->
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml
index ebe3b6c129721..d88bb023c60b2 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductShortDescriptionTest.xml
@@ -26,8 +26,12 @@
             <createData entity="ApiProductWithDescription" stepKey="product"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
 
diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml
index e72f614593cfe..4c586d18fd3cf 100644
--- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml
+++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductSkuTest.xml
@@ -26,8 +26,12 @@
             <createData entity="defaultSimpleProduct" stepKey="simpleProduct"/>
 
             <!-- Perform reindex and flush cache -->
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
 
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml
index 0e69dba36d41c..fe2a1bf86a8ce 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateOrderCustomStoreShippingMethodTableRatesTest.xml
@@ -64,7 +64,9 @@
                 <argument name="file" value="usa_tablerates.csv"/>
             </actionGroup>
             <actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveConfig"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!--Delete created data-->
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml
index 5e57224bfee48..9d501e4b34ef7 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreatePartialShipmentEntityTest.xml
@@ -28,7 +28,9 @@
             <!-- Enable payment method one of "Check/Money Order" and  shipping method one of "Free Shipping" -->
             <magentoCLI command="config:set {{enabledCheckMoneyOrder.label}} {{enabledCheckMoneyOrder.value}}" stepKey="enableCheckMoneyOrder"/>
             <createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/>
-            <magentoCLI command="cache:clean config" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete data -->
diff --git a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml
index 6b388ae31e45e..a900a73fc36bc 100644
--- a/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml
+++ b/app/code/Magento/Shipping/Test/Mftf/Test/AdminCreateShipmentEntityTest.xml
@@ -28,7 +28,9 @@
             <!-- Enable payment method one of "Check/Money Order" and  shipping method one of "Free Shipping" -->
             <magentoCLI command="config:set {{enabledCheckMoneyOrder.label}} {{enabledCheckMoneyOrder.value}}" stepKey="enableCheckMoneyOrder"/>
             <createData entity="FreeShippinMethodConfig" stepKey="enableFreeShipping"/>
-            <magentoCLI command="cache:clean config" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
+                <argument name="tags" value="config"/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete data -->
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml
index 8fd21acbd51d9..3e6e984b11462 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/AdminDisablingSwatchTooltipsTest.xml
@@ -44,7 +44,9 @@
 
             <!-- Enable swatch tooltips -->
             <magentoCLI command="config:set catalog/frontend/show_swatch_tooltip 1" stepKey="disableTooltips"/>
-            <magentoCLI command="cache:flush" stepKey="flushCacheAfterEnabling"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterEnabling">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
 
         <!-- Go to the edit page for the "color" attribute -->
@@ -149,7 +151,9 @@
 
         <!-- Disable swatch tooltips -->
         <magentoCLI command="config:set catalog/frontend/show_swatch_tooltip 0" stepKey="disableTooltips"/>
-        <magentoCLI command="cache:flush" stepKey="flushCacheAfterDisabling"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterDisabling">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Verify swatch tooltips are not visible -->
         <reloadPage stepKey="refreshPage"/>
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml
index 0999b43c48820..b661ecb338bde 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontDisplayAllCharactersOnTextSwatchTest.xml
@@ -30,7 +30,9 @@
         <fillField selector="{{AdminManageSwatchSection.swatchAdminDescriptionByIndex('3')}}" userInput="123456789012345678901BrownD" stepKey="fillDescription3" after="fillSwatch3"/>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '3')}}" userInput="123456789012345678901" stepKey="seeGreen" after="seeBlue"/>
         <see selector="{{StorefrontCategorySidebarSection.attributeNthOption(ProductAttributeFrontendLabel.label, '4')}}" userInput="123456789012345678901" stepKey="seeBrown" after="seeGreen"/>
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml
index 2ca26d84d45c7..a832273ff9fcb 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByImageSwatchTest.xml
@@ -105,7 +105,9 @@
         </actionGroup>
 
         <!-- Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Go to the category page -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml
index 82dbff950d62f..38c7b51dcc708 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByTextSwatchTest.xml
@@ -83,7 +83,9 @@
         </actionGroup>
 
         <!--Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Go to the category page -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml
index bf820863cf9b6..0a91e72ce6249 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontFilterByVisualSwatchTest.xml
@@ -95,7 +95,9 @@
         </actionGroup>
 
         <!-- Run re-index task-->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
 
         <!-- Go to the category page -->
         <amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
diff --git a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml
index 551a91f47c165..734294ba977ba 100644
--- a/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml
+++ b/app/code/Magento/Swatches/Test/Mftf/Test/StorefrontImageColorWhenFilterByColorFilterTest.xml
@@ -71,8 +71,12 @@
         <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!--Select any option in the Layered navigation and verify product image-->
         <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="navigateToCategoryPage"/>
diff --git a/app/code/Magento/Translation/Test/Mftf/Test/StorefrontInlineTranslationOnCheckoutTest.xml b/app/code/Magento/Translation/Test/Mftf/Test/StorefrontInlineTranslationOnCheckoutTest.xml
index 9255923213839..e30ab98982b78 100644
--- a/app/code/Magento/Translation/Test/Mftf/Test/StorefrontInlineTranslationOnCheckoutTest.xml
+++ b/app/code/Magento/Translation/Test/Mftf/Test/StorefrontInlineTranslationOnCheckoutTest.xml
@@ -115,7 +115,9 @@
         <magentoCLI command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}" stepKey="enableTranslateInlineForStorefront"/>
 
         <!-- 2. Refresh magento cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCacheAfterTranslateEnabled"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterTranslateEnabled">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- 3. Go to storefront and click on cart button on the top -->
         <reloadPage stepKey="reloadPage"/>
@@ -476,7 +478,9 @@
         <!-- 7. Set *Enabled for Storefront* option to *No* and save configuration -->
         <magentoCLI command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}" stepKey="disableTranslateInlineForStorefront"/>
         <!-- 8. Clear magento cache -->
-        <magentoCLI command="cache:flush" stepKey="flushCacheAfterTranslateDisabled"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterTranslateDisabled">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <magentoCLI command="setup:static-content:deploy -f" stepKey="deployStaticContent"/>
 
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml
index 1d604ef7648dc..7e0dbf89881a6 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml
@@ -22,7 +22,9 @@
             <comment userInput="Enable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentEnableUrlRewriteConfig"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterEnableConfig">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <createData entity="ApiCategory" stepKey="createCategory">
                 <field key="name">category-admin</field>
             </createData>
@@ -39,7 +41,9 @@
             <comment userInput="Disable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentDisableUrlRewriteConfig"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterDisableConfig">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
@@ -58,7 +62,9 @@
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache2"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <actionGroup ref="SwitchCategoryStoreViewActionGroup" stepKey="switchToStoreViewEn">
             <argument name="Store" value="customStoreENNotUnique.name"/>
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml
index 20e6392091998..fee13adcb433c 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesInCatalogCategoriesAfterChangingUrlKeyForStoreViewAndMovingCategory2Test.xml
@@ -35,7 +35,9 @@
 
             <!--Create additional Store View in Main Website Store -->
             <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindexAll"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexAll">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
 
         <after>
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml
index 9d6b267055f70..b34bd672cdffc 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminGenerateUrlRewritesForProductInCategoriesSwitchOffTest.xml
@@ -22,7 +22,9 @@
             <comment userInput="Enable config to generate category/product URL Rewrites" stepKey="commentEnableConfig" />
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
             <createData entity="SimpleSubCategory" stepKey="createCategory"/>
@@ -38,7 +40,9 @@
             <comment userInput="Enable config to generate category/product URL Rewrites" stepKey="commentEnableConfig" />
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
         </after>
@@ -63,7 +67,9 @@
         <waitForPageLoad stepKey="waitForSavingSystemConfiguration"/>
 
         <!-- 3. Flush cache-->
-        <magentoCLI command="cache:flush" stepKey="cleanCache"/>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- 4. Open Marketing - SEO & Search - URL Rewrites -->
         <amOnPage url="{{AdminUrlRewriteIndexPage.url}}" stepKey="amOnUrlRewriteIndexPage2"/>
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml
index f03d9ae1bad67..d102286bd9e6d 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminProductCreateUrlRewriteForCustomStoreViewTest.xml
@@ -31,7 +31,9 @@
             <actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView">
                 <argument name="customStore" value="customStore"/>
             </actionGroup>
-            <magentoCLI command="indexer:reindex" stepKey="runReindex"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="runReindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createProduct"  stepKey="deleteProduct" />
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml
index 639cd2c57f7d1..7e3b6ec28d5a9 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductInAnchorCategoriesTestWithConfigurationTurnedOffTest.xml
@@ -25,7 +25,9 @@
             <comment userInput="Enable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentEnableUrlRewriteConfig"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterEnableConfig">
+                <argument name="tags" value=""/>
+            </actionGroup>
 
             <createData entity="SimpleSubCategory" stepKey="simpleSubCategory1"/>
             <createData entity="SubCategoryWithParent" stepKey="simpleSubCategory2">
@@ -42,7 +44,9 @@
             <comment userInput="Disable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentDisableUrlRewriteConfig"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
@@ -50,7 +54,9 @@
             <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache2"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterDisableConfig">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <!-- Steps -->
         <!-- 1. Log in to Admin -->
diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml
index 1d460b9b668a0..3713b3bc41261 100644
--- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml
+++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminUrlRewritesForProductInAnchorCategoriesTest/AdminUrlRewritesForProductsWithConfigurationTurnedOffTest.xml
@@ -22,7 +22,9 @@
             <comment userInput="Enable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentEnableUrlRewriteConfig"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="enableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache1"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterEnableConfig">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <createData entity="SimpleSubCategory" stepKey="simpleSubCategory1"/>
             <!-- Create Simple product 1 and assign it to Category 1 -->
             <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct">
@@ -32,14 +34,18 @@
             <comment userInput="Disable SEO configuration setting to generate category/product URL Rewrites" stepKey="commentDisableUrlRewriteConfig"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 0" stepKey="disableGenerateUrlRewrite"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfterDisableConfig">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
             <deleteData createDataKey="simpleSubCategory1" stepKey="deletesimpleSubCategory1"/>
             <magentoCLI command="config:set catalog/seo/generate_category_product_rewrites 1" stepKey="resetConfigurationSetting"/>
             <!--Flush cache-->
-            <magentoCLI command="cache:flush" stepKey="cleanCache2"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </after>
         <!-- 1. Log in to Admin -->
         <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml
index 850fa04549e84..6750f21311d3a 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminLockAdminUserEntityTest.xml
@@ -22,13 +22,17 @@
         <before>
             <magentoCLI command="config:set admin/captcha/enable 0" stepKey="disableAdminCaptcha"/>
             <magentoCLI command="config:set admin/security/lockout_failures 2" stepKey="setDefaultMaximumLoginFailures"/>
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches1"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches1">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <actionGroup ref="AdminLoginActionGroup" stepKey="adminLogin"/>
         </before>
         <after>
             <magentoCLI command="config:set admin/captcha/enable 1" stepKey="enableAdminCaptcha"/>
             <magentoCLI command="config:set admin/security/lockout_failures 6" stepKey="setDefaultMaximumLoginFailures"/>
-            <magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>
+            <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanInvalidatedCaches">
+                <argument name="tags" value="config full_page"/>
+            </actionGroup>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
         </after>
 
diff --git a/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml b/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml
index f496e500a4d9b..a43d6578925b2 100644
--- a/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml
+++ b/app/code/Magento/Vault/Test/Mftf/Test/StorefrontVerifySecureURLRedirectVaultTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>
diff --git a/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml b/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml
index 77a8e6e6fd20c..0f4a7f9a55d26 100644
--- a/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml
+++ b/app/code/Magento/Weee/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml
@@ -51,8 +51,12 @@
             <!--Set catalog price scope to Global-->
             <comment userInput="Set catalog price scope to Global" stepKey="commentSetPriceScope"/>
             <magentoCLI command="config:set catalog/price/scope 0" stepKey="setPriceScopeGlobal"/>
-            <magentoCLI command="indexer:reindex catalog_product_price" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value="catalog_product_price"/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!--Set catalog price scope to Global-->
@@ -97,8 +101,12 @@
         <!--Set catalog price scope to Website-->
         <comment userInput="Set catalog price scope to Website" stepKey="commentSetPriceScope"/>
         <magentoCLI command="config:set catalog/price/scope 1" stepKey="setPriceScopeWebsite"/>
-        <magentoCLI command="indexer:reindex catalog_product_price" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value="catalog_product_price"/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
         <!--See available websites only 'All Websites'-->
         <comment userInput="See available websites 'All Websites', 'Main Website' and Second website" stepKey="commentCheckWebsitesInProductPage"/>
         <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="goToProductPageSecondTime">
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddProductsToCartFromWishlistUsingSidebarTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddProductsToCartFromWishlistUsingSidebarTest.xml
index a6cab4b9f9715..c279adbfe876c 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddProductsToCartFromWishlistUsingSidebarTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontAddProductsToCartFromWishlistUsingSidebarTest.xml
@@ -26,16 +26,24 @@
                 <requiredEntity createDataKey="categorySecond"/>
             </createData>
             <createData entity="Simple_US_Customer" stepKey="customer"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
             <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
             <deleteData createDataKey="categoryFirst" stepKey="deleteCategoryFirst"/>
             <deleteData createDataKey="categorySecond" stepKey="deleteCategorySecond"/>
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <!-- Sign in as customer -->
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml
index a23788d2c508f..31bc9f6a31de7 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteBundleFixedProductFromWishlistTest.xml
@@ -45,8 +45,12 @@
                 <requiredEntity createDataKey="createBundleOption1_1"/>
                 <requiredEntity createDataKey="simpleProduct2"/>
             </createData>
-            <magentoCLI stepKey="reindex" command="indexer:reindex"/>
-            <magentoCLI stepKey="flushCache" command="cache:flush"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete data -->
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml
index 4ad87095ecd30..da2cec8284c46 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDeleteConfigurableProductFromWishlistTest.xml
@@ -105,8 +105,12 @@
                 <requiredEntity createDataKey="createConfigProduct"/>
                 <requiredEntity createDataKey="createConfigChildProduct3"/>
             </createData>
-            <magentoCLI stepKey="reindex" command="indexer:reindex"/>
-            <magentoCLI stepKey="flushCache" command="cache:flush"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete data -->
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml
index a5081ca2ad338..05a42314ddb71 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontMoveConfigurableProductFromShoppingCartToWishlistTest.xml
@@ -107,8 +107,12 @@
                 <requiredEntity createDataKey="createConfigChildProduct3"/>
             </createData>
 
-            <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value=""/>
+            </actionGroup>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <!-- Delete data -->
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml
index 97551a596e978..b2364b72f7db8 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontRemoveProductsFromWishlistUsingSidebarTest.xml
@@ -36,8 +36,12 @@
         </after>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <!-- Sign in as customer -->
         <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml
index 08698658588ae..86d09783e0f55 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontUpdateWishlistTest.xml
@@ -27,8 +27,12 @@
         </before>
 
         <!-- Perform reindex and flush cache -->
-        <magentoCLI command="indexer:reindex" stepKey="reindex"/>
-        <magentoCLI command="cache:flush" stepKey="flushCache"/>
+        <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+            <argument name="indices" value=""/>
+        </actionGroup>
+        <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+            <argument name="tags" value=""/>
+        </actionGroup>
 
         <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
             <argument name="Customer" value="$$customer$$"/>
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml
index 72f5bab1e6af5..f5958f5efd414 100644
--- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml
+++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifySecureURLRedirectWishlistTest.xml
@@ -28,11 +28,15 @@
             <executeJS function="return window.location.host" stepKey="hostname"/>
             <magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
             <magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
         </before>
         <after>
             <magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
-            <magentoCLI command="cache:flush" stepKey="flushCache"/>
+            <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
+                <argument name="tags" value=""/>
+            </actionGroup>
             <deleteData createDataKey="customer" stepKey="deleteCustomer"/>
         </after>
         <executeJS function="return window.location.host" stepKey="hostname"/>

From 930be6eb25c69eadba4e21c8bd12ea088c4bb6dd Mon Sep 17 00:00:00 2001
From: Alex Kolesnyk <kolesnyk@adobe.com>
Date: Fri, 5 Jun 2020 10:57:20 -0500
Subject: [PATCH 201/307] MTS-1023: Enable PageBuilder extension by default in
 PR flow

---
 ...ithCartPriceRuleMatchingSubtotalForMultiShipmentTest.xml | 6 ------
 .../Test/StorefrontCheckoutWithMultipleAddressesTest.xml    | 2 --
 .../Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml | 2 --
 ...shippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml | 2 --
 4 files changed, 12 deletions(-)

diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckingWithCartPriceRuleMatchingSubtotalForMultiShipmentTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckingWithCartPriceRuleMatchingSubtotalForMultiShipmentTest.xml
index 02187658a8781..815d406c68bfa 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckingWithCartPriceRuleMatchingSubtotalForMultiShipmentTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckingWithCartPriceRuleMatchingSubtotalForMultiShipmentTest.xml
@@ -19,12 +19,6 @@
             <group value="Multishipment"/>
             <group value="SalesRule"/>
         </annotations>
-        <before>
-            <magentoCLI command="config:set multishipping/options/checkout_multiple 1" stepKey="allowShippingToMultipleAddresses"/>
-        </before>
-        <after>
-            <magentoCLI command="config:set multishipping/options/checkout_multiple 0" stepKey="disableShippingToMultipleAddresses"/>
-        </after>
         <actionGroup ref="AdminCreateCartPriceRuleActionsWithSubtotalActionGroup" before="goToProduct1" stepKey="createSubtotalCartPriceRuleActionsSection">
             <argument name="ruleName" value="CartPriceRuleConditionForSubtotalForMultiShipping"/>
          </actionGroup>
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml
index a49a37e475409..8205ab962b9fe 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontCheckoutWithMultipleAddressesTest.xml
@@ -22,8 +22,6 @@
         <before>
             <!-- Login as Admin -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
-            <!-- Set configurations -->
-            <magentoCLI command="config:set multishipping/options/checkout_multiple 1" stepKey="allowShippingToMultipleAddresses"/>
             <!-- Create simple products -->
             <createData entity="SimpleSubCategory" stepKey="createCategory"/>
             <createData entity="SimpleProduct" stepKey="firstProduct">
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml
index 80407a219a841..2e5c0acc32053 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontOrderWithMultishippingTest.xml
@@ -27,7 +27,6 @@
             <createData entity="SimpleProduct2" stepKey="createProduct2"/>
             <createData entity="Simple_US_Customer_Two_Addresses" stepKey="createCustomer"/>
             <!-- Set configurations -->
-            <magentoCLI command="config:set {{EnableMultiShippingCheckoutMultiple.path}} {{EnableMultiShippingCheckoutMultiple.value}}" stepKey="allowShippingToMultipleAddresses"/>
             <magentoCLI command="config:set {{EnableFreeShippingMethod.path}} {{EnableFreeShippingMethod.value}}" stepKey="enableFreeShipping"/>
             <magentoCLI command="config:set {{EnableFlatRateShippingMethod.path}} {{EnableFlatRateShippingMethod.value}}" stepKey="enableFlatRateShipping"/>
             <magentoCLI command="config:set {{EnableCheckMoneyOrderPaymentMethod.path}} {{EnableCheckMoneyOrderPaymentMethod.value}}" stepKey="enableCheckMoneyOrderPaymentMethod"/>
@@ -43,7 +42,6 @@
             <!-- Need logout before customer delete. Fatal error appears otherwise -->
             <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
             <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
-            <magentoCLI command="config:set {{DisableMultiShippingCheckoutMultiple.path}} {{DisableMultiShippingCheckoutMultiple.value}}" stepKey="withdrawShippingToMultipleAddresses"/>
             <magentoCLI command="config:set {{DisableFreeShippingMethod.path}} {{DisableFreeShippingMethod.value}}" stepKey="disableFreeShipping"/>
             <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearAllOrdersGridFilters"/>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
diff --git a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml
index caf0ce3a51bae..7bb26525b173f 100644
--- a/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml
+++ b/app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml
@@ -22,8 +22,6 @@
         <before>
             <!-- Login as Admin -->
             <actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
-            <!-- Set configurations -->
-            <magentoCLI command="config:set multishipping/options/checkout_multiple 1" stepKey="allowShippingToMultipleAddresses"/>
             <!-- Create two simple products -->
             <createData entity="ApiCategory" stepKey="createCategory"/>
             <createData entity="_defaultProduct" stepKey="createFirstProduct">

From 86a4900f8a76cd90908b910e590e80e3c2960faa Mon Sep 17 00:00:00 2001
From: Ji Lu <jilu1@adobe.com>
Date: Fri, 5 Jun 2020 19:26:14 -0500
Subject: [PATCH 202/307] MQE-2153: bump MFTF version to 3.0.0-RC4

---
 composer.json |   2 +-
 composer.lock | 717 ++++++++++++++------------------------------------
 2 files changed, 203 insertions(+), 516 deletions(-)

diff --git a/composer.json b/composer.json
index d487ad5975040..4cd8a3989f188 100644
--- a/composer.json
+++ b/composer.json
@@ -88,7 +88,7 @@
         "friendsofphp/php-cs-fixer": "~2.16.0",
         "lusitanian/oauth": "~0.8.10",
         "magento/magento-coding-standard": "*",
-        "magento/magento2-functional-testing-framework": "dev-3.0.0-RC3",
+        "magento/magento2-functional-testing-framework": "dev-3.0.0-RC4",
         "pdepend/pdepend": "~2.7.1",
         "phpcompatibility/php-compatibility": "^9.3",
         "phpmd/phpmd": "^2.8.0",
diff --git a/composer.lock b/composer.lock
index 6a47e7e44ab69..d8f088f450af2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "e86af25d9a4a1942c437cca58f9f1efb",
+    "content-hash": "e25a6a8d64ffec2bd0b839679158f286",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -206,16 +206,6 @@
                 "ssl",
                 "tls"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-08T08:27:21+00:00"
         },
         {
@@ -297,16 +287,6 @@
                 "dependency",
                 "package"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-06T08:28:10+00:00"
         },
         {
@@ -472,12 +452,6 @@
                 "Xdebug",
                 "performance"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                }
-            ],
             "time": "2020-03-01T12:26:26+00:00"
         },
         {
@@ -1331,12 +1305,6 @@
                 "BSD-3-Clause"
             ],
             "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.",
-            "funding": [
-                {
-                    "url": "https://funding.communitybridge.org/projects/laminas-project",
-                    "type": "community_bridge"
-                }
-            ],
             "time": "2020-05-20T13:45:39+00:00"
         },
         {
@@ -2294,12 +2262,6 @@
                 "laminas",
                 "mail"
             ],
-            "funding": [
-                {
-                    "url": "https://funding.communitybridge.org/projects/laminas-project",
-                    "type": "community_bridge"
-                }
-            ],
             "time": "2020-04-21T16:42:19+00:00"
         },
         {
@@ -3292,12 +3254,6 @@
                 "laminas",
                 "zf"
             ],
-            "funding": [
-                {
-                    "url": "https://funding.communitybridge.org/projects/laminas-project",
-                    "type": "community_bridge"
-                }
-            ],
             "time": "2020-05-20T16:45:56+00:00"
         },
         {
@@ -3537,16 +3493,6 @@
                 "logging",
                 "psr-3"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/Seldaek",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-22T07:31:27+00:00"
         },
         {
@@ -3962,20 +3908,6 @@
                 "x.509",
                 "x509"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/terrafrost",
-                    "type": "github"
-                },
-                {
-                    "url": "https://www.patreon.com/phpseclib",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-04T23:17:33+00:00"
         },
         {
@@ -4339,16 +4271,6 @@
                 "parser",
                 "validator"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/Seldaek",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-30T19:05:18+00:00"
         },
         {
@@ -4469,43 +4391,29 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-03-30T11:41:10+00:00"
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
-                "reference": "5f8d5271303dad260692ba73dfa21777d38e124e"
+                "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/css-selector/zipball/5f8d5271303dad260692ba73dfa21777d38e124e",
-                "reference": "5f8d5271303dad260692ba73dfa21777d38e124e",
+                "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9",
+                "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5"
+                "php": ">=7.2.5"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -4536,21 +4444,7 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2020-03-27T16:56:45+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/event-dispatcher",
@@ -4620,20 +4514,6 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-03-27T16:54:36+00:00"
         },
         {
@@ -4696,26 +4576,26 @@
         },
         {
             "name": "symfony/filesystem",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
-                "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91"
+                "reference": "6e4320f06d5f2cce0d96530162491f4465179157"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91",
-                "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/6e4320f06d5f2cce0d96530162491f4465179157",
+                "reference": "6e4320f06d5f2cce0d96530162491f4465179157",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "symfony/polyfill-ctype": "~1.8"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -4742,43 +4622,29 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2020-04-12T14:40:17+00:00"
+            "time": "2020-05-30T20:35:19+00:00"
         },
         {
             "name": "symfony/finder",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
-                "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d"
+                "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d",
-                "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d",
+                "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187",
+                "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5"
+                "php": ">=7.2.5"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -4805,21 +4671,7 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2020-03-27T16:56:45+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/polyfill-ctype",
@@ -4877,20 +4729,6 @@
                 "polyfill",
                 "portable"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:14:59+00:00"
         },
         {
@@ -4953,20 +4791,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5026,20 +4850,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5095,20 +4905,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5167,20 +4963,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5230,20 +5012,6 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-15T15:56:18+00:00"
         },
         {
@@ -5720,16 +5488,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.138.7",
+            "version": "3.140.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "6b9f3fcea4dfa6092c628c790ca6d369a75453b7"
+                "reference": "7e37960c1103ee211932be51b2282b41c948a5f0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6b9f3fcea4dfa6092c628c790ca6d369a75453b7",
-                "reference": "6b9f3fcea4dfa6092c628c790ca6d369a75453b7",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7e37960c1103ee211932be51b2282b41c948a5f0",
+                "reference": "7e37960c1103ee211932be51b2282b41c948a5f0",
                 "shasum": ""
             },
             "require": {
@@ -5800,7 +5568,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-05-22T18:11:09+00:00"
+            "time": "2020-06-05T18:12:25+00:00"
         },
         {
             "name": "beberlei/assert",
@@ -6018,16 +5786,16 @@
         },
         {
             "name": "codeception/codeception",
-            "version": "4.1.4",
+            "version": "4.1.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/Codeception.git",
-                "reference": "55d8d1d882fa0777e47de17b04c29b3c50fe29e7"
+                "reference": "24f2345329b1059f1208f65581fc632a4a6e5a55"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/Codeception/zipball/55d8d1d882fa0777e47de17b04c29b3c50fe29e7",
-                "reference": "55d8d1d882fa0777e47de17b04c29b3c50fe29e7",
+                "url": "https://api.github.com/repos/Codeception/Codeception/zipball/24f2345329b1059f1208f65581fc632a4a6e5a55",
+                "reference": "24f2345329b1059f1208f65581fc632a4a6e5a55",
                 "shasum": ""
             },
             "require": {
@@ -6099,13 +5867,7 @@
                 "functional testing",
                 "unit testing"
             ],
-            "funding": [
-                {
-                    "url": "https://opencollective.com/codeception",
-                    "type": "open_collective"
-                }
-            ],
-            "time": "2020-03-23T17:07:20+00:00"
+            "time": "2020-05-24T13:58:47+00:00"
         },
         {
             "name": "codeception/lib-asserts",
@@ -6249,16 +6011,16 @@
         },
         {
             "name": "codeception/module-webdriver",
-            "version": "1.0.8",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/module-webdriver.git",
-                "reference": "da55466876d9e73c09917f495b923395b1cdf92a"
+                "reference": "09c167817393090ce3dbce96027d94656b1963ce"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/da55466876d9e73c09917f495b923395b1cdf92a",
-                "reference": "da55466876d9e73c09917f495b923395b1cdf92a",
+                "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/09c167817393090ce3dbce96027d94656b1963ce",
+                "reference": "09c167817393090ce3dbce96027d94656b1963ce",
                 "shasum": ""
             },
             "require": {
@@ -6300,7 +6062,7 @@
                 "browser-testing",
                 "codeception"
             ],
-            "time": "2020-04-29T13:45:52+00:00"
+            "time": "2020-05-31T08:47:24+00:00"
         },
         {
             "name": "codeception/phpunit-wrapper",
@@ -6530,22 +6292,22 @@
         },
         {
             "name": "doctrine/annotations",
-            "version": "1.10.2",
+            "version": "1.10.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/annotations.git",
-                "reference": "b9d758e831c70751155c698c2f7df4665314a1cb"
+                "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb",
-                "reference": "b9d758e831c70751155c698c2f7df4665314a1cb",
+                "url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d",
+                "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d",
                 "shasum": ""
             },
             "require": {
                 "doctrine/lexer": "1.*",
                 "ext-tokenizer": "*",
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "require-dev": {
                 "doctrine/cache": "1.*",
@@ -6595,24 +6357,24 @@
                 "docblock",
                 "parser"
             ],
-            "time": "2020-04-20T09:18:32+00:00"
+            "time": "2020-05-25T17:24:27+00:00"
         },
         {
             "name": "doctrine/cache",
-            "version": "1.10.0",
+            "version": "1.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/cache.git",
-                "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62"
+                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/cache/zipball/382e7f4db9a12dc6c19431743a2b096041bcdd62",
-                "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62",
+                "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
+                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
                 "shasum": ""
             },
             "require": {
-                "php": "~7.1"
+                "php": "~7.1 || ^8.0"
             },
             "conflict": {
                 "doctrine/common": ">2.2,<2.4"
@@ -6677,7 +6439,7 @@
                 "redis",
                 "xcache"
             ],
-            "time": "2019-11-29T15:36:20+00:00"
+            "time": "2020-05-27T16:24:54+00:00"
         },
         {
             "name": "doctrine/inflector",
@@ -6748,20 +6510,20 @@
         },
         {
             "name": "doctrine/instantiator",
-            "version": "1.3.0",
+            "version": "1.3.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/instantiator.git",
-                "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+                "reference": "f350df0268e904597e3bd9c4685c53e0e333feea"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
-                "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea",
+                "reference": "f350df0268e904597e3bd9c4685c53e0e333feea",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "require-dev": {
                 "doctrine/coding-standard": "^6.0",
@@ -6800,24 +6562,24 @@
                 "constructor",
                 "instantiate"
             ],
-            "time": "2019-10-21T16:45:58+00:00"
+            "time": "2020-05-29T17:27:14+00:00"
         },
         {
             "name": "doctrine/lexer",
-            "version": "1.2.0",
+            "version": "1.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/lexer.git",
-                "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6"
+                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
-                "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
+                "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042",
+                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2"
+                "php": "^7.2 || ^8.0"
             },
             "require-dev": {
                 "doctrine/coding-standard": "^6.0",
@@ -6862,7 +6624,7 @@
                 "parser",
                 "php"
             ],
-            "time": "2019-10-30T14:39:59+00:00"
+            "time": "2020-05-25T17:44:05+00:00"
         },
         {
             "name": "friendsofphp/php-cs-fixer",
@@ -6953,12 +6715,6 @@
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
-            "funding": [
-                {
-                    "url": "https://github.com/keradus",
-                    "type": "github"
-                }
-            ],
             "time": "2020-04-15T18:51:10+00:00"
         },
         {
@@ -7217,12 +6973,6 @@
                 "sftp",
                 "storage"
             ],
-            "funding": [
-                {
-                    "url": "https://offset.earth/frankdejonge",
-                    "type": "other"
-                }
-            ],
             "time": "2020-05-18T15:13:39+00:00"
         },
         {
@@ -7333,16 +7083,16 @@
         },
         {
             "name": "magento/magento2-functional-testing-framework",
-            "version": "dev-3.0.0-RC3",
+            "version": "dev-3.0.0-RC4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/magento2-functional-testing-framework.git",
-                "reference": "aea30ae1df2fe6618478ba8813864c204561fde3"
+                "reference": "e36fc50f8a73a9d22239895fb819cc16767a5179"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/aea30ae1df2fe6618478ba8813864c204561fde3",
-                "reference": "aea30ae1df2fe6618478ba8813864c204561fde3",
+                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/e36fc50f8a73a9d22239895fb819cc16767a5179",
+                "reference": "e36fc50f8a73a9d22239895fb819cc16767a5179",
                 "shasum": ""
             },
             "require": {
@@ -7369,7 +7119,8 @@
                 "symfony/finder": "^5.0",
                 "symfony/mime": "^5.0",
                 "symfony/process": "^4.4",
-                "vlucas/phpdotenv": "^2.4"
+                "vlucas/phpdotenv": "^2.4",
+                "weew/helpers-array": "^1.3"
             },
             "replace": {
                 "facebook/webdriver": "^1.7.1"
@@ -7417,7 +7168,7 @@
                 "magento",
                 "testing"
             ],
-            "time": "2020-05-22T19:17:05+00:00"
+            "time": "2020-06-05T22:31:19+00:00"
         },
         {
             "name": "mikey179/vfsstream",
@@ -8425,20 +8176,6 @@
                 "MIT"
             ],
             "description": "PHPStan - PHP Static Analysis Tool",
-            "funding": [
-                {
-                    "url": "https://github.com/ondrejmirtes",
-                    "type": "github"
-                },
-                {
-                    "url": "https://www.patreon.com/phpstan",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-05T12:55:44+00:00"
         },
         {
@@ -8553,12 +8290,6 @@
                 "filesystem",
                 "iterator"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-04-18T05:02:12+00:00"
         },
         {
@@ -8707,12 +8438,6 @@
             "keywords": [
                 "timer"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-04-20T06:00:37+00:00"
         },
         {
@@ -8762,12 +8487,6 @@
             "keywords": [
                 "tokenizer"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-05-06T09:56:31+00:00"
         },
         {
@@ -8856,16 +8575,6 @@
                 "testing",
                 "xunit"
             ],
-            "funding": [
-                {
-                    "url": "https://phpunit.de/donate.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-05-22T13:54:05+00:00"
         },
         {
@@ -9006,12 +8715,6 @@
             ],
             "description": "Collection of value objects that represent the PHP code units",
             "homepage": "https://github.com/sebastianbergmann/code-unit",
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-04-30T05:58:10+00:00"
         },
         {
@@ -9177,12 +8880,6 @@
                 "unidiff",
                 "unified diff"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-05-08T05:01:12+00:00"
         },
         {
@@ -9236,12 +8933,6 @@
                 "environment",
                 "hhvm"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-04-14T13:36:52+00:00"
         },
         {
@@ -9925,20 +9616,6 @@
             ],
             "description": "Symfony Config Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-15T15:59:10+00:00"
         },
         {
@@ -10012,49 +9689,87 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
+            "time": "2020-04-28T17:58:55+00:00"
+        },
+        {
+            "name": "symfony/deprecation-contracts",
+            "version": "v2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/deprecation-contracts.git",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "function.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
                 {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
                 },
                 {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "time": "2020-04-28T17:58:55+00:00"
+            "description": "A generic function and convention to trigger deprecation notices",
+            "homepage": "https://symfony.com",
+            "time": "2020-05-27T08:34:37+00:00"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d"
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e47fdf8b24edc12022ba52923150ec6484d7f57d",
-                "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
-                "symfony/mime": "^4.4|^5.0",
-                "symfony/polyfill-mbstring": "~1.1"
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/polyfill-mbstring": "~1.1",
+                "symfony/polyfill-php80": "^1.15"
             },
             "require-dev": {
                 "predis/predis": "~1.0",
-                "symfony/expression-language": "^4.4|^5.0"
+                "symfony/cache": "^4.4|^5.0",
+                "symfony/expression-language": "^4.4|^5.0",
+                "symfony/mime": "^4.4|^5.0"
+            },
+            "suggest": {
+                "symfony/mime": "To use the file extension guesser"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10081,40 +9796,27 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2020-04-18T20:50:06+00:00"
+            "time": "2020-05-24T12:18:07+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b"
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b",
-                "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "symfony/polyfill-intl-idn": "^1.10",
-                "symfony/polyfill-mbstring": "^1.0"
+                "symfony/polyfill-mbstring": "^1.0",
+                "symfony/polyfill-php80": "^1.15"
             },
             "conflict": {
                 "symfony/mailer": "<4.4"
@@ -10126,7 +9828,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10157,21 +9859,7 @@
                 "mime",
                 "mime-type"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2020-04-17T03:29:44+00:00"
+            "time": "2020-05-25T12:33:44+00:00"
         },
         {
             "name": "symfony/options-resolver",
@@ -10225,20 +9913,6 @@
                 "configuration",
                 "options"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-06T10:40:56+00:00"
         },
         {
@@ -10298,20 +9972,68 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
+            "time": "2020-05-12T16:47:27+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php80",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.8"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
                 {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
                 },
                 {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
                 },
                 {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
                 }
             ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -10362,38 +10084,25 @@
             ],
             "description": "Symfony Stopwatch Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-03-27T16:56:45+00:00"
         },
         {
             "name": "symfony/yaml",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f"
+                "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/482fb4e710e5af3e0e78015f19aa716ad953392f",
-                "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23",
+                "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
                 "symfony/polyfill-ctype": "~1.8"
             },
             "conflict": {
@@ -10405,10 +10114,13 @@
             "suggest": {
                 "symfony/console": "For validating YAML files using the lint command"
             },
+            "bin": [
+                "Resources/bin/yaml-lint"
+            ],
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10435,21 +10147,7 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2020-04-28T17:58:55+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "thecodingmachine/safe",
@@ -10724,16 +10422,6 @@
                 "env",
                 "environment"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/GrahamCampbell",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-02T13:38:00+00:00"
         },
         {
@@ -10849,6 +10537,5 @@
         "ext-zip": "*",
         "lib-libxml": "*"
     },
-    "platform-dev": [],
-    "plugin-api-version": "1.1.0"
+    "platform-dev": []
 }

From 15372562b622adf6c88749086dc419b9cb950d57 Mon Sep 17 00:00:00 2001
From: Ji Lu <jilu1@adobe.com>
Date: Tue, 2 Jun 2020 18:43:06 -0500
Subject: [PATCH 203/307] MQE-2150: group value "skip" no longer causes test to
 be skipped

---
 .../AdminLockAdminUserWhenCreatingNewIntegrationTest.xml     | 2 --
 .../Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml  | 4 +---
 app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml | 5 +++--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
index a75f65dffeca3..83e3479c753e4 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
@@ -18,8 +18,6 @@
             <testCaseId value="MC-14382" />
             <group value="security"/>
             <group value="mtf_migrated"/>
-            <!-- skip due to MQE-1964 -->
-            <group value="skip"/>
         </annotations>
         <before>
             <!-- Log in to Admin Panel -->
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
index 3d04f3eed4daf..3fffbcd480761 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
@@ -18,8 +18,6 @@
             <testCaseId value="MC-14384" />
             <group value="security"/>
             <group value="mtf_migrated"/>
-            <!-- skip due to MQE-1964 -->
-            <group value="skip"/>
         </annotations>
         <before>
             <!-- Log in to Admin Panel -->
@@ -41,7 +39,7 @@
             <argument name="message" value="The password entered for the current user is invalid. Verify the password and try again." />
             <argument name="messageType" value="error" />
         </actionGroup>
-        
+
         <actionGroup ref="AdminFillUserRoleFormActionGroup" stepKey="fillFieldSecondAttempt">
             <argument name="role" value="roleAdministrator" />
             <argument name="currentAdminPassword" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}INVALID" />
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml
index 501e9520c6367..0943b33e8a711 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminUpdateUserTest.xml
@@ -18,8 +18,9 @@
             <description value="Change full access role for admin user to custom one with restricted permission (Sales)"/>
             <group value="user"/>
             <group value="mtf_migrated"/>
-            <!-- skip due to MQE-1964 -->
-            <group value="skip"/>
+            <skip>
+                <issueId value="MQE-1964"/>
+            </skip>
         </annotations>
 
         <before>

From 692af26d1c656b9cdf8774acdaf160f1551a05bc Mon Sep 17 00:00:00 2001
From: engcom-Echo <engcom-vendorworker-echo@adobe.com>
Date: Fri, 5 Jun 2020 12:03:34 +0300
Subject: [PATCH 204/307] MC-34950 - Wrong style for Product in Checkout Cart

---
 .../frontend/web/template/summary/item/details/thumbnail.html   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html b/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html
index eb218bbee9941..fa32ea1b212ae 100644
--- a/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html
+++ b/app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html
@@ -5,7 +5,7 @@
  */
 -->
 <span class="product-image-container"
-      data-bind="attr: {'style': 'height: ' + getHeight($parents[1]) + 'px; width: ' + getWidth($parents[1]) + 'px;' }">
+      data-bind="attr: {'style': 'height: ' + getHeight($parents[1])/2 + 'px; width: ' + getWidth($parents[1])/2 + 'px;' }">
     <span class="product-image-wrapper">
         <img
             data-bind="attr: {'src': getSrc($parents[1]), 'width': getWidth($parents[1]), 'height': getHeight($parents[1]), 'alt': getAlt($parents[1]), 'title': getAlt($parents[1]) }"/>

From d1133e4a28a798d97f842fdb85183c5701236cfc Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 8 Jun 2020 12:36:48 -0500
Subject: [PATCH 205/307] MC-34764: Fix performance degradation cause by CSP

---
 .../catalog/product/composite/configure.phtml       | 13 +++++++------
 .../templates/product/image_with_borders.phtml      |  5 +++--
 .../view/frontend/templates/js/cookie_status.phtml  |  2 +-
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index 24aa060e3259a..b7aa24107562c 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -23,7 +23,8 @@
             <div id="product_composite_configure_form_fields" class="content product-composite-configure-inner"></div>
             <div id="product_composite_configure_form_additional" class="product_composite_configure_form_additional">
             </div>
-            <div id="product_composite_configure_form_confirmed" class="product_composite_configure_form_confirmed"></div>
+            <div id="product_composite_configure_form_confirmed" class="product_composite_configure_form_confirmed">
+            </div>
         </div>
         <input type="hidden" name="as_js_varname" value="iFrameResponse" />
         <input type="hidden" name="form_key" value="<?= $block->escapeHtmlAttr($block->getFormKey()) ?>" />
@@ -44,11 +45,11 @@
         prodCompConfIframe.style.position = "absolute";
         prodCompConfIframe.style.top = "-1000px";
         prodCompConfIframe.style.left = "-1000px";
-        document.querySelector(".product_composite_configure_messages:last-of-type").style.display = "none";
-        document.querySelector(".product_composite_configure_form_additional:last-of-type").style.display = "none";
-        document.querySelector(".product_composite_configure_form_confirmed:last-of-type").style.display = "none";
-        document.querySelector(".product_composite_configure_confirmed:last-of-type").style.display = "none";
-        document.querySelector(".product-configure-popup:last-of-type").style.display = "none";
+        document.querySelectorAll(".product_composite_configure_messages").forEach((e) => e.style.display = "none");
+        document.querySelectorAll(".product_composite_configure_form_additional").forEach((e) => e.style.display = "none");
+        document.querySelectorAll(".product_composite_configure_form_confirmed").forEach((e) => e.style.display = "none");
+        document.querySelectorAll(".product_composite_configure_confirmed").forEach((e) => e.style.display = "none");
+        document.querySelectorAll(".product-configure-popup").forEach((e) => e.style.display = "none");
 
         require([
             "jquery",
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index ead23a150629b..a98e622b4156a 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -41,7 +41,8 @@ $padding = $block->getRatio() * 100;
 <?php
 $script = <<<SCRIPT
 document.querySelector('#product-image-container-{$block->getProductId()}').style.width = '{$width}px';
-document.querySelector('#product-image-container-{$block->getProductId()} span.product-image-wrapper').style.paddingBottom = '{$padding}%'
+document.querySelector('#product-image-container-{$block->getProductId()} span.product-image-wrapper')
+    .style.paddingBottom = '{$padding}%'
 SCRIPT;
-echo /* @noEscape */$secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false);
 ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false); ?>
diff --git a/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml b/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
index 084b2b54c7188..7d43ffcbb8063 100644
--- a/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
+++ b/app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml
@@ -12,8 +12,8 @@
 </div>
 <?php
 $script = 'document.querySelector("#cookie-status").style.display = "none";';
-echo /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false);
 ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false); ?>
 
 <script type="text/x-magento-init">
     {

From bfeb5bc2f9a52ad41ebbf78097b77668a0f3bfa9 Mon Sep 17 00:00:00 2001
From: Ji Lu <jilu1@adobe.com>
Date: Mon, 8 Jun 2020 13:41:51 -0500
Subject: [PATCH 206/307] MQE-2153: bump MFTF version to 3.0.0-RC4

---
 composer.json |  2 +-
 composer.lock | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/composer.json b/composer.json
index 4cd8a3989f188..aa293fdfb014b 100644
--- a/composer.json
+++ b/composer.json
@@ -88,7 +88,7 @@
         "friendsofphp/php-cs-fixer": "~2.16.0",
         "lusitanian/oauth": "~0.8.10",
         "magento/magento-coding-standard": "*",
-        "magento/magento2-functional-testing-framework": "dev-3.0.0-RC4",
+        "magento/magento2-functional-testing-framework": "3.0.0-RC4",
         "pdepend/pdepend": "~2.7.1",
         "phpcompatibility/php-compatibility": "^9.3",
         "phpmd/phpmd": "^2.8.0",
diff --git a/composer.lock b/composer.lock
index d8f088f450af2..eea11746a42fa 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "e25a6a8d64ffec2bd0b839679158f286",
+    "content-hash": "2ddc5369636a860cfa82ef023c958bd6",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -7083,16 +7083,16 @@
         },
         {
             "name": "magento/magento2-functional-testing-framework",
-            "version": "dev-3.0.0-RC4",
+            "version": "3.0.0-RC4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/magento2-functional-testing-framework.git",
-                "reference": "e36fc50f8a73a9d22239895fb819cc16767a5179"
+                "reference": "34781ccc7385993b1e5bc9182e6ddddde7f2769f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/e36fc50f8a73a9d22239895fb819cc16767a5179",
-                "reference": "e36fc50f8a73a9d22239895fb819cc16767a5179",
+                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/34781ccc7385993b1e5bc9182e6ddddde7f2769f",
+                "reference": "34781ccc7385993b1e5bc9182e6ddddde7f2769f",
                 "shasum": ""
             },
             "require": {
@@ -7168,7 +7168,7 @@
                 "magento",
                 "testing"
             ],
-            "time": "2020-06-05T22:31:19+00:00"
+            "time": "2020-06-08T18:17:54+00:00"
         },
         {
             "name": "mikey179/vfsstream",
@@ -10514,7 +10514,7 @@
     "minimum-stability": "stable",
     "stability-flags": {
         "magento/composer": 20,
-        "magento/magento2-functional-testing-framework": 20
+        "magento/magento2-functional-testing-framework": 5
     },
     "prefer-stable": true,
     "prefer-lowest": false,

From d24daec2a1776c40f8f09becff138e361b14cc36 Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Mon, 8 Jun 2020 14:59:44 -0500
Subject: [PATCH 207/307] MC-33857: Update AdapterInterface::fetchRow return
 type

---
 .../Framework/DB/Adapter/AdapterInterface.php | 32 +++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
index f654fd263f605..5e061100c4216 100644
--- a/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
+++ b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
@@ -36,7 +36,7 @@ interface AdapterInterface
     const INSERT_ON_DUPLICATE = 1;
 
     const INSERT_IGNORE = 2;
-    
+
     /** Strategy for updating data in table. See https://dev.mysql.com/doc/refman/5.7/en/replace.html */
     const REPLACE = 4;
 
@@ -258,7 +258,7 @@ public function renameTable($oldTableName, $newTableName, $schemaName = null);
      *
      * @param string $tableName
      * @param string $columnName
-     * @param array|string $definition  string specific or universal array DB Server definition
+     * @param array|string $definition string specific or universal array DB Server definition
      * @param string $schemaName
      * @return \Magento\Framework\DB\Adapter\AdapterInterface
      */
@@ -273,7 +273,7 @@ public function addColumn($tableName, $columnName, $definition, $schemaName = nu
      * @param string $oldColumnName
      * @param string $newColumnName
      * @param array|string $definition
-     * @param boolean $flushData        flush table statistic
+     * @param boolean $flushData flush table statistic
      * @param string $schemaName
      * @return \Magento\Framework\DB\Adapter\AdapterInterface
      */
@@ -323,8 +323,8 @@ public function tableColumnExists($tableName, $columnName, $schemaName = null);
      *
      * @param string $tableName
      * @param string $indexName
-     * @param string|array $fields  the table column name or array of ones
-     * @param string $indexType     the index type
+     * @param string|array $fields the table column name or array of ones
+     * @param string $indexType the index type
      * @param string $schemaName
      * @return \Zend_Db_Statement_Interface
      */
@@ -468,7 +468,7 @@ public function insertMultiple($table, array $data);
      *      array('value1', 'value2')
      *
      * @param   string $table
-     * @param   string[] $columns  the data array column map
+     * @param   string[] $columns the data array column map
      * @param   array $data
      * @return  int
      */
@@ -550,7 +550,7 @@ public function fetchAll($sql, $bind = [], $fetchMode = null);
      * @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
      * @param mixed $bind Data to bind into SELECT placeholders.
      * @param mixed $fetchMode Override current fetch mode.
-     * @return array
+     * @return mixed Array, object, or scalar depending on fetch mode.
      */
     public function fetchRow($sql, $bind = [], $fetchMode = null);
 
@@ -750,7 +750,7 @@ public function saveDdlCache($tableCacheKey, $ddlType, $data);
      * Return false if cache does not exists
      *
      * @param string $tableCacheKey the table cache key
-     * @param int $ddlType          the DDL constant
+     * @param int $ddlType the DDL constant
      * @return string|array|int|false
      */
     public function loadDdlCache($tableCacheKey, $ddlType);
@@ -864,7 +864,7 @@ public function getGreatestSql(array $data);
      *
      * @see INTERVAL_* constants for $unit
      *
-     * @param \Zend_Db_Expr|string $date   quoted field name or SQL statement
+     * @param \Zend_Db_Expr|string $date quoted field name or SQL statement
      * @param int $interval
      * @param string $unit
      * @return \Zend_Db_Expr
@@ -876,7 +876,7 @@ public function getDateAddSql($date, $interval, $unit);
      *
      * @see INTERVAL_* constants for $unit
      *
-     * @param \Zend_Db_Expr|string $date   quoted field name or SQL statement
+     * @param \Zend_Db_Expr|string $date quoted field name or SQL statement
      * @param int|string $interval
      * @param string $unit
      * @return \Zend_Db_Expr
@@ -895,7 +895,7 @@ public function getDateSubSql($date, $interval, $unit);
      * %m   Month, numeric (00..12)
      * %Y   Year, numeric, four digits
      *
-     * @param \Zend_Db_Expr|string $date   quoted field name or SQL statement
+     * @param \Zend_Db_Expr|string $date quoted field name or SQL statement
      * @param string $format
      * @return \Zend_Db_Expr
      */
@@ -932,7 +932,7 @@ public function getStandardDeviationSql($expressionField);
      *
      * @see INTERVAL_* constants for $unit
      *
-     * @param \Zend_Db_Expr|string $date   quoted field name or SQL statement
+     * @param \Zend_Db_Expr|string $date quoted field name or SQL statement
      * @param string $unit
      * @return \Zend_Db_Expr
      */
@@ -951,9 +951,9 @@ public function getTableName($tableName);
     /**
      * Build a trigger name based on table name and trigger details
      *
-     * @param string $tableName  The table that is the subject of the trigger
-     * @param string $time  Either "before" or "after"
-     * @param string $event  The DB level event which activates the trigger, i.e. "update" or "insert"
+     * @param string $tableName The table that is the subject of the trigger
+     * @param string $time Either "before" or "after"
+     * @param string $event The DB level event which activates the trigger, i.e. "update" or "insert"
      * @return string
      */
     public function getTriggerName($tableName, $time, $event);
@@ -964,7 +964,7 @@ public function getTriggerName($tableName, $time, $event);
      * Check index name length and allowed symbols
      *
      * @param string $tableName
-     * @param string|array $fields  the columns list
+     * @param string|array $fields the columns list
      * @param string $indexType
      * @return string
      */

From 7bd81ec10f09db8ddfd3a89e74669e366c9c15ca Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 8 Jun 2020 15:39:50 -0500
Subject: [PATCH 208/307] MC-34764: Fix performance degradation cause by CSP

---
 .../templates/catalog/product/composite/configure.phtml   | 6 ++++--
 .../frontend/templates/product/layered/renderer.phtml     | 8 ++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index b7aa24107562c..d8a278f24d616 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -46,8 +46,10 @@
         prodCompConfIframe.style.top = "-1000px";
         prodCompConfIframe.style.left = "-1000px";
         document.querySelectorAll(".product_composite_configure_messages").forEach((e) => e.style.display = "none");
-        document.querySelectorAll(".product_composite_configure_form_additional").forEach((e) => e.style.display = "none");
-        document.querySelectorAll(".product_composite_configure_form_confirmed").forEach((e) => e.style.display = "none");
+        document.querySelectorAll(".product_composite_configure_form_additional")
+            .forEach((e) => e.style.display = "none");
+        document.querySelectorAll(".product_composite_configure_form_confirmed")
+            .forEach((e) => e.style.display = "none");
         document.querySelectorAll(".product_composite_configure_confirmed").forEach((e) => e.style.display = "none");
         document.querySelectorAll(".product-configure-popup").forEach((e) => e.style.display = "none");
 
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index f72f914233134..e4c60951ddc89 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -58,11 +58,11 @@
                             $script = 'let ' .$element
                                 .' = document.querySelector(\'div[data-option-id="' .$escaper->escapeJs($option)
                                 .'"]\');' .PHP_EOL;
-                            $script .= $element .'.style.background = "background: url(\''
+                            $script .= $element .'.style.background = "url(\''
                                 .$escapedUrl .'\') no-repeat center";' .PHP_EOL;
                             $script .= $element .'.style.backgroundSize = "initial";';
-                            echo /* @noEscape*/ $secureRenderer->renderTag('script', [], $script, false);
                             ?>
+                            <?= /* @noEscape*/ $secureRenderer->renderTag('script', [], $script, false); ?>
                             <?php break;
                         case '1':
                             ?>
@@ -84,11 +84,11 @@
                             $script = 'let ' .$element
                                 .' = document.querySelector(\'div[data-option-id="' .$escaper->escapeJs($option)
                                 .'"]\');' .PHP_EOL;
-                            $script .= $element .'.style.background = "background: ' .$backgroundValue
+                            $script .= $element .'.style.background = "' .$backgroundValue
                                 .' no-repeat center";' .PHP_EOL;
                             $script .= $element .'.style.backgroundSize = "initial";';
-                            echo /* @noEscape*/ $secureRenderer->renderTag('script', [], $script, false);
                             ?>
+                            <?= /* @noEscape*/ $secureRenderer->renderTag('script', [], $script, false); ?>
                             <?php break;
                         case '0':
                         default:

From 0973b2e5dd77d1ba0cbd316a5e448c49d0af8cd9 Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Tue, 9 Jun 2020 09:45:36 -0500
Subject: [PATCH 209/307] MC-33857: Update AdapterInterface::fetchRow return
 type

---
 dev/tests/api-functional/phpunit_graphql.xml.dist | 2 +-
 dev/tests/api-functional/phpunit_rest.xml.dist    | 6 +++---
 dev/tests/api-functional/phpunit_soap.xml.dist    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev/tests/api-functional/phpunit_graphql.xml.dist b/dev/tests/api-functional/phpunit_graphql.xml.dist
index aa1899d88f48e..b9f38daddb3a6 100644
--- a/dev/tests/api-functional/phpunit_graphql.xml.dist
+++ b/dev/tests/api-functional/phpunit_graphql.xml.dist
@@ -8,7 +8,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.2/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          beStrictAboutTestsThatDoNotTestAnything="false"
diff --git a/dev/tests/api-functional/phpunit_rest.xml.dist b/dev/tests/api-functional/phpunit_rest.xml.dist
index c5173e5dd432e..f6c0d49a93853 100644
--- a/dev/tests/api-functional/phpunit_rest.xml.dist
+++ b/dev/tests/api-functional/phpunit_rest.xml.dist
@@ -8,7 +8,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.2/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          beStrictAboutTestsThatDoNotTestAnything="false"
@@ -17,9 +17,9 @@
     <!-- Test suites definition -->
     <testsuites>
         <testsuite name="Magento REST web API functional tests">
-            <directory suffix="Test.php">testsuite</directory>
+            <directory>testsuite</directory>
+            <directory>../../../app/code/*/*/Test/Api</directory>
             <exclude>testsuite/Magento/GraphQl</exclude>
-            <directory suffix="Test.php">../../../app/code/*/*/Test/Api</directory>
         </testsuite>
     </testsuites>
 
diff --git a/dev/tests/api-functional/phpunit_soap.xml.dist b/dev/tests/api-functional/phpunit_soap.xml.dist
index 935f5113b67a7..743a82d72c9e3 100644
--- a/dev/tests/api-functional/phpunit_soap.xml.dist
+++ b/dev/tests/api-functional/phpunit_soap.xml.dist
@@ -8,7 +8,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.2/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          beStrictAboutTestsThatDoNotTestAnything="false"

From fcb1bd10a67318a9d4ef5e8c8a4d88ee93c5ca45 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 9 Jun 2020 13:22:47 -0500
Subject: [PATCH 210/307] MC-34764: Fix performance degradation cause by CSP

---
 .../catalog/product/composite/configure.phtml | 27 ++++++++++++++-----
 .../templates/order/create/data.phtml         |  2 +-
 .../templates/product/layered/renderer.phtml  |  4 +--
 .../View/Helper/SecureHtmlRenderer.php        |  8 +++---
 4 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
index d8a278f24d616..d04eb300746ac 100644
--- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml
@@ -45,13 +45,26 @@
         prodCompConfIframe.style.position = "absolute";
         prodCompConfIframe.style.top = "-1000px";
         prodCompConfIframe.style.left = "-1000px";
-        document.querySelectorAll(".product_composite_configure_messages").forEach((e) => e.style.display = "none");
-        document.querySelectorAll(".product_composite_configure_form_additional")
-            .forEach((e) => e.style.display = "none");
-        document.querySelectorAll(".product_composite_configure_form_confirmed")
-            .forEach((e) => e.style.display = "none");
-        document.querySelectorAll(".product_composite_configure_confirmed").forEach((e) => e.style.display = "none");
-        document.querySelectorAll(".product-configure-popup").forEach((e) => e.style.display = "none");
+        prodCompConfMessages = document.querySelectorAll(".product_composite_configure_messages");
+        for (var i = 0; i < prodCompConfMessages.length; i++) {
+            prodCompConfMessages[i].style.display = "none";
+        }
+        prodCompConfFormAdd = document.querySelectorAll(".product_composite_configure_form_additional");
+        for (var i = 0; i < prodCompConfFormAdd.length; i++) {
+            prodCompConfFormAdd[i].style.display = "none";
+        }
+        prodCompConfFormConf = document.querySelectorAll(".product_composite_configure_form_confirmed");
+        for (var i = 0; i < prodCompConfFormConf.length; i++) {
+            prodCompConfFormConf[i].style.display = "none";
+        }
+        prodCompConfConf = document.querySelectorAll(".product_composite_configure_confirmed");
+        for (var i = 0; i < prodCompConfConf.length; i++) {
+            prodCompConfConf[i].style.display = "none";
+        }
+        prodConfPopup = document.querySelectorAll(".product-configure-popup");
+        for (var i = 0; i < prodConfPopup.length; i++) {
+            prodConfPopup[i].style.display = "none";
+        }
 
         require([
             "jquery",
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
index afa08c32773ed..ced1ea5e7b73a 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/data.phtml
@@ -31,7 +31,7 @@ script;
         <?= /* @noEscape */ $secureRenderer->renderTag(
             'script',
             [],
-            "let elemOrderSearch = document.querySelector('div#order-search');
+            "var elemOrderSearch = document.querySelector('div#order-search');
             if (elemOrderSearch) {
                 elemOrderSearch.style.display = 'none';
                 elemOrderSearch.classList.remove('no-display');
diff --git a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
index e4c60951ddc89..bae3820042de0 100644
--- a/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
+++ b/app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml
@@ -55,7 +55,7 @@
                             </div>
                             <?php
                             $element = 'swatchImageOption' .$escaper->escapeJs($option);
-                            $script = 'let ' .$element
+                            $script = 'var ' .$element
                                 .' = document.querySelector(\'div[data-option-id="' .$escaper->escapeJs($option)
                                 .'"]\');' .PHP_EOL;
                             $script .= $element .'.style.background = "url(\''
@@ -81,7 +81,7 @@
                             $backgroundValue = $escaper->escapeJs(
                                 str_replace('\'', '\\\'', $swatchData['swatches'][$option]['value'])
                             );
-                            $script = 'let ' .$element
+                            $script = 'var ' .$element
                                 .' = document.querySelector(\'div[data-option-id="' .$escaper->escapeJs($option)
                                 .'"]\');' .PHP_EOL;
                             $script .= $element .'.style.background = "' .$backgroundValue
diff --git a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
index 4c9bdaa5a68d4..ae8ab3f15bc96 100644
--- a/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
+++ b/lib/internal/Magento/Framework/View/Helper/SecureHtmlRenderer.php
@@ -111,10 +111,10 @@ public function renderEventListenerAsTag(
             function {$listenerFunction} () {
                 {$attributeJavascript};
             }
-            let {$elementName} = document.querySelector("{$elementSelector}");
+            var {$elementName} = document.querySelector("{$elementSelector}");
             if ({$elementName}) {
-                {$elementName}.{$eventName} = (event) => {
-                    let targetElement = {$elementName};
+                {$elementName}.{$eventName} = function (event) {
+                    var targetElement = {$elementName};
                     if (event && event.target) {
                         targetElement = event.target;
                     }
@@ -161,7 +161,7 @@ public function renderStyleAsTag(string $style, string $selector): string
         return $this->renderTag(
             'script',
             ['type' => 'text/javascript'],
-            "let $elementVariable = document.querySelector('$selector');\n"
+            "var $elementVariable = document.querySelector('$selector');\n"
             ."if ($elementVariable) {\n{$stylesAssignments}}",
             false
         );

From e1a484c25f6f898ff0f31a4606b4aa1597f2ef87 Mon Sep 17 00:00:00 2001
From: Iryna Lagno <ilagno@adobe.com>
Date: Tue, 9 Jun 2020 13:54:52 -0500
Subject: [PATCH 211/307] MC-35039: Update Elasticsearch dependencies for 2.4.0

---
 app/code/Magento/Elasticsearch/composer.json  |   2 +-
 .../System/Config/TestConnection.php          |   1 +
 .../FieldName/Resolver/DefaultResolver.php    |   2 +
 .../Model/Client/Elasticsearch.php            |   2 +
 app/code/Magento/Elasticsearch6/composer.json |   2 +-
 app/code/Magento/Elasticsearch6/etc/di.xml    |   2 +-
 app/code/Magento/Elasticsearch7/composer.json |   2 +-
 composer.json                                 |   2 +-
 composer.lock                                 | 638 ++++++++++++------
 .../testFromCreateProject/composer.lock       |   6 +-
 .../_files/testSkeleton/composer.lock         |   6 +-
 11 files changed, 457 insertions(+), 208 deletions(-)

diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json
index 386bb1af298bb..8527991f354d9 100644
--- a/app/code/Magento/Elasticsearch/composer.json
+++ b/app/code/Magento/Elasticsearch/composer.json
@@ -12,7 +12,7 @@
         "magento/module-store": "*",
         "magento/module-catalog-inventory": "*",
         "magento/framework": "*",
-        "elasticsearch/elasticsearch": "~7.6"
+        "elasticsearch/elasticsearch": "7.6.*"
     },
     "suggest": {
         "magento/module-config": "*"
diff --git a/app/code/Magento/Elasticsearch6/Block/Adminhtml/System/Config/TestConnection.php b/app/code/Magento/Elasticsearch6/Block/Adminhtml/System/Config/TestConnection.php
index 1b17db1a00f6e..c192b43bdc081 100644
--- a/app/code/Magento/Elasticsearch6/Block/Adminhtml/System/Config/TestConnection.php
+++ b/app/code/Magento/Elasticsearch6/Block/Adminhtml/System/Config/TestConnection.php
@@ -7,6 +7,7 @@
 
 /**
  * Elasticsearch 6.x test connection block
+ * @deprecated the new minor release supports compatibility with Elasticsearch 7
  */
 class TestConnection extends \Magento\AdvancedSearch\Block\Adminhtml\System\Config\TestConnection
 {
diff --git a/app/code/Magento/Elasticsearch6/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php b/app/code/Magento/Elasticsearch6/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php
index 7532927f1dc85..cc8f69e92a858 100644
--- a/app/code/Magento/Elasticsearch6/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php
+++ b/app/code/Magento/Elasticsearch6/Model/Adapter/FieldMapper/Product/FieldProvider/FieldName/Resolver/DefaultResolver.php
@@ -12,6 +12,8 @@
 
 /**
  * Default name resolver.
+ *
+ * @deprecated the new minor release supports compatibility with Elasticsearch 7
  */
 class DefaultResolver extends Base
 {
diff --git a/app/code/Magento/Elasticsearch6/Model/Client/Elasticsearch.php b/app/code/Magento/Elasticsearch6/Model/Client/Elasticsearch.php
index 2c1c283c5b24d..20ce70a4eba4c 100644
--- a/app/code/Magento/Elasticsearch6/Model/Client/Elasticsearch.php
+++ b/app/code/Magento/Elasticsearch6/Model/Client/Elasticsearch.php
@@ -11,6 +11,8 @@
 
 /**
  * Elasticsearch client
+ *
+ * @deprecated the new minor release supports compatibility with Elasticsearch 7
  */
 class Elasticsearch implements ClientInterface
 {
diff --git a/app/code/Magento/Elasticsearch6/composer.json b/app/code/Magento/Elasticsearch6/composer.json
index 36297b03198e2..c3b32ba043345 100644
--- a/app/code/Magento/Elasticsearch6/composer.json
+++ b/app/code/Magento/Elasticsearch6/composer.json
@@ -8,7 +8,7 @@
         "magento/module-catalog-search": "*",
         "magento/module-search": "*",
         "magento/module-elasticsearch": "*",
-        "elasticsearch/elasticsearch": "~7.6"
+        "elasticsearch/elasticsearch": "7.6.*"
     },
     "suggest": {
         "magento/module-config": "*"
diff --git a/app/code/Magento/Elasticsearch6/etc/di.xml b/app/code/Magento/Elasticsearch6/etc/di.xml
index 7263ae01f0f6d..e60f331f9ee8d 100644
--- a/app/code/Magento/Elasticsearch6/etc/di.xml
+++ b/app/code/Magento/Elasticsearch6/etc/di.xml
@@ -17,7 +17,7 @@
     <type name="Magento\Search\Model\Adminhtml\System\Config\Source\Engine">
         <arguments>
             <argument name="engines" xsi:type="array">
-                <item sortOrder="20" name="elasticsearch6" xsi:type="string">Elasticsearch 6.x</item>
+                <item sortOrder="20" name="elasticsearch6" xsi:type="string">Elasticsearch 6.x (Deprecated)</item>
             </argument>
         </arguments>
     </type>
diff --git a/app/code/Magento/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json
index 739ac1019c5ae..92074f9bc0de6 100644
--- a/app/code/Magento/Elasticsearch7/composer.json
+++ b/app/code/Magento/Elasticsearch7/composer.json
@@ -5,7 +5,7 @@
         "php": "~7.3.0||~7.4.0",
         "magento/framework": "*",
         "magento/module-elasticsearch": "*",
-        "elasticsearch/elasticsearch": "~7.6",
+        "elasticsearch/elasticsearch": "7.6.*",
         "magento/module-advanced-search": "*",
         "magento/module-catalog-search": "*"
     },
diff --git a/composer.json b/composer.json
index d487ad5975040..f3bb73bac082e 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,7 @@
         "colinmollenhour/credis": "1.11.1",
         "colinmollenhour/php-redis-session-abstract": "~1.4.0",
         "composer/composer": "^1.9",
-        "elasticsearch/elasticsearch": "~7.6",
+        "elasticsearch/elasticsearch": "7.6.*",
         "guzzlehttp/guzzle": "^6.3.3",
         "laminas/laminas-captcha": "^2.7.1",
         "laminas/laminas-code": "~3.4.1",
diff --git a/composer.lock b/composer.lock
index 6a47e7e44ab69..fc5c02b02a68f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "e86af25d9a4a1942c437cca58f9f1efb",
+    "content-hash": "5f3c699b683c0423f6320bb81c7b8dc4",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -220,16 +220,16 @@
         },
         {
             "name": "composer/composer",
-            "version": "1.10.6",
+            "version": "1.10.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88"
+                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/be81b9c4735362c26876bdbfd3b5bc7e7f711c88",
-                "reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88",
+                "url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
+                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
                 "shasum": ""
             },
             "require": {
@@ -237,7 +237,7 @@
                 "composer/semver": "^1.0",
                 "composer/spdx-licenses": "^1.2",
                 "composer/xdebug-handler": "^1.1",
-                "justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0",
+                "justinrainbow/json-schema": "^5.2.10",
                 "php": "^5.3.2 || ^7.0",
                 "psr/log": "^1.0",
                 "seld/jsonlint": "^1.4",
@@ -302,12 +302,16 @@
                     "url": "https://packagist.com",
                     "type": "custom"
                 },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
                 {
                     "url": "https://tidelift.com/funding/github/packagist/composer/composer",
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-05-06T08:28:10+00:00"
+            "time": "2020-06-03T08:03:56+00:00"
         },
         {
             "name": "composer/semver",
@@ -432,16 +436,16 @@
         },
         {
             "name": "composer/xdebug-handler",
-            "version": "1.4.1",
+            "version": "1.4.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/xdebug-handler.git",
-                "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
+                "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
-                "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
+                "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51",
+                "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51",
                 "shasum": ""
             },
             "require": {
@@ -476,9 +480,17 @@
                 {
                     "url": "https://packagist.com",
                     "type": "custom"
+                },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
                 }
             ],
-            "time": "2020-03-01T12:26:26+00:00"
+            "time": "2020-06-04T11:16:35+00:00"
         },
         {
             "name": "container-interop/container-interop",
@@ -514,16 +526,16 @@
         },
         {
             "name": "elasticsearch/elasticsearch",
-            "version": "v7.7.0",
+            "version": "v7.6.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/elastic/elasticsearch-php.git",
-                "reference": "1d90a7ff4fb1936dc4376f09d723af75714f6f05"
+                "reference": "d4f24bc43c2af60aece3df20eb689d322f9c8acf"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/1d90a7ff4fb1936dc4376f09d723af75714f6f05",
-                "reference": "1d90a7ff4fb1936dc4376f09d723af75714f6f05",
+                "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/d4f24bc43c2af60aece3df20eb689d322f9c8acf",
+                "reference": "d4f24bc43c2af60aece3df20eb689d322f9c8acf",
                 "shasum": ""
             },
             "require": {
@@ -573,7 +585,7 @@
                 "elasticsearch",
                 "search"
             ],
-            "time": "2020-05-13T15:19:26+00:00"
+            "time": "2020-02-15T00:09:00+00:00"
         },
         {
             "name": "ezimuel/guzzlestreams",
@@ -678,16 +690,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.5.3",
+            "version": "6.5.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e"
+                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e",
-                "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
                 "shasum": ""
             },
             "require": {
@@ -695,7 +707,7 @@
                 "guzzlehttp/promises": "^1.0",
                 "guzzlehttp/psr7": "^1.6.1",
                 "php": ">=5.5",
-                "symfony/polyfill-intl-idn": "^1.11"
+                "symfony/polyfill-intl-idn": "1.17.0"
             },
             "require-dev": {
                 "ext-curl": "*",
@@ -741,7 +753,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2020-04-18T10:38:46+00:00"
+            "time": "2020-05-25T19:35:05+00:00"
         },
         {
             "name": "guzzlehttp/promises",
@@ -867,16 +879,16 @@
         },
         {
             "name": "justinrainbow/json-schema",
-            "version": "5.2.9",
+            "version": "5.2.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/justinrainbow/json-schema.git",
-                "reference": "44c6787311242a979fa15c704327c20e7221a0e4"
+                "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/44c6787311242a979fa15c704327c20e7221a0e4",
-                "reference": "44c6787311242a979fa15c704327c20e7221a0e4",
+                "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b",
+                "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b",
                 "shasum": ""
             },
             "require": {
@@ -929,7 +941,7 @@
                 "json",
                 "schema"
             ],
-            "time": "2019-09-25T14:49:45+00:00"
+            "time": "2020-05-27T16:41:55+00:00"
         },
         {
             "name": "laminas/laminas-captcha",
@@ -4223,11 +4235,6 @@
                 "MIT"
             ],
             "authors": [
-                {
-                    "name": "Ben Ramsey",
-                    "email": "ben@benramsey.com",
-                    "homepage": "https://benramsey.com"
-                },
                 {
                     "name": "Marijn Huizendveld",
                     "email": "marijn.huizendveld@gmail.com"
@@ -4235,6 +4242,11 @@
                 {
                     "name": "Thibaud Fabre",
                     "email": "thibaud@aztech.io"
+                },
+                {
+                    "name": "Ben Ramsey",
+                    "email": "ben@benramsey.com",
+                    "homepage": "https://benramsey.com"
                 }
             ],
             "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
@@ -4397,22 +4409,23 @@
         },
         {
             "name": "symfony/console",
-            "version": "v4.4.8",
+            "version": "v4.4.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
-                "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7"
+                "reference": "326b064d804043005526f5a0494cfb49edb59bb0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/10bb3ee3c97308869d53b3e3d03f6ac23ff985f7",
-                "reference": "10bb3ee3c97308869d53b3e3d03f6ac23ff985f7",
+                "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0",
+                "reference": "326b064d804043005526f5a0494cfb49edb59bb0",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1.3",
+                "php": ">=7.1.3",
                 "symfony/polyfill-mbstring": "~1.0",
                 "symfony/polyfill-php73": "^1.8",
+                "symfony/polyfill-php80": "^1.15",
                 "symfony/service-contracts": "^1.1|^2"
             },
             "conflict": {
@@ -4483,29 +4496,29 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-03-30T11:41:10+00:00"
+            "time": "2020-05-30T20:06:45+00:00"
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
-                "reference": "5f8d5271303dad260692ba73dfa21777d38e124e"
+                "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/css-selector/zipball/5f8d5271303dad260692ba73dfa21777d38e124e",
-                "reference": "5f8d5271303dad260692ba73dfa21777d38e124e",
+                "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9",
+                "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5"
+                "php": ">=7.2.5"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -4550,24 +4563,24 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-03-27T16:56:45+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v4.4.8",
+            "version": "v4.4.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
-                "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed"
+                "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/abc8e3618bfdb55e44c8c6a00abd333f831bbfed",
-                "reference": "abc8e3618bfdb55e44c8c6a00abd333f831bbfed",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866",
+                "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1.3",
+                "php": ">=7.1.3",
                 "symfony/event-dispatcher-contracts": "^1.1"
             },
             "conflict": {
@@ -4634,7 +4647,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-03-27T16:54:36+00:00"
+            "time": "2020-05-20T08:37:50+00:00"
         },
         {
             "name": "symfony/event-dispatcher-contracts",
@@ -4696,26 +4709,26 @@
         },
         {
             "name": "symfony/filesystem",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
-                "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91"
+                "reference": "6e4320f06d5f2cce0d96530162491f4465179157"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91",
-                "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91",
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/6e4320f06d5f2cce0d96530162491f4465179157",
+                "reference": "6e4320f06d5f2cce0d96530162491f4465179157",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "symfony/polyfill-ctype": "~1.8"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -4756,29 +4769,29 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-12T14:40:17+00:00"
+            "time": "2020-05-30T20:35:19+00:00"
         },
         {
             "name": "symfony/finder",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
-                "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d"
+                "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d",
-                "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d",
+                "url": "https://api.github.com/repos/symfony/finder/zipball/4298870062bfc667cb78d2b379be4bf5dec5f187",
+                "reference": "4298870062bfc667cb78d2b379be4bf5dec5f187",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5"
+                "php": ">=7.2.5"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -4819,7 +4832,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-03-27T16:56:45+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/polyfill-ctype",
@@ -5183,18 +5196,94 @@
             ],
             "time": "2020-05-12T16:47:27+00:00"
         },
+        {
+            "name": "symfony/polyfill-php80",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.8"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
+                },
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-12T16:47:27+00:00"
+        },
         {
             "name": "symfony/process",
-            "version": "v4.4.8",
+            "version": "v4.4.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
-                "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4"
+                "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4",
-                "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4",
+                "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5",
+                "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5",
                 "shasum": ""
             },
             "require": {
@@ -5244,24 +5333,24 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-15T15:56:18+00:00"
+            "time": "2020-05-30T20:06:45+00:00"
         },
         {
             "name": "symfony/service-contracts",
-            "version": "v2.0.1",
+            "version": "v2.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "144c5e51266b281231e947b51223ba14acf1a749"
+                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
-                "reference": "144c5e51266b281231e947b51223ba14acf1a749",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b",
+                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "psr/container": "^1.0"
             },
             "suggest": {
@@ -5270,7 +5359,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.0-dev"
+                    "dev-master": "2.1-dev"
                 }
             },
             "autoload": {
@@ -5302,7 +5391,21 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2019-11-18T17:27:11+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "tedivm/jshrink",
@@ -5720,16 +5823,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.138.7",
+            "version": "3.140.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "6b9f3fcea4dfa6092c628c790ca6d369a75453b7"
+                "reference": "298ec070adad5760c4b90348219bb3e6bd7a9322"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6b9f3fcea4dfa6092c628c790ca6d369a75453b7",
-                "reference": "6b9f3fcea4dfa6092c628c790ca6d369a75453b7",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/298ec070adad5760c4b90348219bb3e6bd7a9322",
+                "reference": "298ec070adad5760c4b90348219bb3e6bd7a9322",
                 "shasum": ""
             },
             "require": {
@@ -5800,7 +5903,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-05-22T18:11:09+00:00"
+            "time": "2020-06-09T18:11:16+00:00"
         },
         {
             "name": "beberlei/assert",
@@ -6018,16 +6121,16 @@
         },
         {
             "name": "codeception/codeception",
-            "version": "4.1.4",
+            "version": "4.1.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/Codeception.git",
-                "reference": "55d8d1d882fa0777e47de17b04c29b3c50fe29e7"
+                "reference": "5515b6a6c6f1e1c909aaff2e5f3a15c177dfd1a9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/Codeception/zipball/55d8d1d882fa0777e47de17b04c29b3c50fe29e7",
-                "reference": "55d8d1d882fa0777e47de17b04c29b3c50fe29e7",
+                "url": "https://api.github.com/repos/Codeception/Codeception/zipball/5515b6a6c6f1e1c909aaff2e5f3a15c177dfd1a9",
+                "reference": "5515b6a6c6f1e1c909aaff2e5f3a15c177dfd1a9",
                 "shasum": ""
             },
             "require": {
@@ -6105,7 +6208,7 @@
                     "type": "open_collective"
                 }
             ],
-            "time": "2020-03-23T17:07:20+00:00"
+            "time": "2020-06-07T16:31:51+00:00"
         },
         {
             "name": "codeception/lib-asserts",
@@ -6249,16 +6352,16 @@
         },
         {
             "name": "codeception/module-webdriver",
-            "version": "1.0.8",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/module-webdriver.git",
-                "reference": "da55466876d9e73c09917f495b923395b1cdf92a"
+                "reference": "09c167817393090ce3dbce96027d94656b1963ce"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/da55466876d9e73c09917f495b923395b1cdf92a",
-                "reference": "da55466876d9e73c09917f495b923395b1cdf92a",
+                "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/09c167817393090ce3dbce96027d94656b1963ce",
+                "reference": "09c167817393090ce3dbce96027d94656b1963ce",
                 "shasum": ""
             },
             "require": {
@@ -6300,7 +6403,7 @@
                 "browser-testing",
                 "codeception"
             ],
-            "time": "2020-04-29T13:45:52+00:00"
+            "time": "2020-05-31T08:47:24+00:00"
         },
         {
             "name": "codeception/phpunit-wrapper",
@@ -6530,22 +6633,22 @@
         },
         {
             "name": "doctrine/annotations",
-            "version": "1.10.2",
+            "version": "1.10.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/annotations.git",
-                "reference": "b9d758e831c70751155c698c2f7df4665314a1cb"
+                "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb",
-                "reference": "b9d758e831c70751155c698c2f7df4665314a1cb",
+                "url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d",
+                "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d",
                 "shasum": ""
             },
             "require": {
                 "doctrine/lexer": "1.*",
                 "ext-tokenizer": "*",
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "require-dev": {
                 "doctrine/cache": "1.*",
@@ -6595,24 +6698,24 @@
                 "docblock",
                 "parser"
             ],
-            "time": "2020-04-20T09:18:32+00:00"
+            "time": "2020-05-25T17:24:27+00:00"
         },
         {
             "name": "doctrine/cache",
-            "version": "1.10.0",
+            "version": "1.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/cache.git",
-                "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62"
+                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/cache/zipball/382e7f4db9a12dc6c19431743a2b096041bcdd62",
-                "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62",
+                "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
+                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
                 "shasum": ""
             },
             "require": {
-                "php": "~7.1"
+                "php": "~7.1 || ^8.0"
             },
             "conflict": {
                 "doctrine/common": ">2.2,<2.4"
@@ -6677,7 +6780,21 @@
                 "redis",
                 "xcache"
             ],
-            "time": "2019-11-29T15:36:20+00:00"
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-27T16:24:54+00:00"
         },
         {
             "name": "doctrine/inflector",
@@ -6748,20 +6865,20 @@
         },
         {
             "name": "doctrine/instantiator",
-            "version": "1.3.0",
+            "version": "1.3.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/instantiator.git",
-                "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+                "reference": "f350df0268e904597e3bd9c4685c53e0e333feea"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
-                "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
+                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea",
+                "reference": "f350df0268e904597e3bd9c4685c53e0e333feea",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "require-dev": {
                 "doctrine/coding-standard": "^6.0",
@@ -6800,24 +6917,38 @@
                 "constructor",
                 "instantiate"
             ],
-            "time": "2019-10-21T16:45:58+00:00"
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-29T17:27:14+00:00"
         },
         {
             "name": "doctrine/lexer",
-            "version": "1.2.0",
+            "version": "1.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/lexer.git",
-                "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6"
+                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
-                "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
+                "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042",
+                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2"
+                "php": "^7.2 || ^8.0"
             },
             "require-dev": {
                 "doctrine/coding-standard": "^6.0",
@@ -6862,7 +6993,21 @@
                 "parser",
                 "php"
             ],
-            "time": "2019-10-30T14:39:59+00:00"
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-25T17:44:05+00:00"
         },
         {
             "name": "friendsofphp/php-cs-fixer",
@@ -8269,16 +8414,16 @@
         },
         {
             "name": "phpoption/phpoption",
-            "version": "1.7.3",
+            "version": "1.7.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/schmittjoh/php-option.git",
-                "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae"
+                "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
-                "reference": "4acfd6a4b33a509d8c88f50e5222f734b6aeebae",
+                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
+                "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
                 "shasum": ""
             },
             "require": {
@@ -8320,7 +8465,17 @@
                 "php",
                 "type"
             ],
-            "time": "2020-03-21T18:07:53+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/GrahamCampbell",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-06-07T10:40:07+00:00"
         },
         {
             "name": "phpspec/prophecy",
@@ -8443,16 +8598,16 @@
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "8.0.1",
+            "version": "8.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "31e94ccc084025d6abee0585df533eb3a792b96a"
+                "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/31e94ccc084025d6abee0585df533eb3a792b96a",
-                "reference": "31e94ccc084025d6abee0585df533eb3a792b96a",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc",
+                "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc",
                 "shasum": ""
             },
             "require": {
@@ -8503,7 +8658,13 @@
                 "testing",
                 "xunit"
             ],
-            "time": "2020-02-19T13:41:19+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-05-23T08:02:54+00:00"
         },
         {
             "name": "phpunit/php-file-iterator",
@@ -9654,28 +9815,28 @@
         },
         {
             "name": "sebastian/type",
-            "version": "2.0.0",
+            "version": "2.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/type.git",
-                "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1"
+                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9e8f42f740afdea51f5f4e8cec2035580e797ee1",
-                "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
+                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
                 "shasum": ""
             },
             "require": {
                 "php": "^7.3"
             },
             "require-dev": {
-                "phpunit/phpunit": "^9.0"
+                "phpunit/phpunit": "^9.2"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.0-dev"
+                    "dev-master": "2.1-dev"
                 }
             },
             "autoload": {
@@ -9696,7 +9857,13 @@
             ],
             "description": "Collection of value objects that represent the types of the PHP type system",
             "homepage": "https://github.com/sebastianbergmann/type",
-            "time": "2020-02-07T06:13:43+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-01T12:21:09+00:00"
         },
         {
             "name": "sebastian/version",
@@ -9865,22 +10032,24 @@
         },
         {
             "name": "symfony/config",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/config.git",
-                "reference": "db1674e1a261148429f123871f30d211992294e7"
+                "reference": "b8623ef3d99fe62a34baf7a111b576216965f880"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/config/zipball/db1674e1a261148429f123871f30d211992294e7",
-                "reference": "db1674e1a261148429f123871f30d211992294e7",
+                "url": "https://api.github.com/repos/symfony/config/zipball/b8623ef3d99fe62a34baf7a111b576216965f880",
+                "reference": "b8623ef3d99fe62a34baf7a111b576216965f880",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
                 "symfony/filesystem": "^4.4|^5.0",
-                "symfony/polyfill-ctype": "~1.8"
+                "symfony/polyfill-ctype": "~1.8",
+                "symfony/polyfill-php80": "^1.15"
             },
             "conflict": {
                 "symfony/finder": "<4.4"
@@ -9898,7 +10067,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -9939,29 +10108,31 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-15T15:59:10+00:00"
+            "time": "2020-05-23T13:08:13+00:00"
         },
         {
             "name": "symfony/dependency-injection",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba"
+                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba",
-                "reference": "92d8b3bd896a87cdd8aba0a3dd041bc072e8cfba",
+                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6a6791e9584273b32eeb01790da4c7446d87a621",
+                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "psr/container": "^1.0",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/polyfill-php80": "^1.15",
                 "symfony/service-contracts": "^1.1.6|^2"
             },
             "conflict": {
-                "symfony/config": "<5.0",
+                "symfony/config": "<5.1",
                 "symfony/finder": "<4.4",
                 "symfony/proxy-manager-bridge": "<4.4",
                 "symfony/yaml": "<4.4"
@@ -9971,7 +10142,7 @@
                 "symfony/service-implementation": "1.0"
             },
             "require-dev": {
-                "symfony/config": "^5.0",
+                "symfony/config": "^5.1",
                 "symfony/expression-language": "^4.4|^5.0",
                 "symfony/yaml": "^4.4|^5.0"
             },
@@ -9985,7 +10156,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10026,35 +10197,101 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-28T17:58:55+00:00"
+            "time": "2020-05-30T20:35:19+00:00"
+        },
+        {
+            "name": "symfony/deprecation-contracts",
+            "version": "v2.1.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/deprecation-contracts.git",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.1"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "2.1-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "function.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "A generic function and convention to trigger deprecation notices",
+            "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-27T08:34:37+00:00"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d"
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e47fdf8b24edc12022ba52923150ec6484d7f57d",
-                "reference": "e47fdf8b24edc12022ba52923150ec6484d7f57d",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
-                "symfony/mime": "^4.4|^5.0",
-                "symfony/polyfill-mbstring": "~1.1"
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/polyfill-mbstring": "~1.1",
+                "symfony/polyfill-php80": "^1.15"
             },
             "require-dev": {
                 "predis/predis": "~1.0",
-                "symfony/expression-language": "^4.4|^5.0"
+                "symfony/cache": "^4.4|^5.0",
+                "symfony/expression-language": "^4.4|^5.0",
+                "symfony/mime": "^4.4|^5.0"
+            },
+            "suggest": {
+                "symfony/mime": "To use the file extension guesser"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10095,26 +10332,27 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-18T20:50:06+00:00"
+            "time": "2020-05-24T12:18:07+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b"
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b",
-                "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "symfony/polyfill-intl-idn": "^1.10",
-                "symfony/polyfill-mbstring": "^1.0"
+                "symfony/polyfill-mbstring": "^1.0",
+                "symfony/polyfill-php80": "^1.15"
             },
             "conflict": {
                 "symfony/mailer": "<4.4"
@@ -10126,7 +10364,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10171,29 +10409,31 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-17T03:29:44+00:00"
+            "time": "2020-05-25T12:33:44+00:00"
         },
         {
             "name": "symfony/options-resolver",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/options-resolver.git",
-                "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1"
+                "reference": "663f5dd5e14057d1954fe721f9709d35837f2447"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3707e3caeff2b797c0bfaadd5eba723dd44e6bf1",
-                "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1",
+                "url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447",
+                "reference": "663f5dd5e14057d1954fe721f9709d35837f2447",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5"
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
+                "symfony/polyfill-php80": "^1.15"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10239,7 +10479,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-06T10:40:56+00:00"
+            "time": "2020-05-23T13:08:13+00:00"
         },
         {
             "name": "symfony/polyfill-php70",
@@ -10316,26 +10556,26 @@
         },
         {
             "name": "symfony/stopwatch",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/stopwatch.git",
-                "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73"
+                "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73",
-                "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73",
+                "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f7c58cf81dbb5dd67d423a89d577524a2ec0323",
+                "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
                 "symfony/service-contracts": "^1.0|^2"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10376,24 +10616,25 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-03-27T16:56:45+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/yaml",
-            "version": "v5.0.8",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f"
+                "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/482fb4e710e5af3e0e78015f19aa716ad953392f",
-                "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/ea342353a3ef4f453809acc4ebc55382231d4d23",
+                "reference": "ea342353a3ef4f453809acc4ebc55382231d4d23",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2.5",
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1",
                 "symfony/polyfill-ctype": "~1.8"
             },
             "conflict": {
@@ -10405,10 +10646,13 @@
             "suggest": {
                 "symfony/console": "For validating YAML files using the lint command"
             },
+            "bin": [
+                "Resources/bin/yaml-lint"
+            ],
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "5.1-dev"
                 }
             },
             "autoload": {
@@ -10449,7 +10693,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-04-28T17:58:55+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "thecodingmachine/safe",
@@ -10666,26 +10910,26 @@
         },
         {
             "name": "vlucas/phpdotenv",
-            "version": "v2.6.4",
+            "version": "v2.6.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/vlucas/phpdotenv.git",
-                "reference": "67d472b1794c986381a8950e4958e1adb779d561"
+                "reference": "2e977311ffb17b2f82028a9c36824647789c6365"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/67d472b1794c986381a8950e4958e1adb779d561",
-                "reference": "67d472b1794c986381a8950e4958e1adb779d561",
+                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e977311ffb17b2f82028a9c36824647789c6365",
+                "reference": "2e977311ffb17b2f82028a9c36824647789c6365",
                 "shasum": ""
             },
             "require": {
                 "php": "^5.3.9 || ^7.0 || ^8.0",
-                "symfony/polyfill-ctype": "^1.9"
+                "symfony/polyfill-ctype": "^1.16"
             },
             "require-dev": {
                 "ext-filter": "*",
                 "ext-pcre": "*",
-                "phpunit/phpunit": "^4.8.35 || ^5.0"
+                "phpunit/phpunit": "^4.8.35 || ^5.7.27"
             },
             "suggest": {
                 "ext-filter": "Required to use the boolean validator.",
@@ -10734,7 +10978,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-05-02T13:38:00+00:00"
+            "time": "2020-06-02T14:06:52+00:00"
         },
         {
             "name": "webmozart/assert",
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
index 064b5d5f992ab..400073e6a87a6 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
+++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
@@ -4775,7 +4775,7 @@
                 "shasum": "ed1da1137848560dde1a85f0f54dc2fac262359e"
             },
             "require": {
-                "elasticsearch/elasticsearch": "~7.6",
+                "elasticsearch/elasticsearch": "7.6.*",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog": "103.0.*",
@@ -4815,7 +4815,7 @@
                 "shasum": "a9da3243900390ad163efc7969b07116d2eb793f"
             },
             "require": {
-                "elasticsearch/elasticsearch": "~7.6",
+                "elasticsearch/elasticsearch": "7.6.*",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog-search": "101.0.*",
@@ -9408,7 +9408,7 @@
                 "colinmollenhour/php-redis-session-abstract": "~1.4.0",
                 "composer/composer": "^1.6",
                 "dotmailer/dotmailer-magento2-extension": "3.1.1",
-                "elasticsearch/elasticsearch": "~7.6",
+                "elasticsearch/elasticsearch": "7.6.*",
                 "ext-bcmath": "*",
                 "ext-ctype": "*",
                 "ext-curl": "*",
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
index a6f208c9c0d8d..01daa792ed352 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
+++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
@@ -4775,7 +4775,7 @@
                 "shasum": "ed1da1137848560dde1a85f0f54dc2fac262359e"
             },
             "require": {
-                "elasticsearch/elasticsearch": "~7.6",
+                "elasticsearch/elasticsearch": "7.6.*",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog": "103.0.*",
@@ -4815,7 +4815,7 @@
                 "shasum": "a9da3243900390ad163efc7969b07116d2eb793f"
             },
             "require": {
-                "elasticsearch/elasticsearch": "~7.6",
+                "elasticsearch/elasticsearch": "7.6.*",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog-search": "101.0.*",
@@ -9408,7 +9408,7 @@
                 "colinmollenhour/php-redis-session-abstract": "~1.4.0",
                 "composer/composer": "^1.6",
                 "dotmailer/dotmailer-magento2-extension": "3.1.1",
-                "elasticsearch/elasticsearch": "~7.6",
+                "elasticsearch/elasticsearch": "7.6.*",
                 "ext-bcmath": "*",
                 "ext-ctype": "*",
                 "ext-curl": "*",

From bbcb7b71dd9daf0eb055d5dbd94bc5902a02803a Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Tue, 9 Jun 2020 15:51:42 -0500
Subject: [PATCH 212/307] MC-35049: 2.4.0 Page Builder Failed tests

---
 .../product/image_with_borders.phtml          | 38 ++++++++++++++-----
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
index ce21a2473f7a5..0ac6bc88df8ce 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml
@@ -18,8 +18,10 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
     'enable_lazy_loading_for_images_without_borders',
     'Magento_Catalog'
 );
+$width = (int)$block->getWidth();
+$paddingBottom = $block->getRatio() * 100;
 ?>
-<span class="product-image-container" id="product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
+<span class="product-image-container product-image-container-<?= /* @noEscape */ $block->getProductId() ?>">
     <span class="product-image-wrapper">
         <img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>"
             <?php foreach ($block->getCustomAttributes() as $name => $value): ?>
@@ -36,11 +38,29 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
             <?php endif; ?>
             alt="<?= $escaper->escapeHtmlAttr($block->getLabel()) ?>"/></span>
 </span>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'width:' . (int)$block->getWidth() . 'px;',
-    '#product-image-container-' . $block->getProductId()
-) ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-    'padding-bottom: '. ($block->getRatio() * 100) . '%;',
-    '#product-image-container-' . $block->getProductId() . ' span.product-image-wrapper'
-) ?>
+<?php
+$styles = <<<STYLE
+.product-image-container-{$block->getProductId()} {
+    width: {$width}px;
+}
+.product-image-container-{$block->getProductId()} span.product-image-wrapper {
+    padding-bottom: {$paddingBottom}%;
+}
+STYLE;
+//In case a script was using "style" attributes of these elements
+$script = <<<SCRIPT
+prodImageContainers = document.querySelectorAll(".product-image-container-{$block->getProductId()}");
+for (var i = 0; i < prodImageContainers.length; i++) {
+    prodImageContainers[i].style.width = "{$width}px";
+}
+prodImageContainersWrappers = document.querySelectorAll(
+    ".product-image-container-{$block->getProductId()}  span.product-image-wrapper"
+);
+for (var i = 0; i < prodImageContainersWrappers.length; i++) {
+    prodImageContainersWrappers[i].style.paddingBottom = "{$paddingBottom}%";
+}
+SCRIPT;
+
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('style', [], $styles, false) ?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false) ?>

From 2cf4beb424ef1f411018b81b1d00a3663c1da4b4 Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Tue, 9 Jun 2020 16:23:17 -0500
Subject: [PATCH 213/307] MC-35004: WsdlGenerationFromDataObjectTest is failed
 with PHP 7.4.6

---
 .../WsdlGenerationFromDataObjectTest.php      | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php
index dadc2caef7a13..c43cb81683aac 100644
--- a/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php
+++ b/dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php
@@ -116,7 +116,7 @@ protected function _getWsdlContent($wsdlUrl)
             $responseDom->loadXML($responseContent),
             "Valid XML is always expected as a response for WSDL request."
         );
-        return $responseContent;
+        return $responseDom->saveXML();
     }
 
     /**
@@ -207,7 +207,7 @@ protected function _checkComplexTypesDeclaration($wsdlContent)
     <xsd:sequence>
         <xsd:element name="id" minOccurs="1" maxOccurs="1" type="xsd:int">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:min/>
                     <inf:max/>
@@ -231,7 +231,7 @@ protected function _checkComplexTypesDeclaration($wsdlContent)
     <xsd:sequence>
         <xsd:element name="entityId" minOccurs="1" maxOccurs="1" type="xsd:int">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:min/>
                     <inf:max/>
@@ -266,7 +266,7 @@ protected function _checkComplexTypesDeclaration($wsdlContent)
     <xsd:sequence>
         <xsd:element name="result" minOccurs="1" maxOccurs="1" type="tns:TestModule5V2EntityAllSoapAndRest">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:callInfo>
                         <inf:callName>testModule5AllSoapAndRestV2Item</inf:callName>
@@ -290,7 +290,7 @@ protected function _checkComplexTypesDeclaration($wsdlContent)
     <xsd:sequence>
         <xsd:element name="result" minOccurs="1" maxOccurs="1" type="tns:TestModule5V1EntityAllSoapAndRest">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:callInfo>
                         <inf:callName>testModule5AllSoapAndRestV1Item</inf:callName>
@@ -331,7 +331,7 @@ protected function _checkReferencedTypeDeclaration($wsdlContent)
     <xsd:sequence>
         <xsd:element name="price" minOccurs="1" maxOccurs="1" type="xsd:int">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:min/>
                     <inf:max/>
@@ -835,7 +835,7 @@ protected function _checkFaultsComplexTypeSection($wsdlContent)
     <xsd:sequence>
         <xsd:element name="key" minOccurs="1" maxOccurs="1" type="xsd:string">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:maxLength/>
                 </xsd:appinfo>
@@ -843,7 +843,7 @@ protected function _checkFaultsComplexTypeSection($wsdlContent)
         </xsd:element>
         <xsd:element name="value" minOccurs="1" maxOccurs="1" type="xsd:string">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_soapUrl}">
                     <inf:maxLength/>
                 </xsd:appinfo>
@@ -865,7 +865,7 @@ protected function _checkFaultsComplexTypeSection($wsdlContent)
     <xsd:sequence>
         <xsd:element name="message" minOccurs="1" maxOccurs="1" type="xsd:string">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_baseUrl}/soap/{$this->_storeCode}?services=testModule5AllSoapAndRestV2">
                     <inf:maxLength/>
                 </xsd:appinfo>
@@ -888,7 +888,7 @@ protected function _checkFaultsComplexTypeSection($wsdlContent)
     <xsd:sequence>
         <xsd:element name="message" minOccurs="1" maxOccurs="1" type="xsd:string">
             <xsd:annotation>
-                <xsd:documentation></xsd:documentation>
+                <xsd:documentation/>
                 <xsd:appinfo xmlns:inf="{$this->_baseUrl}/soap/{$this->_storeCode}?services=testModule5AllSoapAndRestV1%2CtestModule5AllSoapAndRestV2">
                     <inf:maxLength/>
                 </xsd:appinfo>

From f77a8f78469b8b11fa8c1165932b007e5b70f7fc Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Wed, 10 Jun 2020 17:17:42 +0300
Subject: [PATCH 214/307] MC-35071: Unexpected behavior when closing tab in
 admin panel

---
 app/code/Magento/Config/Block/System/Config/Form/Fieldset.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
index 20b6408eebe82..2617da442cfd1 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
@@ -175,6 +175,7 @@ protected function _getHeaderTitleHtml($element)
             '-link">' . $element->getLegend() . '</a>' .
             /* @noEscape */ $this->secureRenderer->renderEventListenerAsTag(
                 'onclick',
+                'event.preventDefault();' .
                 "Fieldset.toggleCollapse('" . $element->getHtmlId() . "', '" .
                  $this->_urlBuilder->getUrl('*/*/state') . "'); return false;",
                 'a#' . $element->getHtmlId() . '-head'

From b4394d0fe31f7ce3905a33198c31d69e8337f637 Mon Sep 17 00:00:00 2001
From: Ji Lu <jilu1@adobe.com>
Date: Wed, 10 Jun 2020 13:48:58 -0500
Subject: [PATCH 215/307] MQE-2153: bump MFTF version to 3.0.0-RC4

---
 .../Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml  | 3 +++
 .../Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml    | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
index 83e3479c753e4..d2896736908d3 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewIntegrationTest.xml
@@ -18,6 +18,9 @@
             <testCaseId value="MC-14382" />
             <group value="security"/>
             <group value="mtf_migrated"/>
+            <skip>
+                <issueId value="MQE-1964"/>
+            </skip>
         </annotations>
         <before>
             <!-- Log in to Admin Panel -->
diff --git a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
index 3fffbcd480761..ac5e998e53f5f 100644
--- a/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
+++ b/app/code/Magento/Security/Test/Mftf/Test/AdminLockAdminUserWhenCreatingNewRoleTest.xml
@@ -18,6 +18,9 @@
             <testCaseId value="MC-14384" />
             <group value="security"/>
             <group value="mtf_migrated"/>
+            <skip>
+                <issueId value="MQE-1964"/>
+            </skip>
         </annotations>
         <before>
             <!-- Log in to Admin Panel -->

From 1ad25f9e48d19b3740fdbff5229da9b169e85aff Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Wed, 10 Jun 2020 22:32:27 +0300
Subject: [PATCH 216/307] magento/magento2-login-as-customer#156: Banner
 disappear when admin edit customer data from Account Information tab.

---
 .../frontend/web/js/view/loginAsCustomer.js   | 41 +++++++++++++++----
 1 file changed, 33 insertions(+), 8 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
index 7f6cad6ce3f2d..06dffd76f19f3 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
@@ -8,7 +8,7 @@ define([
     'uiComponent',
     'Magento_Customer/js/customer-data',
     'mage/translate'
-], function ($, Component, customerData) {
+], function ($, Component, customer) {
     'use strict';
 
     return Component.extend({
@@ -19,23 +19,48 @@ define([
 
         /** @inheritdoc */
         initialize: function () {
+            var customerData, loggedAsCustomerData;
+
             this._super();
 
-            this.customer = customerData.get('customer');
-            this.loginAsCustomer = customerData.get('loggedAsCustomer');
-            this.isVisible(this.loginAsCustomer().adminUserId);
+            customerData = customer.get('customer');
+            loggedAsCustomerData = customer.get('loggedAsCustomer');
+
+            customerData.subscribe(function (data) {
+                this.fullname = data.fullname;
+                this._updateBanner();
+            }.bind(this));
+            loggedAsCustomerData.subscribe(function (data) {
+                this.adminUserId = data.adminUserId;
+                this.websiteName = data.websiteName;
+                this._updateBanner();
+            }.bind(this));
+
+            this.fullname = customerData().fullname;
+            this.adminUserId = loggedAsCustomerData().adminUserId;
+            this.websiteName = loggedAsCustomerData().websiteName;
 
-            this.notificationText = $.mage.__('You are connected as <strong>%1</strong> on %2')
-                .replace('%1', this.customer().fullname)
-                .replace('%2', this.loginAsCustomer().websiteName);
+            this._updateBanner();
         },
 
         /** @inheritdoc */
         initObservable: function () {
             this._super()
-                .observe('isVisible');
+                .observe(['isVisible', 'notificationText']);
 
             return this;
+        },
+
+        _updateBanner: function () {
+            if (this.adminUserId !== undefined) {
+                this.isVisible(this.adminUserId);
+            }
+
+            if (this.fullname !== undefined && this.websiteName !== undefined) {
+                this.notificationText($.mage.__('You are connected as <strong>%1</strong> on %2')
+                    .replace('%1', this.fullname)
+                    .replace('%2', this.websiteName));
+            }
         }
     });
 });

From f5bb9507fecbf269cb701bb1188673b9cf093478 Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Wed, 10 Jun 2020 14:52:39 -0500
Subject: [PATCH 217/307] MC-33857: Update AdapterInterface::fetchRow return
 type

---
 dev/tests/api-functional/phpunit_graphql.xml.dist             | 2 +-
 dev/tests/api-functional/phpunit_soap.xml.dist                | 4 ++--
 dev/tests/integration/framework/tests/unit/phpunit.xml.dist   | 4 ++--
 .../setup-integration/framework/tests/unit/phpunit.xml.dist   | 4 ++--
 dev/tests/setup-integration/phpunit.xml.dist                  | 2 +-
 dev/tests/static/framework/tests/unit/phpunit.xml.dist        | 4 ++--
 dev/tests/static/phpunit-all.xml.dist                         | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/dev/tests/api-functional/phpunit_graphql.xml.dist b/dev/tests/api-functional/phpunit_graphql.xml.dist
index b9f38daddb3a6..f6a67527c5c44 100644
--- a/dev/tests/api-functional/phpunit_graphql.xml.dist
+++ b/dev/tests/api-functional/phpunit_graphql.xml.dist
@@ -17,7 +17,7 @@
     <!-- Test suites definition -->
     <testsuites>
         <testsuite name="Magento GraphQL web API functional tests">
-            <directory suffix="Test.php">testsuite/Magento/GraphQl</directory>
+            <directory>testsuite/Magento/GraphQl</directory>
         </testsuite>
     </testsuites>
 
diff --git a/dev/tests/api-functional/phpunit_soap.xml.dist b/dev/tests/api-functional/phpunit_soap.xml.dist
index 743a82d72c9e3..9c30a79d3742c 100644
--- a/dev/tests/api-functional/phpunit_soap.xml.dist
+++ b/dev/tests/api-functional/phpunit_soap.xml.dist
@@ -17,9 +17,9 @@
     <!-- Test suites definition -->
     <testsuites>
         <testsuite name="Magento SOAP web API functional tests">
-            <directory suffix="Test.php">testsuite</directory>
+            <directory>testsuite</directory>
             <!-- <exclude>testsuite/Magento/GraphQl</exclude> -->
-            <directory suffix="Test.php">../../../app/code/*/*/Test/Api</directory>
+            <directory>../../../app/code/*/*/Test/Api</directory>
         </testsuite>
     </testsuites>
 
diff --git a/dev/tests/integration/framework/tests/unit/phpunit.xml.dist b/dev/tests/integration/framework/tests/unit/phpunit.xml.dist
index 1a93397caaa4a..d15c5f1818784 100644
--- a/dev/tests/integration/framework/tests/unit/phpunit.xml.dist
+++ b/dev/tests/integration/framework/tests/unit/phpunit.xml.dist
@@ -6,7 +6,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          beStrictAboutTestsThatDoNotTestAnything="false"
@@ -15,7 +15,7 @@
     <!-- Test suites definition -->
     <testsuites>
         <testsuite name="Unit Tests for Integration Tests Framework">
-            <directory suffix="Test.php">testsuite</directory>
+            <directory>testsuite</directory>
         </testsuite>
     </testsuites>
     <php>
diff --git a/dev/tests/setup-integration/framework/tests/unit/phpunit.xml.dist b/dev/tests/setup-integration/framework/tests/unit/phpunit.xml.dist
index 1a93397caaa4a..d15c5f1818784 100644
--- a/dev/tests/setup-integration/framework/tests/unit/phpunit.xml.dist
+++ b/dev/tests/setup-integration/framework/tests/unit/phpunit.xml.dist
@@ -6,7 +6,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          beStrictAboutTestsThatDoNotTestAnything="false"
@@ -15,7 +15,7 @@
     <!-- Test suites definition -->
     <testsuites>
         <testsuite name="Unit Tests for Integration Tests Framework">
-            <directory suffix="Test.php">testsuite</directory>
+            <directory>testsuite</directory>
         </testsuite>
     </testsuites>
     <php>
diff --git a/dev/tests/setup-integration/phpunit.xml.dist b/dev/tests/setup-integration/phpunit.xml.dist
index 65a3273c4fdcd..0317d0e39efb1 100644
--- a/dev/tests/setup-integration/phpunit.xml.dist
+++ b/dev/tests/setup-integration/phpunit.xml.dist
@@ -16,7 +16,7 @@
     <!-- Test suites definition -->
     <testsuites>
         <testsuite name="Magento Setup/Upgrade Tests">
-            <directory suffix="Test.php">testsuite</directory>
+            <directory>testsuite</directory>
         </testsuite>
     </testsuites>
     <!-- Code coverage filters -->
diff --git a/dev/tests/static/framework/tests/unit/phpunit.xml.dist b/dev/tests/static/framework/tests/unit/phpunit.xml.dist
index aca48f6f8d1d0..f1cd910f3b02b 100644
--- a/dev/tests/static/framework/tests/unit/phpunit.xml.dist
+++ b/dev/tests/static/framework/tests/unit/phpunit.xml.dist
@@ -6,7 +6,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          beStrictAboutTestsThatDoNotTestAnything="false"
@@ -14,7 +14,7 @@
 >
     <testsuites>
         <testsuite name="Magento Unit Tests for Static Code Analysis Framework">
-            <directory suffix="Test.php">testsuite/Magento/TestFramework</directory>
+            <directory>testsuite/Magento/TestFramework</directory>
         </testsuite>
     </testsuites>
     <php>
diff --git a/dev/tests/static/phpunit-all.xml.dist b/dev/tests/static/phpunit-all.xml.dist
index 7f067d9290f3a..1d1464161da58 100644
--- a/dev/tests/static/phpunit-all.xml.dist
+++ b/dev/tests/static/phpunit-all.xml.dist
@@ -8,7 +8,7 @@
  */
 -->
 <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
+         xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.1/phpunit.xsd"
          colors="true"
          columns="max"
          bootstrap="./framework/bootstrap.php"

From fb3fe5879107a0f5d0a4457d3ddc501c166f4545 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Thu, 11 Jun 2020 08:12:33 +0300
Subject: [PATCH 218/307] MC-34941: [MFTF] Replace magentoCli calls with
 appropriate AG calls

---
 .../StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml  | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
index 5619aa27860ce..b046ad6534f82 100644
--- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
@@ -25,6 +25,5 @@
         <fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/>
         <click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
         <waitForPageLoad stepKey="wait"/>
-        <see userInput="{{payerName}}" selector="{{PayPalPaymentSection.reviewUserInfo}}" stepKey="seePayerName"/>
     </actionGroup>
 </actionGroups>

From d6da5e27f4b876146d3f78700a567408b13b4b3c Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Thu, 11 Jun 2020 15:08:15 +0300
Subject: [PATCH 219/307] MC-35101: Stacked Paypal message on Admin Settings
 Menu tabs

---
 app/code/Magento/Config/Block/System/Config/Form/Fieldset.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
index 20b6408eebe82..51ee6dbee1e2e 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Fieldset.php
@@ -225,7 +225,7 @@ protected function _getFooterHtml($element)
                 );
                 $html .= $this->secureRenderer->renderStyleAsTag(
                     'display:none;',
-                    'row_' . $field->getId() . '_comment'
+                    '#row_' . $field->getId() . '_comment'
                 );
             }
         }

From 4d24466fb2ce20fcd769fd4b68c9e4d3e476fe35 Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Thu, 11 Jun 2020 17:28:50 +0300
Subject: [PATCH 220/307] MC-34415: Shopping Cart is not empty after removing
 item

---
 .../view/frontend/web/js/empty-cart.js        |  16 +--
 .../view/frontend/web/js/customer-data.js     |  13 +-
 .../templates/checkout/addresses.phtml        |   2 +-
 .../view/frontend/web/js/multi-shipping.js    |  18 ++-
 .../Checkout/frontend/js/empty-cart.test.js   | 113 ++++++++++++++++++
 .../frontend/js/multi-shipping.test.js        | 110 +++++++++++++++++
 6 files changed, 262 insertions(+), 10 deletions(-)
 create mode 100644 dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/empty-cart.test.js
 create mode 100644 dev/tests/js/jasmine/tests/app/code/Magento/Multishipping/frontend/js/multi-shipping.test.js

diff --git a/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
index 4b30ad8075274..2e9bdf1f31086 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
@@ -3,14 +3,16 @@
  * See COPYING.txt for license details.
  */
 
-define([
-    'Magento_Customer/js/customer-data'
-], function (customerData) {
+define(['Magento_Customer/js/customer-data'], function (customerData) {
     'use strict';
 
-    var cartData = customerData.get('cart');
+    return function () {
+        var cartData = customerData.get('cart');
 
-    if (cartData().items && cartData().items.length !== 0) {
-        customerData.reload(['cart'], false);
-    }
+        customerData.getInitCustomerData().done(function () {
+            if (cartData().items && cartData().items.length !== 0) {
+                customerData.reload(['cart'], false);
+            }
+        });
+    };
 });
diff --git a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js
index 770ea47d754d3..8976d0dda4673 100644
--- a/app/code/Magento/Customer/view/frontend/web/js/customer-data.js
+++ b/app/code/Magento/Customer/view/frontend/web/js/customer-data.js
@@ -24,7 +24,8 @@ define([
         invalidateCacheByCloseCookieSession,
         dataProvider,
         buffer,
-        customerData;
+        customerData,
+        deferred = $.Deferred();
 
     url.setBaseUrl(window.BASE_URL);
     options.sectionLoadUrl = url.build('customer/section/load');
@@ -341,6 +342,15 @@ define([
             $.cookieStorage.set('section_data_ids', sectionDataIds);
         },
 
+        /**
+         * Checks if customer data is initialized.
+         *
+         * @returns {jQuery.Deferred}
+         */
+        getInitCustomerData: function () {
+            return deferred.promise();
+        },
+
         /**
          * @param {Object} settings
          * @constructor
@@ -350,6 +360,7 @@ define([
             invalidateCacheBySessionTimeOut(settings);
             invalidateCacheByCloseCookieSession();
             customerData.init();
+            deferred.resolve();
         }
     };
 
diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml
index e941ecf63255b..a37ff04a8dc2a 100644
--- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/addresses.phtml
@@ -16,7 +16,7 @@
 ?>
 <form id="checkout_multishipping_form"
       data-mage-init='{
-          "multiShipping":{},
+          "multiShipping": {"itemsQty": <?= /* @noEscape */ (int)$block->getCheckout()->getQuote()->getItemsSummaryQty() ?>},
           "cartUpdate": {
                "validationURL": "<?= $block->escapeUrl($block->getUrl('multishipping/checkout/checkItems')) ?>",
                "eventName": "updateMulticartItemQty"
diff --git a/app/code/Magento/Multishipping/view/frontend/web/js/multi-shipping.js b/app/code/Magento/Multishipping/view/frontend/web/js/multi-shipping.js
index 537abb3aa2071..8af1c1ed06fc1 100644
--- a/app/code/Magento/Multishipping/view/frontend/web/js/multi-shipping.js
+++ b/app/code/Magento/Multishipping/view/frontend/web/js/multi-shipping.js
@@ -5,12 +5,14 @@
 
 define([
     'jquery',
+    'Magento_Customer/js/customer-data',
     'jquery-ui-modules/widget'
-], function ($) {
+], function ($, customerData) {
     'use strict';
 
     $.widget('mage.multiShipping', {
         options: {
+            itemsQty: 0,
             addNewAddressBtn: 'button[data-role="add-new-address"]', // Add a new multishipping address.
             addNewAddressFlag: '#add_new_address_flag', // Hidden input field with value 0 or 1.
             canContinueBtn: 'button[data-role="can-continue"]', // Continue (update quantity or go to shipping).
@@ -22,10 +24,24 @@ define([
          * @private
          */
         _create: function () {
+            this._prepareCartData();
             $(this.options.addNewAddressBtn).on('click', $.proxy(this._addNewAddress, this));
             $(this.options.canContinueBtn).on('click', $.proxy(this._canContinue, this));
         },
 
+        /**
+         * Takes cart items qty from current cart data and compare it with current items qty
+         * Reloads cart data if cart items qty is wrong
+         * @private
+         */
+        _prepareCartData: function () {
+            var cartData = customerData.get('cart');
+
+            if (cartData()['summary_count'] !== this.options.itemsQty) {
+                customerData.reload(['cart'], false);
+            }
+        },
+
         /**
          * Add a new address. Set the hidden input field and submit the form. Then enter a new shipping address.
          * @private
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/empty-cart.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/empty-cart.test.js
new file mode 100644
index 0000000000000..7de56c869a81a
--- /dev/null
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Checkout/frontend/js/empty-cart.test.js
@@ -0,0 +1,113 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/* eslint-disable max-nested-callbacks */
+/*jscs:disable jsDoc*/
+define([
+    'squire', 'jquery', 'ko'
+], function (Squire, $, ko) {
+    'use strict';
+
+    describe('Magento_Checkout/js/empty-cart', function () {
+        var injector = new Squire(),
+            cartData = ko.observable({}),
+            mocks = {
+                'Magento_Customer/js/customer-data': {
+                    get: jasmine.createSpy('get', function () {
+                        return cartData;
+                    }).and.callThrough(),
+                    reload: jasmine.createSpy(),
+                    getInitCustomerData: function () {}
+                }
+            },
+            deferred,
+            emptyCart;
+
+        beforeEach(function (done) {
+            injector.mock(mocks);
+            injector.require(['Magento_Checkout/js/empty-cart'], function (instance) {
+                emptyCart = instance;
+                done();
+            });
+        });
+
+        afterEach(function () {
+            try {
+                injector.clean();
+                injector.remove();
+            } catch (e) {}
+
+            cartData({});
+        });
+
+        describe('Check Cart data preparation process', function () {
+            it('Tests that Cart data is NOT checked before initialization', function () {
+                spyOn(mocks['Magento_Customer/js/customer-data'], 'getInitCustomerData').and.callFake(function () {
+                    deferred = $.Deferred();
+
+                    return deferred.promise();
+                });
+                expect(emptyCart()).toBe(undefined);
+
+                expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
+                expect(mocks['Magento_Customer/js/customer-data'].getInitCustomerData).toHaveBeenCalled();
+                expect(mocks['Magento_Customer/js/customer-data'].reload).not.toHaveBeenCalled();
+            });
+
+            it('Tests that Cart data does NOT reload if there are no items in it', function () {
+                spyOn(mocks['Magento_Customer/js/customer-data'], 'getInitCustomerData').and.callFake(function () {
+                    deferred = $.Deferred();
+
+                    deferred.resolve();
+
+                    return deferred.promise();
+                });
+                cartData({
+                    items: []
+                });
+                emptyCart();
+
+                expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
+                expect(mocks['Magento_Customer/js/customer-data'].reload).not.toHaveBeenCalled();
+            });
+
+            it('Tests that Cart data is checked only after initialization', function () {
+                spyOn(mocks['Magento_Customer/js/customer-data'], 'getInitCustomerData').and.callFake(function () {
+                    deferred = $.Deferred();
+
+                    return deferred.promise();
+                });
+                cartData({
+                    items: [1]
+                });
+                emptyCart();
+
+                expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
+                expect(mocks['Magento_Customer/js/customer-data'].reload).not.toHaveBeenCalled();
+
+                deferred.resolve();
+
+                expect(mocks['Magento_Customer/js/customer-data'].reload).toHaveBeenCalledWith(['cart'], false);
+            });
+
+            it('Tests that Cart data reloads if it has items', function () {
+                spyOn(mocks['Magento_Customer/js/customer-data'], 'getInitCustomerData').and.callFake(function () {
+                    deferred = $.Deferred();
+
+                    deferred.resolve();
+
+                    return deferred.promise();
+                });
+                cartData({
+                    items: [1]
+                });
+                emptyCart();
+
+                expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
+                expect(mocks['Magento_Customer/js/customer-data'].reload).toHaveBeenCalledWith(['cart'], false);
+            });
+        });
+    });
+});
diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Multishipping/frontend/js/multi-shipping.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Multishipping/frontend/js/multi-shipping.test.js
new file mode 100644
index 0000000000000..65ee180476f3a
--- /dev/null
+++ b/dev/tests/js/jasmine/tests/app/code/Magento/Multishipping/frontend/js/multi-shipping.test.js
@@ -0,0 +1,110 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+/* eslint-disable max-nested-callbacks */
+define([
+    'squire',
+    'jquery',
+    'ko',
+    'multiShipping'
+], function (Squire, $, ko, MultiShipping) {
+    'use strict';
+
+    describe('Magento_Multishipping/js/multi-shipping', function () {
+        var injector = new Squire(),
+            Obj;
+
+        describe('Check Cart data preparation process', function () {
+            var customerData = ko.observable({}),
+                mocks = {
+                    'Magento_Customer/js/customer-data': {
+                        get: jasmine.createSpy('get', function () {
+                            return customerData;
+                        }).and.callThrough(),
+                        reload: jasmine.createSpy()
+                    }
+                },
+                summaryCount = {};
+
+            beforeEach(function (done) {
+                injector.mock(mocks);
+                injector.require(['multiShipping'], function (Instance) {
+                    Obj = Instance;
+                    done();
+                });
+            });
+
+            afterEach(function () {
+                try {
+                    injector.clean();
+                    injector.remove();
+                } catch (e) {}
+
+                customerData({});
+            });
+
+            it('Prepare Cart data with the same items qty', function () {
+                summaryCount['summary_count'] = 0;
+                customerData(summaryCount);
+                new Obj({});
+
+                expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
+                expect(mocks['Magento_Customer/js/customer-data'].reload).not.toHaveBeenCalled();
+            });
+
+            it('Prepare Cart data with different items qty', function () {
+                summaryCount['summary_count'] = 1;
+                customerData(summaryCount);
+                new Obj({});
+
+                expect(mocks['Magento_Customer/js/customer-data'].get).toHaveBeenCalledWith('cart');
+                expect(mocks['Magento_Customer/js/customer-data'].reload).toHaveBeenCalledWith(['cart'], false);
+            });
+        });
+
+        describe('Check Multishipping events', function () {
+            var addNewAddressBtn,
+                addressflag,
+                canContinueBtn,
+                canContinueFlag;
+
+            beforeEach(function () {
+                addNewAddressBtn = $('<button type="button" data-role="add-new-address"/>');
+                addressflag = $('<input type="hidden" value="0" id="add_new_address_flag"/>');
+                canContinueBtn = $('<button type="submit" data-role="can-continue" data-flag="1"/>');
+                canContinueFlag = $('<input type="hidden" value="0" id="can_continue_flag"/>');
+                $(document.body).append(addNewAddressBtn)
+                    .append(addressflag)
+                    .append(canContinueBtn)
+                    .append(canContinueFlag);
+            });
+
+            afterEach(function () {
+                addNewAddressBtn.remove();
+                addressflag.remove();
+                canContinueBtn.remove();
+                canContinueFlag.remove();
+            });
+
+            it('Check add new address event', function () {
+                Obj = new MultiShipping({});
+                Obj.element = jasmine.createSpyObj('element', ['submit']);
+                addNewAddressBtn.click();
+
+                expect(Obj.element.submit).toHaveBeenCalled();
+                expect(addressflag.val()).toBe('1');
+            });
+
+            it('Check can continue event', function () {
+                Obj = new MultiShipping({});
+                Obj.element = jasmine.createSpyObj('element', ['submit']);
+                canContinueBtn.click();
+
+                expect(Obj.element.submit).not.toHaveBeenCalled();
+                expect(canContinueFlag.val()).toBe('1');
+            });
+        });
+    });
+});

From 52701916926d4e3be6f8cadd21187abf15e98d13 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Thu, 11 Jun 2020 18:44:52 +0300
Subject: [PATCH 221/307] MC-34425: Magento crashes when trying to oepn
 category when Website Restrictions is enabled

---
 app/code/Magento/Catalog/Controller/Category/View.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/code/Magento/Catalog/Controller/Category/View.php b/app/code/Magento/Catalog/Controller/Category/View.php
index 552af244f0097..e448be9a1df21 100644
--- a/app/code/Magento/Catalog/Controller/Category/View.php
+++ b/app/code/Magento/Catalog/Controller/Category/View.php
@@ -205,10 +205,9 @@ protected function _initCategory()
     /**
      * Category view action
      *
-     * @return ResultInterface
      * @throws NoSuchEntityException
      */
-    public function execute(): ?ResultInterface
+    public function execute()
     {
         $result = null;
 

From 12e1a886c8d798a65b68648e71918059e20510de Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Thu, 11 Jun 2020 18:55:19 +0300
Subject: [PATCH 222/307] MC-35101: Stacked Paypal message on Admin Settings
 Menu tabs

---
 .../Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
index 54c5a1426e352..fd5fbe7c4cdc6 100644
--- a/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
+++ b/app/code/Magento/Config/Test/Unit/Block/System/Config/Form/FieldsetTest.php
@@ -243,7 +243,7 @@ public function testRenderWithStoredElements($expanded, $nested, $extra)
         $this->assertStringContainsString('test_field_toHTML', $actual);
 
         $expected = '<div id="row_test_field_id_comment" class="system-tooltip-box">test_field_tootip</div>' .
-        '<style>row_test_field_id_comment { display:none; }</style>';
+        '<style>#row_test_field_id_comment { display:none; }</style>';
         $this->assertStringContainsString($expected, $actual);
         if ($nested) {
             $this->assertStringContainsString('nested', $actual);

From 6ef64f6038b148cd9eb753f7b9da3d3890db53ef Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Thu, 11 Jun 2020 19:20:49 +0300
Subject: [PATCH 223/307] MC-35120: Radio icon is not displayed on the order
 create page

---
 .../adminhtml/templates/order/create/store/select.phtml     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml
index 180486870446d..1c21d51a2df32 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/store/select.phtml
@@ -51,14 +51,14 @@
                                 <div class="admin__field admin__field-option">
                                     <input type="radio"
                                            id="store_<?= (int) $_store->getId() ?>" class="admin__control-radio"/>
+                                    <label class="admin__field-label" for="store_<?= (int) $_store->getId() ?>">
+                                        <?= $block->escapeHtml($_store->getName()) ?>
+                                    </label>
                                     <?= /* @noEscape*/ $secureRenderer->renderEventListenerAsTag(
                                         'onclick',
                                         "order.setStoreId('" .  (int)$_store->getId() . "')",
                                         'input#store_' . (int)$_store->getId()
                                     ) ?>
-                                    <label class="admin__field-label" for="store_<?= (int) $_store->getId() ?>">
-                                        <?= $block->escapeHtml($_store->getName()) ?>
-                                    </label>
                                 </div>
                             </div>
                         </div>

From 61c8674f33f7b3a3fae1c00f2511ac876e77d275 Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Thu, 11 Jun 2020 11:35:16 -0500
Subject: [PATCH 224/307] MC-35039: Update Elasticsearch dependencies for 2.4.0

---
 app/code/Magento/Elasticsearch/composer.json  |  2 +-
 app/code/Magento/Elasticsearch6/composer.json |  2 +-
 app/code/Magento/Elasticsearch7/composer.json |  2 +-
 composer.json                                 |  2 +-
 composer.lock                                 | 77 ++++++-------------
 .../testFromCreateProject/composer.lock       |  6 +-
 .../_files/testSkeleton/composer.lock         |  6 +-
 7 files changed, 34 insertions(+), 63 deletions(-)

diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json
index 8527991f354d9..b79ae7bc5cc47 100644
--- a/app/code/Magento/Elasticsearch/composer.json
+++ b/app/code/Magento/Elasticsearch/composer.json
@@ -12,7 +12,7 @@
         "magento/module-store": "*",
         "magento/module-catalog-inventory": "*",
         "magento/framework": "*",
-        "elasticsearch/elasticsearch": "7.6.*"
+        "elasticsearch/elasticsearch": "~7.7.0"
     },
     "suggest": {
         "magento/module-config": "*"
diff --git a/app/code/Magento/Elasticsearch6/composer.json b/app/code/Magento/Elasticsearch6/composer.json
index c3b32ba043345..1ee92c0b0a3b3 100644
--- a/app/code/Magento/Elasticsearch6/composer.json
+++ b/app/code/Magento/Elasticsearch6/composer.json
@@ -8,7 +8,7 @@
         "magento/module-catalog-search": "*",
         "magento/module-search": "*",
         "magento/module-elasticsearch": "*",
-        "elasticsearch/elasticsearch": "7.6.*"
+        "elasticsearch/elasticsearch": "~7.7.0"
     },
     "suggest": {
         "magento/module-config": "*"
diff --git a/app/code/Magento/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json
index 92074f9bc0de6..1e59ceaebaf84 100644
--- a/app/code/Magento/Elasticsearch7/composer.json
+++ b/app/code/Magento/Elasticsearch7/composer.json
@@ -5,7 +5,7 @@
         "php": "~7.3.0||~7.4.0",
         "magento/framework": "*",
         "magento/module-elasticsearch": "*",
-        "elasticsearch/elasticsearch": "7.6.*",
+        "elasticsearch/elasticsearch": "~7.7.0",
         "magento/module-advanced-search": "*",
         "magento/module-catalog-search": "*"
     },
diff --git a/composer.json b/composer.json
index 4a95ef3e066a9..bcd4af8c2090f 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,7 @@
         "colinmollenhour/credis": "1.11.1",
         "colinmollenhour/php-redis-session-abstract": "~1.4.0",
         "composer/composer": "^1.9",
-        "elasticsearch/elasticsearch": "7.6.*",
+        "elasticsearch/elasticsearch": "~7.7.0",
         "guzzlehttp/guzzle": "^6.3.3",
         "laminas/laminas-captcha": "^2.7.1",
         "laminas/laminas-code": "~3.4.1",
diff --git a/composer.lock b/composer.lock
index fc5c02b02a68f..20dfc8010947d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "5f3c699b683c0423f6320bb81c7b8dc4",
+    "content-hash": "02fccb2d01ffd97470ee6ba2f551f5fc",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -206,16 +206,6 @@
                 "ssl",
                 "tls"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-08T08:27:21+00:00"
         },
         {
@@ -526,16 +516,16 @@
         },
         {
             "name": "elasticsearch/elasticsearch",
-            "version": "v7.6.1",
+            "version": "v7.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/elastic/elasticsearch-php.git",
-                "reference": "d4f24bc43c2af60aece3df20eb689d322f9c8acf"
+                "reference": "1d90a7ff4fb1936dc4376f09d723af75714f6f05"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/d4f24bc43c2af60aece3df20eb689d322f9c8acf",
-                "reference": "d4f24bc43c2af60aece3df20eb689d322f9c8acf",
+                "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/1d90a7ff4fb1936dc4376f09d723af75714f6f05",
+                "reference": "1d90a7ff4fb1936dc4376f09d723af75714f6f05",
                 "shasum": ""
             },
             "require": {
@@ -585,7 +575,7 @@
                 "elasticsearch",
                 "search"
             ],
-            "time": "2020-02-15T00:09:00+00:00"
+            "time": "2020-05-13T15:19:26+00:00"
         },
         {
             "name": "ezimuel/guzzlestreams",
@@ -2306,12 +2296,6 @@
                 "laminas",
                 "mail"
             ],
-            "funding": [
-                {
-                    "url": "https://funding.communitybridge.org/projects/laminas-project",
-                    "type": "community_bridge"
-                }
-            ],
             "time": "2020-04-21T16:42:19+00:00"
         },
         {
@@ -3974,20 +3958,6 @@
                 "x.509",
                 "x509"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/terrafrost",
-                    "type": "github"
-                },
-                {
-                    "url": "https://www.patreon.com/phpseclib",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-04T23:17:33+00:00"
         },
         {
@@ -4235,6 +4205,11 @@
                 "MIT"
             ],
             "authors": [
+                {
+                    "name": "Ben Ramsey",
+                    "email": "ben@benramsey.com",
+                    "homepage": "https://benramsey.com"
+                },
                 {
                     "name": "Marijn Huizendveld",
                     "email": "marijn.huizendveld@gmail.com"
@@ -4242,11 +4217,6 @@
                 {
                     "name": "Thibaud Fabre",
                     "email": "thibaud@aztech.io"
-                },
-                {
-                    "name": "Ben Ramsey",
-                    "email": "ben@benramsey.com",
-                    "homepage": "https://benramsey.com"
                 }
             ],
             "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
@@ -5823,16 +5793,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.140.4",
+            "version": "3.141.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "298ec070adad5760c4b90348219bb3e6bd7a9322"
+                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/298ec070adad5760c4b90348219bb3e6bd7a9322",
-                "reference": "298ec070adad5760c4b90348219bb3e6bd7a9322",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d57dbde176a7db7a6131bb5d325aff63515eabc3",
+                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3",
                 "shasum": ""
             },
             "require": {
@@ -5903,7 +5873,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-06-09T18:11:16+00:00"
+            "time": "2020-06-10T18:11:38+00:00"
         },
         {
             "name": "beberlei/assert",
@@ -7478,16 +7448,16 @@
         },
         {
             "name": "magento/magento2-functional-testing-framework",
-            "version": "dev-3.0.0-RC3",
+            "version": "3.0.0-RC4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/magento2-functional-testing-framework.git",
-                "reference": "aea30ae1df2fe6618478ba8813864c204561fde3"
+                "reference": "34781ccc7385993b1e5bc9182e6ddddde7f2769f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/aea30ae1df2fe6618478ba8813864c204561fde3",
-                "reference": "aea30ae1df2fe6618478ba8813864c204561fde3",
+                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/34781ccc7385993b1e5bc9182e6ddddde7f2769f",
+                "reference": "34781ccc7385993b1e5bc9182e6ddddde7f2769f",
                 "shasum": ""
             },
             "require": {
@@ -7514,7 +7484,8 @@
                 "symfony/finder": "^5.0",
                 "symfony/mime": "^5.0",
                 "symfony/process": "^4.4",
-                "vlucas/phpdotenv": "^2.4"
+                "vlucas/phpdotenv": "^2.4",
+                "weew/helpers-array": "^1.3"
             },
             "replace": {
                 "facebook/webdriver": "^1.7.1"
@@ -7562,7 +7533,7 @@
                 "magento",
                 "testing"
             ],
-            "time": "2020-05-22T19:17:05+00:00"
+            "time": "2020-06-08T18:17:54+00:00"
         },
         {
             "name": "mikey179/vfsstream",
@@ -11070,7 +11041,7 @@
     "minimum-stability": "stable",
     "stability-flags": {
         "magento/composer": 20,
-        "magento/magento2-functional-testing-framework": 20
+        "magento/magento2-functional-testing-framework": 5
     },
     "prefer-stable": true,
     "prefer-lowest": false,
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
index 400073e6a87a6..9b008d03e0037 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
+++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testFromCreateProject/composer.lock
@@ -4775,7 +4775,7 @@
                 "shasum": "ed1da1137848560dde1a85f0f54dc2fac262359e"
             },
             "require": {
-                "elasticsearch/elasticsearch": "7.6.*",
+                "elasticsearch/elasticsearch": "~7.7.0",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog": "103.0.*",
@@ -4815,7 +4815,7 @@
                 "shasum": "a9da3243900390ad163efc7969b07116d2eb793f"
             },
             "require": {
-                "elasticsearch/elasticsearch": "7.6.*",
+                "elasticsearch/elasticsearch": "~7.7.0",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog-search": "101.0.*",
@@ -9408,7 +9408,7 @@
                 "colinmollenhour/php-redis-session-abstract": "~1.4.0",
                 "composer/composer": "^1.6",
                 "dotmailer/dotmailer-magento2-extension": "3.1.1",
-                "elasticsearch/elasticsearch": "7.6.*",
+                "elasticsearch/elasticsearch": "~7.7.0",
                 "ext-bcmath": "*",
                 "ext-ctype": "*",
                 "ext-curl": "*",
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
index 01daa792ed352..ba21896d665f9 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
+++ b/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/testSkeleton/composer.lock
@@ -4775,7 +4775,7 @@
                 "shasum": "ed1da1137848560dde1a85f0f54dc2fac262359e"
             },
             "require": {
-                "elasticsearch/elasticsearch": "7.6.*",
+                "elasticsearch/elasticsearch": "~7.7.0",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog": "103.0.*",
@@ -4815,7 +4815,7 @@
                 "shasum": "a9da3243900390ad163efc7969b07116d2eb793f"
             },
             "require": {
-                "elasticsearch/elasticsearch": "7.6.*",
+                "elasticsearch/elasticsearch": "~7.7.0",
                 "magento/framework": "102.0.*",
                 "magento/module-advanced-search": "100.3.*",
                 "magento/module-catalog-search": "101.0.*",
@@ -9408,7 +9408,7 @@
                 "colinmollenhour/php-redis-session-abstract": "~1.4.0",
                 "composer/composer": "^1.6",
                 "dotmailer/dotmailer-magento2-extension": "3.1.1",
-                "elasticsearch/elasticsearch": "7.6.*",
+                "elasticsearch/elasticsearch": "~7.7.0",
                 "ext-bcmath": "*",
                 "ext-ctype": "*",
                 "ext-curl": "*",

From cd791b90595b9652c5ec7d69548c99f890466f36 Mon Sep 17 00:00:00 2001
From: Pieter Hoste <hoste.pieter@gmail.com>
Date: Fri, 5 Jun 2020 17:06:35 +0200
Subject: [PATCH 225/307] Simplify version constraint for the
 php-amqplib/php-amqplib package, now that the php extension sockets is
 considered required for Magento.

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index aa293fdfb014b..ce431c9b6db28 100644
--- a/composer.json
+++ b/composer.json
@@ -70,7 +70,7 @@
         "monolog/monolog": "^1.17",
         "paragonie/sodium_compat": "^1.6",
         "pelago/emogrifier": "^3.1.0",
-        "php-amqplib/php-amqplib": "~2.7.0||~2.10.0",
+        "php-amqplib/php-amqplib": "~2.10.0",
         "phpseclib/mcrypt_compat": "1.0.8",
         "phpseclib/phpseclib": "2.0.*",
         "ramsey/uuid": "~3.8.0",

From 50f94e40dbe4be56a3d99f7b3968e787a15b420b Mon Sep 17 00:00:00 2001
From: Lena Orobei <oorobei@magento.com>
Date: Thu, 11 Jun 2020 15:34:03 -0500
Subject: [PATCH 226/307] magento/magento2#27200: Dependency
 php-amqplib/php-amqplib vs php extension sockets causes inconsistent
 composer.lock file

---
 composer.lock | 293 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 291 insertions(+), 2 deletions(-)

diff --git a/composer.lock b/composer.lock
index eea11746a42fa..c059a77c3e35b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "2ddc5369636a860cfa82ef023c958bd6",
+    "content-hash": "d41767acdd1e6d4926c14821738ed8d5",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -1305,6 +1305,12 @@
                 "BSD-3-Clause"
             ],
             "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.",
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
             "time": "2020-05-20T13:45:39+00:00"
         },
         {
@@ -3254,6 +3260,12 @@
                 "laminas",
                 "zf"
             ],
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
             "time": "2020-05-20T16:45:56+00:00"
         },
         {
@@ -3493,6 +3505,16 @@
                 "logging",
                 "psr-3"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/Seldaek",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-22T07:31:27+00:00"
         },
         {
@@ -4444,6 +4466,20 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -4622,6 +4658,20 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-30T20:35:19+00:00"
         },
         {
@@ -4671,6 +4721,20 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -4729,6 +4793,20 @@
                 "polyfill",
                 "portable"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:14:59+00:00"
         },
         {
@@ -4791,6 +4869,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -4850,6 +4942,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -4905,6 +5011,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -4963,6 +5083,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5867,6 +6001,12 @@
                 "functional testing",
                 "unit testing"
             ],
+            "funding": [
+                {
+                    "url": "https://opencollective.com/codeception",
+                    "type": "open_collective"
+                }
+            ],
             "time": "2020-05-24T13:58:47+00:00"
         },
         {
@@ -6439,6 +6579,20 @@
                 "redis",
                 "xcache"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-27T16:24:54+00:00"
         },
         {
@@ -6562,6 +6716,20 @@
                 "constructor",
                 "instantiate"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-29T17:27:14+00:00"
         },
         {
@@ -6624,6 +6792,20 @@
                 "parser",
                 "php"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-25T17:44:05+00:00"
         },
         {
@@ -6973,6 +7155,12 @@
                 "sftp",
                 "storage"
             ],
+            "funding": [
+                {
+                    "url": "https://offset.earth/frankdejonge",
+                    "type": "other"
+                }
+            ],
             "time": "2020-05-18T15:13:39+00:00"
         },
         {
@@ -8575,6 +8763,16 @@
                 "testing",
                 "xunit"
             ],
+            "funding": [
+                {
+                    "url": "https://phpunit.de/donate.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-05-22T13:54:05+00:00"
         },
         {
@@ -8880,6 +9078,12 @@
                 "unidiff",
                 "unified diff"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-05-08T05:01:12+00:00"
         },
         {
@@ -9735,6 +9939,20 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-27T08:34:37+00:00"
         },
         {
@@ -9796,6 +10014,20 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-24T12:18:07+00:00"
         },
         {
@@ -9859,6 +10091,20 @@
                 "mime",
                 "mime-type"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-25T12:33:44+00:00"
         },
         {
@@ -9972,6 +10218,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -10034,6 +10294,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -10147,6 +10421,20 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -10537,5 +10825,6 @@
         "ext-zip": "*",
         "lib-libxml": "*"
     },
-    "platform-dev": []
+    "platform-dev": [],
+    "plugin-api-version": "1.1.0"
 }

From e21fbddd942844fac7f1d61b5b51abdf848a94da Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Fri, 12 Jun 2020 15:34:09 +0300
Subject: [PATCH 227/307] magento/magento2-login-as-customer#158: Enable Page
 Cache - Admin is not logged in as customer because was redirected to the
 "Sign In" page.

---
 .../view/frontend/layout/loginascustomer_login_index.xml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/layout/loginascustomer_login_index.xml b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/layout/loginascustomer_login_index.xml
index efb866690c401..768b63cbbecea 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/layout/loginascustomer_login_index.xml
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/layout/loginascustomer_login_index.xml
@@ -13,7 +13,7 @@
             </action>
         </referenceBlock>
         <referenceContainer name="content">
-            <block class="Magento\Framework\View\Element\Template" name="loginascustomer_login" template="Magento_LoginAsCustomerFrontendUi::login.phtml"/>
+            <block class="Magento\Framework\View\Element\Template" name="loginascustomer_login" template="Magento_LoginAsCustomerFrontendUi::login.phtml" cacheable="false"/>
         </referenceContainer>
     </body>
 </page>

From 8a5e79d5be26e6e694c3e5950c2cbc0dc278273a Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Fri, 12 Jun 2020 16:11:43 +0300
Subject: [PATCH 228/307] MC-35139: [UPS] Allowed Methods are absent

---
 .../templates/system/shipping/carrier_config.phtml        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
index d0b6443994aa6..f068b0cf0079f 100644
--- a/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
+++ b/app/code/Magento/Ups/view/adminhtml/templates/system/shipping/carrier_config.phtml
@@ -156,7 +156,7 @@ $scriptString .= <<<script
         setFormValues: function()
         {
             var a;
-            if ($(this.carriersUpsTypeId) == 'UPS') {
+            if (\$F(this.carriersUpsTypeId) == 'UPS') {
                 for (a = 0; a < this.checkingUpsXmlId.length; a++) {
                     $(this.checkingUpsXmlId[a]).removeClassName('required-entry');
                 }
@@ -184,13 +184,13 @@ $scriptString .= <<<script
         },
         changeOriginShipment: function(Event, key)
         {
-            this.originShipmentTitle = key ? key : $('carriers_ups_origin_shipment');
+            this.originShipmentTitle = key ? key : \$F('carriers_ups_origin_shipment');
             this.updateAllowedMethods(this.originShipmentTitle);
         },
         changeFieldsDisabledState: function (fields, key) {
-            $(fields[key]).disabled = $(this.carriersUpsActiveId) !== '1'
+            $(fields[key]).disabled = \$F(this.carriersUpsActiveId) !== '1'
                 || $(fields[key] + '_inherit') !== null
-                && $(fields[key] + '_inherit') === '1';
+                && \$F(fields[key] + '_inherit') === '1';
 
             if ($(fields[key]).next() !== undefined) {
                 $(fields[key]).removeClassName('mage-error').next().remove();

From b7ed3e6a96941d02bc5f6fc579f88dad60ab77b3 Mon Sep 17 00:00:00 2001
From: Sergii Ivashchenko <serg.ivashchenko@gmail.com>
Date: Fri, 12 Jun 2020 18:24:43 +0100
Subject: [PATCH 229/307] magento/adobe-stock-integration#1439: Added
 description and hash fields to the media asset

---
 app/code/Magento/MediaGallery/Model/Asset.php | 32 +++++++++++++++++++
 .../Model/Asset/Command/GetById.php           |  2 ++
 .../Model/Asset/Command/GetByPath.php         |  2 ++
 .../Model/ResourceModel/GetAssetsByIds.php    |  2 ++
 .../Model/ResourceModel/GetAssetsByPaths.php  |  2 ++
 .../Model/ResourceModel/SaveAssets.php        |  2 ++
 .../Magento/MediaGallery/etc/db_schema.xml    |  2 ++
 .../MediaGallery/etc/db_schema_whitelist.json |  2 ++
 .../Api/Data/AssetInterface.php               | 14 ++++++++
 9 files changed, 60 insertions(+)

diff --git a/app/code/Magento/MediaGallery/Model/Asset.php b/app/code/Magento/MediaGallery/Model/Asset.php
index 78b9477a70b08..7a4e51709dc0a 100644
--- a/app/code/Magento/MediaGallery/Model/Asset.php
+++ b/app/code/Magento/MediaGallery/Model/Asset.php
@@ -32,11 +32,21 @@ class Asset implements AssetInterface
      */
     private $title;
 
+    /**
+     * @var string|null
+     */
+    private $description;
+
     /**
      * @var string|null
      */
     private $source;
 
+    /**
+     * @var string|null
+     */
+    private $hash;
+
     /**
      * @var string
      */
@@ -80,7 +90,9 @@ class Asset implements AssetInterface
      * @param int $size
      * @param int|null $id
      * @param string|null $title
+     * @param string|null $description
      * @param string|null $source
+     * @param string|null $hash
      * @param string|null $createdAt
      * @param string|null $updatedAt
      * @param AssetExtensionInterface|null $extensionAttributes
@@ -93,7 +105,9 @@ public function __construct(
         int $size,
         ?int $id = null,
         ?string $title = null,
+        ?string $description = null,
         ?string $source = null,
+        ?string $hash = null,
         ?string $createdAt = null,
         ?string $updatedAt = null,
         ?AssetExtensionInterface $extensionAttributes = null
@@ -105,7 +119,9 @@ public function __construct(
         $this->size = $size;
         $this->id = $id;
         $this->title = $title;
+        $this->description = $description;
         $this->source = $source;
+        $this->hash = $hash;
         $this->createdAt = $createdAt;
         $this->updatedAt = $updatedAt;
         $this->extensionAttributes = $extensionAttributes;
@@ -135,6 +151,14 @@ public function getTitle(): ?string
         return $this->title;
     }
 
+    /**
+     * @inheritdoc
+     */
+    public function getDescription(): ?string
+    {
+        return $this->description;
+    }
+
     /**
      * @inheritdoc
      */
@@ -143,6 +167,14 @@ public function getSource(): ?string
         return $this->source;
     }
 
+    /**
+     * @inheritdoc
+     */
+    public function getHash(): ?string
+    {
+        return $this->hash;
+    }
+
     /**
      * @inheritdoc
      */
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php b/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php
index b2f900233e46a..71e2cb70663f3 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php
@@ -94,7 +94,9 @@ public function execute(int $mediaAssetId): AssetInterface
                     'id' => $mediaAssetData['id'],
                     'path' => $mediaAssetData['path'],
                     'title' => $mediaAssetData['title'],
+                    'description' => $mediaAssetData['description'],
                     'source' => $mediaAssetData['source'],
+                    'hash' => $mediaAssetData['hash'],
                     'contentType' => $mediaAssetData['content_type'],
                     'width' => $mediaAssetData['width'],
                     'height' => $mediaAssetData['height'],
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php b/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php
index d9faad62b2cd1..02512a12f9d07 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php
@@ -86,7 +86,9 @@ public function execute(string $path): AssetInterface
                     'id' => $data['id'],
                     'path' => $data['path'],
                     'title' => $data['title'],
+                    'description' => $data['description'],
                     'source' => $data['source'],
+                    'hash' => $data['hash'],
                     'contentType' => $data['content_type'],
                     'width' => $data['width'],
                     'height' => $data['height'],
diff --git a/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByIds.php b/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByIds.php
index 53185939b2283..f73162b775683 100644
--- a/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByIds.php
+++ b/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByIds.php
@@ -65,7 +65,9 @@ public function execute(array $ids): array
                         'id' => $assetData['id'],
                         'path' => $assetData['path'],
                         'title' => $assetData['title'],
+                        'description' => $assetData['description'],
                         'source' => $assetData['source'],
+                        'hash' => $assetData['hash'],
                         'contentType' => $assetData['content_type'],
                         'width' => $assetData['width'],
                         'height' => $assetData['height'],
diff --git a/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByPaths.php b/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByPaths.php
index 5593083d9673a..b25d2e22aabd4 100644
--- a/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByPaths.php
+++ b/app/code/Magento/MediaGallery/Model/ResourceModel/GetAssetsByPaths.php
@@ -66,7 +66,9 @@ public function execute(array $paths): array
                         'id' => $assetData['id'],
                         'path' => $assetData['path'],
                         'title' => $assetData['title'],
+                        'description' => $assetData['description'],
                         'source' => $assetData['source'],
+                        'hash' => $assetData['hash'],
                         'contentType' => $assetData['content_type'],
                         'width' => $assetData['width'],
                         'height' => $assetData['height'],
diff --git a/app/code/Magento/MediaGallery/Model/ResourceModel/SaveAssets.php b/app/code/Magento/MediaGallery/Model/ResourceModel/SaveAssets.php
index ec08addf93462..801279aa7fd7d 100644
--- a/app/code/Magento/MediaGallery/Model/ResourceModel/SaveAssets.php
+++ b/app/code/Magento/MediaGallery/Model/ResourceModel/SaveAssets.php
@@ -60,7 +60,9 @@ public function execute(array $assets): void
                     'id' => $asset->getId(),
                     'path' => $asset->getPath(),
                     'title' => $asset->getTitle(),
+                    'description' => $asset->getDescription(),
                     'source' => $asset->getSource(),
+                    'hash' => $asset->getHash(),
                     'content_type' => $asset->getContentType(),
                     'width' => $asset->getWidth(),
                     'height' => $asset->getHeight(),
diff --git a/app/code/Magento/MediaGallery/etc/db_schema.xml b/app/code/Magento/MediaGallery/etc/db_schema.xml
index 31a764ef00c4d..1001737daa8a7 100644
--- a/app/code/Magento/MediaGallery/etc/db_schema.xml
+++ b/app/code/Magento/MediaGallery/etc/db_schema.xml
@@ -10,7 +10,9 @@
         <column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
         <column xsi:type="varchar" name="path" length="255" nullable="true" comment="Path"/>
         <column xsi:type="varchar" name="title" length="255" nullable="true" comment="Title"/>
+        <column xsi:type="text" name="description" nullable="true" comment="Description"/>
         <column xsi:type="varchar" name="source" length="255" nullable="true" comment="Source"/>
+        <column xsi:type="varchar" name="hash" length="255" nullable="true" comment="File hash"/>
         <column xsi:type="varchar" name="content_type" length="255" nullable="true" comment="Content Type"/>
         <column xsi:type="int" name="width" unsigned="true" nullable="false" identity="false" default="0" comment="Width"/>
         <column xsi:type="int" name="height" unsigned="true" nullable="false" identity="false" default="0" comment="Height"/>
diff --git a/app/code/Magento/MediaGallery/etc/db_schema_whitelist.json b/app/code/Magento/MediaGallery/etc/db_schema_whitelist.json
index 8f5098caa9753..b32dfbf082175 100644
--- a/app/code/Magento/MediaGallery/etc/db_schema_whitelist.json
+++ b/app/code/Magento/MediaGallery/etc/db_schema_whitelist.json
@@ -4,7 +4,9 @@
             "id": true,
             "path": true,
             "title": true,
+            "description": true,
             "source": true,
+            "hash": true,
             "content_type": true,
             "width": true,
             "height": true,
diff --git a/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php b/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php
index 5df420a274933..a747cb963baab 100644
--- a/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php
@@ -38,6 +38,13 @@ public function getPath(): string;
      */
     public function getTitle(): ?string;
 
+    /**
+     * Get description
+     *
+     * @return string|null
+     */
+    public function getDescription(): ?string;
+
     /**
      * Get the name of the channel/stock/integration file was retrieved from. null if not identified.
      *
@@ -45,6 +52,13 @@ public function getTitle(): ?string;
      */
     public function getSource(): ?string;
 
+    /**
+     * Get file hash
+     *
+     * @return string|null
+     */
+    public function getHash(): ?string;
+
     /**
      * Get content type
      *

From 74727b2515d9b17f650bcf7a581d06a8c2358616 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Fri, 12 Jun 2020 17:40:37 -0500
Subject: [PATCH 230/307] MC-35064: [Cloud] Can't deploy 2.4.0-alpha8 on cloud
 pro instance

---
 .../Framework/View/Template/Html/Minifier.php | 23 ++++++++++++++++++-
 .../Test/Unit/Template/Html/MinifierTest.php  | 11 ++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php
index 796cc8bef0f28..0a8db80cae349 100644
--- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php
+++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php
@@ -114,6 +114,18 @@ public function minify($file)
     {
         $dir = dirname($file);
         $fileName = basename($file);
+        $content = $this->readFactory->create($dir)->readFile($fileName);
+        //Storing Heredocs
+        $heredocs = [];
+        $content = preg_replace_callback(
+            '/<<<([A-z]+).*?\1;/ims',
+            function ($match) use (&$heredocs) {
+                $heredocs[] = $match[0];
+
+                return '__MINIFIED_HEREDOC__' .(count($heredocs) - 1);
+            },
+            $content
+        );
         $content = preg_replace(
             '#(?<!]]>)\s+</#',
             '</',
@@ -136,7 +148,7 @@ public function minify($file)
                                 preg_replace(
                                     '#(?<!:)//[^\n\r]*(\<\?php)[^\n\r]*(\s\?\>)[^\n\r]*#',
                                     '',
-                                    $this->readFactory->create($dir)->readFile($fileName)
+                                    $content
                                 )
                             )
                         )
@@ -145,6 +157,15 @@ public function minify($file)
             )
         );
 
+        //Restoring Heredocs
+        $content = preg_replace_callback(
+            '/__MINIFIED_HEREDOC__(\d+)/ims',
+            function ($match) use ($heredocs) {
+                return $heredocs[(int)$match[1]];
+            },
+            $content
+        );
+
         if (!$this->htmlDirectory->isExist()) {
             $this->htmlDirectory->create();
         }
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php
index 3e9db46c354d7..21f8aa598a721 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php
@@ -167,6 +167,12 @@ public function testMinify()
             <?php // echo \$block->getChildHtml('anotherChildBlock'); ?>
         <?php // endif; ?>
     </body>
+    <?php
+    \$sometext = <<<SOMETEXT
+    mytext
+    mytextline2
+SOMETEXT;
+    ?>
 </html>
 TEXT;
 
@@ -189,7 +195,10 @@ public function testMinify()
                 }
             });
             //]]>
-</script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a> <?php ?> <?php echo \$block->getChildHtml('someChildBlock'); ?> <?php ?> <?php ?> <?php ?></body></html>
+</script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a> <?php ?> <?php echo \$block->getChildHtml('someChildBlock'); ?> <?php ?> <?php ?> <?php ?></body><?php \$sometext = <<<SOMETEXT
+    mytext
+    mytextline2
+SOMETEXT; ?></html>
 TEXT;
 
         $this->appDirectoryMock->expects($this->once())

From f979863fabe9ca8bec051876a303eb2578212672 Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Mon, 15 Jun 2020 11:55:18 +0300
Subject: [PATCH 231/307] =?UTF-8?q?magento/magento2-login-as-customer#94:?=
 =?UTF-8?q?=20"Login=20as=20Customer"=20button=20must=20be=20next=20to=20t?=
 =?UTF-8?q?he=20=E2=80=9CBack=20button=E2=80=9D=20on=20the=20left.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Component/Control/LoginAsCustomerButton.php        |  2 +-
 .../view/adminhtml/web/css/source/_module.less         | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/LoginAsCustomerAdminUi/Ui/Customer/Component/Control/LoginAsCustomerButton.php b/app/code/Magento/LoginAsCustomerAdminUi/Ui/Customer/Component/Control/LoginAsCustomerButton.php
index 0f8f7750262f2..d900641c131a3 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/Ui/Customer/Component/Control/LoginAsCustomerButton.php
+++ b/app/code/Magento/LoginAsCustomerAdminUi/Ui/Customer/Component/Control/LoginAsCustomerButton.php
@@ -69,7 +69,7 @@ public function getButtonData(): array
                 'on_click' => 'window.lacConfirmationPopup("'
                     . $this->escaper->escapeHtml($this->escaper->escapeJs($this->getLoginUrl()))
                     . '")',
-                'sort_order' => 70,
+                'sort_order' => 15,
             ];
         }
 
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/view/adminhtml/web/css/source/_module.less b/app/code/Magento/LoginAsCustomerAdminUi/view/adminhtml/web/css/source/_module.less
index 2901f95f0e279..d702bc49f23ed 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/view/adminhtml/web/css/source/_module.less
+++ b/app/code/Magento/LoginAsCustomerAdminUi/view/adminhtml/web/css/source/_module.less
@@ -39,4 +39,14 @@
             }
         }
     }
+
+    .page-actions {
+        .page-actions-buttons {
+            .login-button {
+                -ms-flex-order: -1;
+                -webkit-order: -1;
+                order: -1;
+            }
+        }
+    }
 }

From 62d0a299d84bad081b9ba683c74af7eeb672cc3d Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Mon, 15 Jun 2020 11:58:40 +0300
Subject: [PATCH 232/307] magento/magento2-login-as-customer#144: "Login as
 Customer" functionality should be enabled by default.

---
 app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php | 2 +-
 app/code/Magento/LoginAsCustomer/etc/config.xml               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
index 3b8d26129a91e..f473dcebcf9ea 100644
--- a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
+++ b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -45,7 +45,7 @@ public function __construct(
      */
     public function beforeLogout(Auth $subject): void
     {
-        if ($this->config->isEnabled()) {
+        if ($this->config->isEnabled() && $subject->getUser()) {
             $userId = (int)$subject->getUser()->getId();
             $this->deleteAuthenticationDataForUser->execute($userId);
         }
diff --git a/app/code/Magento/LoginAsCustomer/etc/config.xml b/app/code/Magento/LoginAsCustomer/etc/config.xml
index 936ae1ff2f05d..7e39cc39145eb 100644
--- a/app/code/Magento/LoginAsCustomer/etc/config.xml
+++ b/app/code/Magento/LoginAsCustomer/etc/config.xml
@@ -10,7 +10,7 @@
     <default>
         <login_as_customer>
             <general>
-                <enabled>0</enabled>
+                <enabled>1</enabled>
                 <store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
                 <authentication_data_expiration_time>60</authentication_data_expiration_time>
             </general>

From 3947566b61e028b640fefcb9f2a1369a58d0a833 Mon Sep 17 00:00:00 2001
From: Sergii Ivashchenko <serg.ivashchenko@gmail.com>
Date: Mon, 15 Jun 2020 12:39:21 +0100
Subject: [PATCH 233/307] magento-engcom/magento2ce#3890: Fixed unit tests

---
 .../GetByIdExceptionDuringMediaAssetInitializationTest.php      | 2 ++
 .../Unit/Model/Asset/Command/GetByIdExceptionOnGetDataTest.php  | 2 ++
 .../Test/Unit/Model/Asset/Command/GetByIdSuccessfulTest.php     | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionDuringMediaAssetInitializationTest.php b/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionDuringMediaAssetInitializationTest.php
index 09ce7ffe8ff20..5f99163db8f12 100644
--- a/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionDuringMediaAssetInitializationTest.php
+++ b/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionDuringMediaAssetInitializationTest.php
@@ -28,7 +28,9 @@ class GetByIdExceptionDuringMediaAssetInitializationTest extends TestCase
         'id' => 45,
         'path' => 'img.jpg',
         'title' => 'Img',
+        'description' => 'Img Description',
         'source' => 'Adobe Stock',
+        'hash' => 'hash',
         'content_type' => 'image/jpeg',
         'width' => 420,
         'height' => 240,
diff --git a/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionOnGetDataTest.php b/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionOnGetDataTest.php
index 89efae07360b4..3b47b0036224b 100644
--- a/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionOnGetDataTest.php
+++ b/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdExceptionOnGetDataTest.php
@@ -29,7 +29,9 @@ class GetByIdExceptionOnGetDataTest extends TestCase
         'id' => 45,
         'path' => 'img.jpg',
         'title' => 'Img',
+        'description' => 'Img Description',
         'source' => 'Adobe Stock',
+        'hash' => 'hash',
         'content_type' => 'image/jpeg',
         'width' => 420,
         'height' => 240,
diff --git a/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdSuccessfulTest.php b/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdSuccessfulTest.php
index 8b805d0256e37..2c24899746473 100644
--- a/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdSuccessfulTest.php
+++ b/app/code/Magento/MediaGallery/Test/Unit/Model/Asset/Command/GetByIdSuccessfulTest.php
@@ -29,7 +29,9 @@ class GetByIdSuccessfulTest extends TestCase
         'id' => 45,
         'path' => 'img.jpg',
         'title' => 'Img',
+        'description' => 'Img Description',
         'source' => 'Adobe Stock',
+        'hash' => 'hash',
         'content_type' => 'image/jpeg',
         'width' => 420,
         'height' => 240,

From b917a014ad62442277ed4133da65725d60b1950f Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Mon, 15 Jun 2020 11:43:25 -0500
Subject: [PATCH 234/307] MC-35064: [Cloud] Can't deploy 2.4.0-alpha8 on cloud
 pro instance

---
 .../Framework/View/Test/Unit/Template/Html/MinifierTest.php     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php
index 21f8aa598a721..6aafa5a46cf63 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php
@@ -113,6 +113,8 @@ public function testGetPathToMinified()
     /**
      * Covered method minify and test regular expressions
      * @test
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
     public function testMinify()
     {

From 78728a3b1bbd85b8bf906d86e51e18074159953d Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Mon, 15 Jun 2020 12:00:26 -0500
Subject: [PATCH 235/307] MC-35039: Update Elasticsearch dependencies for 2.4.0

---
 app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml | 2 +-
 app/code/Magento/Elasticsearch7/etc/di.xml               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml b/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml
index 52e5be5a5beeb..9e818ff61eb89 100644
--- a/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml
+++ b/app/code/Magento/Elasticsearch7/etc/adminhtml/system.xml
@@ -10,7 +10,7 @@
     <system>
         <section id="catalog">
             <group id="search">
-                <!-- Elasticsearch 7.0+ -->
+                <!-- Elasticsearch 7 -->
                 <field id="elasticsearch7_server_hostname" translate="label" type="text" sortOrder="61"
                        showInDefault="1" showInWebsite="0" showInStore="0">
                     <label>Elasticsearch Server Hostname</label>
diff --git a/app/code/Magento/Elasticsearch7/etc/di.xml b/app/code/Magento/Elasticsearch7/etc/di.xml
index b5d013a294e26..446331edc63fb 100644
--- a/app/code/Magento/Elasticsearch7/etc/di.xml
+++ b/app/code/Magento/Elasticsearch7/etc/di.xml
@@ -17,7 +17,7 @@
     <type name="Magento\Search\Model\Adminhtml\System\Config\Source\Engine">
         <arguments>
             <argument name="engines" xsi:type="array">
-                <item sortOrder="30" name="elasticsearch7" xsi:type="string">Elasticsearch 7.0+</item>
+                <item sortOrder="30" name="elasticsearch7" xsi:type="string">Elasticsearch 7</item>
             </argument>
         </arguments>
     </type>

From 1373e358c2b1be9a1a3086d07f553f6fd3433879 Mon Sep 17 00:00:00 2001
From: Soumya Unnikrishnan <sunnikri@adobe.com>
Date: Mon, 15 Jun 2020 12:00:50 -0500
Subject: [PATCH 236/307] MQE-2179: [3.0.0 RC5 - Release] Checklist

---
 composer.json |   2 +-
 composer.lock | 207 ++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 200 insertions(+), 9 deletions(-)

diff --git a/composer.json b/composer.json
index aa293fdfb014b..c5557a9df986f 100644
--- a/composer.json
+++ b/composer.json
@@ -88,7 +88,7 @@
         "friendsofphp/php-cs-fixer": "~2.16.0",
         "lusitanian/oauth": "~0.8.10",
         "magento/magento-coding-standard": "*",
-        "magento/magento2-functional-testing-framework": "3.0.0-RC4",
+        "magento/magento2-functional-testing-framework": "dev-3.0.0-RC5",
         "pdepend/pdepend": "~2.7.1",
         "phpcompatibility/php-compatibility": "^9.3",
         "phpmd/phpmd": "^2.8.0",
diff --git a/composer.lock b/composer.lock
index eea11746a42fa..8d22b58d32ddf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "2ddc5369636a860cfa82ef023c958bd6",
+    "content-hash": "d55c9c67cc6b0568bbffb1d78997f8d5",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -206,6 +206,16 @@
                 "ssl",
                 "tls"
             ],
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-04-08T08:27:21+00:00"
         },
         {
@@ -452,6 +462,12 @@
                 "Xdebug",
                 "performance"
             ],
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                }
+            ],
             "time": "2020-03-01T12:26:26+00:00"
         },
         {
@@ -3908,6 +3924,20 @@
                 "x.509",
                 "x509"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/terrafrost",
+                    "type": "github"
+                },
+                {
+                    "url": "https://www.patreon.com/phpseclib",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-04-04T23:17:33+00:00"
         },
         {
@@ -4444,6 +4474,20 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -4622,6 +4666,20 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-30T20:35:19+00:00"
         },
         {
@@ -4671,6 +4729,20 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -5867,6 +5939,12 @@
                 "functional testing",
                 "unit testing"
             ],
+            "funding": [
+                {
+                    "url": "https://opencollective.com/codeception",
+                    "type": "open_collective"
+                }
+            ],
             "time": "2020-05-24T13:58:47+00:00"
         },
         {
@@ -6439,6 +6517,20 @@
                 "redis",
                 "xcache"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-27T16:24:54+00:00"
         },
         {
@@ -6562,6 +6654,20 @@
                 "constructor",
                 "instantiate"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-29T17:27:14+00:00"
         },
         {
@@ -6624,6 +6730,20 @@
                 "parser",
                 "php"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-25T17:44:05+00:00"
         },
         {
@@ -7083,16 +7203,16 @@
         },
         {
             "name": "magento/magento2-functional-testing-framework",
-            "version": "3.0.0-RC4",
+            "version": "dev-3.0.0-RC5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/magento2-functional-testing-framework.git",
-                "reference": "34781ccc7385993b1e5bc9182e6ddddde7f2769f"
+                "reference": "bd2eee29eac0e438a2d09f63e6b5e3a8f852d933"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/34781ccc7385993b1e5bc9182e6ddddde7f2769f",
-                "reference": "34781ccc7385993b1e5bc9182e6ddddde7f2769f",
+                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/bd2eee29eac0e438a2d09f63e6b5e3a8f852d933",
+                "reference": "bd2eee29eac0e438a2d09f63e6b5e3a8f852d933",
                 "shasum": ""
             },
             "require": {
@@ -7168,7 +7288,7 @@
                 "magento",
                 "testing"
             ],
-            "time": "2020-06-08T18:17:54+00:00"
+            "time": "2020-06-15T16:31:51+00:00"
         },
         {
             "name": "mikey179/vfsstream",
@@ -9735,6 +9855,20 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-27T08:34:37+00:00"
         },
         {
@@ -9796,6 +9930,20 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-24T12:18:07+00:00"
         },
         {
@@ -9859,6 +10007,20 @@
                 "mime",
                 "mime-type"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-25T12:33:44+00:00"
         },
         {
@@ -10034,6 +10196,20 @@
                 "portable",
                 "shim"
             ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -10147,6 +10323,20 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -10514,7 +10704,7 @@
     "minimum-stability": "stable",
     "stability-flags": {
         "magento/composer": 20,
-        "magento/magento2-functional-testing-framework": 5
+        "magento/magento2-functional-testing-framework": 20
     },
     "prefer-stable": true,
     "prefer-lowest": false,
@@ -10537,5 +10727,6 @@
         "ext-zip": "*",
         "lib-libxml": "*"
     },
-    "platform-dev": []
+    "platform-dev": [],
+    "plugin-api-version": "1.1.0"
 }

From 65c1404f8eaf95c78725215c94b1b3800777706e Mon Sep 17 00:00:00 2001
From: Soumya Unnikrishnan <sunnikri@adobe.com>
Date: Mon, 15 Jun 2020 12:07:11 -0500
Subject: [PATCH 237/307] MQE-2164: Remove problematic terms from MFTF

---
 ...minCreateDownloadableProductWithInvalidDomainLinkUrlTest.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithInvalidDomainLinkUrlTest.xml b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithInvalidDomainLinkUrlTest.xml
index 9ad20385519d1..34b9701f2dca5 100644
--- a/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithInvalidDomainLinkUrlTest.xml
+++ b/app/code/Magento/Downloadable/Test/Mftf/Test/AdminCreateDownloadableProductWithInvalidDomainLinkUrlTest.xml
@@ -37,7 +37,7 @@
             <argument name="link" value="downloadableLink"/>
             <argument name="index" value="0"/>
         </actionGroup>
-        <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductAfterAddingDomainToWhitelist" after="addDownloadableProductLinkAgain" />
+        <actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductAfterAddingDomainToAllowlist" after="addDownloadableProductLinkAgain" />
         <scrollTo selector="{{StorefrontDownloadableProductSection.downloadableLinkByTitle(downloadableLink.title)}}" stepKey="scrollToLinks"/>
         <click selector="{{StorefrontDownloadableProductSection.downloadableLinkByTitle(downloadableLink.title)}}" stepKey="selectProductLink"/>
         <see selector="{{CheckoutCartProductSection.ProductPriceByName(DownloadableProduct.name)}}" userInput="$52.99" stepKey="assertProductPriceInCart"/>

From 6f60490ca15b02304959a104087033b8e2028d35 Mon Sep 17 00:00:00 2001
From: Lukasz Bajsarowicz <lukasz.bajsarowicz@gmail.com>
Date: Mon, 8 Jun 2020 14:06:40 +0200
Subject: [PATCH 238/307] Remove classes that were deprecated, as these were
 not released yet, remove `isDenied` that is inappropriate to the context of
 excluding directories. Replacing back to Exclude from Deny.

---
 .../Model/FilterProductCustomAttribute.php    | 12 +++----
 app/code/Magento/CatalogInventory/etc/di.xml  |  2 +-
 .../Eav/Model/Validator/Attribute/Data.php    | 18 +++++------
 .../Model/Validator/Attribute/DataTest.php    | 31 ++++++++++---------
 app/code/Magento/Elasticsearch/etc/di.xml     |  2 +-
 .../Fedex/etc/wsdl/RateService_v10.wsdl       |  8 ++---
 .../Fedex/etc/wsdl/RateService_v9.wsdl        |  6 ++--
 .../Fedex/etc/wsdl/ShipService_v10.wsdl       |  4 +--
 .../Fedex/etc/wsdl/ShipService_v9.wsdl        |  4 +--
 .../Model/Import/AbstractEntity.php           | 12 +++++--
 .../Model/Directory/Command/CreateByPaths.php | 14 ++++-----
 .../Model/Directory/Command/DeleteByPaths.php | 14 ++++-----
 .../Model/Directory/Config/Converter.php      | 14 ++++-----
 ...sConfig.php => ExcludedPatternsConfig.php} |  8 ++---
 .../{IsBlacklisted.php => IsExcluded.php}     | 14 ++++-----
 ...BlacklistedTest.php => IsExcludedTest.php} | 24 +++++++-------
 app/code/Magento/MediaGallery/etc/di.xml      |  9 +++---
 .../Magento/MediaGallery/etc/directory.xml    |  4 +--
 ...erface.php => IsPathExcludedInterface.php} |  6 ++--
 ...hp => ExcludedPatternsConfigInterface.php} |  4 +--
 .../Magento/MediaGalleryApi/etc/directory.xsd |  6 ++--
 .../MediaGalleryCatalog/etc/directory.xml     |  4 +--
 .../ResourceModel/Order/Rss/OrderStatus.php   |  6 ++--
 app/code/Magento/SampleData/README.md         |  4 +--
 .../Search/Model/SearchEngine/Validator.php   | 14 ++++-----
 .../Unit/Model/SearchEngine/ValidatorTest.php |  4 +--
 .../plugins/lists/editor_plugin_src.js        | 16 +++++-----
 .../Test/AdminCreateActiveUserEntityTest.xml  |  2 +-
 .../AdminCreateInactiveUserEntityTest.xml     |  4 +--
 .../Workaround/Cleanup/StaticProperties.php   |  2 +-
 ...BlacklistedTest.php => IsExcludedTest.php} | 21 ++++++-------
 .../Magento/Test/Integrity/ClassesTest.php    | 28 ++++++++---------
 32 files changed, 164 insertions(+), 157 deletions(-)
 rename app/code/Magento/MediaGallery/Model/Directory/{BlacklistPatternsConfig.php => ExcludedPatternsConfig.php} (68%)
 rename app/code/Magento/MediaGallery/Model/Directory/{IsBlacklisted.php => IsExcluded.php} (61%)
 rename app/code/Magento/MediaGallery/Test/Unit/Model/Directory/{IsBlacklistedTest.php => IsExcludedTest.php} (70%)
 rename app/code/Magento/MediaGalleryApi/Api/{IsPathBlacklistedInterface.php => IsPathExcludedInterface.php} (71%)
 rename app/code/Magento/MediaGalleryApi/Model/{BlacklistPatternsConfigInterface.php => ExcludedPatternsConfigInterface.php} (75%)
 rename dev/tests/integration/testsuite/Magento/MediaGallery/Model/{IsBlacklistedTest.php => IsExcludedTest.php} (62%)

diff --git a/app/code/Magento/Catalog/Model/FilterProductCustomAttribute.php b/app/code/Magento/Catalog/Model/FilterProductCustomAttribute.php
index 497ed2fd49953..a928ddea03a70 100644
--- a/app/code/Magento/Catalog/Model/FilterProductCustomAttribute.php
+++ b/app/code/Magento/Catalog/Model/FilterProductCustomAttribute.php
@@ -8,21 +8,21 @@
 namespace Magento\Catalog\Model;
 
 /**
- * Filter custom attributes for product using the blacklist
+ * Filter custom attributes for product using the excluded list
  */
 class FilterProductCustomAttribute
 {
     /**
      * @var array
      */
-    private $blackList;
+    private $excludedList;
 
     /**
-     * @param array $blackList
+     * @param array $excludedList
      */
-    public function __construct(array $blackList = [])
+    public function __construct(array $excludedList = [])
     {
-        $this->blackList = $blackList;
+        $this->excludedList = $excludedList;
     }
 
     /**
@@ -33,6 +33,6 @@ public function __construct(array $blackList = [])
      */
     public function execute(array $attributes): array
     {
-        return array_diff_key($attributes, array_flip($this->blackList));
+        return array_diff_key($attributes, array_flip($this->excludedList));
     }
 }
diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml
index 78a0c2b734315..927fd8583ad26 100644
--- a/app/code/Magento/CatalogInventory/etc/di.xml
+++ b/app/code/Magento/CatalogInventory/etc/di.xml
@@ -37,7 +37,7 @@
     </type>
     <type name="Magento\Catalog\Model\FilterProductCustomAttribute">
         <arguments>
-            <argument name="blackList" xsi:type="array">
+            <argument name="excludedList" xsi:type="array">
                 <item name="quantity_and_stock_status" xsi:type="string">quantity_and_stock_status</item>
             </argument>
         </arguments>
diff --git a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php
index 15dcea077c887..7e434166a15be 100644
--- a/app/code/Magento/Eav/Model/Validator/Attribute/Data.php
+++ b/app/code/Magento/Eav/Model/Validator/Attribute/Data.php
@@ -23,12 +23,12 @@ class Data extends \Magento\Framework\Validator\AbstractValidator
     /**
      * @var array
      */
-    protected $_attributesWhiteList = [];
+    protected $allowedAttributesList = [];
 
     /**
      * @var array
      */
-    protected $_attributesBlackList = [];
+    protected $deniedAttributesList = [];
 
     /**
      * @var array
@@ -68,9 +68,9 @@ public function setAttributes(array $attributes)
      * @param array $attributesCodes
      * @return $this
      */
-    public function setAttributesWhiteList(array $attributesCodes)
+    public function setAllowedAttributesList(array $attributesCodes)
     {
-        $this->_attributesWhiteList = $attributesCodes;
+        $this->allowedAttributesList = $attributesCodes;
         return $this;
     }
 
@@ -82,9 +82,9 @@ public function setAttributesWhiteList(array $attributesCodes)
      * @param array $attributesCodes
      * @return $this
      */
-    public function setAttributesBlackList(array $attributesCodes)
+    public function setDeniedAttributesList(array $attributesCodes)
     {
-        $this->_attributesBlackList = $attributesCodes;
+        $this->deniedAttributesList = $attributesCodes;
         return $this;
     }
 
@@ -171,11 +171,11 @@ protected function _getAttributes($entity)
             $attributesCodes[] = $attributeCode;
         }
 
-        $ignoreAttributes = $this->_attributesBlackList;
-        if ($this->_attributesWhiteList) {
+        $ignoreAttributes = $this->deniedAttributesList;
+        if ($this->allowedAttributesList) {
             $ignoreAttributes = array_merge(
                 $ignoreAttributes,
-                array_diff($attributesCodes, $this->_attributesWhiteList)
+                array_diff($attributesCodes, $this->allowedAttributesList)
             );
         }
 
diff --git a/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php b/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php
index 774b968f1b697..a8ecbb8371ac9 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/Validator/Attribute/DataTest.php
@@ -249,10 +249,10 @@ public function testIsValidAttributesFromCollection()
     }
 
     /**
-     * @dataProvider whiteBlackListProvider
+     * @dataProvider allowDenyListProvider
      * @param callable $callback
      */
-    public function testIsValidBlackListWhiteListChecks($callback)
+    public function testIsValidExclusionInclusionListChecks($callback)
     {
         $attribute = $this->_getAttributeMock(
             [
@@ -302,19 +302,19 @@ public function testIsValidBlackListWhiteListChecks($callback)
     /**
      * @return array
      */
-    public function whiteBlackListProvider()
+    public function allowDenyListProvider()
     {
-        $whiteCallback = function ($validator) {
-            $validator->setAttributesWhiteList(['attribute']);
+        $allowedCallbackList = function ($validator) {
+            $validator->setAllowedAttributesList(['attribute']);
         };
 
-        $blackCallback = function ($validator) {
-            $validator->setAttributesBlackList(['attribute2']);
+        $deniedCallbackList = function ($validator) {
+            $validator->setDeniedAttributesList(['attribute2']);
         };
-        return ['white_list' => [$whiteCallback], 'black_list' => [$blackCallback]];
+        return ['allowed' => [$allowedCallbackList], 'denied' => [$deniedCallbackList]];
     }
 
-    public function testSetAttributesWhiteList()
+    public function testSetAttributesAllowedList()
     {
         $this->markTestSkipped('Skipped in #27500 due to testing protected/private methods and properties');
 
@@ -328,12 +328,14 @@ public function testSetAttributesWhiteList()
             )
             ->getMock();
         $validator = new Data($attrDataFactory);
-        $result = $validator->setAttributesWhiteList($attributes);
-        $this->assertAttributeEquals($attributes, '_attributesWhiteList', $validator);
+        $result = $validator->setIncludedAttributesList($attributes);
+
+        // phpstan:ignore
+        $this->assertAttributeEquals($attributes, '_attributesAllowed', $validator);
         $this->assertEquals($validator, $result);
     }
 
-    public function testSetAttributesBlackList()
+    public function testSetAttributesDeniedList()
     {
         $this->markTestSkipped('Skipped in #27500 due to testing protected/private methods and properties');
 
@@ -347,8 +349,9 @@ public function testSetAttributesBlackList()
             )
             ->getMock();
         $validator = new Data($attrDataFactory);
-        $result = $validator->setAttributesBlackList($attributes);
-        $this->assertAttributeEquals($attributes, '_attributesBlackList', $validator);
+        $result = $validator->setDeniedAttributesList($attributes);
+        // phpstan:ignore
+        $this->assertAttributeEquals($attributes, '_attributesDenied', $validator);
         $this->assertEquals($validator, $result);
     }
 
diff --git a/app/code/Magento/Elasticsearch/etc/di.xml b/app/code/Magento/Elasticsearch/etc/di.xml
index 633889e70591b..633e67dfe698e 100644
--- a/app/code/Magento/Elasticsearch/etc/di.xml
+++ b/app/code/Magento/Elasticsearch/etc/di.xml
@@ -537,7 +537,7 @@
     </type>
     <type name="Magento\Search\Model\SearchEngine\Validator">
         <arguments>
-            <argument name="engineBlacklist" xsi:type="array">
+            <argument name="excludedEngineList" xsi:type="array">
                 <item name="elasticsearch" xsi:type="string">Elasticsearch 2</item>
             </argument>
             <argument name="engineValidators" xsi:type="array">
diff --git a/app/code/Magento/Fedex/etc/wsdl/RateService_v10.wsdl b/app/code/Magento/Fedex/etc/wsdl/RateService_v10.wsdl
index 62795f07239a6..3629bb424f207 100644
--- a/app/code/Magento/Fedex/etc/wsdl/RateService_v10.wsdl
+++ b/app/code/Magento/Fedex/etc/wsdl/RateService_v10.wsdl
@@ -472,7 +472,7 @@
       <xs:complexType name="Commodity">
         <xs:annotation>
           <xs:documentation>
-            For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction.
+            For international multiple piece shipments, commodity information must be passed in the Main and on each child transaction.
             If this shipment contains more than four commodity line items, the four highest valued should be included in the first 4 occurrences for this request.
           </xs:documentation>
         </xs:annotation>
@@ -983,7 +983,7 @@
           </xs:element>
           <xs:element name="CustomsValue" type="ns:Money" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>The total customs value for the shipment. This total will rrepresent th esum of the values of all commodities, and may include freight, miscellaneous, and insurance charges. Must contain 2 explicit decimal positions with a max length of 17 including the decimal. For Express International MPS, the Total Customs Value is in the master transaction and all child transactions</xs:documentation>
+              <xs:documentation>The total customs value for the shipment. This total will rrepresent th esum of the values of all commodities, and may include freight, miscellaneous, and insurance charges. Must contain 2 explicit decimal positions with a max length of 17 including the decimal. For Express International MPS, the Total Customs Value is in the main transaction and all child transactions</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="FreightOnValue" type="ns:FreightOnValueType" minOccurs="0">
@@ -1005,7 +1005,7 @@
           <xs:element name="Commodities" type="ns:Commodity" minOccurs="0" maxOccurs="99">
             <xs:annotation>
               <xs:documentation>
-                For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction.
+                For international multiple piece shipments, commodity information must be passed in the Main and on each child transaction.
                 If this shipment contains more than four commodity line items, the four highest valued should be included in the first 4 occurrences for this request.
               </xs:documentation>
             </xs:annotation>
@@ -4867,4 +4867,4 @@
       <s1:address location="https://wsbeta.fedex.com:443/web-services/rate"/>
     </port>
   </service>
-</definitions>
\ No newline at end of file
+</definitions>
diff --git a/app/code/Magento/Fedex/etc/wsdl/RateService_v9.wsdl b/app/code/Magento/Fedex/etc/wsdl/RateService_v9.wsdl
index 17a6f74cc09b8..2f3feecb58084 100644
--- a/app/code/Magento/Fedex/etc/wsdl/RateService_v9.wsdl
+++ b/app/code/Magento/Fedex/etc/wsdl/RateService_v9.wsdl
@@ -471,7 +471,7 @@
       <xs:complexType name="Commodity">
         <xs:annotation>
           <xs:documentation>
-            For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction.
+            For international multiple piece shipments, commodity information must be passed in the Main and on each child transaction.
             If this shipment commitment more than four commodity line items, the four highest valued should be included in the first 4 occurrences for this request.
           </xs:documentation>
         </xs:annotation>
@@ -983,7 +983,7 @@
           </xs:element>
           <xs:element name="CustomsValue" type="ns:Money" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>The total customs value for the shipment. This total will rrepresent th esum of the values of all commodities, and may include freight, miscellaneous, and insurance charges. Must contain 2 explicit decimal positions with a max length of 17 including the decimal. For Express International MPS, the Total Customs Value is in the master transaction and all child transactions</xs:documentation>
+              <xs:documentation>The total customs value for the shipment. This total will rrepresent th esum of the values of all commodities, and may include freight, miscellaneous, and insurance charges. Must contain 2 explicit decimal positions with a max length of 17 including the decimal. For Express International MPS, the Total Customs Value is in the main transaction and all child transactions</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="FreightOnValue" type="ns:FreightOnValueType" minOccurs="0">
@@ -1005,7 +1005,7 @@
           <xs:element name="Commodities" type="ns:Commodity" minOccurs="0" maxOccurs="99">
             <xs:annotation>
               <xs:documentation>
-                For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction.
+                For international multiple piece shipments, commodity information must be passed in the Main and on each child transaction.
                 If this shipment contains more than four commodity line items, the four highest valued should be included in the first 4 occurrences for this request.
               </xs:documentation>
             </xs:annotation>
diff --git a/app/code/Magento/Fedex/etc/wsdl/ShipService_v10.wsdl b/app/code/Magento/Fedex/etc/wsdl/ShipService_v10.wsdl
index 54bb57d490c76..439d032a61fd0 100644
--- a/app/code/Magento/Fedex/etc/wsdl/ShipService_v10.wsdl
+++ b/app/code/Magento/Fedex/etc/wsdl/ShipService_v10.wsdl
@@ -497,7 +497,7 @@
       <xs:complexType name="Commodity">
         <xs:annotation>
           <xs:documentation>
-            For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction.
+            For international multiple piece shipments, commodity information must be passed in the Main and on each child transaction.
             If this shipment contains more than four commodity line items, the four highest valued should be included in the first 4 occurrences for this request.
           </xs:documentation>
         </xs:annotation>
@@ -724,7 +724,7 @@
           </xs:element>
           <xs:element name="MasterTrackingId" type="ns:TrackingId" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>The master tracking number and form id of this multiple piece shipment. This information is to be provided for each subsequent of a multiple piece shipment.</xs:documentation>
+              <xs:documentation>The main tracking number and form id of this multiple piece shipment. This information is to be provided for each subsequent of a multiple piece shipment.</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="ServiceTypeDescription" type="xs:string" minOccurs="0">
diff --git a/app/code/Magento/Fedex/etc/wsdl/ShipService_v9.wsdl b/app/code/Magento/Fedex/etc/wsdl/ShipService_v9.wsdl
index d8dc0fdfed4ab..a449bf41dbd68 100644
--- a/app/code/Magento/Fedex/etc/wsdl/ShipService_v9.wsdl
+++ b/app/code/Magento/Fedex/etc/wsdl/ShipService_v9.wsdl
@@ -497,7 +497,7 @@
       <xs:complexType name="Commodity">
         <xs:annotation>
           <xs:documentation>
-            For international multiple piece shipments, commodity information must be passed in the Master and on each child transaction.
+            For international multiple piece shipments, commodity information must be passed in the Main and on each child transaction.
             If this shipment contains more than four commodity line items, the four highest valued should be included in the first 4 occurrences for this request.
           </xs:documentation>
         </xs:annotation>
@@ -724,7 +724,7 @@
           </xs:element>
           <xs:element name="MasterTrackingId" type="ns:TrackingId" minOccurs="0">
             <xs:annotation>
-              <xs:documentation>The master tracking number and form id of this multiple piece shipment. This information is to be provided for each subsequent of a multiple piece shipment.</xs:documentation>
+              <xs:documentation>The main tracking number and form id of this multiple piece shipment. This information is to be provided for each subsequent of a multiple piece shipment.</xs:documentation>
             </xs:annotation>
           </xs:element>
           <xs:element name="ServiceTypeDescription" type="xs:string" minOccurs="0">
diff --git a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php
index 5bd956c1bc322..9bf5b945c8fbd 100644
--- a/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php
+++ b/app/code/Magento/ImportExport/Model/Import/AbstractEntity.php
@@ -15,6 +15,7 @@
 /**
  * Import entity abstract model
  *
+ * phpcs:disable Magento2.Classes.AbstractApi
  * @api
  *
  * @SuppressWarnings(PHPMD.TooManyFields)
@@ -335,6 +336,8 @@ public function __construct(
     }
 
     /**
+     * Returns Error aggregator
+     *
      * @return ProcessingErrorAggregatorInterface
      */
     public function getErrorAggregator()
@@ -413,7 +416,7 @@ protected function _saveValidatedBunches()
 
         $source->rewind();
         $this->_dataSourceModel->cleanBunches();
-        $masterAttributeCode = $this->getMasterAttributeCode();
+        $mainAttributeCode = $this->getMasterAttributeCode();
 
         while ($source->valid() || count($bunchRows) || isset($entityGroup)) {
             if ($startNewBunch || !$source->valid()) {
@@ -453,7 +456,7 @@ protected function _saveValidatedBunches()
                     continue;
                 }
 
-                if (isset($rowData[$masterAttributeCode]) && trim($rowData[$masterAttributeCode])) {
+                if (isset($rowData[$mainAttributeCode]) && trim($rowData[$mainAttributeCode])) {
                     /* Add entity group that passed validation to bunch */
                     if (isset($entityGroup)) {
                         foreach ($entityGroup as $key => $value) {
@@ -590,6 +593,7 @@ public function getBehavior(array $rowData = null)
      * Get default import behavior
      *
      * @return string
+     * phpcs:disable Magento2.Functions.StaticFunction
      */
     public static function getDefaultBehavior()
     {
@@ -652,7 +656,9 @@ public function isAttributeParticular($attributeCode)
     }
 
     /**
-     * @return string the master attribute code to use in an import
+     * Returns the master attribute code to use in an import
+     *
+     * @return string
      */
     public function getMasterAttributeCode()
     {
diff --git a/app/code/Magento/MediaGallery/Model/Directory/Command/CreateByPaths.php b/app/code/Magento/MediaGallery/Model/Directory/Command/CreateByPaths.php
index 4d87c1aa95285..f33c22a18b4b8 100644
--- a/app/code/Magento/MediaGallery/Model/Directory/Command/CreateByPaths.php
+++ b/app/code/Magento/MediaGallery/Model/Directory/Command/CreateByPaths.php
@@ -10,7 +10,7 @@
 use Magento\Cms\Model\Wysiwyg\Images\Storage;
 use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\MediaGalleryApi\Api\CreateDirectoriesByPathsInterface;
-use Magento\MediaGalleryApi\Api\IsPathBlacklistedInterface;
+use Magento\MediaGalleryApi\Api\IsPathExcludedInterface;
 use Psr\Log\LoggerInterface;
 
 /**
@@ -29,23 +29,23 @@ class CreateByPaths implements CreateDirectoriesByPathsInterface
     private $storage;
 
     /**
-     * @var IsPathBlacklistedInterface
+     * @var IsPathExcludedInterface
      */
-    private $isPathBlacklisted;
+    private $isPathExcluded;
 
     /**
      * @param LoggerInterface $logger
      * @param Storage $storage
-     * @param IsPathBlacklistedInterface $isPathBlacklisted
+     * @param IsPathExcludedInterface $isPathExcluded
      */
     public function __construct(
         LoggerInterface $logger,
         Storage $storage,
-        IsPathBlacklistedInterface $isPathBlacklisted
+        IsPathExcludedInterface $isPathExcluded
     ) {
         $this->logger = $logger;
         $this->storage = $storage;
-        $this->isPathBlacklisted = $isPathBlacklisted;
+        $this->isPathExcluded = $isPathExcluded;
     }
 
     /**
@@ -55,7 +55,7 @@ public function execute(array $paths): void
     {
         $failedPaths = [];
         foreach ($paths as $path) {
-            if ($this->isPathBlacklisted->execute($path)) {
+            if ($this->isPathExcluded->execute($path)) {
                 $failedPaths[] = $path;
                 continue;
             }
diff --git a/app/code/Magento/MediaGallery/Model/Directory/Command/DeleteByPaths.php b/app/code/Magento/MediaGallery/Model/Directory/Command/DeleteByPaths.php
index d46fb854fff22..2e45000c07225 100644
--- a/app/code/Magento/MediaGallery/Model/Directory/Command/DeleteByPaths.php
+++ b/app/code/Magento/MediaGallery/Model/Directory/Command/DeleteByPaths.php
@@ -10,7 +10,7 @@
 use Magento\Cms\Model\Wysiwyg\Images\Storage;
 use Magento\Framework\Exception\CouldNotDeleteException;
 use Magento\MediaGalleryApi\Api\DeleteDirectoriesByPathsInterface;
-use Magento\MediaGalleryApi\Api\IsPathBlacklistedInterface;
+use Magento\MediaGalleryApi\Api\IsPathExcludedInterface;
 use Psr\Log\LoggerInterface;
 
 /**
@@ -29,23 +29,23 @@ class DeleteByPaths implements DeleteDirectoriesByPathsInterface
     private $storage;
 
     /**
-     * @var IsPathBlacklistedInterface
+     * @var IsPathExcludedInterface
      */
-    private $isPathBlacklisted;
+    private $isPathExcluded;
 
     /**
      * @param LoggerInterface $logger
      * @param Storage $storage
-     * @param IsPathBlacklistedInterface $isPathBlacklisted
+     * @param IsPathExcludedInterface $isPathExcluded
      */
     public function __construct(
         LoggerInterface $logger,
         Storage $storage,
-        IsPathBlacklistedInterface $isPathBlacklisted
+        IsPathExcludedInterface $isPathExcluded
     ) {
         $this->logger = $logger;
         $this->storage = $storage;
-        $this->isPathBlacklisted = $isPathBlacklisted;
+        $this->isPathExcluded = $isPathExcluded;
     }
 
     /**
@@ -55,7 +55,7 @@ public function execute(array $paths): void
     {
         $failedPaths = [];
         foreach ($paths as $path) {
-            if ($this->isPathBlacklisted->execute($path)) {
+            if ($this->isPathExcluded->execute($path)) {
                 $failedPaths[] = $path;
                 continue;
             }
diff --git a/app/code/Magento/MediaGallery/Model/Directory/Config/Converter.php b/app/code/Magento/MediaGallery/Model/Directory/Config/Converter.php
index 91f16d246f636..3d9911c805efb 100644
--- a/app/code/Magento/MediaGallery/Model/Directory/Config/Converter.php
+++ b/app/code/Magento/MediaGallery/Model/Directory/Config/Converter.php
@@ -15,9 +15,9 @@
 class Converter implements ConverterInterface
 {
     /**
-     * Blacklist tag name
+     * Excluded list tag name
      */
-    private const BLACKLIST_TAG_NAME = 'blacklist';
+    private const EXCLUDED_LIST_TAG_NAME = 'exclude';
 
     /**
      * Patterns tag name
@@ -43,12 +43,12 @@ public function convert($source): array
             throw new \InvalidArgumentException('The source should be instance of DOMDocument');
         }
 
-        foreach ($source->getElementsByTagName(self::BLACKLIST_TAG_NAME) as $blacklist) {
-            $result[self::BLACKLIST_TAG_NAME] = [];
-            foreach ($blacklist->getElementsByTagName(self::PATTERNS_TAG_NAME) as $patterns) {
-                $result[self::BLACKLIST_TAG_NAME][self::PATTERNS_TAG_NAME] = [];
+        foreach ($source->getElementsByTagName(self::EXCLUDED_LIST_TAG_NAME) as $excludedList) {
+            $result[self::EXCLUDED_LIST_TAG_NAME] = [];
+            foreach ($excludedList->getElementsByTagName(self::PATTERNS_TAG_NAME) as $patterns) {
+                $result[self::EXCLUDED_LIST_TAG_NAME][self::PATTERNS_TAG_NAME] = [];
                 foreach ($patterns->getElementsByTagName(self::PATTERN_TAG_NAME) as $pattern) {
-                    $result[self::BLACKLIST_TAG_NAME][self::PATTERNS_TAG_NAME]
+                    $result[self::EXCLUDED_LIST_TAG_NAME][self::PATTERNS_TAG_NAME]
                     [$pattern->attributes->getNamedItem('name')->nodeValue] = $pattern->nodeValue;
                 }
             }
diff --git a/app/code/Magento/MediaGallery/Model/Directory/BlacklistPatternsConfig.php b/app/code/Magento/MediaGallery/Model/Directory/ExcludedPatternsConfig.php
similarity index 68%
rename from app/code/Magento/MediaGallery/Model/Directory/BlacklistPatternsConfig.php
rename to app/code/Magento/MediaGallery/Model/Directory/ExcludedPatternsConfig.php
index 8fdd4f70d5060..29ed5fbf04ecd 100644
--- a/app/code/Magento/MediaGallery/Model/Directory/BlacklistPatternsConfig.php
+++ b/app/code/Magento/MediaGallery/Model/Directory/ExcludedPatternsConfig.php
@@ -8,14 +8,14 @@
 namespace Magento\MediaGallery\Model\Directory;
 
 use Magento\Framework\Config\DataInterface;
-use Magento\MediaGalleryApi\Model\BlacklistPatternsConfigInterface;
+use Magento\MediaGalleryApi\Model\ExcludedPatternsConfigInterface;
 
 /**
  * Media gallery directory config
  */
-class BlacklistPatternsConfig implements BlacklistPatternsConfigInterface
+class ExcludedPatternsConfig implements ExcludedPatternsConfigInterface
 {
-    private const XML_PATH_BLACKLIST_PATTERNS = 'blacklist/patterns';
+    private const XML_PATH_EXCLUDED_PATTERNS = 'exclude/patterns';
 
     /**
      * @var DataInterface
@@ -37,6 +37,6 @@ public function __construct(DataInterface $data)
      */
     public function get() : array
     {
-        return $this->data->get(self::XML_PATH_BLACKLIST_PATTERNS);
+        return $this->data->get(self::XML_PATH_EXCLUDED_PATTERNS);
     }
 }
diff --git a/app/code/Magento/MediaGallery/Model/Directory/IsBlacklisted.php b/app/code/Magento/MediaGallery/Model/Directory/IsExcluded.php
similarity index 61%
rename from app/code/Magento/MediaGallery/Model/Directory/IsBlacklisted.php
rename to app/code/Magento/MediaGallery/Model/Directory/IsExcluded.php
index 0191b357aaefa..8fb0e03b76548 100644
--- a/app/code/Magento/MediaGallery/Model/Directory/IsBlacklisted.php
+++ b/app/code/Magento/MediaGallery/Model/Directory/IsExcluded.php
@@ -7,23 +7,23 @@
 
 namespace Magento\MediaGallery\Model\Directory;
 
-use Magento\MediaGalleryApi\Api\IsPathBlacklistedInterface;
-use Magento\MediaGalleryApi\Model\BlacklistPatternsConfigInterface;
+use Magento\MediaGalleryApi\Api\IsPathExcludedInterface;
+use Magento\MediaGalleryApi\Model\ExcludedPatternsConfigInterface;
 
 /**
- * Check if the path is blacklisted for media gallery. Directory path may be blacklisted if it's reserved by the system
+ * Check if the path is excluded for media gallery. Directory path may be blacklisted if it's reserved by the system
  */
-class IsBlacklisted implements IsPathBlacklistedInterface
+class IsExcluded implements IsPathExcludedInterface
 {
     /**
-     * @var BlacklistPatternsConfigInterface
+     * @var ExcludedPatternsConfigInterface
      */
     private $config;
 
     /**
-     * @param BlacklistPatternsConfigInterface $config
+     * @param ExcludedPatternsConfigInterface $config
      */
-    public function __construct(BlacklistPatternsConfigInterface $config)
+    public function __construct(ExcludedPatternsConfigInterface $config)
     {
         $this->config = $config;
     }
diff --git a/app/code/Magento/MediaGallery/Test/Unit/Model/Directory/IsBlacklistedTest.php b/app/code/Magento/MediaGallery/Test/Unit/Model/Directory/IsExcludedTest.php
similarity index 70%
rename from app/code/Magento/MediaGallery/Test/Unit/Model/Directory/IsBlacklistedTest.php
rename to app/code/Magento/MediaGallery/Test/Unit/Model/Directory/IsExcludedTest.php
index c96fd2ee54512..cc57b043954d7 100644
--- a/app/code/Magento/MediaGallery/Test/Unit/Model/Directory/IsBlacklistedTest.php
+++ b/app/code/Magento/MediaGallery/Test/Unit/Model/Directory/IsExcludedTest.php
@@ -8,45 +8,45 @@
 namespace Magento\MediaGallery\Test\Unit\Model\Directory;
 
 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
-use Magento\MediaGallery\Model\Directory\IsBlacklisted;
-use Magento\MediaGalleryApi\Model\BlacklistPatternsConfigInterface;
+use Magento\MediaGallery\Model\Directory\IsExcluded;
+use Magento\MediaGalleryApi\Model\ExcludedPatternsConfigInterface;
 use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 
 /**
- * Test for IsBlacklisted
+ * Test for IsExcluded
  */
-class IsBlacklistedTest extends TestCase
+class IsExcludedTest extends TestCase
 {
     /**
-     * @var IsBlacklisted
+     * @var IsExcluded
      */
     private $object;
 
     /**
-     * @var BlacklistPatternsConfigInterface|MockObject
+     * @var ExcludedPatternsConfigInterface|MockObject
      */
-    private $config;
+    private $configMock;
 
     /**
      * Initialize basic test class mocks
      */
     protected function setUp(): void
     {
-        $this->config = $this->getMockBuilder(BlacklistPatternsConfigInterface::class)
+        $this->configMock = $this->getMockBuilder(ExcludedPatternsConfigInterface::class)
             ->disableOriginalConstructor()
             ->getMockForAbstractClass();
-        $this->config->expects($this->at(0))->method('get')->willReturn([
+        $this->configMock->expects($this->at(0))->method('get')->willReturn([
             'tmp' => '/pub\/media\/tmp/',
             'captcha' => '/pub\/media\/captcha/'
         ]);
-        $this->object = (new ObjectManager($this))->getObject(IsBlacklisted::class, [
-            'config' => $this->config
+        $this->object = (new ObjectManager($this))->getObject(IsExcluded::class, [
+            'config' => $this->configMock
         ]);
     }
 
     /**
-     * Test if the directory path is blacklisted
+     * Test if the directory path is excluded
      *
      * @param string $path
      * @param bool $isExcluded
diff --git a/app/code/Magento/MediaGallery/etc/di.xml b/app/code/Magento/MediaGallery/etc/di.xml
index a85c26e275226..bedb78758786b 100644
--- a/app/code/Magento/MediaGallery/etc/di.xml
+++ b/app/code/Magento/MediaGallery/etc/di.xml
@@ -21,7 +21,7 @@
     <preference for="Magento\MediaGalleryApi\Api\CreateDirectoriesByPathsInterface" type="Magento\MediaGallery\Model\Directory\Command\CreateByPaths"/>
     <preference for="Magento\MediaGalleryApi\Api\DeleteDirectoriesByPathsInterface" type="Magento\MediaGallery\Model\Directory\Command\DeleteByPaths"/>
 
-    <preference for="Magento\MediaGalleryApi\Api\IsPathBlacklistedInterface" type="Magento\MediaGallery\Model\Directory\IsBlacklisted"/>
+    <preference for="Magento\MediaGalleryApi\Api\IsPathExcludedInterface" type="Magento\MediaGallery\Model\Directory\IsExcluded"/>
 
     <preference for="Magento\MediaGalleryApi\Api\DeleteAssetsByPathsInterface" type="Magento\MediaGallery\Model\ResourceModel\DeleteAssetsByPaths"/>
     <preference for="Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface" type="Magento\MediaGallery\Model\ResourceModel\GetAssetsByIds"/>
@@ -40,7 +40,7 @@
             <argument name="converter" xsi:type="object">Magento\MediaGallery\Model\Directory\Config\Converter</argument>
             <argument name="schemaLocator" xsi:type="object">Magento\MediaGallery\Model\Directory\Config\SchemaLocator</argument>
             <argument name="idAttributes" xsi:type="array">
-                <item name="/config/blacklist/patterns/pattern" xsi:type="string">name</item>
+                <item name="/config/exclude/patterns/pattern" xsi:type="string">name</item>
             </argument>
         </arguments>
     </virtualType>
@@ -50,11 +50,10 @@
             <argument name="cacheId" xsi:type="string">Media_Gallery_Patterns_CacheId</argument>
         </arguments>
     </virtualType>
-    <type name="Magento\MediaGallery\Model\Directory\BlacklistPatternsConfig">
+    <type name="Magento\MediaGallery\Model\Directory\ExcludedPatternsConfig">
         <arguments>
             <argument name="data" xsi:type="object">Magento\MediaGallery\Model\Directory\Config\Data</argument>
         </arguments>
     </type>
-
-    <preference for="Magento\MediaGalleryApi\Model\BlacklistPatternsConfigInterface" type="Magento\MediaGallery\Model\Directory\BlacklistPatternsConfig"/>
+    <preference for="Magento\MediaGalleryApi\Model\ExcludedPatternsConfigInterface" type="Magento\MediaGallery\Model\Directory\ExcludedPatternsConfig"/>
 </config>
diff --git a/app/code/Magento/MediaGallery/etc/directory.xml b/app/code/Magento/MediaGallery/etc/directory.xml
index 92f50b2dd0a30..42094aff72640 100644
--- a/app/code/Magento/MediaGallery/etc/directory.xml
+++ b/app/code/Magento/MediaGallery/etc/directory.xml
@@ -6,7 +6,7 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_MediaGalleryApi:etc/directory.xsd">
-    <blacklist>
+    <exclude>
         <patterns>
             <pattern name="captcha">/^captcha/</pattern>
             <pattern name="customer">/^customer/</pattern>
@@ -17,5 +17,5 @@
             <pattern name="tmp">/^tmp/</pattern>
             <pattern name="directories-with-dots">/^\./</pattern>
         </patterns>
-    </blacklist>
+    </exclude>
 </config>
diff --git a/app/code/Magento/MediaGalleryApi/Api/IsPathBlacklistedInterface.php b/app/code/Magento/MediaGalleryApi/Api/IsPathExcludedInterface.php
similarity index 71%
rename from app/code/Magento/MediaGalleryApi/Api/IsPathBlacklistedInterface.php
rename to app/code/Magento/MediaGalleryApi/Api/IsPathExcludedInterface.php
index cbd23ec3fbde7..1e41debb1b1c5 100644
--- a/app/code/Magento/MediaGalleryApi/Api/IsPathBlacklistedInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/IsPathExcludedInterface.php
@@ -8,12 +8,12 @@
 namespace Magento\MediaGalleryApi\Api;
 
 /**
- * Check if the path is blacklisted for media gallery.
+ * Check if the path is excluded for media gallery.
  *
- * Directory path may be blacklisted if it's reserved by the system.
+ * Directory path may be excluded if it's reserved by the system.
  * @api
  */
-interface IsPathBlacklistedInterface
+interface IsPathExcludedInterface
 {
     /**
      * Check if the path is excluded from displaying and processing in the media gallery
diff --git a/app/code/Magento/MediaGalleryApi/Model/BlacklistPatternsConfigInterface.php b/app/code/Magento/MediaGalleryApi/Model/ExcludedPatternsConfigInterface.php
similarity index 75%
rename from app/code/Magento/MediaGalleryApi/Model/BlacklistPatternsConfigInterface.php
rename to app/code/Magento/MediaGalleryApi/Model/ExcludedPatternsConfigInterface.php
index b4710f32e0c46..dd82f87780a49 100644
--- a/app/code/Magento/MediaGalleryApi/Model/BlacklistPatternsConfigInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/ExcludedPatternsConfigInterface.php
@@ -7,9 +7,9 @@
 namespace Magento\MediaGalleryApi\Model;
 
 /**
- * Returns list of blacklist regexp patterns
+ * Returns list of excluded regexp patterns
  */
-interface BlacklistPatternsConfigInterface
+interface ExcludedPatternsConfigInterface
 {
     /**
      * Get regexp patterns
diff --git a/app/code/Magento/MediaGalleryApi/etc/directory.xsd b/app/code/Magento/MediaGalleryApi/etc/directory.xsd
index 2ad76c8fcc9f2..2fb4fed028469 100644
--- a/app/code/Magento/MediaGalleryApi/etc/directory.xsd
+++ b/app/code/Magento/MediaGalleryApi/etc/directory.xsd
@@ -11,14 +11,14 @@
 
     <xs:complexType name="configType">
         <xs:sequence>
-            <xs:element type="blacklistType" name="blacklist" maxOccurs="unbounded" minOccurs="1"/>
+            <xs:element type="excludeType" name="exclude" maxOccurs="unbounded" minOccurs="1"/>
         </xs:sequence>
     </xs:complexType>
 
-    <xs:complexType name="blacklistType">
+    <xs:complexType name="excludeType">
         <xs:annotation>
             <xs:documentation>
-                Blacklist used for excluding directories from media gallery rendering and operations
+                List used for excluding directories from media gallery rendering and operations
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
diff --git a/app/code/Magento/MediaGalleryCatalog/etc/directory.xml b/app/code/Magento/MediaGalleryCatalog/etc/directory.xml
index eaced3f642f70..f1ec76a877368 100644
--- a/app/code/Magento/MediaGalleryCatalog/etc/directory.xml
+++ b/app/code/Magento/MediaGalleryCatalog/etc/directory.xml
@@ -6,9 +6,9 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_MediaGalleryApi:etc/directory.xsd">
-    <blacklist>
+    <exclude>
         <patterns>
             <pattern name="catalog">/^catalog\/product/</pattern>
         </patterns>
-    </blacklist>
+    </exclude>
 </config>
diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Rss/OrderStatus.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Rss/OrderStatus.php
index 19d9b6f300eba..b1d2deb248ba1 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Rss/OrderStatus.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Rss/OrderStatus.php
@@ -43,13 +43,13 @@ public function getAllCommentCollection($orderId)
         $commentSelects = [];
         foreach (['invoice', 'shipment', 'creditmemo'] as $entityTypeCode) {
             $mainTable = $resource->getTableName('sales_' . $entityTypeCode);
-            $slaveTable = $resource->getTableName('sales_' . $entityTypeCode . '_comment');
+            $commentTable = $resource->getTableName('sales_' . $entityTypeCode . '_comment');
             $select = $read->select()->from(
                 ['main' => $mainTable],
                 ['entity_id' => 'order_id', 'entity_type_code' => new \Zend_Db_Expr("'{$entityTypeCode}'")]
             )->join(
-                ['slave' => $slaveTable],
-                'main.entity_id = slave.parent_id',
+                ['comment' => $commentTable],
+                'main.entity_id = comment.parent_id',
                 $fields
             )->where(
                 'main.order_id = ?',
diff --git a/app/code/Magento/SampleData/README.md b/app/code/Magento/SampleData/README.md
index c71439b929013..e0666ba73fe24 100644
--- a/app/code/Magento/SampleData/README.md
+++ b/app/code/Magento/SampleData/README.md
@@ -11,7 +11,7 @@ You can deploy sample data from one of the following sources:
 * From the Magento composer repository, optionally using Magento CLI
 * From the Magento GitHub repository
 
-If your Magento code base was cloned from the `master` branch, you can use either source of the sample data. If it was cloned from the `develop` branch, use the GitHub repository and choose to get sample data modules from the `develop` branch.
+If your Magento code base was cloned from the mainline branch, you can use either source of the sample data. If it was cloned from the `develop` branch, use the GitHub repository and choose to get sample data modules from the `develop` branch.
 
 ### Deploy Sample Data from Composer Repository
 
@@ -46,7 +46,7 @@ Each package corresponds to a sample data module. The complete list of available
 
 To deploy sample data from the GitHub repository:
 
-1. Clone sample data from `https://github.com/magento/magento2-sample-data`. If your Magento instance was cloned from the `master` branch, choose the `master` branch when cloning sample data; choose the `develop` branch if Magento was cloned from `develop`.
+1. Clone sample data from `https://github.com/magento/magento2-sample-data`. If your Magento instance was cloned from the mainline branch, choose the mainline branch when cloning sample data; choose the `develop` branch if Magento was cloned from `develop`.
 2. Link the sample data and your Magento instance by running: `# php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"`
 
 ## Install Sample Data
diff --git a/app/code/Magento/Search/Model/SearchEngine/Validator.php b/app/code/Magento/Search/Model/SearchEngine/Validator.php
index f4fc8a9a62e0e..264e7c69dd520 100644
--- a/app/code/Magento/Search/Model/SearchEngine/Validator.php
+++ b/app/code/Magento/Search/Model/SearchEngine/Validator.php
@@ -22,7 +22,7 @@ class Validator implements ValidatorInterface
     /**
      * @var array
      */
-    private $engineBlacklist = ['mysql' => 'MySQL'];
+    private $excludedEngineList = ['mysql' => 'MySQL'];
 
     /**
      * @var ValidatorInterface[]
@@ -32,16 +32,16 @@ class Validator implements ValidatorInterface
     /**
      * @param ScopeConfigInterface $scopeConfig
      * @param array $engineValidators
-     * @param array $engineBlacklist
+     * @param array $excludedEngineList
      */
     public function __construct(
         ScopeConfigInterface $scopeConfig,
         array $engineValidators = [],
-        array $engineBlacklist = []
+        array $excludedEngineList = []
     ) {
         $this->scopeConfig = $scopeConfig;
         $this->engineValidators = $engineValidators;
-        $this->engineBlacklist = array_merge($this->engineBlacklist, $engineBlacklist);
+        $this->excludedEngineList = array_merge($this->excludedEngineList, $excludedEngineList);
     }
 
     /**
@@ -51,9 +51,9 @@ public function validate(): array
     {
         $errors = [];
         $currentEngine = $this->scopeConfig->getValue('catalog/search/engine');
-        if (isset($this->engineBlacklist[$currentEngine])) {
-            $blacklistedEngine = $this->engineBlacklist[$currentEngine];
-            $errors[] = "Your current search engine, '{$blacklistedEngine}', is not supported."
+        if (isset($this->excludedEngineList[$currentEngine])) {
+            $excludedEngine = $this->excludedEngineList[$currentEngine];
+            $errors[] = "Your current search engine, '{$excludedEngine}', is not supported."
                 . " You must install a supported search engine before upgrading."
                 . " See the System Upgrade Guide for more information.";
         }
diff --git a/app/code/Magento/Search/Test/Unit/Model/SearchEngine/ValidatorTest.php b/app/code/Magento/Search/Test/Unit/Model/SearchEngine/ValidatorTest.php
index c91c0fce9dd47..cc272ccb60162 100644
--- a/app/code/Magento/Search/Test/Unit/Model/SearchEngine/ValidatorTest.php
+++ b/app/code/Magento/Search/Test/Unit/Model/SearchEngine/ValidatorTest.php
@@ -34,7 +34,7 @@ protected function setUp(): void
             [
                 'scopeConfig' => $this->scopeConfigMock,
                 'engineValidators' => ['otherEngine' => $this->otherEngineValidatorMock],
-                'engineBlacklist' => ['badEngine' => 'Bad Engine']
+                'excludedEngineList' => ['badEngine' => 'Bad Engine']
             ]
         );
     }
@@ -54,7 +54,7 @@ public function testValidateValid()
         $this->assertEquals($expectedErrors, $this->validator->validate());
     }
 
-    public function testValidateBlacklist()
+    public function testValidateExcludedList()
     {
         $this->scopeConfigMock
             ->expects($this->once())
diff --git a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/lists/editor_plugin_src.js b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/lists/editor_plugin_src.js
index a3bd16cab718e..2119426a5c157 100644
--- a/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/lists/editor_plugin_src.js
+++ b/app/code/Magento/Tinymce3/view/base/web/tiny_mce/plugins/lists/editor_plugin_src.js
@@ -82,9 +82,9 @@
 		}
 	}
 
-	function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
-		if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
-			return merge(e1, e2, differentStylesMasterElement);
+	function attemptMerge(e1, e2, differentStylesMainElement, mergeParagraphs) {
+		if (canMerge(e1, e2, !!differentStylesMainElement, mergeParagraphs)) {
+			return merge(e1, e2, differentStylesMainElement);
 		} else if (e1 && e1.tagName === 'LI' && isList(e2)) {
 			// Fix invalidly nested lists.
 			e1.appendChild(e2);
@@ -112,7 +112,7 @@
 		return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
 	}
 
-	function merge(e1, e2, masterElement) {
+	function merge(e1, e2, mainElement) {
 		var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
 		if (e1.tagName === 'P') {
 			e1.appendChild(e1.ownerDocument.createElement('br'));
@@ -120,8 +120,8 @@
 		while (e2.firstChild) {
 			e1.appendChild(e2.firstChild);
 		}
-		if (masterElement) {
-			e1.style.listStyleType = masterElement.style.listStyleType;
+		if (mainElement) {
+			e1.style.listStyleType = mainElement.style.listStyleType;
 		}
 		e2.parentNode.removeChild(e2);
 		attemptMerge(lastOriginal, firstNew, false);
@@ -164,7 +164,7 @@
                 }
                 return false;
             }
-			
+
             // If we are at the end of a paragraph in a list item, pressing enter should create a new list item instead of a new paragraph.
             function isEndOfParagraph() {
 				var node = ed.selection.getNode();
@@ -241,7 +241,7 @@
 					Event.cancel(e);
 				}
 			}
-			
+
             // Creates a new list item after the current selection's list item parent
             function createNewLi(ed, e) {
                 if (state == LIST_PARAGRAPH) {
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml
index 668ae550f1b3d..ba8d6ef433e13 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateActiveUserEntityTest.xml
@@ -32,7 +32,7 @@
             <argument name="user" value="activeAdmin"/>
             <argument name="role" value="roleDefaultAdministrator"/>
         </actionGroup>
-        <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutMasterAdmin"/>
+        <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutMainAdmin"/>
 
         <actionGroup ref="AdminLoginActionGroup" stepKey="loginToNewAdmin">
             <argument name="username" value="{{activeAdmin.username}}"/>
diff --git a/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml b/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml
index 23a30246bd999..c26821d5be4b2 100644
--- a/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml
+++ b/app/code/Magento/User/Test/Mftf/Test/AdminCreateInactiveUserEntityTest.xml
@@ -20,7 +20,7 @@
             <group value="mtf_migrated"/>
         </annotations>
 
-        <actionGroup ref="AdminLoginActionGroup" stepKey="adminMasterLogin"/>
+        <actionGroup ref="AdminLoginActionGroup" stepKey="adminMainLogin"/>
         <actionGroup ref="AdminCreateUserWithRoleAndIsActiveActionGroup" stepKey="createAdminUser">
             <argument name="user" value="inactiveAdmin"/>
             <argument name="role" value="roleDefaultAdministrator"/>
@@ -29,7 +29,7 @@
         <actionGroup ref="AssertAdminUserIsInGridActionGroup" stepKey="assertAdminIsInGrid">
             <argument name="user" value="inactiveAdmin"/>
         </actionGroup>
-        <actionGroup ref="AdminLogoutActionGroup" stepKey="adminMasterLogout"/>
+        <actionGroup ref="AdminLogoutActionGroup" stepKey="adminMainLogout"/>
 
         <actionGroup ref="AdminLoginActionGroup" stepKey="adminNewLogin">
             <argument name="username" value="{{inactiveAdmin.username}}"/>
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php
index 73786707b417b..4af90d5038f36 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Workaround/Cleanup/StaticProperties.php
@@ -79,7 +79,7 @@ public function __construct()
      */
     protected static function _isClassCleanable(\ReflectionClass $reflectionClass)
     {
-        // do not process blacklisted classes from integration framework
+        // do not process skipped classes from integration framework
         foreach (self::$_classesToSkip as $notCleanableClass) {
             if ($reflectionClass->getName() == $notCleanableClass || is_subclass_of(
                 $reflectionClass->getName(),
diff --git a/dev/tests/integration/testsuite/Magento/MediaGallery/Model/IsBlacklistedTest.php b/dev/tests/integration/testsuite/Magento/MediaGallery/Model/IsExcludedTest.php
similarity index 62%
rename from dev/tests/integration/testsuite/Magento/MediaGallery/Model/IsBlacklistedTest.php
rename to dev/tests/integration/testsuite/Magento/MediaGallery/Model/IsExcludedTest.php
index f63674754ea3d..bd0df51162620 100644
--- a/dev/tests/integration/testsuite/Magento/MediaGallery/Model/IsBlacklistedTest.php
+++ b/dev/tests/integration/testsuite/Magento/MediaGallery/Model/IsExcludedTest.php
@@ -7,18 +7,17 @@
 
 namespace Magento\MediaGallery\Model;
 
-use Magento\MediaGalleryApi\Api\IsPathBlacklistedInterface;
+use Magento\MediaGalleryApi\Api\IsPathExcludedInterface;
 use Magento\TestFramework\Helper\Bootstrap;
 use PHPUnit\Framework\TestCase;
 
 /**
- * Test for IsPathBlacklistedInterface
+ * Test for IsPathExcludedInterface
  */
-class IsBlacklistedTest extends TestCase
+class IsExcludedTest extends TestCase
 {
-
     /**
-     * @var IsPathBlacklistedInterface
+     * @var IsPathExcludedInterface
      */
     private $service;
 
@@ -27,23 +26,23 @@ class IsBlacklistedTest extends TestCase
      */
     protected function setUp(): void
     {
-        $this->service = Bootstrap::getObjectManager()->get(IsPathBlacklistedInterface::class);
+        $this->service = Bootstrap::getObjectManager()->get(IsPathExcludedInterface::class);
     }
 
     /**
-     * Testing the blacklisted paths
+     * Testing the excluded paths
      *
      * @param string $path
-     * @param bool $isBlacklisted
+     * @param bool $isExcluded
      * @dataProvider pathsProvider
      */
-    public function testExecute(string $path, bool $isBlacklisted): void
+    public function testExecute(string $path, bool $isExcluded): void
     {
-        $this->assertEquals($isBlacklisted, $this->service->execute($path));
+        $this->assertEquals($isExcluded, $this->service->execute($path));
     }
 
     /**
-     * Provider of paths and if the path should be in the blacklist
+     * Provider of paths and if the path should be in the excluded list
      *
      * @return array
      */
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php
index 7f7d9be162dec..d82c5e068f880 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php
@@ -31,12 +31,12 @@ class ClassesTest extends \PHPUnit\Framework\TestCase
     /**
      * @var array
      */
-    private static $keywordsBlacklist = ["String", "Array", "Boolean", "Element"];
+    private static $excludeKeywords = ["String", "Array", "Boolean", "Element"];
 
     /**
      * @var array|null
      */
-    private $referenceBlackList = null;
+    private $excludeReference = null;
 
     /**
      * Set Up
@@ -307,7 +307,7 @@ private function assertClassNamespace(string $file, string $relativePath, string
     public function testClassReferences()
     {
         $this->markTestSkipped("To be fixed in MC-33329. The test is not working properly "
-            . "after blacklisting logic was fixed. Previously it was ignoring all files.");
+            . "after excluded logic was fixed. Previously it was ignoring all files.");
         $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
         $invoker(
             /**
@@ -373,7 +373,7 @@ function ($file) {
                 );
 
                 $vendorClasses = array_filter($vendorClasses, 'strlen');
-                $vendorClasses = $this->referenceBlacklistFilter($vendorClasses);
+                $vendorClasses = $this->excludedReferenceFilter($vendorClasses);
                 if (!empty($vendorClasses)) {
                     $this->assertClassesExist($vendorClasses, $file);
                 }
@@ -392,7 +392,7 @@ function ($file) {
                     $badClasses = $this->handleAliasClasses($aliasClasses, $badClasses);
                 }
 
-                $badClasses = $this->referenceBlacklistFilter($badClasses);
+                $badClasses = $this->excludedReferenceFilter($badClasses);
                 $badClasses = $this->removeSpecialCases($badClasses, $file, $contents, $namespacePath);
                 $this->assertClassReferences($badClasses, $file);
             },
@@ -426,12 +426,12 @@ private function handleAliasClasses(array $aliasClasses, array $badClasses): arr
      * @param array $classes
      * @return array
      */
-    private function referenceBlacklistFilter(array $classes): array
+    private function excludedReferenceFilter(array $classes): array
     {
-        // exceptions made for the files from the blacklist
-        $blacklistClasses = $this->getReferenceBlacklist();
+        // exceptions made for the files from the exclusion
+        $excludeClasses = $this->getExcludedReferences();
         foreach ($classes as $class) {
-            if (in_array($class, $blacklistClasses)) {
+            if (in_array($class, $excludeClasses)) {
                 unset($classes[array_search($class, $classes)]);
             }
         }
@@ -444,16 +444,16 @@ private function referenceBlacklistFilter(array $classes): array
      *
      * @return array
      */
-    private function getReferenceBlacklist(): array
+    private function getExcludedReferences(): array
     {
-        if (!isset($this->referenceBlackList)) {
-            $this->referenceBlackList = file(
+        if (!isset($this->excludeReference)) {
+            $this->excludeReference = file(
                 __DIR__ . '/_files/blacklist/reference.txt',
                 FILE_IGNORE_NEW_LINES
             );
         }
 
-        return $this->referenceBlackList;
+        return $this->excludeReference;
     }
 
     /**
@@ -479,7 +479,7 @@ private function removeSpecialCases(array $badClasses, string $file, string $con
             }
 
             // Remove usage of key words such as "Array", "String", and "Boolean"
-            if (in_array($badClass, self::$keywordsBlacklist)) {
+            if (in_array($badClass, self::$excludeKeywords)) {
                 unset($badClasses[array_search($badClass, $badClasses)]);
                 continue;
             }

From 709487013af8e53f43e3054e8f6177f8e91801bc Mon Sep 17 00:00:00 2001
From: Soumya Unnikrishnan <sunnikri@adobe.com>
Date: Mon, 15 Jun 2020 14:57:53 -0500
Subject: [PATCH 239/307] MQE-2179: [3.0.0 RC5 - Release] Checklist

---
 composer.lock | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/composer.lock b/composer.lock
index 8d22b58d32ddf..5b96dcf674818 100644
--- a/composer.lock
+++ b/composer.lock
@@ -7207,12 +7207,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/magento2-functional-testing-framework.git",
-                "reference": "bd2eee29eac0e438a2d09f63e6b5e3a8f852d933"
+                "reference": "e5126f4eb476e227e3b668b622159c917f123175"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/bd2eee29eac0e438a2d09f63e6b5e3a8f852d933",
-                "reference": "bd2eee29eac0e438a2d09f63e6b5e3a8f852d933",
+                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/e5126f4eb476e227e3b668b622159c917f123175",
+                "reference": "e5126f4eb476e227e3b668b622159c917f123175",
                 "shasum": ""
             },
             "require": {
@@ -7288,7 +7288,7 @@
                 "magento",
                 "testing"
             ],
-            "time": "2020-06-15T16:31:51+00:00"
+            "time": "2020-06-15T19:51:46+00:00"
         },
         {
             "name": "mikey179/vfsstream",

From 9aebc4d1fd81e4652a11a16ee5b8f26b49d53ec5 Mon Sep 17 00:00:00 2001
From: Ji Lu <jilu1@adobe.com>
Date: Mon, 15 Jun 2020 16:59:10 -0500
Subject: [PATCH 240/307] MQE-2194: fix mftf tests static check failures

---
 ...orefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml | 1 -
 .../StorefrontLoginToPayPalPaymentFromCartActionGroup.xml    | 5 ++++-
 .../Test/StorefrontPaypalSmartButtonInProductPageTest.xml    | 5 ++---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
index b046ad6534f82..040e258484ee6 100644
--- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
@@ -9,7 +9,6 @@
               xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
     <actionGroup name="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup">
         <arguments>
-            <argument name="payerName" defaultValue="MPI" type="string"/>
             <argument name="credentials" defaultValue="_CREDS"/>
         </arguments>
         <!--Check in-context-->
diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentFromCartActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentFromCartActionGroup.xml
index f627b9158f868..aa682cb7a3bb3 100644
--- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentFromCartActionGroup.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentFromCartActionGroup.xml
@@ -8,7 +8,10 @@
 <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
     <actionGroup name="StorefrontLoginToPayPalPaymentFromCartAccountActionGroup" extends="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup">
+        <arguments>
+            <argument name="payerName" defaultValue="MPI" type="string"/>
+        </arguments>
         <seeElement selector="{{PayPalCheckoutAsGuestSection.CreditDebitBtn}}" stepKey="assertCheckoutAsGuest" before="waitForLoginForm"/>
-        <see userInput="{{payerName}}" selector="{{PayPalPaymentSection.userName}}" stepKey="seePayerName"/>
+        <see userInput="{{payerName}}" selector="{{PayPalPaymentSection.userName}}" stepKey="seePayerName" after="assertCheckoutAsGuest"/>
     </actionGroup>
 </actionGroups>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml
index 41578eed67625..53f9f8adf4d44 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInProductPageTest.xml
@@ -79,9 +79,8 @@
         <actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
 
         <!--Login to Paypal in-context-->
-        <actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal">
-            <argument name="payerName" value="{{Payer.firstName}}"/>
-        </actionGroup>
+        <actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal"/>
+
         <!--Transfer Cart Line and Shipping Method assertion-->
         <actionGroup ref="PayPalAssertTransferLineAndShippingMethodNotExistActionGroup" stepKey="assertPayPalSettings"/>
 

From 82f5a3696c55e65387fc330749e7267dcc269cf1 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Tue, 16 Jun 2020 09:51:19 +0300
Subject: [PATCH 241/307] MC-35166: Admin user and user role pages are loading
 not correctly

---
 .../adminhtml/templates/widget/tabs.phtml     | 24 +++++++++++++------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
index 2346a619f4dc8..51183f733434e 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/tabs.phtml
@@ -31,7 +31,7 @@
             <?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' :
                 $block->getTabUrl($_tab) ?>
 
-            <li class="admin__page-nav-item" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
+            <li class="admin__page-nav-item no-display" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
                 <?= /* @noEscape */ $block->getUiId('tab', 'item', $_tab->getId()) ?>>
                 <a href="<?=  $block->escapeUrl($_tabHref) ?>"
                    id="<?=  $block->escapeHtmlAttr($block->getTabId($_tab)) ?>"
@@ -72,17 +72,27 @@
                     <?= /* @noEscape */ $block->getUiId('tab', 'content', $_tab->getId()) ?>>
                     <?= /* @noEscape */ $block->getTabContent($_tab) ?>
                 </div>
-                <?php if ($block->getTabIsHidden($_tab)): ?>
-                    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-                        'display:none',
-                        'li.admin__page-nav-item#' . $block->escapeJs($block->getTabId($_tab))
-                    ); ?>
-                <?php endif; ?>
                 <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
                     'display:none',
                     'div#' . $block->escapeJs($block->getTabId($_tab)) . '_content'
                 ); ?>
             </li>
+            <?php $scriptString = <<<script
+    require(['jquery'], function($){
+        'use strict';
+script;
+            if ($block->getTabIsHidden($_tab)):
+                $scriptString .= <<<script
+        $('li.admin__page-nav-item#{$block->escapeJs($block->getTabId($_tab))}').css('display', 'none');
+script;
+            endif;
+
+            $scriptString .= <<<script
+        $('li.admin__page-nav-item#{$block->escapeJs($block->getTabId($_tab))}').removeClass('no-display');
+    })
+script;
+            ?>
+            <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
         <?php endforeach; ?>
     </ul>
 </div>

From 1e10e6cdf1bcdf0b185b9eb047910cb965d5d328 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Tue, 16 Jun 2020 12:31:54 +0300
Subject: [PATCH 242/307] MC-35195: Unexpected ";" character appears when
 loading the Home page

---
 .../view/frontend/templates/account/authentication-popup.phtml  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
index edeaf5667b9cf..8355e229fe452 100644
--- a/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
+++ b/app/code/Magento/Customer/view/frontend/templates/account/authentication-popup.phtml
@@ -9,7 +9,7 @@
 ?>
 <div id="authenticationPopup" data-bind="scope:'authenticationPopup', style: {display: 'none'}">
     <?php $scriptString = 'window.authenticationPopup = ' . /* @noEscape */ $block->getSerializedConfig(); ?>
-    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>;
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
     <!-- ko template: getTemplate() --><!-- /ko -->
     <script type="text/x-magento-init">
         {

From 62fe3d4d232e991d5a21dbfbcb58bd8bb41e1c68 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Tue, 16 Jun 2020 14:13:46 +0300
Subject: [PATCH 243/307] MC-35191: The style of the PayPal express review page
 is broken

---
 .../Checkout/view/frontend/templates/total/default.phtml    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
index 37e9ded4a3aa4..dbe8a2142e3f1 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/total/default.phtml
@@ -39,5 +39,7 @@ $checkoutHelper = $block->getData('checkoutHelper');
         <?php endif; ?>
     </td>
 </tr>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals th.mark') ?>
-<?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals td.amount') ?>
+<?php if ($block->getTotal()->getStyle()): ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals th.mark') ?>
+    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag($block->getTotal()->getStyle(), 'tr.totals td.amount') ?>
+<?php endif; ?>

From 27ad26995cdd253f622cf212085da31cd79f2fb2 Mon Sep 17 00:00:00 2001
From: Peter Dohogne <pdohogne@magento.com>
Date: Tue, 16 Jun 2020 10:11:30 -0500
Subject: [PATCH 244/307] MC-35047: Updating to magento/composer 1.6.0

---
 composer.json |   2 +-
 composer.lock | 239 ++++++--------------------------------------------
 2 files changed, 30 insertions(+), 211 deletions(-)

diff --git a/composer.json b/composer.json
index 9a4cff5a652dd..76e179d5e8e89 100644
--- a/composer.json
+++ b/composer.json
@@ -64,7 +64,7 @@
         "laminas/laminas-uri": "^2.5.1",
         "laminas/laminas-validator": "^2.6.0",
         "laminas/laminas-view": "~2.11.2",
-        "magento/composer": "1.6.x-dev",
+        "magento/composer": "1.6.0",
         "magento/magento-composer-installer": ">=0.1.11",
         "magento/zendframework1": "~1.14.2",
         "monolog/monolog": "^1.17",
diff --git a/composer.lock b/composer.lock
index 53cb6bcbf59ac..c31bff6466d8d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "0675947ee8db6a44dc6efe0672f43fd3",
+    "content-hash": "c6003e70c11db07e1adeb97615c349ab",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -1333,12 +1333,6 @@
                 "BSD-3-Clause"
             ],
             "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.",
-            "funding": [
-                {
-                    "url": "https://funding.communitybridge.org/projects/laminas-project",
-                    "type": "community_bridge"
-                }
-            ],
             "time": "2020-05-20T13:45:39+00:00"
         },
         {
@@ -3288,26 +3282,20 @@
                 "laminas",
                 "zf"
             ],
-            "funding": [
-                {
-                    "url": "https://funding.communitybridge.org/projects/laminas-project",
-                    "type": "community_bridge"
-                }
-            ],
             "time": "2020-05-20T16:45:56+00:00"
         },
         {
             "name": "magento/composer",
-            "version": "1.6.x-dev",
+            "version": "1.6.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/composer.git",
-                "reference": "f3e4bec8fc73a97a6cbc391b1b93d4c32566763d"
+                "reference": "fcc66f535d631788f2ba160ff547357086d9b2c9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/composer/zipball/f3e4bec8fc73a97a6cbc391b1b93d4c32566763d",
-                "reference": "f3e4bec8fc73a97a6cbc391b1b93d4c32566763d",
+                "url": "https://api.github.com/repos/magento/composer/zipball/fcc66f535d631788f2ba160ff547357086d9b2c9",
+                "reference": "fcc66f535d631788f2ba160ff547357086d9b2c9",
                 "shasum": ""
             },
             "require": {
@@ -3330,7 +3318,7 @@
                 "AFL-3.0"
             ],
             "description": "Magento composer library helps to instantiate Composer application and run composer commands.",
-            "time": "2020-05-08T01:07:09+00:00"
+            "time": "2020-06-15T17:52:31+00:00"
         },
         {
             "name": "magento/magento-composer-installer",
@@ -3533,16 +3521,6 @@
                 "logging",
                 "psr-3"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/Seldaek",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-22T07:31:27+00:00"
         },
         {
@@ -4205,11 +4183,6 @@
                 "MIT"
             ],
             "authors": [
-                {
-                    "name": "Ben Ramsey",
-                    "email": "ben@benramsey.com",
-                    "homepage": "https://benramsey.com"
-                },
                 {
                     "name": "Marijn Huizendveld",
                     "email": "marijn.huizendveld@gmail.com"
@@ -4217,6 +4190,11 @@
                 {
                     "name": "Thibaud Fabre",
                     "email": "thibaud@aztech.io"
+                },
+                {
+                    "name": "Ben Ramsey",
+                    "email": "ben@benramsey.com",
+                    "homepage": "https://benramsey.com"
                 }
             ],
             "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).",
@@ -4850,20 +4828,6 @@
                 "polyfill",
                 "portable"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:14:59+00:00"
         },
         {
@@ -4926,20 +4890,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -4999,20 +4949,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5068,20 +5004,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5140,20 +5062,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5216,20 +5124,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -6740,20 +6634,6 @@
                 "redis",
                 "xcache"
             ],
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-27T16:24:54+00:00"
         },
         {
@@ -6877,20 +6757,6 @@
                 "constructor",
                 "instantiate"
             ],
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-29T17:27:14+00:00"
         },
         {
@@ -6953,20 +6819,6 @@
                 "parser",
                 "php"
             ],
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-25T17:44:05+00:00"
         },
         {
@@ -7316,12 +7168,6 @@
                 "sftp",
                 "storage"
             ],
-            "funding": [
-                {
-                    "url": "https://offset.earth/frankdejonge",
-                    "type": "other"
-                }
-            ],
             "time": "2020-05-18T15:13:39+00:00"
         },
         {
@@ -8655,6 +8501,12 @@
                 "filesystem",
                 "iterator"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-04-18T05:02:12+00:00"
         },
         {
@@ -8940,16 +8792,6 @@
                 "testing",
                 "xunit"
             ],
-            "funding": [
-                {
-                    "url": "https://phpunit.de/donate.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-05-22T13:54:05+00:00"
         },
         {
@@ -9090,6 +8932,12 @@
             ],
             "description": "Collection of value objects that represent the PHP code units",
             "homepage": "https://github.com/sebastianbergmann/code-unit",
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-04-30T05:58:10+00:00"
         },
         {
@@ -9255,12 +9103,6 @@
                 "unidiff",
                 "unified diff"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-05-08T05:01:12+00:00"
         },
         {
@@ -9314,6 +9156,12 @@
                 "environment",
                 "hhvm"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-04-14T13:36:52+00:00"
         },
         {
@@ -10154,20 +10002,6 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-27T08:34:37+00:00"
         },
         {
@@ -10449,20 +10283,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -10980,7 +10800,6 @@
     "aliases": [],
     "minimum-stability": "stable",
     "stability-flags": {
-        "magento/composer": 20,
         "magento/magento2-functional-testing-framework": 5
     },
     "prefer-stable": true,

From 8a0ad511a44721dec4eed72b922d9c95ea80ba94 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Tue, 16 Jun 2020 20:33:56 +0300
Subject: [PATCH 245/307] =?UTF-8?q?MC-35197:=20Unexpected=20loading=20of?=
 =?UTF-8?q?=20the=20=E2=80=9CCreate=20New=20Order=E2=80=9D=20page=20in=20t?=
 =?UTF-8?q?he=20Magento=20Admin=20panel?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../view/adminhtml/templates/popup.phtml      | 22 ++++++---
 .../templates/order/create/form.phtml         | 46 +++++++++++++------
 2 files changed, 47 insertions(+), 21 deletions(-)

diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
index 397b4db4d811f..746044c2ae553 100644
--- a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
+++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
@@ -8,7 +8,7 @@
 ?>
 
 <?php if ($block->getChildHtml()):?>
-<div id="gift_options_configure_new" class="gift-options-popup product-configure-popup">
+<div id="gift_options_configure_new" class="gift-options-popup product-configure-popup no-display">
     <div id="gift_options_form_contents">
         <div class="content">
             <?= $block->getChildHtml() ?>
@@ -23,11 +23,21 @@
         </div>
     </div>
 </div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#gift_options_configure_new') ?>
-<div id="giftoptions_tooltip_window" class="gift-options-tooltip">
-    <div id="giftoptions_tooltip_window_content"> </div>
-</div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display: none;", 'div#giftoptions_tooltip_window') ?>
+    <div id="giftoptions_tooltip_window" class="gift-options-tooltip">
+        <div id="giftoptions_tooltip_window_content"> </div>
+    </div>
+    <?php $scriptString = <<<script
+    require(['jquery'], function($){
+        'use strict';
+        $('div#gift_options_configure_new').css('display', 'none');
+        $('div#gift_options_configure_new').removeClass('no-display');
+
+        $('div#giftoptions_tooltip_window').css('display', 'none');
+        $('div#giftoptions_tooltip_window').removeClass('no-display');
+    });
+script;
+    ?>
+    <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
     <?php $scriptString = <<<script
 require([
     "Magento_Sales/order/create/giftmessage",
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
index 4f1ee1f93c02c..80749b9c55a4b 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
@@ -14,25 +14,41 @@
     <div id="order-message">
         <?= $block->getChildHtml('message') ?>
     </div>
-    <div id="order-customer-selector" class="fieldset-wrapper order-customer-selector">
+    <div id="order-customer-selector" class="fieldset-wrapper order-customer-selector no-display">
         <?= $block->getChildHtml('customer.grid.container') ?>
     </div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        'display:' . /* @noEscape */ $block->getCustomerSelectorDisplay(),
-        'div#order-customer-selector'
-    ) ?>
-    <div id="order-store-selector" class="fieldset-wrapper">
+    <div id="order-store-selector" class="fieldset-wrapper no-display">
         <?= $block->getChildHtml('store') ?>
     </div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        'display:' . /* @noEscape */ $block->getStoreSelectorDisplay(),
-        'div#order-store-selector'
-    ) ?>
-    <div id="order-data">
+    <div id="order-data" class="no-display">
         <?= $block->getChildHtml('data') ?>
     </div>
-    <?= /* @noEscape */ $secureRenderer->renderStyleAsTag(
-        'display:' . /* @noEscape */ $block->getDataSelectorDisplay(),
-        'div#order-data'
-    ) ?>
 </form>
+<?php $scriptString = <<<script
+require(['jquery'], function($){
+    'use strict';
+
+script;
+if ($block->getCustomerSelectorDisplay()) {
+    $scriptString .= <<<script
+    $('div#order-customer-selector').css('display', '{$block->getCustomerSelectorDisplay()}');
+    $('div#order-customer-selector').removeClass('no-display');
+script;
+}
+if ($block->getStoreSelectorDisplay()) {
+    $scriptString .= <<<script
+    $('div#order-store-selector').css('display', '{$block->getStoreSelectorDisplay()}');
+    $('div#order-store-selector').removeClass('no-display');
+script;
+}
+if ($block->getDataSelectorDisplay()) {
+    $scriptString .= <<<script
+    $('div#order-data').css('display', '{$block->getDataSelectorDisplay()}');
+    $('div#order-data').removeClass('no-display');
+script;
+}
+$scriptString .= <<<script
+});
+script;
+?>
+<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

From f9757abb979ba8db2b4e0ab8ea6de6de8848824d Mon Sep 17 00:00:00 2001
From: Ihor Vansach <ihor@magefan.com>
Date: Wed, 10 Jun 2020 23:30:32 +0300
Subject: [PATCH 246/307] Fixed issue magento2-login-as-customer/issues/159

---
 .../ProcessShoppingCartPlugin.php             | 26 ++-----------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php b/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
index cf25962a104b2..592d1b2bf206f 100644
--- a/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
+++ b/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
@@ -60,7 +60,7 @@ public function __construct(
     }
 
     /**
-     * Remove all items from guest shopping cart
+     * Remove all items from guest shopping cart and mark customer cart as not-guest
      *
      * @param AuthenticateCustomerBySecretInterface $subject
      * @param string $secret
@@ -77,31 +77,9 @@ public function beforeExecute(
             $quote = $this->checkoutSession->getQuote();
             /* Remove items from guest cart */
             $quote->removeAllItems();
+            $quote->setCustomerIsGuest(0);
             $this->quoteRepository->save($quote);
         }
         return null;
     }
-
-    /**
-     * Mark customer cart as not-guest
-     *
-     * @param AuthenticateCustomerBySecretInterface $subject
-     * @param void $result
-     * @param string $secret
-     * @return void
-     * @throws LocalizedException
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    public function afterExecute(
-        AuthenticateCustomerBySecretInterface $subject,
-        $result,
-        string $secret
-    ) {
-        $this->checkoutSession->loadCustomerQuote();
-        $quote = $this->checkoutSession->getQuote();
-
-        $quote->setCustomerIsGuest(0);
-        $this->quoteRepository->save($quote);
-    }
 }

From 4a6b670c2051a125055d2fd28b7fb17646f2ebfa Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 17:04:19 -0500
Subject: [PATCH 247/307] magento2-login-as-customer/pull/162: Fixed issue
 magento2-login-as-customer/issues/156

---
 .../Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php b/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
index 592d1b2bf206f..2d781274a0b29 100644
--- a/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
+++ b/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
@@ -15,7 +15,7 @@
 use Magento\LoginAsCustomerApi\Api\GetAuthenticationDataBySecretInterface;
 
 /**
- * Remove all items from guest shopping cart before execute. Mark customer cart as not-guest after execute
+ * Mark customer cart as guest cart and remove all items from it
  *
  * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
  */

From c6535cb0834da161c1226403e486b5119028b2b5 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 17:06:59 -0500
Subject: [PATCH 248/307] magento2-login-as-customer/pull/162: Fixed issue
 magento2-login-as-customer/issues/156

---
 .../Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php b/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
index 2d781274a0b29..4aa068a0ccc61 100644
--- a/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
+++ b/app/code/Magento/LoginAsCustomerQuote/Plugin/LoginAsCustomerApi/ProcessShoppingCartPlugin.php
@@ -15,7 +15,7 @@
 use Magento\LoginAsCustomerApi\Api\GetAuthenticationDataBySecretInterface;
 
 /**
- * Mark customer cart as guest cart and remove all items from it
+ * Remove all items from guest shopping cart and mark cart as not-guest
  *
  * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
  */
@@ -60,7 +60,7 @@ public function __construct(
     }
 
     /**
-     * Remove all items from guest shopping cart and mark customer cart as not-guest
+     * Remove all items from guest shopping cart and mark cart as not-guest
      *
      * @param AuthenticateCustomerBySecretInterface $subject
      * @param string $secret

From eb3ea37fb9739ac1da033abae500fd085e4e2641 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 21:05:19 -0500
Subject: [PATCH 249/307] magento2-login-as-customer/issues/168: [CE] Endless
 loading of the page after trying to search any word in "Login as Customer Log

---
 .../adminhtml/ui_component/login_as_customer_log_listing.xml     | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/code/Magento/LoginAsCustomerLog/view/adminhtml/ui_component/login_as_customer_log_listing.xml b/app/code/Magento/LoginAsCustomerLog/view/adminhtml/ui_component/login_as_customer_log_listing.xml
index 077fd6e18db7c..fdd1bf55c91b9 100644
--- a/app/code/Magento/LoginAsCustomerLog/view/adminhtml/ui_component/login_as_customer_log_listing.xml
+++ b/app/code/Magento/LoginAsCustomerLog/view/adminhtml/ui_component/login_as_customer_log_listing.xml
@@ -38,7 +38,6 @@
         </settings>
         <bookmark name="bookmarks"/>
         <columnsControls name="columns_controls"/>
-        <filterSearch name="name"/>
         <filters name="listing_filters">
             <settings>
                 <templates>

From 361239fb75c3dbba3e47e3fa433ff5ca2859ee31 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 21:11:11 -0500
Subject: [PATCH 250/307] magento/magento2-login-as-customer#156: Banner
 disappear when admin edit customer data from Account Information tab

---
 .../view/frontend/web/js/view/loginAsCustomer.js    | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
index 06dffd76f19f3..9687525ee26eb 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
@@ -28,19 +28,19 @@ define([
 
             customerData.subscribe(function (data) {
                 this.fullname = data.fullname;
-                this._updateBanner();
+                this.updateBanner();
             }.bind(this));
             loggedAsCustomerData.subscribe(function (data) {
                 this.adminUserId = data.adminUserId;
                 this.websiteName = data.websiteName;
-                this._updateBanner();
+                this.updateBanner();
             }.bind(this));
 
             this.fullname = customerData().fullname;
             this.adminUserId = loggedAsCustomerData().adminUserId;
             this.websiteName = loggedAsCustomerData().websiteName;
 
-            this._updateBanner();
+            this.updateBanner();
         },
 
         /** @inheritdoc */
@@ -51,7 +51,12 @@ define([
             return this;
         },
 
-        _updateBanner: function () {
+        /**
+         * Update banner area
+         *
+         * @returns void
+         */
+        updateBanner: function () {
             if (this.adminUserId !== undefined) {
                 this.isVisible(this.adminUserId);
             }

From 2bc1209586de144c3f61c4c4e937c28bcac80bc9 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 21:22:46 -0500
Subject: [PATCH 251/307] magento/magento2-login-as-customer#171: Force
 customer unlogin during admin loglout without additional MySQL queries

---
 app/code/Magento/LoginAsCustomer/etc/di.xml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomer/etc/di.xml b/app/code/Magento/LoginAsCustomer/etc/di.xml
index c0ba4901ba7b8..c53e37d284daa 100755
--- a/app/code/Magento/LoginAsCustomer/etc/di.xml
+++ b/app/code/Magento/LoginAsCustomer/etc/di.xml
@@ -13,7 +13,4 @@
     <preference for="Magento\LoginAsCustomerApi\Api\DeleteAuthenticationDataForUserInterface" type="Magento\LoginAsCustomer\Model\ResourceModel\DeleteAuthenticationDataForUser"/>
     <preference for="Magento\LoginAsCustomerApi\Api\ConfigInterface" type="Magento\LoginAsCustomer\Model\Config"/>
     <preference for="Magento\LoginAsCustomerApi\Api\IsLoginAsCustomerSessionActiveInterface" type="Magento\LoginAsCustomer\Model\ResourceModel\IsLoginAsCustomerSessionActive"/>
-    <type name="Magento\Backend\Model\Auth">
-        <plugin name="login_as_customer_admin_logout" type="Magento\LoginAsCustomer\Plugin\AdminLogoutPlugin"/>
-    </type>
 </config>

From 8dc6b6fcc3d6b5873ff0b048087a4f85ca299bff Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 22:13:48 -0500
Subject: [PATCH 252/307] magento/magento2-login-as-customer#171: Force
 customer unlogin during admin loglout without additional MySQL queries

---
 .../Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php     | 5 +++--
 app/code/Magento/LoginAsCustomer/etc/di.xml                  | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
index f473dcebcf9ea..fddc11b0a4d6d 100644
--- a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
+++ b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -45,8 +45,9 @@ public function __construct(
      */
     public function beforeLogout(Auth $subject): void
     {
-        if ($this->config->isEnabled() && $subject->getUser()) {
-            $userId = (int)$subject->getUser()->getId();
+        $user = $subject->getUser();
+        if ($this->config->isEnabled() && $user && $user->getIsLoggedAsCustomer()) {
+            $userId = (int)$user->getId();
             $this->deleteAuthenticationDataForUser->execute($userId);
         }
     }
diff --git a/app/code/Magento/LoginAsCustomer/etc/di.xml b/app/code/Magento/LoginAsCustomer/etc/di.xml
index c53e37d284daa..c0ba4901ba7b8 100755
--- a/app/code/Magento/LoginAsCustomer/etc/di.xml
+++ b/app/code/Magento/LoginAsCustomer/etc/di.xml
@@ -13,4 +13,7 @@
     <preference for="Magento\LoginAsCustomerApi\Api\DeleteAuthenticationDataForUserInterface" type="Magento\LoginAsCustomer\Model\ResourceModel\DeleteAuthenticationDataForUser"/>
     <preference for="Magento\LoginAsCustomerApi\Api\ConfigInterface" type="Magento\LoginAsCustomer\Model\Config"/>
     <preference for="Magento\LoginAsCustomerApi\Api\IsLoginAsCustomerSessionActiveInterface" type="Magento\LoginAsCustomer\Model\ResourceModel\IsLoginAsCustomerSessionActive"/>
+    <type name="Magento\Backend\Model\Auth">
+        <plugin name="login_as_customer_admin_logout" type="Magento\LoginAsCustomer\Plugin\AdminLogoutPlugin"/>
+    </type>
 </config>

From 76c4198b9060adcc2a8495843dcf42105797de66 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 23:46:46 -0500
Subject: [PATCH 253/307] magento/magento2-login-as-customer#171: Force
 customer unlogin during admin loglout without additional MySQL queries

---
 app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php | 2 +-
 app/code/Magento/LoginAsCustomer/etc/config.xml               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
index fddc11b0a4d6d..ef757b3c081d7 100644
--- a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
+++ b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -46,7 +46,7 @@ public function __construct(
     public function beforeLogout(Auth $subject): void
     {
         $user = $subject->getUser();
-        if ($this->config->isEnabled() && $user && $user->getIsLoggedAsCustomer()) {
+        if ($this->config->isEnabled() && $user) {
             $userId = (int)$user->getId();
             $this->deleteAuthenticationDataForUser->execute($userId);
         }
diff --git a/app/code/Magento/LoginAsCustomer/etc/config.xml b/app/code/Magento/LoginAsCustomer/etc/config.xml
index 7e39cc39145eb..936ae1ff2f05d 100644
--- a/app/code/Magento/LoginAsCustomer/etc/config.xml
+++ b/app/code/Magento/LoginAsCustomer/etc/config.xml
@@ -10,7 +10,7 @@
     <default>
         <login_as_customer>
             <general>
-                <enabled>1</enabled>
+                <enabled>0</enabled>
                 <store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
                 <authentication_data_expiration_time>60</authentication_data_expiration_time>
             </general>

From 38892865b20e048a220abe52c94559b070c36c97 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Tue, 16 Jun 2020 23:56:00 -0500
Subject: [PATCH 254/307] magento/magento2-login-as-customer#171: Force
 customer unlogin during admin loglout without additional MySQL queries

---
 app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php   | 2 +-
 app/code/Magento/LoginAsCustomer/etc/config.xml                 | 2 +-
 .../CustomerData/LoginAsCustomerUi.php                          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
index ef757b3c081d7..fddc11b0a4d6d 100644
--- a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
+++ b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -46,7 +46,7 @@ public function __construct(
     public function beforeLogout(Auth $subject): void
     {
         $user = $subject->getUser();
-        if ($this->config->isEnabled() && $user) {
+        if ($this->config->isEnabled() && $user && $user->getIsLoggedAsCustomer()) {
             $userId = (int)$user->getId();
             $this->deleteAuthenticationDataForUser->execute($userId);
         }
diff --git a/app/code/Magento/LoginAsCustomer/etc/config.xml b/app/code/Magento/LoginAsCustomer/etc/config.xml
index 936ae1ff2f05d..7e39cc39145eb 100644
--- a/app/code/Magento/LoginAsCustomer/etc/config.xml
+++ b/app/code/Magento/LoginAsCustomer/etc/config.xml
@@ -10,7 +10,7 @@
     <default>
         <login_as_customer>
             <general>
-                <enabled>0</enabled>
+                <enabled>1</enabled>
                 <store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
                 <authentication_data_expiration_time>60</authentication_data_expiration_time>
             </general>
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/CustomerData/LoginAsCustomerUi.php b/app/code/Magento/LoginAsCustomerFrontendUi/CustomerData/LoginAsCustomerUi.php
index 6303989c0c667..985561df0bbc4 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/CustomerData/LoginAsCustomerUi.php
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/CustomerData/LoginAsCustomerUi.php
@@ -49,7 +49,7 @@ public function __construct(
      */
     public function getSectionData(): array
     {
-        if (!$this->customerSession->getCustomerId()) {
+        if (!$this->customerSession->getCustomerId() || !$this->customerSession->getLoggedAsCustomerAdmindId()) {
             return [];
         }
 

From 229f045852a05c555bad4d527320d72615c71272 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Wed, 17 Jun 2020 01:45:23 -0500
Subject: [PATCH 255/307] magento/magento2-login-as-customer#171: Force
 customer unlogin during admin loglout without additional MySQL queries

---
 .../Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml  | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml b/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml
index 2204402b7dd30..6e595270f0b04 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml
@@ -6,13 +6,6 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
-    <type name="Magento\Customer\CustomerData\SectionPoolInterface">
-        <arguments>
-            <argument name="sectionSourceMap" xsi:type="array">
-                <item name="loggedAsCustomer" xsi:type="string">Magento\LoginAsCustomerFrontendUi\CustomerData\LoginAsCustomerUi</item>
-            </argument>
-        </arguments>
-    </type>
     <type name="Magento\Framework\App\ActionInterface">
         <plugin name="invalidate_expired_session_plugin"
                 type="Magento\LoginAsCustomerFrontendUi\Plugin\InvalidateExpiredSessionPlugin"/>

From e0191e0818bc3fdf53a8c1c6d746260480d6beff Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Wed, 17 Jun 2020 11:13:10 +0300
Subject: [PATCH 256/307] =?UTF-8?q?MC-35197:=20Unexpected=20loading=20of?=
 =?UTF-8?q?=20the=20=E2=80=9CCreate=20New=20Order=E2=80=9D=20page=20in=20t?=
 =?UTF-8?q?he=20Magento=20Admin=20panel?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Magento/GiftMessage/view/adminhtml/templates/popup.phtml    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
index 746044c2ae553..e45446450f872 100644
--- a/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
+++ b/app/code/Magento/GiftMessage/view/adminhtml/templates/popup.phtml
@@ -23,7 +23,7 @@
         </div>
     </div>
 </div>
-    <div id="giftoptions_tooltip_window" class="gift-options-tooltip">
+    <div id="giftoptions_tooltip_window" class="gift-options-tooltip no-display">
         <div id="giftoptions_tooltip_window_content"> </div>
     </div>
     <?php $scriptString = <<<script

From 14528a3bac0027997094444055124e93dc2533ae Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Wed, 17 Jun 2020 04:12:19 -0500
Subject: [PATCH 257/307] magento/magento2-login-as-customer#171: Force
 customer logout during admin loglout without additional MySQL queries

---
 app/code/Magento/LoginAsCustomer/etc/config.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/LoginAsCustomer/etc/config.xml b/app/code/Magento/LoginAsCustomer/etc/config.xml
index 7e39cc39145eb..936ae1ff2f05d 100644
--- a/app/code/Magento/LoginAsCustomer/etc/config.xml
+++ b/app/code/Magento/LoginAsCustomer/etc/config.xml
@@ -10,7 +10,7 @@
     <default>
         <login_as_customer>
             <general>
-                <enabled>1</enabled>
+                <enabled>0</enabled>
                 <store_view_manual_choice_enabled>0</store_view_manual_choice_enabled>
                 <authentication_data_expiration_time>60</authentication_data_expiration_time>
             </general>

From 1d300ba5e755028134fa7bbc759d661167b8ef51 Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Wed, 17 Jun 2020 14:00:13 +0300
Subject: [PATCH 258/307] magento/magento2-login-as-customer#171: Force
 customer unlogin during admin loglout without additional MySQL queries.

---
 .../LoginAsCustomer/Plugin/AdminLogoutPlugin.php     | 12 +++++++++++-
 .../Controller/Adminhtml/Login/Login.php             |  1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
index fddc11b0a4d6d..0a4f61469b031 100644
--- a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
+++ b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -8,6 +8,7 @@
 namespace Magento\LoginAsCustomer\Plugin;
 
 use Magento\Backend\Model\Auth;
+use Magento\Backend\Model\Auth\Session as AuthSession;
 use Magento\LoginAsCustomerApi\Api\ConfigInterface;
 use Magento\LoginAsCustomerApi\Api\DeleteAuthenticationDataForUserInterface;
 
@@ -16,6 +17,11 @@
  */
 class AdminLogoutPlugin
 {
+    /**
+     * @var AuthSession
+     */
+    private $authSession;
+
     /**
      * @var ConfigInterface
      */
@@ -27,13 +33,16 @@ class AdminLogoutPlugin
     private $deleteAuthenticationDataForUser;
 
     /**
+     * @param AuthSession $authSession
      * @param ConfigInterface $config
      * @param DeleteAuthenticationDataForUserInterface $deleteAuthenticationDataForUser
      */
     public function __construct(
+        AuthSession $authSession,
         ConfigInterface $config,
         DeleteAuthenticationDataForUserInterface $deleteAuthenticationDataForUser
     ) {
+        $this->authSession = $authSession;
         $this->config = $config;
         $this->deleteAuthenticationDataForUser = $deleteAuthenticationDataForUser;
     }
@@ -46,7 +55,8 @@ public function __construct(
     public function beforeLogout(Auth $subject): void
     {
         $user = $subject->getUser();
-        if ($this->config->isEnabled() && $user && $user->getIsLoggedAsCustomer()) {
+        $isLoggedAsCustomer = $this->authSession->getIsLoggedAsCustomer();
+        if ($this->config->isEnabled() && $user && $isLoggedAsCustomer) {
             $userId = (int)$user->getId();
             $this->deleteAuthenticationDataForUser->execute($userId);
         }
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/Controller/Adminhtml/Login/Login.php b/app/code/Magento/LoginAsCustomerAdminUi/Controller/Adminhtml/Login/Login.php
index 7ccdcfe45e482..70eef5347f8e3 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/Controller/Adminhtml/Login/Login.php
+++ b/app/code/Magento/LoginAsCustomerAdminUi/Controller/Adminhtml/Login/Login.php
@@ -167,6 +167,7 @@ public function execute(): ResultInterface
 
         $this->deleteAuthenticationDataForUser->execute($userId);
         $secret = $this->saveAuthenticationData->execute($authenticationData);
+        $this->authSession->setIsLoggedAsCustomer(true);
 
         $redirectUrl = $this->getLoginProceedRedirectUrl($secret, $storeId);
         $resultRedirect->setUrl($redirectUrl);

From 495832cb9ed305c518c9ed762f0d36ef2adbc83c Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Wed, 17 Jun 2020 14:53:53 +0300
Subject: [PATCH 259/307] =?UTF-8?q?MC-35197:=20Unexpected=20loading=20of?=
 =?UTF-8?q?=20the=20=E2=80=9CCreate=20New=20Order=E2=80=9D=20page=20in=20t?=
 =?UTF-8?q?he=20Magento=20Admin=20panel?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../templates/order/create/form.phtml         | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
index 80749b9c55a4b..bd2e08d30ccdd 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/create/form.phtml
@@ -24,31 +24,31 @@
         <?= $block->getChildHtml('data') ?>
     </div>
 </form>
-<?php $scriptString = <<<script
+<?php $scriptString = <<<Script
 require(['jquery'], function($){
     'use strict';
 
-script;
+Script;
 if ($block->getCustomerSelectorDisplay()) {
-    $scriptString .= <<<script
+    $scriptString .= <<<Script
     $('div#order-customer-selector').css('display', '{$block->getCustomerSelectorDisplay()}');
     $('div#order-customer-selector').removeClass('no-display');
-script;
+Script;
 }
 if ($block->getStoreSelectorDisplay()) {
-    $scriptString .= <<<script
+    $scriptString .= <<<Script
     $('div#order-store-selector').css('display', '{$block->getStoreSelectorDisplay()}');
     $('div#order-store-selector').removeClass('no-display');
-script;
+Script;
 }
 if ($block->getDataSelectorDisplay()) {
-    $scriptString .= <<<script
+    $scriptString .= <<<Script
     $('div#order-data').css('display', '{$block->getDataSelectorDisplay()}');
     $('div#order-data').removeClass('no-display');
-script;
+Script;
 }
-$scriptString .= <<<script
+$scriptString .= <<<Script
 });
-script;
+Script;
 ?>
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

From 8818e304323b3c048db7432c2b8302eff81bc54a Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Wed, 17 Jun 2020 11:45:15 +0300
Subject: [PATCH 260/307] magento/magento2-login-as-customer#172: Persistent
 banner is not shown when admin is logged in as customer.

---
 .../Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml  | 7 +++++++
 .../view/frontend/web/js/view/loginAsCustomer.js           | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml b/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml
index 6e595270f0b04..2204402b7dd30 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/etc/frontend/di.xml
@@ -6,6 +6,13 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
+    <type name="Magento\Customer\CustomerData\SectionPoolInterface">
+        <arguments>
+            <argument name="sectionSourceMap" xsi:type="array">
+                <item name="loggedAsCustomer" xsi:type="string">Magento\LoginAsCustomerFrontendUi\CustomerData\LoginAsCustomerUi</item>
+            </argument>
+        </arguments>
+    </type>
     <type name="Magento\Framework\App\ActionInterface">
         <plugin name="invalidate_expired_session_plugin"
                 type="Magento\LoginAsCustomerFrontendUi\Plugin\InvalidateExpiredSessionPlugin"/>
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
index 9687525ee26eb..c19adbf0dfb4f 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/view/frontend/web/js/view/loginAsCustomer.js
@@ -5,10 +5,11 @@
 
 define([
     'jquery',
+    'underscore',
     'uiComponent',
     'Magento_Customer/js/customer-data',
     'mage/translate'
-], function ($, Component, customer) {
+], function ($, _, Component, customer) {
     'use strict';
 
     return Component.extend({
@@ -63,8 +64,8 @@ define([
 
             if (this.fullname !== undefined && this.websiteName !== undefined) {
                 this.notificationText($.mage.__('You are connected as <strong>%1</strong> on %2')
-                    .replace('%1', this.fullname)
-                    .replace('%2', this.websiteName));
+                    .replace('%1', _.escape(this.fullname))
+                    .replace('%2', _.escape(this.websiteName)));
             }
         }
     });

From 74a48fd21a694a43a2417e5a4586a6ceb52bf082 Mon Sep 17 00:00:00 2001
From: Valerii Naida <vnayda@adobe.com>
Date: Wed, 17 Jun 2020 11:04:56 -0500
Subject: [PATCH 261/307] magento/magento2-login-as-customer#171: Force
 customer logout during admin logout without additional MySQL queries

---
 app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
index 0a4f61469b031..244fed20c21e8 100644
--- a/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
+++ b/app/code/Magento/LoginAsCustomer/Plugin/AdminLogoutPlugin.php
@@ -14,6 +14,8 @@
 
 /**
  * Delete all Login as Customer sessions for logging out admin.
+ *
+ * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
  */
 class AdminLogoutPlugin
 {

From b1a526dc9a2a9958b28eb4a541e26aa6a59415f2 Mon Sep 17 00:00:00 2001
From: Oleksandr Gorkun <ogorkun@magento.com>
Date: Thu, 18 Jun 2020 13:41:20 -0500
Subject: [PATCH 262/307] MC-35301: Allow inline scripts and styles for 2.4.0

---
 app/code/Magento/Csp/etc/config.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Csp/etc/config.xml b/app/code/Magento/Csp/etc/config.xml
index dd3ddcbbf85bc..6e2235479da93 100644
--- a/app/code/Magento/Csp/etc/config.xml
+++ b/app/code/Magento/Csp/etc/config.xml
@@ -75,14 +75,14 @@
                     <styles>
                         <policy_id>style-src</policy_id>
                         <self>1</self>
-                        <inline>0</inline>
+                        <inline>1</inline>
                         <eval>0</eval>
                         <dynamic>0</dynamic>
                     </styles>
                     <scripts>
                         <policy_id>script-src</policy_id>
                         <self>1</self>
-                        <inline>0</inline>
+                        <inline>1</inline>
                         <eval>1</eval>
                         <dynamic>0</dynamic>
                     </scripts>
@@ -180,14 +180,14 @@
                     <styles>
                         <policy_id>style-src</policy_id>
                         <self>1</self>
-                        <inline>0</inline>
+                        <inline>1</inline>
                         <eval>0</eval>
                         <dynamic>0</dynamic>
                     </styles>
                     <scripts>
                         <policy_id>script-src</policy_id>
                         <self>1</self>
-                        <inline>0</inline>
+                        <inline>1</inline>
                         <eval>1</eval>
                         <dynamic>0</dynamic>
                     </scripts>

From 5f1d4e01b70faf4453313f969d5c54e4a900a070 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Fri, 19 Jun 2020 15:20:10 +0300
Subject: [PATCH 263/307] MC-35316: Pagination products not work in admin
 create order page

---
 .../Backend/view/adminhtml/templates/widget/grid.phtml      | 6 ++++--
 .../view/adminhtml/templates/widget/grid/extended.phtml     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index f4ef4db022a8e..667622fb2254b 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -101,7 +101,8 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                                     'onclick',
                                     /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                         /* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();',
-                                    'button.action-previous'
+                                    'div#' . $block->escapeJs($block->getId()) .
+                                    ' .admin__data-grid-pager button.action-previous:not(.disabled)'
                                 ) ?>
                             <?php else: ?>
                                 <button type="button" class="action-previous disabled">
@@ -137,7 +138,8 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
                                     'onclick',
                                     /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                     /* @noEscape */ ($_curPage + 1) . '\');event.preventDefault();',
-                                    'button.action-next'
+                                    'div#' . $block->escapeJs($block->getId()) .
+                                    ' .admin__data-grid-pager button.action-next:not(.disabled)'
                                 ) ?>
                             <?php else: ?>
                                 <button type="button" class="action-next disabled">
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
index 9cf4e18b8af1f..d4aa14250837f 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml
@@ -116,7 +116,8 @@ $numColumns = count($block->getColumns());
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                 /* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();',
-                                '.admin__data-grid-pager button.action-previous'
+                                'div#' . $block->escapeJs($block->getId()) .
+                                ' .admin__data-grid-pager button.action-previous:not(.disabled)'
                             ) ?>
                         <?php else: ?>
                             <button type="button" class="action-previous disabled">
@@ -150,7 +151,8 @@ $numColumns = count($block->getColumns());
                                 'onclick',
                                 /* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
                                 /* @noEscape */ ($_curPage + 1) . '\');event.preventDefault();',
-                                '.admin__data-grid-pager button.action-next'
+                                'div#' . $block->escapeJs($block->getId()) .
+                                ' .admin__data-grid-pager button.action-next:not(.disabled)'
                             ) ?>
                         <?php else: ?>
                             <button type="button" class="action-next disabled">

From c31e32deb3c678296b7b18a6d7cc6cd7b2a09f86 Mon Sep 17 00:00:00 2001
From: DianaRusin <rusind95@gmail.com>
Date: Fri, 19 Jun 2020 17:21:48 +0300
Subject: [PATCH 264/307] MC-35322: [MFTF] CreateOrderFromEditCustomerPageTest
 unstable on Jenkins

---
 .../ActionGroup/AddConfigurableProductToOrderActionGroup.xml    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AddConfigurableProductToOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AddConfigurableProductToOrderActionGroup.xml
index dee2af6cd4053..48443512ee4c8 100644
--- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AddConfigurableProductToOrderActionGroup.xml
+++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AddConfigurableProductToOrderActionGroup.xml
@@ -18,6 +18,8 @@
             <argument name="option"/>
         </arguments>
 
+        <scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
+        <waitForElementVisible selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="waitForAddProductsButton"/>
         <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
         <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterConfigurable"/>
         <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchConfigurable"/>

From 0769167b8ad1fb27f1897db8293d61e5066dfe9f Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Mon, 22 Jun 2020 18:39:49 +0300
Subject: [PATCH 265/307] MC-35316: Pagination products not work in admin
 create order page

---
 .../Test/Mftf/Test/AdminOrderPagerTest.xml    | 133 ++++++++++++++++++
 .../AdminDataGridPaginationSection.xml        |   5 +-
 2 files changed, 136 insertions(+), 2 deletions(-)
 create mode 100644 app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml

diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml
new file mode 100644
index 0000000000000..176bd440f7e22
--- /dev/null
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml
@@ -0,0 +1,133 @@
+<?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="AdminOrderPagerTest">
+        <annotations>
+            <stories value="Admin order pager"/>
+            <title value="Check pager is working"/>
+            <description value="Check Pager in order add products grid"/>
+            <severity value="AVERAGE"/>
+            <testCaseId value="MC-35349"/>
+            <group value="sales"/>
+        </annotations>
+        <before>
+            <!-- 21 products created and category -->
+            <createData entity="_defaultCategory" stepKey="createCategory"/>
+            <createData entity="SimpleProduct" stepKey="createProduct01">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct02">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct03">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct04">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="_defaultProduct" stepKey="createProduct05">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="_defaultProduct" stepKey="createProduct06">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="_defaultProduct" stepKey="createProduct07">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="_defaultProduct" stepKey="createProduct08">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="_defaultProduct" stepKey="createProduct09">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct10">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct11">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct12">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct13">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct14">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct15">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct16">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct17">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct18">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct19">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProduct" stepKey="createProduct20">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="SimpleProduct" stepKey="createProduct21">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+
+            <!-- Customer is created -->
+            <createData entity="Simple_US_Customer" stepKey="createCustomer"/>
+            <!-- Login to Admin -->
+            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
+        </before>
+        <after>
+            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
+            <!-- Delete category and products -->
+            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+            <deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
+            <deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/>
+            <deleteData createDataKey="createProduct03" stepKey="deleteProduct3"/>
+            <deleteData createDataKey="createProduct04" stepKey="deleteProduct4"/>
+            <deleteData createDataKey="createProduct05" stepKey="deleteProduct5"/>
+            <deleteData createDataKey="createProduct06" stepKey="deleteProduct6"/>
+            <deleteData createDataKey="createProduct07" stepKey="deleteProduct7"/>
+            <deleteData createDataKey="createProduct08" stepKey="deleteProduct8"/>
+            <deleteData createDataKey="createProduct09" stepKey="deleteProduct9"/>
+            <deleteData createDataKey="createProduct10" stepKey="deleteProduct10"/>
+            <deleteData createDataKey="createProduct11" stepKey="deleteProduct11"/>
+            <deleteData createDataKey="createProduct12" stepKey="deleteProduct12"/>
+            <deleteData createDataKey="createProduct13" stepKey="deleteProduct13"/>
+            <deleteData createDataKey="createProduct14" stepKey="deleteProduct14"/>
+            <deleteData createDataKey="createProduct15" stepKey="deleteProduct15"/>
+            <deleteData createDataKey="createProduct16" stepKey="deleteProduct16"/>
+            <deleteData createDataKey="createProduct17" stepKey="deleteProduct17"/>
+            <deleteData createDataKey="createProduct18" stepKey="deleteProduct18"/>
+            <deleteData createDataKey="createProduct19" stepKey="deleteProduct19"/>
+            <deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/>
+            <deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/>
+
+            <!-- Delete Customer -->
+            <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
+        </after>
+
+        <!-- Initiate create new order -->
+        <actionGroup ref="NavigateToNewOrderPageExistingCustomerActionGroup" stepKey="navigateToNewOrderWithExistingCustomer">
+            <argument name="customer" value="$createCustomer$"/>
+        </actionGroup>
+
+        <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
+        <click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPage"/>
+        <seeInField selector="{{AdminDataGridPaginationSection.selectedPage}}" userInput="2" stepKey="seeSecondPageOrderGrid"/>
+        <click selector="{{AdminDataGridPaginationSection.previousPage}}" stepKey="clickPreviousPage"/>
+        <seeInField selector="{{AdminDataGridPaginationSection.selectedPage}}" userInput="1" stepKey="seeFirstPageOrderGrid"/>
+    </test>
+</tests>
diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml
index 133836761174d..6f3cf005f9ba7 100644
--- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml
+++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml
@@ -16,10 +16,11 @@
         <element name="perPageDropDownItem" type="button" selector="//*[contains(@class, 'selectmenu-items _active')]//button[contains(@class, 'selectmenu-item-action') and text()='{{dropDownItem}}']" timeout="30" parameterized="true"/>
         <element name="perPageEditCustomValue" type="button" selector="//div[contains(@class, 'selectmenu-items _active')]//div[contains(@class, 'selectmenu-item')]//button[text()='{{perPageCustomValue}}']/following-sibling::button[contains(@class, 'action-edit')]" parameterized="true"/>
         <element name="perPageDeleteCustomValue" type="button" selector="//div[contains(@class, 'selectmenu-items _active')]//div[contains(@class, 'selectmenu-item')]//button[text()='{{perPageCustomValue}}']/parent::div/preceding-sibling::div/button[contains(@class, 'action-delete')]" parameterized="true"/>
-        <element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next" timeout="30"/>
-        <element name="previousPage" type="button" selector="div.admin__data-grid-pager > button.action-previous" timeout="30"/>
+        <element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next:not(.disabled)" timeout="30"/>
+        <element name="previousPage" type="button" selector="div.admin__data-grid-pager > button.action-previous:not(.disabled)" timeout="30"/>
         <element name="currentPage" type="input" selector="div.admin__data-grid-pager > input[data-ui-id='current-page-input']"/>
         <element name="totalPages" type="text" selector="div.admin__data-grid-pager > label"/>
         <element name="perPageDropDownValue" type="input" selector=".selectmenu-value input" timeout="30"/>
+        <element name="selectedPage" type="input" selector="#sales_order_create_search_grid_page-current" timeout="30"/>
     </section>
 </sections>

From 8f1c69571e57270135964ab9cb207584f60d657f Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Mon, 22 Jun 2020 21:45:25 +0300
Subject: [PATCH 266/307] MC-35316: Pagination products not work in admin
 create order page

---
 .../Sales/Test/Mftf/Test/AdminOrderPagerTest.xml  | 15 +++++++++++----
 .../Section/AdminDataGridPaginationSection.xml    |  6 ++++--
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml
index 176bd440f7e22..fea3fe68fd522 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/AdminOrderPagerTest.xml
@@ -10,11 +10,13 @@
        xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
     <test name="AdminOrderPagerTest">
         <annotations>
+            <features value="Sales"/>
             <stories value="Admin order pager"/>
             <title value="Check pager is working"/>
             <description value="Check Pager in order add products grid"/>
             <severity value="AVERAGE"/>
             <testCaseId value="MC-35349"/>
+            <useCaseId value="MC-35316"/>
             <group value="sales"/>
         </annotations>
         <before>
@@ -91,8 +93,7 @@
         </before>
         <after>
             <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
-            <!-- Delete category and products -->
-            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+            <!-- Delete products -->
             <deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
             <deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/>
             <deleteData createDataKey="createProduct03" stepKey="deleteProduct3"/>
@@ -115,6 +116,9 @@
             <deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/>
             <deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/>
 
+            <!-- Delete Category -->
+            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+
             <!-- Delete Customer -->
             <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
         </after>
@@ -124,10 +128,13 @@
             <argument name="customer" value="$createCustomer$"/>
         </actionGroup>
 
+        <waitForElementVisible selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="waitForAddProductsButtonAppeared"/>
         <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
-        <click selector="{{AdminDataGridPaginationSection.nextPage}}" stepKey="clickNextPage"/>
+        <dontSee selector="{{AdminDataGridPaginationSection.prevPageActive}}" stepKey="previousPageDisabled"/>
+        <click selector="{{AdminDataGridPaginationSection.nextPageActive}}" stepKey="clickNextPage"/>
         <seeInField selector="{{AdminDataGridPaginationSection.selectedPage}}" userInput="2" stepKey="seeSecondPageOrderGrid"/>
-        <click selector="{{AdminDataGridPaginationSection.previousPage}}" stepKey="clickPreviousPage"/>
+        <click selector="{{AdminDataGridPaginationSection.prevPageActive}}" stepKey="clickPreviousPage"/>
         <seeInField selector="{{AdminDataGridPaginationSection.selectedPage}}" userInput="1" stepKey="seeFirstPageOrderGrid"/>
+        <dontSee selector="{{AdminDataGridPaginationSection.prevPageActive}}" stepKey="prevPageDisabled"/>
     </test>
 </tests>
diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml
index 6f3cf005f9ba7..51cebdb01a74d 100644
--- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml
+++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml
@@ -16,11 +16,13 @@
         <element name="perPageDropDownItem" type="button" selector="//*[contains(@class, 'selectmenu-items _active')]//button[contains(@class, 'selectmenu-item-action') and text()='{{dropDownItem}}']" timeout="30" parameterized="true"/>
         <element name="perPageEditCustomValue" type="button" selector="//div[contains(@class, 'selectmenu-items _active')]//div[contains(@class, 'selectmenu-item')]//button[text()='{{perPageCustomValue}}']/following-sibling::button[contains(@class, 'action-edit')]" parameterized="true"/>
         <element name="perPageDeleteCustomValue" type="button" selector="//div[contains(@class, 'selectmenu-items _active')]//div[contains(@class, 'selectmenu-item')]//button[text()='{{perPageCustomValue}}']/parent::div/preceding-sibling::div/button[contains(@class, 'action-delete')]" parameterized="true"/>
-        <element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next:not(.disabled)" timeout="30"/>
-        <element name="previousPage" type="button" selector="div.admin__data-grid-pager > button.action-previous:not(.disabled)" timeout="30"/>
+        <element name="nextPage" type="button" selector="div.admin__data-grid-pager > button.action-next" timeout="30"/>
+        <element name="previousPage" type="button" selector="div.admin__data-grid-pager > button.action-previous" timeout="30"/>
         <element name="currentPage" type="input" selector="div.admin__data-grid-pager > input[data-ui-id='current-page-input']"/>
         <element name="totalPages" type="text" selector="div.admin__data-grid-pager > label"/>
         <element name="perPageDropDownValue" type="input" selector=".selectmenu-value input" timeout="30"/>
         <element name="selectedPage" type="input" selector="#sales_order_create_search_grid_page-current" timeout="30"/>
+        <element name="nextPageActive" type="button" selector="div.admin__data-grid-pager > button.action-next:not(.disabled)" timeout="30"/>
+        <element name="prevPageActive" type="button" selector="div.admin__data-grid-pager > button.action-previous:not(.disabled)" timeout="30"/>
     </section>
 </sections>

From f3406490443d3b53bd7d6bde0585b71dc8c0d11a Mon Sep 17 00:00:00 2001
From: Raoul Rego <rrego@adobe.com>
Date: Wed, 10 Jun 2020 09:43:15 -0500
Subject: [PATCH 267/307] MC-33330: Product is removed from Shopping Cart after
 cancel PayPal checkout flow

- Remove quoteID from paypal session after completing or cancelling order
- Removed comment
---
 .../Magento/Paypal/Controller/Express/AbstractExpress/Cancel.php | 1 +
 .../Paypal/Controller/Express/AbstractExpress/PlaceOrder.php     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Cancel.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Cancel.php
index c469338d03961..375a2639ab073 100644
--- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Cancel.php
+++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/Cancel.php
@@ -31,6 +31,7 @@ public function execute()
                     ->unsLastSuccessQuoteId()
                     ->unsLastOrderId()
                     ->unsLastRealOrderId();
+                $this->_getSession()->unsQuoteId(); // clean quote from session that was set in OnAuthorization
                 $this->messageManager->addSuccessMessage(
                     __('Express Checkout and Order have been canceled.')
                 );
diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php
index 055af4162d5f3..50efc763a4456 100644
--- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php
+++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php
@@ -127,6 +127,7 @@ public function execute()
                 return;
             }
             $this->_initToken(false); // no need in token anymore
+            $this->_getSession()->unsQuoteId(); // clean quote from session that was set in OnAuthorization
             $this->_redirect('checkout/onepage/success');
             return;
         } catch (ApiProcessableException $e) {

From 420c7f5e83fed1dca92f59a67b657a03698dd8ce Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Thu, 2 Jul 2020 12:42:35 +0300
Subject: [PATCH 268/307] MC-35582: [Cloud] Backend not loading after
 authorization for 2.4.0-beta1

---
 .../view/adminhtml/templates/notification.phtml               | 4 ++--
 .../Backend/view/adminhtml/templates/widget/grid.phtml        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
index a8fdb2e04ef31..718d63dcd5b80 100644
--- a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
+++ b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
@@ -11,14 +11,14 @@
 <?php
 $isAnaliticsVisible = $block->getNotification()->isAnalyticsVisible() ? 1 : 0;
 $isReleaseVisible = $block->getNotification()->isReleaseVisible() ? 1 : 0;
-$scriptString = <<<script
+$scriptString = "
     define('analyticsPopupConfig', function () {
         return {
             analyticsVisible: {$isAnaliticsVisible},
             releaseVisible: {$isReleaseVisible},
         }
     });
-script
+";
 ?>
 
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index 667622fb2254b..9034b045f3edf 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -189,7 +189,7 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
 
         $scriptString .= '
 require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'){' . PHP_EOL .'
-        //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed' . PHP_EOL;
+        /* TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed */' . PHP_EOL;
         if ($block->getDependencyJsObject()) {
             $scriptString .= 'registry.get(\'' . $block->escapeJs($block->getDependencyJsObject()) .
                 '\', function ('. $block->escapeJs($block->getDependencyJsObject()) . ') {' . PHP_EOL;

From 8cc7055f4264a455f9d7d0e982711a11130415bd Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Thu, 2 Jul 2020 16:27:47 +0300
Subject: [PATCH 269/307] MC-35599: A Customer can not change the file of the
 Product with Customizable Option, updating the Shopping Cart

---
 .../frontend/templates/product/view/options/type/file.phtml     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
index a11f5db1f4842..f5fd1c5aa64e1 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/options/type/file.phtml
@@ -75,6 +75,6 @@
     <?= $_fileExists ?
         /* @noEscape */ $secureRenderer->renderStyleAsTag(
             'display:none',
-            'input-box-' . /* @noEscape */ $_fileName
+            '#input-box-' . /* @noEscape */ $_fileName
         ) : '' ?>
 </div>

From e892d452ec8496b26bee0b5f0cb82e86340b4579 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Mon, 6 Jul 2020 11:11:38 +0300
Subject: [PATCH 270/307] MC-35582: [Cloud] Backend not loading after
 authorization for 2.4.0-beta1

---
 .../view/adminhtml/templates/notification.phtml               | 4 ++--
 .../Backend/view/adminhtml/templates/widget/grid.phtml        | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
index 718d63dcd5b80..6d56cd4452a91 100644
--- a/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
+++ b/app/code/Magento/AdminAnalytics/view/adminhtml/templates/notification.phtml
@@ -11,14 +11,14 @@
 <?php
 $isAnaliticsVisible = $block->getNotification()->isAnalyticsVisible() ? 1 : 0;
 $isReleaseVisible = $block->getNotification()->isReleaseVisible() ? 1 : 0;
-$scriptString = "
+$scriptString = <<<script
     define('analyticsPopupConfig', function () {
         return {
             analyticsVisible: {$isAnaliticsVisible},
             releaseVisible: {$isReleaseVisible},
         }
     });
-";
+script;
 ?>
 
 <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
index 9034b045f3edf..6f9344d7e1d77 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml
@@ -188,8 +188,8 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()): 0;
         $scriptString .= 'deps.push(\'mage/adminhtml/grid\');' . PHP_EOL;
 
         $scriptString .= '
-require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'){' . PHP_EOL .'
-        /* TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed */' . PHP_EOL;
+require(deps, function('. ($block->getDependencyJsObject() ? 'registry' : '') .'){' . PHP_EOL;
+        //TODO: getJsObjectName and getRowClickCallback has unexpected behavior. Should be removed
         if ($block->getDependencyJsObject()) {
             $scriptString .= 'registry.get(\'' . $block->escapeJs($block->getDependencyJsObject()) .
                 '\', function ('. $block->escapeJs($block->getDependencyJsObject()) . ') {' . PHP_EOL;

From ab461801f9932f9166341c1c6ab50add249f4246 Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Tue, 7 Jul 2020 14:16:19 -0500
Subject: [PATCH 271/307] MC-35649: Admin Login Unusable on PHP 7.4 Due to PHP
 Notices

---
 .../Framework/View/Element/Html/Calendar.php    | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/lib/internal/Magento/Framework/View/Element/Html/Calendar.php b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
index 0c8187569cf28..c29e52387c2d7 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
@@ -107,9 +107,20 @@ protected function _toHtml()
             ]
         );
 
-        // get "today" and "week" words
-        $this->assign('today', $this->encoder->encode($localeData['fields']['day']['relative']['0']));
-        $this->assign('week', $this->encoder->encode($localeData['fields']['week']['dn']));
+        /**
+         * Get "today" and "week" words
+         *
+         * Fields value in the current position have been added to ICU Data tables,
+         * starting with ICU library version 51.1.
+         * Due to fact that we do not use these variables in templates, we do not initialize them for older versions
+         *
+         * @see https://github.com/unicode-org/icu/blob/release-50-2/icu4c/source/data/locales/en.txt
+         * @see https://github.com/unicode-org/icu/blob/release-51-2/icu4c/source/data/locales/en.txt
+         */
+        if ($localeData->get('fields')) {
+            $this->assign('today', $this->encoder->encode($localeData['fields']['day']['relative']['0']));
+            $this->assign('week', $this->encoder->encode($localeData['fields']['week']['dn']));
+        }
 
         // get "am" & "pm" words
         $this->assign('am', $this->encoder->encode($localeData['calendar']['gregorian']['AmPmMarkers']['0']));

From 3d0cbfadab049d738148c4a60316a4c9b3ae81ce Mon Sep 17 00:00:00 2001
From: Max Lesechko <mlesechko@magento.com>
Date: Tue, 7 Jul 2020 16:40:54 -0500
Subject: [PATCH 272/307] MC-35649: Admin Login Unusable on PHP 7.4 Due to PHP
 Notices

---
 .../Framework/View/Element/Html/Calendar.php  | 36 +++++++++++--------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/lib/internal/Magento/Framework/View/Element/Html/Calendar.php b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
index c29e52387c2d7..0e17626160bd6 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
@@ -107,20 +107,7 @@ protected function _toHtml()
             ]
         );
 
-        /**
-         * Get "today" and "week" words
-         *
-         * Fields value in the current position have been added to ICU Data tables,
-         * starting with ICU library version 51.1.
-         * Due to fact that we do not use these variables in templates, we do not initialize them for older versions
-         *
-         * @see https://github.com/unicode-org/icu/blob/release-50-2/icu4c/source/data/locales/en.txt
-         * @see https://github.com/unicode-org/icu/blob/release-51-2/icu4c/source/data/locales/en.txt
-         */
-        if ($localeData->get('fields')) {
-            $this->assign('today', $this->encoder->encode($localeData['fields']['day']['relative']['0']));
-            $this->assign('week', $this->encoder->encode($localeData['fields']['week']['dn']));
-        }
+        $this->assignFieldsValues($localeData);
 
         // get "am" & "pm" words
         $this->assign('am', $this->encoder->encode($localeData['calendar']['gregorian']['AmPmMarkers']['0']));
@@ -200,4 +187,25 @@ public function getYearRange()
         return (new \DateTime())->modify('- 100 years')->format('Y')
             . ':' . (new \DateTime())->modify('+ 100 years')->format('Y');
     }
+
+    /**
+     * Assign "fields" values from the ICU data
+     *
+     * @param \ResourceBundle $localeData
+     */
+    private function assignFieldsValues(\ResourceBundle $localeData): void
+    {
+        /**
+         * Fields value in the current position has been added to ICU Data tables
+         * starting with ICU library version 51.1.
+         * Due to fact that we do not use these variables in templates, we do not initialize them for older versions
+         *
+         * @see https://github.com/unicode-org/icu/blob/release-50-2/icu4c/source/data/locales/en.txt
+         * @see https://github.com/unicode-org/icu/blob/release-51-2/icu4c/source/data/locales/en.txt
+         */
+        if ($localeData->get('fields')) {
+            $this->assign('today', $this->encoder->encode($localeData['fields']['day']['relative']['0']));
+            $this->assign('week', $this->encoder->encode($localeData['fields']['week']['dn']));
+        }
+    }
 }

From 588b87bb139125d2b20bcee81c018a80cdfa42eb Mon Sep 17 00:00:00 2001
From: DianaRusin <rusind95@gmail.com>
Date: Thu, 9 Jul 2020 09:44:42 +0300
Subject: [PATCH 273/307] MC-35754: [MFTF] skip
 StorefrontPaypalSmartButtonInCheckoutPageTest and
 StorefrontPaypalSmartButtonWithFranceMerchantCountryTest

---
 .../Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml     | 3 +++
 ...torefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
index d27ac4c4a92f5..2bf940bc42448 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
@@ -17,6 +17,9 @@
             <severity value="CRITICAL"/>
             <testCaseId value="MC-13690"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-35754"/>
+            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
index 3fd5f44d5a4b6..38ebbdb699945 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
@@ -17,6 +17,9 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
+            <skip>
+                <issueId value="MC-35754"/>
+            </skip>
         </annotations>
         <before>
             <!--Set price scope global-->

From 3fdf24b210798270c4a90056dbd35604bc2c97cb Mon Sep 17 00:00:00 2001
From: DianaRusin <rusind95@gmail.com>
Date: Thu, 9 Jul 2020 10:17:27 +0300
Subject: [PATCH 274/307] MC-35754: [MFTF] skip
 StorefrontPaypalSmartButtonInCheckoutPageTest and
 StorefrontPaypalSmartButtonWithFranceMerchantCountryTest

---
 .../Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml | 2 +-
 ...StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
index 2bf940bc42448..d2c3d2ed4f01b 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
@@ -18,7 +18,7 @@
             <testCaseId value="MC-13690"/>
             <group value="paypalExpress"/>
             <skip>
-                <issueId value="MC-35754"/>
+                <issueId value="MC-35722"/>
             </skip>
         </annotations>
         <before>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
index 38ebbdb699945..5a765e469bc9d 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
@@ -18,7 +18,7 @@
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
             <skip>
-                <issueId value="MC-35754"/>
+                <issueId value="MC-35722"/>
             </skip>
         </annotations>
         <before>

From 47ad3aece54117699b2fd815ada42cf35bcfa980 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Thu, 9 Jul 2020 15:48:30 +0300
Subject: [PATCH 275/307] MC-35618: Unexpected results of editing a Grouped
 Product in the Wish List by a Customer

---
 .../Model/Wishlist/Product/Item.php           | 23 +++++++++-
 .../Unit/Model/Wishlist/Product/ItemTest.php  | 40 ++++++++++++++---
 .../Magento/Wishlist/Controller/Index/Add.php |  1 +
 .../Controller/Index/UpdateItemOptions.php    |  1 +
 .../Index/UpdateItemOptionsTest.php           | 43 +++++++++++++++++++
 .../_files/wishlist_with_grouped_product.php  | 41 ++++++++++++++++++
 ...wishlist_with_grouped_product_rollback.php | 13 ++++++
 7 files changed, 153 insertions(+), 9 deletions(-)
 create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php
 create mode 100644 dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product_rollback.php

diff --git a/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php b/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
index d84df510195f3..b0048d66dd93e 100644
--- a/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
+++ b/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
@@ -7,6 +7,7 @@
 
 namespace Magento\GroupedProduct\Model\Wishlist\Product;
 
+use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface;
 use Magento\Wishlist\Model\Item as WishlistItem;
 use Magento\GroupedProduct\Model\Product\Type\Grouped as TypeGrouped;
 use Magento\Catalog\Model\Product;
@@ -36,7 +37,7 @@ public function beforeRepresentProduct(
 
             $diff = array_diff_key($itemOptions, $productOptions);
 
-            if (!$diff) {
+            if (!$diff && $this->isAddAction($productOptions['info_buyRequest'])) {
                 $buyRequest = $subject->getBuyRequest();
                 $superGroupInfo = $buyRequest->getData('super_group');
 
@@ -78,10 +79,14 @@ public function beforeCompareOptions(
         array $options2
     ): array {
         $diff = array_diff_key($options1, $options2);
+        $productOptions = isset($options1['info_buyRequest']['product']) ? $options1 : $options2;
 
         if (!$diff) {
             foreach (array_keys($options1) as $key) {
-                if (preg_match('/associated_product_\d+/', $key)) {
+                if (
+                    preg_match('/associated_product_\d+/', $key)
+                    && $this->isAddAction($productOptions['info_buyRequest'])
+                ) {
                     unset($options1[$key]);
                     unset($options2[$key]);
                 }
@@ -90,4 +95,18 @@ public function beforeCompareOptions(
 
         return [$options1, $options2];
     }
+
+    /**
+     * Check that current request belongs to add to wishlist action.
+     *
+     * @param OptionInterface $buyRequest
+     *
+     * @return bool
+     */
+    private function isAddAction(OptionInterface $buyRequest): bool
+    {
+        $requestValue = json_decode($buyRequest->getValue(), true);
+
+        return $requestValue['action'] === 'add';
+    }
 }
diff --git a/app/code/Magento/GroupedProduct/Test/Unit/Model/Wishlist/Product/ItemTest.php b/app/code/Magento/GroupedProduct/Test/Unit/Model/Wishlist/Product/ItemTest.php
index 7dc25c3de1245..6006ed639c92e 100644
--- a/app/code/Magento/GroupedProduct/Test/Unit/Model/Wishlist/Product/ItemTest.php
+++ b/app/code/Magento/GroupedProduct/Test/Unit/Model/Wishlist/Product/ItemTest.php
@@ -115,13 +115,29 @@ public function testBeforeRepresentProduct()
      */
     public function testBeforeCompareOptionsSameKeys()
     {
-        $options1 = ['associated_product_34' => 3];
-        $options2 = ['associated_product_34' => 2];
+        $infoBuyRequestMock = $this->createPartialMock(
+            \Magento\Catalog\Model\Product\Configuration\Item\Option::class,
+            [
+                'getValue',
+            ]
+        );
+
+        $infoBuyRequestMock->expects($this->atLeastOnce())
+            ->method('getValue')
+            ->willReturn('{"product":"3","action":"add"}');
+        $options1 = [
+            'associated_product_34' => 3,
+            'info_buyRequest' => $infoBuyRequestMock,
+        ];
+        $options2 = [
+            'associated_product_34' => 3,
+            'info_buyRequest' => $infoBuyRequestMock,
+        ];
 
         $res = $this->model->beforeCompareOptions($this->subjectMock, $options1, $options2);
 
-        $this->assertEquals([], $res[0]);
-        $this->assertEquals([], $res[1]);
+        $this->assertEquals(['info_buyRequest' => $infoBuyRequestMock], $res[0]);
+        $this->assertEquals(['info_buyRequest' => $infoBuyRequestMock], $res[1]);
     }
 
     /**
@@ -175,16 +191,26 @@ private function getProductAssocOption($initVal, $prodId)
     {
         $items = [];
 
-        $optionMock = $this->createPartialMock(
+        $associatedProductMock = $this->createPartialMock(
+            \Magento\Catalog\Model\Product\Configuration\Item\Option::class,
+            [
+                'getValue',
+            ]
+        );
+        $infoBuyRequestMock = $this->createPartialMock(
             \Magento\Catalog\Model\Product\Configuration\Item\Option::class,
             [
                 'getValue',
             ]
         );
 
-        $optionMock->expects($this->once())->method('getValue')->willReturn($initVal);
+        $associatedProductMock->expects($this->once())->method('getValue')->willReturn($initVal);
+        $infoBuyRequestMock->expects($this->once())
+            ->method('getValue')
+            ->willReturn('{"product":"'. $prodId . '","action":"add"}');
 
-        $items['associated_product_' . $prodId] = $optionMock;
+        $items['associated_product_' . $prodId] = $associatedProductMock;
+        $items['info_buyRequest'] = $infoBuyRequestMock;
 
         return $items;
     }
diff --git a/app/code/Magento/Wishlist/Controller/Index/Add.php b/app/code/Magento/Wishlist/Controller/Index/Add.php
index 3ed152cb84125..903719b245058 100644
--- a/app/code/Magento/Wishlist/Controller/Index/Add.php
+++ b/app/code/Magento/Wishlist/Controller/Index/Add.php
@@ -112,6 +112,7 @@ public function execute()
 
         try {
             $buyRequest = new \Magento\Framework\DataObject($requestParams);
+            $buyRequest->setData('action', 'add');
 
             $result = $wishlist->addNewItem($product, $buyRequest);
             if (is_string($result)) {
diff --git a/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php b/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php
index 6fae77fd604e5..1bc6182232b44 100644
--- a/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php
+++ b/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php
@@ -104,6 +104,7 @@ public function execute()
             }
 
             $buyRequest = new \Magento\Framework\DataObject($this->getRequest()->getParams());
+            $buyRequest->setData('action', 'updateItem');
 
             $wishlist->updateItem($id, $buyRequest)->save();
 
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/Index/UpdateItemOptionsTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/Index/UpdateItemOptionsTest.php
index 4301121704078..7873829207c1f 100644
--- a/dev/tests/integration/testsuite/Magento/Wishlist/Controller/Index/UpdateItemOptionsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/Controller/Index/UpdateItemOptionsTest.php
@@ -153,6 +153,33 @@ public function testUpdateItemNotSpecifyAsWishListItem(): void
         $this->assertRedirect($this->stringContains('wishlist/index/index/wishlist_id/'));
     }
 
+    /**
+     * @magentoDataFixture Magento/Wishlist/_files/wishlist_with_grouped_product.php
+     * @magentoDbIsolation disabled
+     *
+     * @return void
+     */
+    public function testUpdateItemOptionsForGroupedProduct(): void
+    {
+        $this->customerSession->setCustomerId(1);
+        $item = $this->getWishlistByCustomerId->getItemBySku(1, 'grouped');
+        $this->assertNotNull($item);
+        $params = [
+            'id' => $item->getId(),
+            'product' => $item->getProductId(),
+            'super_group' => $this->performGroupedOption(),
+            'qty' => 1,
+        ];
+        $this->performUpdateWishListItemRequest($params);
+        $message = sprintf("%s has been updated in your Wish List.", $item->getProduct()->getName());
+        $this->assertSessionMessages($this->equalTo([(string)__($message)]), MessageInterface::TYPE_SUCCESS);
+        $this->assertRedirect($this->stringContains('wishlist/index/index/wishlist_id/' . $item->getWishlistId()));
+        $this->assertUpdatedItem(
+            $this->getWishlistByCustomerId->getItemBySku(1, 'grouped'),
+            $params
+        );
+    }
+
     /**
      * Perform request update wish list item.
      *
@@ -195,4 +222,20 @@ private function performConfigurableOption(ProductInterface $product): array
 
         return [$attributeId => $option['value_index']];
     }
+
+    /**
+     * Perform group option to select.
+     *
+     * @return array
+     */
+    private function performGroupedOption(): array
+    {
+        $simple1 = $this->productRepository->get('simple_11');
+        $simple2 = $this->productRepository->get('simple_22');
+
+        return [
+            $simple1->getId() => '3',
+            $simple2->getId() => '3',
+        ];
+    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php
new file mode 100644
index 0000000000000..b46d087d7fb71
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Customer\Model\CustomerRegistry;
+use Magento\Framework\DataObject;
+use Magento\TestFramework\Helper\Bootstrap;
+use Magento\Wishlist\Model\WishlistFactory;
+use Magento\TestFramework\Workaround\Override\Fixture\Resolver;
+
+Resolver::getInstance()->requireDataFixture('Magento/Customer/_files/customer.php');
+Resolver::getInstance()->requireDataFixture(
+    'Magento/GroupedProduct/_files/product_grouped_with_simple.php'
+);
+
+$objectManager = Bootstrap::getObjectManager();
+/** @var CustomerRegistry $customerRegistry */
+$customerRegistry = $objectManager->create(CustomerRegistry::class);
+$customer = $customerRegistry->retrieve(1);
+$wishlistFactory = $objectManager->get(WishlistFactory::class);
+$wishlist = $wishlistFactory->create();
+$wishlist->loadByCustomerId($customer->getId(), true);
+/** @var ProductRepositoryInterface $productRepository */
+$productRepository = $objectManager->create(ProductRepositoryInterface::class);
+$product = $productRepository->get('grouped');
+$simple1 = $productRepository->get('simple_11');
+$simple2 = $productRepository->get('simple_22');
+$buyRequest = new DataObject([
+    'product' => $product->getId(),
+    'super_group' =>
+        [
+            $simple1->getId() => '1',
+            $simple2->getId() => '1',
+        ],
+    'action' => 'add',
+]);
+$wishlist->addNewItem($product, $buyRequest);
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product_rollback.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product_rollback.php
new file mode 100644
index 0000000000000..dc8c56d8eb73c
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product_rollback.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+declare(strict_types=1);
+
+use Magento\TestFramework\Workaround\Override\Fixture\Resolver;
+
+Resolver::getInstance()->requireDataFixture('Magento/Customer/_files/customer_rollback.php');
+Resolver::getInstance()->requireDataFixture(
+    'Magento/GroupedProduct/_files/product_grouped_with_simple_rollback.php'
+);

From 6d5fbd78604fe311df6fc2f8603cc8d7d96ed32f Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Thu, 9 Jul 2020 17:47:07 +0300
Subject: [PATCH 276/307] MC-35600: The customer creation page not opens
 without default group selected

---
 .../UpdateDefaultCustomerGroupInConfig.php    | 79 +++++++++++++++++++
 .../Magento/Customer/etc/adminhtml/system.xml |  5 ++
 2 files changed, 84 insertions(+)
 create mode 100644 app/code/Magento/Customer/Setup/Patch/Data/UpdateDefaultCustomerGroupInConfig.php

diff --git a/app/code/Magento/Customer/Setup/Patch/Data/UpdateDefaultCustomerGroupInConfig.php b/app/code/Magento/Customer/Setup/Patch/Data/UpdateDefaultCustomerGroupInConfig.php
new file mode 100644
index 0000000000000..c8159adc2ccff
--- /dev/null
+++ b/app/code/Magento/Customer/Setup/Patch/Data/UpdateDefaultCustomerGroupInConfig.php
@@ -0,0 +1,79 @@
+<?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\Customer\Model\GroupManagement;
+use Magento\Customer\Model\Vat;
+use Magento\Framework\Setup\ModuleDataSetupInterface;
+use Magento\Framework\Setup\Patch\DataPatchInterface;
+
+/**
+ * Update default customer group id in customer configuration if it's value is NULL
+ */
+class UpdateDefaultCustomerGroupInConfig implements DataPatchInterface
+{
+    /**
+     * @var ModuleDataSetupInterface
+     */
+    private $moduleDataSetup;
+
+    /**
+     * @var GroupManagement
+     */
+    private $groupManagement;
+
+    /**
+     * @param ModuleDataSetupInterface $moduleDataSetup
+     * @param GroupManagement $groupManagement
+     */
+    public function __construct(
+        ModuleDataSetupInterface $moduleDataSetup,
+        GroupManagement $groupManagement
+    ) {
+        $this->moduleDataSetup = $moduleDataSetup;
+        $this->groupManagement = $groupManagement;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function apply()
+    {
+        $customerGroups = $this->groupManagement->getLoggedInGroups();
+        $commonGroup = array_shift($customerGroups);
+
+        $this->moduleDataSetup->getConnection()->update(
+            $this->moduleDataSetup->getTable('core_config_data'),
+            ['value' => $commonGroup->getId()],
+            [
+                'value is ?' => new \Zend_Db_Expr('NULL'),
+                'path = ?' => GroupManagement::XML_PATH_DEFAULT_ID,
+            ]
+        );
+
+        return $this;
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getAliases()
+    {
+        return [];
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public static function getDependencies()
+    {
+        return [
+            DefaultCustomerGroupsAndAttributes::class,
+        ];
+    }
+}
diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml
index fca625d847a1d..09a6e86eef0d2 100644
--- a/app/code/Magento/Customer/etc/adminhtml/system.xml
+++ b/app/code/Magento/Customer/etc/adminhtml/system.xml
@@ -40,6 +40,7 @@
                 <field id="default_group" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                     <label>Default Group</label>
                     <source_model>Magento\Customer\Model\Config\Source\Group</source_model>
+                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_domestic_group" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Group for Valid VAT ID - Domestic</label>
@@ -47,6 +48,7 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
+                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_intra_union_group" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Group for Valid VAT ID - Intra-Union</label>
@@ -54,6 +56,7 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
+                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_invalid_group" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Group for Invalid VAT ID</label>
@@ -61,6 +64,7 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
+                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_error_group" translate="label" type="select" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Validation Error Group</label>
@@ -68,6 +72,7 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
+                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_on_each_transaction" translate="label" type="select" sortOrder="56" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Validate on Each Transaction</label>

From 6294aaf48176f7b93b922afe72ea15631d766c5f Mon Sep 17 00:00:00 2001
From: Ji Lu <jilu1@adobe.com>
Date: Thu, 9 Jul 2020 18:13:24 -0500
Subject: [PATCH 277/307] MQE-2220: updated mftf version to ^3.0

---
 .../ActionGroup/deleteBackupActionGroup.xml   |  12 -
 .../UpdateIndexerOnSaveActionGroup.xml        |  11 -
 composer.json                                 |   2 +-
 composer.lock                                 | 376 +-----------------
 4 files changed, 10 insertions(+), 391 deletions(-)
 delete mode 100644 app/code/Magento/Backup/Test/Mftf/ActionGroup/deleteBackupActionGroup.xml
 delete mode 100644 app/code/Magento/Indexer/Test/Mftf/ActionGroup/IndexerActionGroup/UpdateIndexerOnSaveActionGroup.xml

diff --git a/app/code/Magento/Backup/Test/Mftf/ActionGroup/deleteBackupActionGroup.xml b/app/code/Magento/Backup/Test/Mftf/ActionGroup/deleteBackupActionGroup.xml
deleted file mode 100644
index b879a2aa9647a..0000000000000
--- a/app/code/Magento/Backup/Test/Mftf/ActionGroup/deleteBackupActionGroup.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?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="deleteBackup" extends="AdminBackupDeleteActionGroup" deprecated="Use DeleteBackupActionGroup"/>
-</actionGroups>
diff --git a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/IndexerActionGroup/UpdateIndexerOnSaveActionGroup.xml b/app/code/Magento/Indexer/Test/Mftf/ActionGroup/IndexerActionGroup/UpdateIndexerOnSaveActionGroup.xml
deleted file mode 100644
index efa6291d5de63..0000000000000
--- a/app/code/Magento/Indexer/Test/Mftf/ActionGroup/IndexerActionGroup/UpdateIndexerOnSaveActionGroup.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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="updateIndexerOnSave" extends="AdminIndexerSetUpdateOnSaveActionGroup" deprecated="Use AdminIndexerSetUpdateOnSaveActionGroup"/>
-</actionGroups>
diff --git a/composer.json b/composer.json
index 8bf980ff19212..816fad7068837 100644
--- a/composer.json
+++ b/composer.json
@@ -88,7 +88,7 @@
         "friendsofphp/php-cs-fixer": "~2.16.0",
         "lusitanian/oauth": "~0.8.10",
         "magento/magento-coding-standard": "*",
-        "magento/magento2-functional-testing-framework": "3.0.0-RC5",
+        "magento/magento2-functional-testing-framework": "^3.0",
         "pdepend/pdepend": "~2.7.1",
         "phpcompatibility/php-compatibility": "^9.3",
         "phpmd/phpmd": "^2.8.0",
diff --git a/composer.lock b/composer.lock
index 2b35275620528..04ecd43514636 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "07bb75cbd8269245d02b01a19b448f83",
+    "content-hash": "0ebe9109f59c372f9962e2a51c35c829",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -206,16 +206,6 @@
                 "ssl",
                 "tls"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-08T08:27:21+00:00"
         },
         {
@@ -297,20 +287,6 @@
                 "dependency",
                 "package"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/composer",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-06-03T08:03:56+00:00"
         },
         {
@@ -476,20 +452,6 @@
                 "Xdebug",
                 "performance"
             ],
-            "funding": [
-                {
-                    "url": "https://packagist.com",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/composer",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-06-04T11:16:35+00:00"
         },
         {
@@ -3946,20 +3908,6 @@
                 "x.509",
                 "x509"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/terrafrost",
-                    "type": "github"
-                },
-                {
-                    "url": "https://www.patreon.com/phpseclib",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-04-04T23:17:33+00:00"
         },
         {
@@ -4444,20 +4392,6 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-30T20:06:45+00:00"
         },
         {
@@ -4511,20 +4445,6 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -4595,20 +4515,6 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-20T08:37:50+00:00"
         },
         {
@@ -4717,20 +4623,6 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-30T20:35:19+00:00"
         },
         {
@@ -4780,20 +4672,6 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -5148,20 +5026,6 @@
                 "portable",
                 "shim"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-12T16:47:27+00:00"
         },
         {
@@ -5211,20 +5075,6 @@
             ],
             "description": "Symfony Process Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-30T20:06:45+00:00"
         },
         {
@@ -5283,20 +5133,6 @@
                 "interoperability",
                 "standards"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -6094,12 +5930,6 @@
                 "functional testing",
                 "unit testing"
             ],
-            "funding": [
-                {
-                    "url": "https://opencollective.com/codeception",
-                    "type": "open_collective"
-                }
-            ],
             "time": "2020-06-07T16:31:51+00:00"
         },
         {
@@ -6672,20 +6502,6 @@
                 "redis",
                 "xcache"
             ],
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-27T16:24:54+00:00"
         },
         {
@@ -6809,20 +6625,6 @@
                 "constructor",
                 "instantiate"
             ],
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-29T17:27:14+00:00"
         },
         {
@@ -6885,20 +6687,6 @@
                 "parser",
                 "php"
             ],
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-25T17:44:05+00:00"
         },
         {
@@ -7358,16 +7146,16 @@
         },
         {
             "name": "magento/magento2-functional-testing-framework",
-            "version": "3.0.0-RC5",
+            "version": "3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/magento/magento2-functional-testing-framework.git",
-                "reference": "e5126f4eb476e227e3b668b622159c917f123175"
+                "reference": "8d98efa7434a30ab9e82ef128c430ef8e3a50699"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/e5126f4eb476e227e3b668b622159c917f123175",
-                "reference": "e5126f4eb476e227e3b668b622159c917f123175",
+                "url": "https://api.github.com/repos/magento/magento2-functional-testing-framework/zipball/8d98efa7434a30ab9e82ef128c430ef8e3a50699",
+                "reference": "8d98efa7434a30ab9e82ef128c430ef8e3a50699",
                 "shasum": ""
             },
             "require": {
@@ -7392,6 +7180,7 @@
                 "spomky-labs/otphp": "^10.0",
                 "symfony/console": "^4.4",
                 "symfony/finder": "^5.0",
+                "symfony/http-foundation": "^5.0",
                 "symfony/mime": "^5.0",
                 "symfony/process": "^4.4",
                 "vlucas/phpdotenv": "^2.4",
@@ -7443,7 +7232,7 @@
                 "magento",
                 "testing"
             ],
-            "time": "2020-06-15T19:51:46+00:00"
+            "time": "2020-07-09T21:26:19+00:00"
         },
         {
             "name": "mikey179/vfsstream",
@@ -8346,16 +8135,6 @@
                 "php",
                 "type"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/GrahamCampbell",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-06-07T10:40:07+00:00"
         },
         {
@@ -8525,12 +8304,6 @@
                 "testing",
                 "xunit"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-05-23T08:02:54+00:00"
         },
         {
@@ -9678,12 +9451,6 @@
             ],
             "description": "Collection of value objects that represent the types of the PHP type system",
             "homepage": "https://github.com/sebastianbergmann/type",
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
             "time": "2020-06-01T12:21:09+00:00"
         },
         {
@@ -9915,20 +9682,6 @@
             ],
             "description": "Symfony Config Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-23T13:08:13+00:00"
         },
         {
@@ -10004,20 +9757,6 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-30T20:35:19+00:00"
         },
         {
@@ -10064,20 +9803,6 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-27T08:34:37+00:00"
         },
         {
@@ -10139,20 +9864,6 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-24T12:18:07+00:00"
         },
         {
@@ -10216,20 +9927,6 @@
                 "mime",
                 "mime-type"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-25T12:33:44+00:00"
         },
         {
@@ -10286,20 +9983,6 @@
                 "configuration",
                 "options"
             ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-23T13:08:13+00:00"
         },
         {
@@ -10409,20 +10092,6 @@
             ],
             "description": "Symfony Stopwatch Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -10486,20 +10155,6 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
@@ -10775,16 +10430,6 @@
                 "env",
                 "environment"
             ],
-            "funding": [
-                {
-                    "url": "https://github.com/GrahamCampbell",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
-                    "type": "tidelift"
-                }
-            ],
             "time": "2020-06-02T14:06:52+00:00"
         },
         {
@@ -10875,9 +10520,7 @@
     ],
     "aliases": [],
     "minimum-stability": "stable",
-    "stability-flags": {
-        "magento/magento2-functional-testing-framework": 5
-    },
+    "stability-flags": [],
     "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {
@@ -10899,6 +10542,5 @@
         "ext-zip": "*",
         "lib-libxml": "*"
     },
-    "platform-dev": [],
-    "plugin-api-version": "1.1.0"
+    "platform-dev": []
 }

From d7156cc4e473bd59103e6acee26c46df155a29e4 Mon Sep 17 00:00:00 2001
From: Myroslav Dobra <dmaraptor@gmail.com>
Date: Fri, 10 Jul 2020 10:54:23 +0300
Subject: [PATCH 278/307] MC-35600: The customer creation page not opens
 without default group selected

---
 app/code/Magento/Customer/etc/adminhtml/system.xml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml
index 09a6e86eef0d2..569f9d09c2087 100644
--- a/app/code/Magento/Customer/etc/adminhtml/system.xml
+++ b/app/code/Magento/Customer/etc/adminhtml/system.xml
@@ -48,7 +48,6 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
-                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_intra_union_group" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Group for Valid VAT ID - Intra-Union</label>
@@ -56,7 +55,6 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
-                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_invalid_group" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Group for Invalid VAT ID</label>
@@ -64,7 +62,6 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
-                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_error_group" translate="label" type="select" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Validation Error Group</label>
@@ -72,7 +69,6 @@
                     <depends>
                         <field id="auto_group_assign">1</field>
                     </depends>
-                    <validate>required-entry</validate>
                 </field>
                 <field id="viv_on_each_transaction" translate="label" type="select" sortOrder="56" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Validate on Each Transaction</label>

From 1586e8d22878b82a1ae990f62a5565cff8225e82 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Fri, 10 Jul 2020 13:58:34 +0300
Subject: [PATCH 279/307] MC-35618: Unexpected results of editing a Grouped
 Product in the Wish List by a Customer

---
 .../Magento/GroupedProduct/Model/Wishlist/Product/Item.php  | 3 +--
 app/code/Magento/Wishlist/Model/Wishlist.php                | 6 +++---
 .../Test/Unit/Controller/Index/UpdateItemOptionsTest.php    | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php b/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
index b0048d66dd93e..48e1a5053ac69 100644
--- a/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
+++ b/app/code/Magento/GroupedProduct/Model/Wishlist/Product/Item.php
@@ -83,8 +83,7 @@ public function beforeCompareOptions(
 
         if (!$diff) {
             foreach (array_keys($options1) as $key) {
-                if (
-                    preg_match('/associated_product_\d+/', $key)
+                if (preg_match('/associated_product_\d+/', $key)
                     && $this->isAddAction($productOptions['info_buyRequest'])
                 ) {
                     unset($options1[$key]);
diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php
index cb1a7d956570b..66d19d6dcf617 100644
--- a/app/code/Magento/Wishlist/Model/Wishlist.php
+++ b/app/code/Magento/Wishlist/Model/Wishlist.php
@@ -756,9 +756,9 @@ public function updateItem($itemId, $buyRequest, $params = null)
             $isForceSetQuantity = true;
             foreach ($items as $_item) {
                 /* @var $_item Item */
-                if ($_item->getProductId() == $product->getId() && $_item->representProduct(
-                    $product
-                ) && $_item->getId() != $item->getId()
+                if ($_item->getProductId() == $product->getId()
+                    && $_item->getId() != $item->getId()
+                    && $_item->representProduct($product)
                 ) {
                     // We do not add new wishlist item, but updating the existing one
                     $isForceSetQuantity = false;
diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php
index 623ba8f266fa1..69e4e48262842 100644
--- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php
+++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php
@@ -380,7 +380,7 @@ public function testExecuteAddSuccessException()
         $wishlist
             ->expects($this->once())
             ->method('updateItem')
-            ->with(3, new DataObject([]))
+            ->with(3, new DataObject(['action' => 'updateItem']))
             ->willReturnSelf();
         $wishlist
             ->expects($this->once())
@@ -509,7 +509,7 @@ public function testExecuteAddSuccessCriticalException()
         $wishlist
             ->expects($this->once())
             ->method('updateItem')
-            ->with(3, new DataObject([]))
+            ->with(3, new DataObject(['action' => 'updateItem']))
             ->willReturnSelf();
         $wishlist
             ->expects($this->once())

From 1831d4b80363ca2d2c6cee9ce2f385203df32145 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Fri, 10 Jul 2020 18:00:51 +0300
Subject: [PATCH 280/307] MC-35765: [2.4.0-beta1] Full Tax Details causes the
 Order Page to fail

---
 .../Sales/view/adminhtml/templates/order/totals/tax.phtml    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
index 4f1b18f3fcda8..484e11389403a 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
@@ -86,8 +86,9 @@ $taxHelper = $block->getData('taxHelper');
             $amount     = $info['tax_amount'];
             $baseAmount = $info['base_tax_amount'];
             $isFirst    = 1;
+            $infoTitle = preg_replace('/[^A-Za-z0-9\-]/', '', $info['title']);
             ?>
-            <tr id="info-<?= /* @noEscape */ $info->getCode() ?>"
+            <tr id="info-<?= /* @noEscape */ $infoTitle ?>"
                 class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
                 <?php if ($info['percent'] !== null): ?>
                     <td class="admin__total-mark">
@@ -98,7 +99,7 @@ $taxHelper = $block->getData('taxHelper');
                 <?php endif; ?>
                     <td><?= /* @noEscape */ $block->displayAmount($amount, $baseAmount) ?></td>
             </tr>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#info-' . $info->getCode()) ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#info-' . $infoTitle) ?>
             <?php
             $isFirst = 0;
             $isTop = 0;

From 64acc51a3e48cb436f810b84584cdc72f823081b Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Fri, 10 Jul 2020 18:23:56 +0300
Subject: [PATCH 281/307] MC-35765: [2.4.0-beta1] Full Tax Details causes the
 Order Page to fail

---
 .../Sales/view/adminhtml/templates/order/totals/tax.phtml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
index 484e11389403a..b13e531764679 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
@@ -86,7 +86,7 @@ $taxHelper = $block->getData('taxHelper');
             $amount     = $info['tax_amount'];
             $baseAmount = $info['base_tax_amount'];
             $isFirst    = 1;
-            $infoTitle = preg_replace('/[^A-Za-z0-9\-]/', '', $info['title']);
+            $infoTitle = sha1($info['title']);
             ?>
             <tr id="info-<?= /* @noEscape */ $infoTitle ?>"
                 class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">

From 4e4eb6b210cd4fa42d1218e1c8ca4ed4ef2e4697 Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Fri, 10 Jul 2020 20:00:12 +0300
Subject: [PATCH 282/307] MC-35765: [2.4.0-beta1] Full Tax Details causes the
 Order Page to fail

---
 .../Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php    | 8 +++++++-
 .../Sales/view/adminhtml/templates/order/totals/tax.phtml | 4 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
index f145ef3625054..e923b006a0ac6 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Totals/Tax.php
@@ -5,6 +5,9 @@
  */
 namespace Magento\Sales\Block\Adminhtml\Order\Totals;
 
+use Magento\Framework\App\ObjectManager;
+use Magento\Framework\Math\Random;
+
 /**
  * Adminhtml order tax totals block
  *
@@ -50,6 +53,7 @@ class Tax extends \Magento\Tax\Block\Sales\Order\Tax
      * @param \Magento\Tax\Model\Sales\Order\TaxFactory $taxOrderFactory
      * @param \Magento\Sales\Helper\Admin $salesAdminHelper
      * @param array $data
+     * @param Random $randomHelper
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
@@ -58,13 +62,15 @@ public function __construct(
         \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Tax\Model\Sales\Order\TaxFactory $taxOrderFactory,
         \Magento\Sales\Helper\Admin $salesAdminHelper,
-        array $data = []
+        array $data = [],
+        ?Random $randomHelper = null
     ) {
         $this->_taxHelper = $taxHelper;
         $this->_taxCalculation = $taxCalculation;
         $this->_taxOrderFactory = $taxOrderFactory;
         $this->_salesAdminHelper = $salesAdminHelper;
         $data['taxHelper'] = $this->_taxHelper;
+        $data['randomHelper'] = $randomHelper ?? ObjectManager::getInstance()->get(Random::class);
         parent::__construct($context, $taxConfig, $data);
     }
 
diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
index b13e531764679..7475f6d7bbe25 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
@@ -16,6 +16,8 @@ $_fullInfo  = $block->getFullTaxInfo();
 
 /** @var \Magento\Tax\Helper\Data $taxHelper */
 $taxHelper = $block->getData('taxHelper');
+/** @var \Magento\Framework\Math\Random $randomHelper */
+$randomHelper = $block->getData('randomHelper');
 ?>
 
 <?php if ($block->displayFullSummary() && $_fullInfo): ?>
@@ -86,7 +88,7 @@ $taxHelper = $block->getData('taxHelper');
             $amount     = $info['tax_amount'];
             $baseAmount = $info['base_tax_amount'];
             $isFirst    = 1;
-            $infoTitle = sha1($info['title']);
+            $infoTitle = $randomHelper->getRandomString(20);
             ?>
             <tr id="info-<?= /* @noEscape */ $infoTitle ?>"
                 class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">

From 94afe443259892b5203178fe5930de7cf816464f Mon Sep 17 00:00:00 2001
From: Viktor Sevch <viktor.sevch@transoftgroup.com>
Date: Fri, 10 Jul 2020 20:02:16 +0300
Subject: [PATCH 283/307] MC-35765: [2.4.0-beta1] Full Tax Details causes the
 Order Page to fail

---
 .../Sales/view/adminhtml/templates/order/totals/tax.phtml   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
index 7475f6d7bbe25..0ae7f71145dcc 100644
--- a/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/templates/order/totals/tax.phtml
@@ -88,9 +88,9 @@ $randomHelper = $block->getData('randomHelper');
             $amount     = $info['tax_amount'];
             $baseAmount = $info['base_tax_amount'];
             $isFirst    = 1;
-            $infoTitle = $randomHelper->getRandomString(20);
+            $infoId = $randomHelper->getRandomString(20);
             ?>
-            <tr id="info-<?= /* @noEscape */ $infoTitle ?>"
+            <tr id="info-<?= /* @noEscape */ $infoId ?>"
                 class="summary-details<?= ($isTop ? ' summary-details-first' : '') ?>">
                 <?php if ($info['percent'] !== null): ?>
                     <td class="admin__total-mark">
@@ -101,7 +101,7 @@ $randomHelper = $block->getData('randomHelper');
                 <?php endif; ?>
                     <td><?= /* @noEscape */ $block->displayAmount($amount, $baseAmount) ?></td>
             </tr>
-            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#info-' . $infoTitle) ?>
+            <?= /* @noEscape */ $secureRenderer->renderStyleAsTag("display:none;", 'tr#info-' . $infoId) ?>
             <?php
             $isFirst = 0;
             $isTop = 0;

From 7eb4cea228a8cc31929895ba9f246501ff86ab65 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Mon, 13 Jul 2020 18:47:55 +0300
Subject: [PATCH 284/307] MC-35618: Unexpected results of editing a Grouped
 Product in the Wish List by a Customer

---
 .../Magento/Wishlist/Controller/Index/Add.php |  1 -
 .../Controller/Index/UpdateItemOptions.php    |  1 -
 app/code/Magento/Wishlist/Model/Wishlist.php  | 14 +++--
 .../Index/UpdateItemOptionsTest.php           |  4 +-
 .../Wishlist/Test/Unit/Model/WishlistTest.php | 59 +++++++++++++------
 .../_files/wishlist_with_grouped_product.php  |  4 +-
 6 files changed, 54 insertions(+), 29 deletions(-)

diff --git a/app/code/Magento/Wishlist/Controller/Index/Add.php b/app/code/Magento/Wishlist/Controller/Index/Add.php
index 903719b245058..3ed152cb84125 100644
--- a/app/code/Magento/Wishlist/Controller/Index/Add.php
+++ b/app/code/Magento/Wishlist/Controller/Index/Add.php
@@ -112,7 +112,6 @@ public function execute()
 
         try {
             $buyRequest = new \Magento\Framework\DataObject($requestParams);
-            $buyRequest->setData('action', 'add');
 
             $result = $wishlist->addNewItem($product, $buyRequest);
             if (is_string($result)) {
diff --git a/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php b/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php
index 1bc6182232b44..6fae77fd604e5 100644
--- a/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php
+++ b/app/code/Magento/Wishlist/Controller/Index/UpdateItemOptions.php
@@ -104,7 +104,6 @@ public function execute()
             }
 
             $buyRequest = new \Magento\Framework\DataObject($this->getRequest()->getParams());
-            $buyRequest->setData('action', 'updateItem');
 
             $wishlist->updateItem($id, $buyRequest)->save();
 
diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php
index 66d19d6dcf617..1789725791de8 100644
--- a/app/code/Magento/Wishlist/Model/Wishlist.php
+++ b/app/code/Magento/Wishlist/Model/Wishlist.php
@@ -492,6 +492,9 @@ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false
         } else {
             $_buyRequest = new DataObject();
         }
+        if ($_buyRequest->getData('action') !== 'updateItem') {
+            $_buyRequest->setData('action', 'add');
+        }
 
         /* @var $product Product */
         $cartCandidates = $product->getTypeInstance()->processConfiguration($_buyRequest, clone $product);
@@ -750,15 +753,16 @@ public function updateItem($itemId, $buyRequest, $params = null)
             }
             $params->setCurrentConfig($item->getBuyRequest());
             $buyRequest = $this->_catalogProduct->addParamsToBuyRequest($buyRequest, $params);
+            $buyRequest->setData('action', 'updateItem');
 
             $product->setWishlistStoreId($item->getStoreId());
             $items = $this->getItemCollection();
             $isForceSetQuantity = true;
-            foreach ($items as $_item) {
-                /* @var $_item Item */
-                if ($_item->getProductId() == $product->getId()
-                    && $_item->getId() != $item->getId()
-                    && $_item->representProduct($product)
+            foreach ($items as $wishlistItem) {
+                /* @var $wishlistItem Item */
+                if ($wishlistItem->getProductId() == $product->getId()
+                    && $wishlistItem->getId() != $item->getId()
+                    && $wishlistItem->representProduct($product)
                 ) {
                     // We do not add new wishlist item, but updating the existing one
                     $isForceSetQuantity = false;
diff --git a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php
index 69e4e48262842..623ba8f266fa1 100644
--- a/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php
+++ b/app/code/Magento/Wishlist/Test/Unit/Controller/Index/UpdateItemOptionsTest.php
@@ -380,7 +380,7 @@ public function testExecuteAddSuccessException()
         $wishlist
             ->expects($this->once())
             ->method('updateItem')
-            ->with(3, new DataObject(['action' => 'updateItem']))
+            ->with(3, new DataObject([]))
             ->willReturnSelf();
         $wishlist
             ->expects($this->once())
@@ -509,7 +509,7 @@ public function testExecuteAddSuccessCriticalException()
         $wishlist
             ->expects($this->once())
             ->method('updateItem')
-            ->with(3, new DataObject(['action' => 'updateItem']))
+            ->with(3, new DataObject([]))
             ->willReturnSelf();
         $wishlist
             ->expects($this->once())
diff --git a/app/code/Magento/Wishlist/Test/Unit/Model/WishlistTest.php b/app/code/Magento/Wishlist/Test/Unit/Model/WishlistTest.php
index 19bfb3598f0e3..e09491813877b 100644
--- a/app/code/Magento/Wishlist/Test/Unit/Model/WishlistTest.php
+++ b/app/code/Magento/Wishlist/Test/Unit/Model/WishlistTest.php
@@ -243,34 +243,22 @@ public function testLoadByCustomerId()
 
     /**
      * @param int|Item|MockObject $itemId
-     * @param DataObject $buyRequest
+     * @param DataObject|MockObject $buyRequest
      * @param null|array|DataObject $param
      * @throws LocalizedException
      *
      * @dataProvider updateItemDataProvider
      */
-    public function testUpdateItem($itemId, $buyRequest, $param)
+    public function testUpdateItem($itemId, $buyRequest, $param): void
     {
         $storeId = 1;
         $productId = 1;
         $stores = [(new DataObject())->setId($storeId)];
 
-        $newItem = $this->getMockBuilder(Item::class)
-            ->setMethods(
-                ['setProductId', 'setWishlistId', 'setStoreId', 'setOptions', 'setProduct', 'setQty', 'getItem', 'save']
-            )
-            ->disableOriginalConstructor()
-            ->getMock();
-        $newItem->expects($this->any())->method('setProductId')->willReturnSelf();
-        $newItem->expects($this->any())->method('setWishlistId')->willReturnSelf();
-        $newItem->expects($this->any())->method('setStoreId')->willReturnSelf();
-        $newItem->expects($this->any())->method('setOptions')->willReturnSelf();
-        $newItem->expects($this->any())->method('setProduct')->willReturnSelf();
-        $newItem->expects($this->any())->method('setQty')->willReturnSelf();
-        $newItem->expects($this->any())->method('getItem')->willReturn(2);
-        $newItem->expects($this->any())->method('save')->willReturnSelf();
+        $newItem = $this->prepareWishlistItem();
 
         $this->itemFactory->expects($this->once())->method('create')->willReturn($newItem);
+        $this->productHelper->expects($this->once())->method('addParamsToBuyRequest')->willReturn($buyRequest);
 
         $this->storeManager->expects($this->any())->method('getStores')->willReturn($stores);
         $this->storeManager->expects($this->any())->method('getStore')->willReturn($stores[0]);
@@ -355,13 +343,48 @@ public function testUpdateItem($itemId, $buyRequest, $param)
         );
     }
 
+    /**
+     * Prepare wishlist item mock.
+     *
+     * @return MockObject
+     */
+    private function prepareWishlistItem(): MockObject
+    {
+        $newItem = $this->getMockBuilder(Item::class)
+            ->setMethods(
+                ['setProductId', 'setWishlistId', 'setStoreId', 'setOptions', 'setProduct', 'setQty', 'getItem', 'save']
+            )
+            ->disableOriginalConstructor()
+            ->getMock();
+        $newItem->expects($this->any())->method('setProductId')->willReturnSelf();
+        $newItem->expects($this->any())->method('setWishlistId')->willReturnSelf();
+        $newItem->expects($this->any())->method('setStoreId')->willReturnSelf();
+        $newItem->expects($this->any())->method('setOptions')->willReturnSelf();
+        $newItem->expects($this->any())->method('setProduct')->willReturnSelf();
+        $newItem->expects($this->any())->method('setQty')->willReturnSelf();
+        $newItem->expects($this->any())->method('getItem')->willReturn(2);
+        $newItem->expects($this->any())->method('save')->willReturnSelf();
+
+        return $newItem;
+    }
+
     /**
      * @return array
      */
-    public function updateItemDataProvider()
+    public function updateItemDataProvider(): array
     {
+        $dataObjectMock = $this->createMock(DataObject::class);
+        $dataObjectMock->expects($this->once())
+            ->method('setData')
+            ->with('action', 'updateItem')
+            ->willReturnSelf();
+        $dataObjectMock->expects($this->once())
+            ->method('getData')
+            ->with('action')
+            ->willReturn('updateItem');
+
         return [
-            '0' => [1, new DataObject(), null]
+            '0' => [1, $dataObjectMock, null]
         ];
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php
index b46d087d7fb71..94d23436e2a00 100644
--- a/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_grouped_product.php
@@ -19,13 +19,13 @@
 
 $objectManager = Bootstrap::getObjectManager();
 /** @var CustomerRegistry $customerRegistry */
-$customerRegistry = $objectManager->create(CustomerRegistry::class);
+$customerRegistry = $objectManager->get(CustomerRegistry::class);
 $customer = $customerRegistry->retrieve(1);
 $wishlistFactory = $objectManager->get(WishlistFactory::class);
 $wishlist = $wishlistFactory->create();
 $wishlist->loadByCustomerId($customer->getId(), true);
 /** @var ProductRepositoryInterface $productRepository */
-$productRepository = $objectManager->create(ProductRepositoryInterface::class);
+$productRepository = $objectManager->get(ProductRepositoryInterface::class);
 $product = $productRepository->get('grouped');
 $simple1 = $productRepository->get('simple_11');
 $simple2 = $productRepository->get('simple_22');

From c00d2fd2d752895ce693721c8af5d3282e169963 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Tue, 14 Jul 2020 13:58:50 +0300
Subject: [PATCH 285/307] MC-35618: Unexpected results of editing a Grouped
 Product in the Wish List by a Customer

---
 .../Magento/Wishlist/Model/WishlistTest.php      | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php
index cab007aa6af9c..4f9109c69a844 100644
--- a/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php
@@ -20,7 +20,7 @@
 /**
  * Tests for wish list model.
  *
- * @magentoDbIsolation enabled
+ * @magentoDbIsolation disabled
  * @magentoAppIsolation disabled
  */
 class WishlistTest extends TestCase
@@ -143,7 +143,12 @@ public function testAddConfigurableProductToWishList(): void
         $configurableOptions = $configurableProduct->getTypeInstance()->getConfigurableOptions($configurableProduct);
         $attributeId = key($configurableOptions);
         $option = reset($configurableOptions[$attributeId]);
-        $buyRequest = ['super_attribute' => [$attributeId => $option['value_index']]];
+        $buyRequest = [
+            'super_attribute' => [
+                $attributeId => $option['value_index']
+            ],
+            'action' => 'add',
+        ];
         $wishlist = $this->getWishlistByCustomerId->execute(1);
         $wishlist->addNewItem($configurableProduct, $buyRequest);
         $item = $this->getWishlistByCustomerId->getItemBySku(1, 'Configurable product');
@@ -166,7 +171,12 @@ public function testAddBundleProductToWishList(): void
         $option = reset($bundleOptions);
         $productLinks = $option->getProductLinks();
         $this->assertNotNull($productLinks[0]);
-        $buyRequest = ['bundle_option' => [$option->getOptionId() => $productLinks[0]->getId()]];
+        $buyRequest = [
+            'bundle_option' => [
+                $option->getOptionId() => $productLinks[0]->getId()
+            ],
+            'action' => 'add',
+        ];
         $skuWithChosenOption = implode('-', [$bundleProduct->getSku(), $productLinks[0]->getSku()]);
         $wishlist = $this->getWishlistByCustomerId->execute(1);
         $wishlist->addNewItem($bundleProduct, $buyRequest);

From 45634d3a7f21984aa06baeb9986009392916ea9f Mon Sep 17 00:00:00 2001
From: Raoul Rego <rrego@adobe.com>
Date: Tue, 14 Jul 2020 02:08:52 -0500
Subject: [PATCH 286/307] MC-35722: [MFTF]
 StorefrontPaypalSmartButtonInCheckoutPageTest and
 StorefrontPaypalSmartButtonWithFranceMerchantCountryTest failed on Jekins

- Added extra steps to fix login flow
- Added waitForLoginPageLoad
---
 ...StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml | 2 ++
 .../PayPalPaymentSection.xml                                   | 1 +
 .../Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml     | 3 ---
 ...torefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml | 3 ---
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
index 5619aa27860ce..00a271e2ad274 100644
--- a/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml
@@ -17,6 +17,8 @@
         <waitForPageLoad stepKey="waitForPageLoad"/>
         <seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
         <conditionalClick selector="{{PayPalPaymentSection.notYouLink}}" dependentSelector="{{PayPalPaymentSection.notYouLink}}" visible="true" stepKey="selectNotYouSection"/>
+        <conditionalClick selector="{{PayPalPaymentSection.existingAccountLoginBtn}}" dependentSelector="{{PayPalPaymentSection.existingAccountLoginBtn}}" visible="true" stepKey="skipAccountCreationAndLogin"/>
+        <waitForPageLoad stepKey="waitForLoginPageLoad"/>
         <waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
         <fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
         <click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalPaymentSection.xml b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalPaymentSection.xml
index 361016c40539c..e53c1bbc1ec29 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalPaymentSection.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalPaymentSection.xml
@@ -10,6 +10,7 @@
     <section name="PayPalPaymentSection">
         <element name="guestCheckout" type="input" selector="#guest"/>
         <element name="loginSection" type="input" selector=" #main>#login"/>
+        <element name="existingAccountLoginBtn" type="input" selector="#loginSection a"/>
         <element name="email" type="input" selector="//input[contains(@name, 'email') and not(contains(@style, 'display:none'))]"/>
         <element name="password" type="input" selector="//input[contains(@name, 'password') and not(contains(@style, 'display:none'))]"/>
         <element name="loginBtn" type="input" selector="button#btnLogin"/>
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
index 2cc94caf4c1b1..d27ac4c4a92f5 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml
@@ -17,9 +17,6 @@
             <severity value="CRITICAL"/>
             <testCaseId value="MC-13690"/>
             <group value="paypalExpress"/>
-            <skip>
-                <issueId value="MC-33951"/>
-            </skip>
         </annotations>
         <before>
             <!-- Login -->
diff --git a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
index 22997b7005f91..0efb3f33739fa 100644
--- a/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
+++ b/app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml
@@ -17,9 +17,6 @@
             <severity value="MAJOR"/>
             <testCaseId value="MC-33274"/>
             <group value="paypalExpress"/>
-            <skip>
-                <issueId value="MC-33951"/>
-            </skip>
         </annotations>
         <before>
             <!--Set merchant country-->

From 647865946defd5fb35e9aa133adb05f64d8e4813 Mon Sep 17 00:00:00 2001
From: Stas Kozar <stas.kozar@transoftgroup.com>
Date: Wed, 15 Jul 2020 11:13:53 +0300
Subject: [PATCH 287/307] MC-35618: Unexpected results of editing a Grouped
 Product in the Wish List by a Customer

---
 .../testsuite/Magento/Wishlist/Model/WishlistTest.php           | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php
index 4f9109c69a844..29dda2bbde581 100644
--- a/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/Model/WishlistTest.php
@@ -20,7 +20,7 @@
 /**
  * Tests for wish list model.
  *
- * @magentoDbIsolation disabled
+ * @magentoDbIsolation enabled
  * @magentoAppIsolation disabled
  */
 class WishlistTest extends TestCase

From fadb3c520747d3f0886bef85c7a1f101c2a3adbb Mon Sep 17 00:00:00 2001
From: ameysar <andrii.meysar@transoftgroup.com>
Date: Thu, 16 Jul 2020 11:00:04 +0300
Subject: [PATCH 288/307] MC-35845: [2.4][MFTF] Flaky Test:
 StoreFrontCheckCustomerInfoCreatedByGuestTest

---
 ...ontCheckCustomerInfoCreatedByGuestTest.xml |  5 +-
 ...tomerInfoOnOrderPageCreatedByGuestTest.xml | 63 +++++++++++++++++++
 2 files changed, 67 insertions(+), 1 deletion(-)
 create mode 100644 app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest.xml

diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
index bd81a1cfab604..b854be12a8524 100644
--- a/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StoreFrontCheckCustomerInfoCreatedByGuestTest.xml
@@ -12,12 +12,15 @@
         <annotations>
             <features value="Checkout"/>
             <stories value="Check customer information created by guest"/>
-            <title value="Check Customer Information Created By Guest"/>
+            <title value="Deprecated. Check Customer Information Created By Guest"/>
             <description value="Check customer information after placing the order as the guest who created an account"/>
             <severity value="MAJOR"/>
             <testCaseId value="MAGETWO-95932"/>
             <useCaseId value="MAGETWO-95820"/>
             <group value="checkout"/>
+            <skip>
+                <issueId value="DEPRECATED">Use StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest instead.</issueId>
+            </skip>
         </annotations>
 
         <before>
diff --git a/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest.xml b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest.xml
new file mode 100644
index 0000000000000..fa75a280e69f1
--- /dev/null
+++ b/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest.xml
@@ -0,0 +1,63 @@
+<?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="StorefrontCheckCustomerInfoOnOrderPageCreatedByGuestTest">
+        <annotations>
+            <features value="Checkout"/>
+            <stories value="Check customer information created by guest"/>
+            <title value="Check Customer Information Created By Guest"/>
+            <description value="Check customer information after placing the order as the guest who created an account"/>
+            <severity value="MAJOR"/>
+            <testCaseId value="MC-28550"/>
+            <useCaseId value="MAGETWO-95820"/>
+            <group value="checkout"/>
+        </annotations>
+
+        <before>
+            <createData entity="_defaultCategory" stepKey="createCategory"/>
+            <createData entity="_defaultProduct" stepKey="createProduct">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
+        </before>
+
+        <after>
+            <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
+            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+            <actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrdersGridFilter"/>
+            <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
+        </after>
+
+        <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
+            <argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
+        </actionGroup>
+        <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
+            <argument name="productName" value="$createProduct.name$"/>
+        </actionGroup>
+        <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/>
+        <actionGroup ref="GuestCheckoutFillingShippingSectionActionGroup" stepKey="fillShippingSectionAsGuest">
+            <argument name="customerVar" value="CustomerEntityOne"/>
+            <argument name="customerAddressVar" value="CustomerAddressSimple"/>
+        </actionGroup>
+        <actionGroup ref="CheckoutSelectCheckMoneyOrderPaymentActionGroup" stepKey="selectCheckMoneyPayment"/>
+        <actionGroup ref="CheckoutPlaceOrderActionGroup" stepKey="placeOrder">
+            <argument name="orderNumberMessage" value="CONST.successGuestCheckoutOrderNumberMessage"/>
+            <argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
+        </actionGroup>
+        <grabTextFrom selector="{{CheckoutSuccessRegisterSection.orderNumber}}" stepKey="grabOrderNumber"/>
+        <actionGroup ref="StorefrontRegisterCustomerFromOrderSuccessPage" stepKey="createCustomerAfterPlaceOrder">
+            <argument name="customer" value="CustomerEntityOne"/>
+        </actionGroup>
+        <actionGroup ref="OpenOrderByIdActionGroup" stepKey="filterOrdersGridById">
+            <argument name="orderId" value="{$grabOrderNumber}"/>
+        </actionGroup>
+        <see userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminShipmentOrderInformationSection.customerName}}" stepKey="seeCustomerName"/>
+    </test>
+</tests>

From f61869381e4ba204a1a55c05b78782b0e348d94a Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Thu, 16 Jul 2020 12:15:29 -0500
Subject: [PATCH 289/307] Release artifact preparation

---
 CHANGELOG.md | 775 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 775 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4661c4875737d..fc0f5b058862b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,778 @@
+2.4.0
+=============
+* GitHub issues:
+    * [#24229](https://github.com/magento/magento2/issues/24229) -- Unable to enable maintenance mode when env.php is read only (fixed in [magento/magento2#25790](https://github.com/magento/magento2/pull/25790))
+    * [#22416](https://github.com/magento/magento2/issues/22416) -- Coupling beetwen Magento_Checkout::js/view/shipping.js:validateShippingInformation() and layout definition or view.  (fixed in [magento/magento2#25541](https://github.com/magento/magento2/pull/25541))
+    * [#25739](https://github.com/magento/magento2/issues/25739) -- grunt clean does not clean generated folder (fixed in [magento/magento2#25765](https://github.com/magento/magento2/pull/25765))
+    * [#25654](https://github.com/magento/magento2/issues/25654) -- Magento OpenGraph meta description / title content bleeding (fixed in [magento/magento2#25655](https://github.com/magento/magento2/pull/25655))
+    * [#25731](https://github.com/magento/magento2/issues/25731) -- queue_consumer.xml doesn't allow numbers in handler class (fixed in [magento/magento2#25952](https://github.com/magento/magento2/pull/25952))
+    * [#25935](https://github.com/magento/magento2/issues/25935) -- Email address mismatch with text in iPad(768) view (fixed in [magento/magento2#25942](https://github.com/magento/magento2/pull/25942))
+    * [#25931](https://github.com/magento/magento2/issues/25931) -- Refresh Statistics: Updated At = Null should be display as "Never" instead of "undefined". (fixed in [magento/magento2#25932](https://github.com/magento/magento2/pull/25932))
+    * [#25925](https://github.com/magento/magento2/issues/25925) -- Dupplicate Records when sorting column in Content->Themes Grid (fixed in [magento/magento2#25926](https://github.com/magento/magento2/pull/25926))
+    * [#25917](https://github.com/magento/magento2/issues/25917) -- Admin confirm password input doesn't inherit needed styles (fixed in [magento/magento2#25918](https://github.com/magento/magento2/pull/25918))
+    * [#25911](https://github.com/magento/magento2/issues/25911) -- Category - Notice on incorrect price filter GET param (fixed in [magento/magento2#25912](https://github.com/magento/magento2/pull/25912))
+    * [#25893](https://github.com/magento/magento2/issues/25893) -- A "500 (Internal Server Error)" appears in Developer Console if Delete the image that is added to Page Content (fixed in [magento/magento2#25924](https://github.com/magento/magento2/pull/25924))
+    * [#25896](https://github.com/magento/magento2/issues/25896) -- Cannot create folder using only letters (fixed in [magento/magento2#25904](https://github.com/magento/magento2/pull/25904))
+    * [#24713](https://github.com/magento/magento2/issues/24713) -- Symbol of the Belarusian currency BYR is outdated (fixed in [magento/magento2#25723](https://github.com/magento/magento2/pull/25723))
+    * [#19805](https://github.com/magento/magento2/issues/19805) -- Sales order Address Information edit form layout design improvement. (fixed in [magento/magento2#25699](https://github.com/magento/magento2/pull/25699))
+    * [#23481](https://github.com/magento/magento2/issues/23481) -- Billing/Shipping Address edit form design update from order backend (fixed in [magento/magento2#25699](https://github.com/magento/magento2/pull/25699))
+    * [#25972](https://github.com/magento/magento2/issues/25972) -- Not required spacing in submenu on hover desktop (fixed in [magento/magento2#25973](https://github.com/magento/magento2/pull/25973))
+    * [#25586](https://github.com/magento/magento2/issues/25586) -- Mixins are not applied for advanced bundled modules (fixed in [magento/magento2#25587](https://github.com/magento/magento2/pull/25587))
+    * [#20379](https://github.com/magento/magento2/issues/20379) -- calendar icon not aligned inside the textbox in Add Design Change page (fixed in [magento/magento2#26063](https://github.com/magento/magento2/pull/26063))
+    * [#18687](https://github.com/magento/magento2/issues/18687) -- Left Side Back End Menu Design fix (fixed in [magento/magento2#26034](https://github.com/magento/magento2/pull/26034))
+    * [#24025](https://github.com/magento/magento2/issues/24025) -- Slow Performance of ProductMetadata::getVersion (fixed in [magento/magento2#26001](https://github.com/magento/magento2/pull/26001))
+    * [#100](https://github.com/magento/partners-magento2ee/issues/100) -- Users can see Negotiable Quotes from other Company (fixed in [magento/magento2#25940](https://github.com/magento/magento2/pull/25940) and [magento/partners-magento2ee#134](https://github.com/magento/partners-magento2ee/pull/134))
+    * [#24357](https://github.com/magento/magento2/issues/24357) -- Eav sort order by attribute option_id (fixed in [magento/magento2#24360](https://github.com/magento/magento2/pull/24360))
+    * [#25930](https://github.com/magento/magento2/issues/25930) -- Integration Success Message Text Overflow Issue in Admin (fixed in [magento/magento2#26011](https://github.com/magento/magento2/pull/26011))
+    * [#25433](https://github.com/magento/magento2/issues/25433) -- Close (X) not working when error come for qty (fixed in [magento/magento2#25759](https://github.com/magento/magento2/pull/25759))
+    * [#26155](https://github.com/magento/magento2/issues/26155) -- Table quote column customer_note uses wrong type (fixed in [magento/magento2#26160](https://github.com/magento/magento2/pull/26160))
+    * [#761](https://github.com/magento/magento2/issues/761) -- A more verbose message when the db is not up to date.   (fixed in [magento/magento2#25864](https://github.com/magento/magento2/pull/25864))
+    * [#25974](https://github.com/magento/magento2/issues/25974) -- Amount of characters on a 'Area' Customizable Option counted differently on backend/frontend (fixed in [magento/magento2#26033](https://github.com/magento/magento2/pull/26033))
+    * [#25674](https://github.com/magento/magento2/issues/25674) -- Elasticsearch version selections in admin are overly broad (fixed in [magento/magento2#25838](https://github.com/magento/magento2/pull/25838))
+    * [#13136](https://github.com/magento/magento2/issues/13136) -- Error in vendor/magento/module-shipping/Model/Config/Source/Allmethods.php - public function toOptionArray (fixed in [magento/magento2#25315](https://github.com/magento/magento2/pull/25315))
+    * [#22047](https://github.com/magento/magento2/issues/22047) -- Magento CRON Job Names are missing in NewRelic: "Transaction Names" (fixed in [magento/magento2#25957](https://github.com/magento/magento2/pull/25957))
+    * [#26164](https://github.com/magento/magento2/issues/26164) -- Underline should not display on hover for delete icon at shopping cart Internet explorer browser (fixed in [magento/magento2#26173](https://github.com/magento/magento2/pull/26173))
+    * [#24972](https://github.com/magento/magento2/issues/24972) -- Special Price class not added in configurable product page (fixed in [magento/magento2#26170](https://github.com/magento/magento2/pull/26170))
+    * [#25659](https://github.com/magento/magento2/issues/25659) -- Paypal Payments Pro IPN keeping payments marked as Pending Payment (fixed in [magento/magento2#25876](https://github.com/magento/magento2/pull/25876))
+    * [#18717](https://github.com/magento/magento2/issues/18717) -- UrlRewrite removes query string from url, if url has trailing slash (fixed in [magento/magento2#25603](https://github.com/magento/magento2/pull/25603))
+    * [#26176](https://github.com/magento/magento2/issues/26176) -- Footer Newsletter input field width is not identical in Internet Explorer/EDGE browser compared with chrome (fixed in [magento/magento2#26182](https://github.com/magento/magento2/pull/26182))
+    * [#25390](https://github.com/magento/magento2/issues/25390) -- UPS carrier model getting error when create plugin in to Magento 2.3.3 compatibility (fixed in [magento/magento2#26130](https://github.com/magento/magento2/pull/26130))
+    * [#26083](https://github.com/magento/magento2/issues/26083) -- Problem when trying to unset additional data in payment method. (fixed in [magento/magento2#26084](https://github.com/magento/magento2/pull/26084))
+    * [#26064](https://github.com/magento/magento2/issues/26064) -- Incorrect Error Message While Sharing Wish list more than Specified Email Address Value in Admin Configuration (fixed in [magento/magento2#26066](https://github.com/magento/magento2/pull/26066))
+    * [#14663](https://github.com/magento/magento2/issues/14663) -- Updating Customer through rest/all/V1/customers/:id resets group_id if group_id not passed in payload (fixed in [magento/magento2#25958](https://github.com/magento/magento2/pull/25958))
+    * [#20966](https://github.com/magento/magento2/issues/20966) -- Elastic Search 5 Indexing Performance Issue (fixed in [magento/magento2#25452](https://github.com/magento/magento2/pull/25452))
+    * [#21684](https://github.com/magento/magento2/issues/21684) -- Currency sign for "Layered Navigation Price Step" is not according to default settings (fixed in [magento/magento2#24815](https://github.com/magento/magento2/pull/24815))
+    * [#24468](https://github.com/magento/magento2/issues/24468) -- Export Coupon Code Grid redirect to DashBoard when create New Cart Price Rule (fixed in [magento/magento2#24471](https://github.com/magento/magento2/pull/24471))
+    * [#22856](https://github.com/magento/magento2/issues/22856) -- Catalog pricerules are not working with custom options as expected in Magento 2.3.0 product details page (fixed in [magento/magento2#22917](https://github.com/magento/magento2/pull/22917))
+    * [#14001](https://github.com/magento/magento2/issues/14001) -- M2.2.3 directory_country_region_name locale fix? 8bytes zh_Hans_CN(11bytes) ca_ES_VALENCIA(14bytes) (fixed in [magento/magento2#26268](https://github.com/magento/magento2/pull/26268))
+    * [#23521](https://github.com/magento/magento2/issues/23521) -- Unable to run \Magento\Downloadable\Test\Unit\Helper\DownloadTest without internet connection / dns resolution (fixed in [magento/magento2#26264](https://github.com/magento/magento2/pull/26264))
+    * [#25936](https://github.com/magento/magento2/issues/25936) -- Regular Price Label Alignment Issues in Frontend (fixed in [magento/magento2#26237](https://github.com/magento/magento2/pull/26237))
+    * [#26227](https://github.com/magento/magento2/issues/26227) -- Need some space between input and update button Minicart (fixed in [magento/magento2#26234](https://github.com/magento/magento2/pull/26234))
+    * [#26208](https://github.com/magento/magento2/issues/26208) -- Sorting issue for status column for Cache Management (fixed in [magento/magento2#26215](https://github.com/magento/magento2/pull/26215))
+    * [#26206](https://github.com/magento/magento2/issues/26206) -- Missing information about currently reindexed index on failure (fixed in [magento/magento2#26207](https://github.com/magento/magento2/pull/26207))
+    * [#26181](https://github.com/magento/magento2/issues/26181) -- Out of stock text is not aligned properly with add to cart button at list page in responsive   (fixed in [magento/magento2#26183](https://github.com/magento/magento2/pull/26183))
+    * [#26168](https://github.com/magento/magento2/issues/26168) -- Input Checkbox Alignment Issue at checkout page in Safari Browser (fixed in [magento/magento2#26169](https://github.com/magento/magento2/pull/26169))
+    * [#19093](https://github.com/magento/magento2/issues/19093) -- API: salesOrderItemRepository does not include gift message (fixed in [magento/magento2#25946](https://github.com/magento/magento2/pull/25946))
+    * [#23350](https://github.com/magento/magento2/issues/23350) -- Add support for catching throwables in App/Bootstrap (fixed in [magento/magento2#25250](https://github.com/magento/magento2/pull/25250))
+    * [#26289](https://github.com/magento/magento2/issues/26289) -- Jump Datepicker in  Catalog Price Rule (fixed in [magento/magento2#26290](https://github.com/magento/magento2/pull/26290))
+    * [#22964](https://github.com/magento/magento2/issues/22964) -- Unable to save any dates if the user interface locale is not english (US) in 2.3.1 (fixed in [magento/magento2#26270](https://github.com/magento/magento2/pull/26270))
+    * [#14913](https://github.com/magento/magento2/issues/14913) -- bookmark views become uneditable after deleting the first bookmark view. (fixed in [magento/magento2#26263](https://github.com/magento/magento2/pull/26263))
+    * [#26217](https://github.com/magento/magento2/issues/26217) -- Wrong fields selection while using fragments on GraphQL products query (fixed in [magento/magento2#26218](https://github.com/magento/magento2/pull/26218))
+    * [#23899](https://github.com/magento/magento2/issues/23899) -- system.xml file validation issue (fixed in [magento/magento2#25985](https://github.com/magento/magento2/pull/25985))
+    * [#14971](https://github.com/magento/magento2/issues/14971) -- Improper Handling of Pagination SEO (fixed in [magento/magento2#25337](https://github.com/magento/magento2/pull/25337))
+    * [#22988](https://github.com/magento/magento2/issues/22988) -- Wrong behavior of grid row and checkbox click (fixed in [magento/magento2#22990](https://github.com/magento/magento2/pull/22990))
+    * [#7065](https://github.com/magento/magento2/issues/7065) -- page.main.title is translating title (fixed in [magento/magento2#26269](https://github.com/magento/magento2/pull/26269))
+    * [#11209](https://github.com/magento/magento2/issues/11209) -- Wishlist Add grouped product Error (fixed in [magento/magento2#26258](https://github.com/magento/magento2/pull/26258))
+    * [#26235](https://github.com/magento/magento2/issues/26235) -- Both Menu spacing should be same (fixed in [magento/magento2#26238](https://github.com/magento/magento2/pull/26238))
+    * [#25130](https://github.com/magento/magento2/issues/25130) -- Issue with reorder when disabled reorder setting from admin (fixed in [magento/magento2#26051](https://github.com/magento/magento2/pull/26051))
+    * [#25881](https://github.com/magento/magento2/issues/25881) -- Admin panel is not accessible after limited permissions set to at least one admin account (fixed in [magento/magento2#25909](https://github.com/magento/magento2/pull/25909))
+    * [#25373](https://github.com/magento/magento2/issues/25373) -- The 'promotion' region of the minicart is never rendered (fixed in [magento/magento2#25375](https://github.com/magento/magento2/pull/25375))
+    * [#25278](https://github.com/magento/magento2/issues/25278) -- Incorrect @return type at getSourceModel in Eav\Attribute (fixed in [magento/magento2#25333](https://github.com/magento/magento2/pull/25333))
+    * [#25188](https://github.com/magento/magento2/issues/25188) -- Magento 2.3: Import fails if configurable attribute has an equal sign in its value (fixed in [magento/magento2#25194](https://github.com/magento/magento2/pull/25194))
+    * [#22304](https://github.com/magento/magento2/issues/22304) -- [Grouped product] Can´t add simple products to cart if one other is out of stock (fixed in [magento/magento2#24955](https://github.com/magento/magento2/pull/24955))
+    * [#26331](https://github.com/magento/magento2/issues/26331) -- [ MFTF ] Mess in ActionGroups: invalid names, multiple nodes. (fixed in [magento/partners-magento2ee#120](https://github.com/magento/partners-magento2ee/pull/120) and [magento/partners-magento2ee#108](https://github.com/magento/partners-magento2ee/pull/108) and [magento/partners-magento2ee#107](https://github.com/magento/partners-magento2ee/pull/107) and [magento/partners-magento2ee#106](https://github.com/magento/partners-magento2ee/pull/106) and [magento/partners-magento2ee#104](https://github.com/magento/partners-magento2ee/pull/104) and [magento/partners-magento2ee#105](https://github.com/magento/partners-magento2ee/pull/105) and [magento/partners-magento2ee#119](https://github.com/magento/partners-magento2ee/pull/119) and [magento/magento2#26323](https://github.com/magento/magento2/pull/26323) and [magento/magento2#26321](https://github.com/magento/magento2/pull/26321) and [magento/partners-magento2ee#111](https://github.com/magento/partners-magento2ee/pull/111) and [magento/magento2#26320](https://github.com/magento/magento2/pull/26320) and [magento/magento2#26319](https://github.com/magento/magento2/pull/26319) and [magento/partners-magento2ee#109](https://github.com/magento/partners-magento2ee/pull/109) and [magento/magento2#26322](https://github.com/magento/magento2/pull/26322) and [magento/partners-magento2ee#121](https://github.com/magento/partners-magento2ee/pull/121) and [magento/partners-magento2ee#117](https://github.com/magento/partners-magento2ee/pull/117) and [magento/partners-magento2ee#116](https://github.com/magento/partners-magento2ee/pull/116) and [magento/magento2#25828](https://github.com/magento/magento2/pull/25828) and [magento/magento2#26329](https://github.com/magento/magento2/pull/26329))
+    * [#22909](https://github.com/magento/partners-magento2ee/issues/22909) -- requirejs/domReady.js can severely delay rendering of content (fixed in [magento/magento2#23313](https://github.com/magento/magento2/pull/23313) and [magento/partners-magento2ee#50](https://github.com/magento/partners-magento2ee/pull/50))
+    * [#26396](https://github.com/magento/magento2/issues/26396) -- MFTF: Functional Tests are failing in Magento CI process (fixed in [magento/magento2#26407](https://github.com/magento/magento2/pull/26407) and [magento/magento2#26395](https://github.com/magento/magento2/pull/26395))
+    * [#26364](https://github.com/magento/magento2/issues/26364) -- Add to Compare link not showing in mobile view under 640px (fixed in [magento/magento2#26424](https://github.com/magento/magento2/pull/26424) and [magento/magento2#26365](https://github.com/magento/magento2/pull/26365))
+    * [#25968](https://github.com/magento/magento2/issues/25968) -- `getPrice()` returns a string when setting custom price in admin order (fixed in [magento/magento2#26313](https://github.com/magento/magento2/pull/26313))
+    * [#26612](https://github.com/magento/magento2/issues/26612) -- MFTF: StorefrontApplyPromoCodeDuringCheckoutTest is failing in CI process (fixed in [magento/magento2#26614](https://github.com/magento/magento2/pull/26614))
+    * [#26437](https://github.com/magento/magento2/issues/26437) -- Viewing customer shopping cart in admin shows all products in catalog when there is no active quote (fixed in [magento/magento2#26489](https://github.com/magento/magento2/pull/26489))
+    * [#26479](https://github.com/magento/magento2/issues/26479) -- Bug: AutoloaderRegistry::getAutoloader returns array (fixed in [magento/magento2#26480](https://github.com/magento/magento2/pull/26480))
+    * [#25162](https://github.com/magento/magento2/issues/25162) -- Message at Frontend has No HTML format (fixed in [magento/magento2#26455](https://github.com/magento/magento2/pull/26455))
+    * [#25761](https://github.com/magento/magento2/issues/25761) -- Site map doesn't include home page (fixed in [magento/magento2#26445](https://github.com/magento/magento2/pull/26445))
+    * [#18012](https://github.com/magento/magento2/issues/18012) -- Can not add string to underscore template using knockout (fixed in [magento/magento2#26435](https://github.com/magento/magento2/pull/26435))
+    * [#25300](https://github.com/magento/magento2/issues/25300) -- Mobile view issue on category page - Sort By label overlaps with Shop By button (fixed in [magento/magento2#26381](https://github.com/magento/magento2/pull/26381))
+    * [#26275](https://github.com/magento/magento2/issues/26275) -- Whitespace between label and required star on Checkout page (fixed in [magento/magento2#26285](https://github.com/magento/magento2/pull/26285))
+    * [#26065](https://github.com/magento/magento2/issues/26065) -- Performance of isSalable method check on configurable product (fixed in [magento/magento2#26071](https://github.com/magento/magento2/pull/26071))
+    * [#21014](https://github.com/magento/magento2/issues/21014) -- Gallery Thumbnail (left/right) Scroll Performance Android Chrome Sluggish and Unresponsive (fixed in [magento/magento2#25839](https://github.com/magento/magento2/pull/25839))
+    * [#10518](https://github.com/magento/magento2/issues/10518) -- Mobile product page image jumps (fixed in [magento/magento2#25385](https://github.com/magento/magento2/pull/25385))
+    * [#21717](https://github.com/magento/magento2/issues/21717) -- Product view page scrolls up randomly on mobile device (fixed in [magento/magento2#25385](https://github.com/magento/magento2/pull/25385))
+    * [#25962](https://github.com/magento/magento2/issues/25962) -- Radio alignment issue (fixed in [magento/magento2#25966](https://github.com/magento/magento2/pull/25966))
+    * [#9466](https://github.com/magento/magento2/issues/9466) -- Duplicating product copies product images couple of hundred times (fixed in [magento/magento2#25875](https://github.com/magento/magento2/pull/25875))
+    * [#17125](https://github.com/magento/magento2/issues/17125) -- x-magento-init initialisation not bound to happen in the right order. (fixed in [magento/magento2#25764](https://github.com/magento/magento2/pull/25764))
+    * [#26610](https://github.com/magento/magento2/issues/26610) -- MFTF: AdminAddingNewOptionsWithImagesAndPricesToConfigurableProductTest is failing in CI process (fixed in [magento/magento2#26611](https://github.com/magento/magento2/pull/26611))
+    * [#26240](https://github.com/magento/magento2/issues/26240) -- Minimum Advertised Price doesn't change for selected swatch option for configurable product (fixed in [magento/magento2#26241](https://github.com/magento/magento2/pull/26241) and [magento/magento2#26317](https://github.com/magento/magento2/pull/26317))
+    * [#17847](https://github.com/magento/magento2/issues/17847) -- Wrong State Title, Displaying Status Label Rather than State (fixed in [magento/magento2#26569](https://github.com/magento/magento2/pull/26569))
+    * [#21555](https://github.com/magento/magento2/issues/21555) -- Anonyomus classes in 2.3 (test data provider) (fixed in [magento/magento2#26533](https://github.com/magento/magento2/pull/26533))
+    * [#26532](https://github.com/magento/magento2/issues/26532) -- di:setup:compile fails with anonymous classes (fixed in [magento/magento2#26533](https://github.com/magento/magento2/pull/26533))
+    * [#26332](https://github.com/magento/magento2/issues/26332) -- BeforeOrderPaymentSaveObserver override payment insructions with wrong store view config (fixed in [magento/magento2#26399](https://github.com/magento/magento2/pull/26399))
+    * [#25591](https://github.com/magento/magento2/issues/25591) -- & character in SKUs is shown as & in current variations list on configurable products  (fixed in [magento/magento2#26007](https://github.com/magento/magento2/pull/26007))
+    * [#13865](https://github.com/magento/magento2/issues/13865) -- Safari "Block all cookies" setting breaks JavaScript scripts (fixed in [magento/magento2#25324](https://github.com/magento/magento2/pull/25324))
+    * [#26375](https://github.com/magento/magento2/issues/26375) -- Switching billing address causes Javascript function text to render in front-end checkout payment section (fixed in [magento/magento2#26378](https://github.com/magento/magento2/pull/26378))
+    * [#25032](https://github.com/magento/magento2/issues/25032) -- Display some error "We can't update your Wish List right now." at wish list (fixed in [magento/magento2#25641](https://github.com/magento/magento2/pull/25641))
+    * [#8691](https://github.com/magento/magento2/issues/8691) -- Language pack inheritance order is incorrect (fixed in [magento/magento2#26420](https://github.com/magento/magento2/pull/26420))
+    * [#25195](https://github.com/magento/magento2/issues/25195) -- Issue with tier price 0 when saving product second time (fixed in [magento/magento2#26162](https://github.com/magento/magento2/pull/26162))
+    * [#26622](https://github.com/magento/magento2/issues/26622) -- Fixed cart discount calculated incorrectly when product first added to cart. (fixed in [magento/magento2#26623](https://github.com/magento/magento2/pull/26623))
+    * [#26543](https://github.com/magento/magento2/issues/26543) -- My Wish List Product not showing properly between >768px and <1023px (fixed in [magento/magento2#26546](https://github.com/magento/magento2/pull/26546))
+    * [#25268](https://github.com/magento/magento2/issues/25268) -- $order->getCustomer() returns NULL for registered customer (fixed in [magento/magento2#26423](https://github.com/magento/magento2/pull/26423))
+    * [#26338](https://github.com/magento/magento2/issues/26338) -- Code cleanup for module xml extra end tag removed (fixed in [magento/magento2#26339](https://github.com/magento/magento2/pull/26339))
+    * [#26760](https://github.com/magento/magento2/issues/26760) -- Validate html error when enable critical css (fixed in [magento/magento2#26764](https://github.com/magento/magento2/pull/26764))
+    * [#14885](https://github.com/magento/magento2/issues/14885) -- Refactoring: Code duplication EmailSender / ShipmentSender and so on (fixed in [magento/magento2#26714](https://github.com/magento/magento2/pull/26714))
+    * [#863](https://github.com/magento/magento2/issues/863) -- How to switch base,thumbnail images in magento 2 back end  (fixed in [magento/magento2#26502](https://github.com/magento/magento2/pull/26502))
+    * [#26276](https://github.com/magento/magento2/issues/26276) -- Checkout. Quote Address Street cloning issue (fixed in [magento/magento2#26279](https://github.com/magento/magento2/pull/26279))
+    * [#26245](https://github.com/magento/magento2/issues/26245) -- Magento does not send an email about a refunded grouped product (fixed in [magento/magento2#26246](https://github.com/magento/magento2/pull/26246))
+    * [#26141](https://github.com/magento/magento2/issues/26141) -- Modal Popup and Custom subTitle erased (fixed in [magento/magento2#26142](https://github.com/magento/magento2/pull/26142))
+    * [#25487](https://github.com/magento/magento2/issues/25487) -- Redis cache grows unilimmited (fixed in [magento/magento2#25488](https://github.com/magento/magento2/pull/25488))
+    * [#25245](https://github.com/magento/magento2/issues/25245) -- Warning when Search Terms page is opened by clicking option  at the footer (fixed in [magento/magento2#25246](https://github.com/magento/magento2/pull/25246))
+    * [#24842](https://github.com/magento/magento2/issues/24842) -- Unable to delete custom option file in admin order create (fixed in [magento/magento2#24843](https://github.com/magento/magento2/pull/24843))
+    * [#847](https://github.com/magento/magento2/issues/847) -- Use cursor: pointer for the product online switcher (fixed in [magento/magento2#25991](https://github.com/magento/magento2/pull/25991))
+    * [#26843](https://github.com/magento/magento2/issues/26843) -- es_US Spanish (United States ) Locale is not supported in Magento 2.3.4 (fixed in [magento/magento2#26857](https://github.com/magento/magento2/pull/26857))
+    * [#26054](https://github.com/magento/magento2/issues/26054) -- Do not duplicate SEO meta data when duplicating a product (fixed in [magento/magento2#26659](https://github.com/magento/magento2/pull/26659))
+    * [#26314](https://github.com/magento/magento2/issues/26314) -- Minimum Advertised Prices duplicates for all configurable products with price from selected swatch (fixed in [magento/magento2#26317](https://github.com/magento/magento2/pull/26317))
+    * [#24547](https://github.com/magento/magento2/issues/24547) -- Magento\Customer\Model\Account\Redirect::setRedirectCookie() not properly working (fixed in [magento/magento2#24612](https://github.com/magento/magento2/pull/24612))
+    * [#26675](https://github.com/magento/magento2/issues/26675) -- Date incorrect on pdf invoice (fixed in [magento/magento2#26701](https://github.com/magento/magento2/pull/26701))
+    * [#25675](https://github.com/magento/magento2/issues/25675) -- Unable add product to cart in Magento 2.3.3 backend when stock quantity is 1 - "The requested qty is not available" (fixed in [magento/magento2#26650](https://github.com/magento/magento2/pull/26650))
+    * [#26583](https://github.com/magento/magento2/issues/26583) -- Product Detail Page - Tier price (fixed & discount) save percentage displaying wrong calculation (fixed in [magento/magento2#26584](https://github.com/magento/magento2/pull/26584))
+    * [#25963](https://github.com/magento/magento2/issues/25963) -- Grid Export rendered data is not reflecting in the exported File, Displayed ID instead of Rendered Label (fixed in [magento/magento2#26523](https://github.com/magento/magento2/pull/26523))
+    * [#26416](https://github.com/magento/magento2/issues/26416) -- Compare Products section not showing in mobile view under 767px (fixed in [magento/magento2#26418](https://github.com/magento/magento2/pull/26418))
+    * [#25656](https://github.com/magento/magento2/issues/25656) -- M2.3.2 : Nullable getters in Service Contracts will throw a reflection error when used in the web API  (fixed in [magento/magento2#25806](https://github.com/magento/magento2/pull/25806))
+    * [#24971](https://github.com/magento/magento2/issues/24971) -- Incorrect @var reference in docBlock of a class member variable (fixed in [magento/magento2#24976](https://github.com/magento/magento2/pull/24976))
+    * [#14958](https://github.com/magento/magento2/issues/14958) -- sale_sequence_* records are not removed on store view deletion (fixed in [magento/magento2#22296](https://github.com/magento/magento2/pull/22296))
+    * [#26607](https://github.com/magento/partners-magento2ee/issues/26607) -- MFTF: AdminReorderWithCatalogPriceTest is failing in CI process (fixed in [magento/magento2#26608](https://github.com/magento/magento2/pull/26608) and [magento/partners-magento2ee#135](https://github.com/magento/partners-magento2ee/pull/135))
+    * [#25856](https://github.com/magento/magento2/issues/25856) -- Ordered Products Report not grouping by configurable products variations (fixed in [magento/magento2#25858](https://github.com/magento/magento2/pull/25858))
+    * [#26973](https://github.com/magento/magento2/issues/26973) -- Fatal error on calling ImageFactory::create() for product_page_image_large (fixed in [magento/magento2#26974](https://github.com/magento/magento2/pull/26974))
+    * [#26917](https://github.com/magento/magento2/issues/26917) -- Tax rate Zip/Post range and check box alignment issue (fixed in [magento/magento2#26932](https://github.com/magento/magento2/pull/26932))
+    * [#26838](https://github.com/magento/magento2/issues/26838) -- Low stock report showing disabled products (fixed in [magento/magento2#26862](https://github.com/magento/magento2/pull/26862))
+    * [#26229](https://github.com/magento/magento2/issues/26229) -- Active menu is not set when opening admin path Marketing > User Content > Pending Reviews (fixed in [magento/magento2#26230](https://github.com/magento/magento2/pull/26230))
+    * [#25910](https://github.com/magento/magento2/issues/25910) -- Choose drop down not close when open another for upload file for swatch (fixed in [magento/magento2#26090](https://github.com/magento/magento2/pull/26090))
+    * [#13269](https://github.com/magento/magento2/issues/13269) -- Magento Framework Escaper - Critical log with special symbols (fixed in [magento/magento2#25895](https://github.com/magento/magento2/pull/25895))
+    * [#25738](https://github.com/magento/magento2/issues/25738) -- DOMDocument::loadHTML(): Tag date invalid in Entity (fixed in [magento/magento2#25895](https://github.com/magento/magento2/pull/25895))
+    * [#572](https://github.com/magento/magento2/issues/572) -- How do I: Bug tracking for Magento 1 + ideas for Magento 2 (fixed in [magento/magento2#25349](https://github.com/magento/magento2/pull/25349))
+    * [#26800](https://github.com/magento/magento2/issues/26800) -- Undefined variable $type in Product-Link Management (fixed in [magento/magento2#26979](https://github.com/magento/magento2/pull/26979))
+    * [#13252](https://github.com/magento/magento2/issues/13252) -- Fetching customer entity through API will not return 'is_subscribed' extension attribute (fixed in [magento/magento2#25311](https://github.com/magento/magento2/pull/25311))
+    * [#27044](https://github.com/magento/magento2/issues/27044) -- BUG: Category Repository get()'s argument `store_id` does not work (fixed in [magento/magento2#27048](https://github.com/magento/magento2/pull/27048))
+    * [#27040](https://github.com/magento/magento2/issues/27040) -- Images no longer responsive (fixed in [magento/magento2#27041](https://github.com/magento/magento2/pull/27041))
+    * [#17933](https://github.com/magento/magento2/issues/17933) -- Bank Transer Payment Instuctions switch back to default (fixed in [magento/magento2#26765](https://github.com/magento/magento2/pull/26765))
+    * [#23755](https://github.com/magento/magento2/issues/23755) -- Store view switcher is wrong , when each store views have different url. (fixed in [magento/magento2#26548](https://github.com/magento/magento2/pull/26548))
+    * [#26384](https://github.com/magento/magento2/issues/26384) -- Store switcher redirects to homepage for multistore setup with different domains (fixed in [magento/magento2#26548](https://github.com/magento/magento2/pull/26548))
+    * [#25243](https://github.com/magento/magento2/issues/25243) -- Numerical placeholder count in Phrase starts with %1, however js code assumes 0% (fixed in [magento/magento2#25359](https://github.com/magento/magento2/pull/25359))
+    * [#23619](https://github.com/magento/magento2/issues/23619) -- Less compilation extend 'mixin' has no matches (fixed in [magento/magento2#24003](https://github.com/magento/magento2/pull/24003))
+    * [#27032](https://github.com/magento/magento2/issues/27032) -- Add image lazy loading (fixed in [magento/magento2#27033](https://github.com/magento/magento2/pull/27033))
+    * [#25834](https://github.com/magento/magento2/issues/25834) -- Discount fixed amount whole cart applied mutiple time when customer use Check Out with Multiple Addresses (fixed in [magento/magento2#26419](https://github.com/magento/magento2/pull/26419))
+    * [#26989](https://github.com/magento/magento2/issues/26989) -- MFTF: Use Magento Cron for reindexing after creating data (fixed in [magento/magento2#26990](https://github.com/magento/magento2/pull/26990))
+    * [#27027](https://github.com/magento/magento2/issues/27027) -- Admin date of birth doesn't factor in user locale set (fixed in [magento/magento2#27149](https://github.com/magento/magento2/pull/27149))
+    * [#973](https://github.com/magento/magento2/issues/973) -- [Question] Add jenkins-ci ant build.xml and tool configurations to repository (fixed in [magento/magento2#27138](https://github.com/magento/magento2/pull/27138))
+    * [#26758](https://github.com/magento/magento2/issues/26758) -- cms-page-specific layouts are not applied if FullActionName differs from page_view (fixed in [magento/magento2#27131](https://github.com/magento/magento2/pull/27131))
+    * [#26847](https://github.com/magento/magento2/issues/26847) -- Hitting enter on create folder in media gallery refreshes the page (fixed in [magento/magento2#27029](https://github.com/magento/magento2/pull/27029))
+    * [#27009](https://github.com/magento/magento2/issues/27009) -- Missing variable outside CATCH causing a double-fault in Renderer.php  (fixed in [magento/magento2#27026](https://github.com/magento/magento2/pull/27026))
+    * [#26992](https://github.com/magento/magento2/issues/26992) -- Add New ratings Is active and checkbox alignment issue (fixed in [magento/magento2#27014](https://github.com/magento/magento2/pull/27014))
+    * [#20309](https://github.com/magento/magento2/issues/20309) -- URL Rewrites redirect loop (fixed in [magento/magento2#26902](https://github.com/magento/magento2/pull/26902))
+    * [#26648](https://github.com/magento/magento2/issues/26648) -- Table bottom border color different then thead and tbody border color (fixed in [magento/magento2#26649](https://github.com/magento/magento2/pull/26649))
+    * [#26590](https://github.com/magento/magento2/issues/26590) -- Customer registration multiple form submit (fixed in [magento/magento2#26642](https://github.com/magento/magento2/pull/26642))
+    * [#24637](https://github.com/magento/magento2/issues/24637) -- Chinese input in tinymce 4 (fixed in [magento/magento2#25454](https://github.com/magento/magento2/pull/25454))
+    * [#22609](https://github.com/magento/magento2/issues/22609) -- Since Magento 2.3 the wysiwyg image uploader incorrectly uses pub/media as storage root. (fixed in [magento/magento2#24878](https://github.com/magento/magento2/pull/24878))
+    * [#24735](https://github.com/magento/magento2/issues/24735) -- Image in minicart is blurred on iPhone (fixed in [magento/magento2#24743](https://github.com/magento/magento2/pull/24743))
+    * [#14086](https://github.com/magento/magento2/issues/14086) -- Guest cart API ignoring cartId in url for some methods (fixed in [magento/magento2#27172](https://github.com/magento/magento2/pull/27172))
+    * [#25219](https://github.com/magento/magento2/issues/25219) -- Custom attributes of images generated by Block\Product\ImageFactory don't render correctly (fixed in [magento/magento2#26959](https://github.com/magento/magento2/pull/26959))
+    * [#26499](https://github.com/magento/magento2/issues/26499) -- Product url key is not transliterated anymore if already set (fixed in [magento/magento2#26506](https://github.com/magento/magento2/pull/26506))
+    * [#25669](https://github.com/magento/magento2/issues/25669) -- health_check.php fails if any database cache engine configured (fixed in [magento/magento2#25722](https://github.com/magento/magento2/pull/25722))
+    * [#20472](https://github.com/magento/magento2/issues/20472) -- Special Price shown without currency symbol in magento backoffice (fixed in [magento/magento2#27261](https://github.com/magento/magento2/pull/27261))
+    * [#20906](https://github.com/magento/magento2/issues/20906) -- Magento backend catalog "Cost" without currency symbol (fixed in [magento/magento2#27261](https://github.com/magento/magento2/pull/27261))
+    * [#21910](https://github.com/magento/magento2/issues/21910) -- Magento backend catalog "MSRP" without currency symbol (fixed in [magento/magento2#27261](https://github.com/magento/magento2/pull/27261))
+    * [#4112](https://github.com/magento/magento2/issues/4112) -- Wrong parent category url_key in URL (fixed in [magento/magento2#26784](https://github.com/magento/magento2/pull/26784))
+    * [#11615](https://github.com/magento/magento2/issues/11615) -- URL Rewrites vs multiple storeviews - a never ending battle (fixed in [magento/magento2#26784](https://github.com/magento/magento2/pull/26784))
+    * [#11616](https://github.com/magento/magento2/issues/11616) -- URL Rewrites vs multiple storeviews - too many rewrites are being generated (fixed in [magento/magento2#26784](https://github.com/magento/magento2/pull/26784))
+    * [#25124](https://github.com/magento/magento2/issues/25124) -- Magento 2.3 Wrong product url for anchor categories for multiple storeviews (fixed in [magento/magento2#26784](https://github.com/magento/magento2/pull/26784))
+    * [#26393](https://github.com/magento/magento2/issues/26393) -- Product category url rewrite missing storeview specific url_key (fixed in [magento/magento2#26784](https://github.com/magento/magento2/pull/26784))
+    * [#26345](https://github.com/magento/magento2/issues/26345) -- Reorder in Admin panel leads to report page in case of changed product custom option max characters (fixed in [magento/magento2#26348](https://github.com/magento/magento2/pull/26348))
+    * [#26117](https://github.com/magento/magento2/issues/26117) -- "Current user does not have an active cart" even when he actually has one (fixed in [magento/magento2#27187](https://github.com/magento/magento2/pull/27187))
+    * [#26825](https://github.com/magento/magento2/issues/26825) -- Adding/updating image using API will not create thumbnail for admin products grid (fixed in [magento/magento2#27170](https://github.com/magento/magento2/pull/27170))
+    * [#27117](https://github.com/magento/partners-magento2ee/issues/27117) -- MFTF: Test names are not following Best Practices (`Test` suffix) (fixed in [magento/magento2#27118](https://github.com/magento/magento2/pull/27118) and [magento/partners-magento2ee#151](https://github.com/magento/partners-magento2ee/pull/151))
+    * [#26683](https://github.com/magento/magento2/issues/26683) -- Unable to execute addSimpleProduct mutation while other items out of stock (fixed in [magento/magento2#27015](https://github.com/magento/magento2/pull/27015))
+    * [#26963](https://github.com/magento/magento2/issues/26963) -- Missing JS file (critical-css-loader) in Magento 2.3.4 (fixed in [magento/magento2#26987](https://github.com/magento/magento2/pull/26987))
+    * [#26473](https://github.com/magento/magento2/issues/26473) -- BUG: Wrong selected product image when query url param configurable product (fixed in [magento/magento2#26560](https://github.com/magento/magento2/pull/26560))
+    * [#26856](https://github.com/magento/magento2/issues/26856) -- Wrong gallery main image and active preview after updating for configurable products. (fixed in [magento/magento2#26560](https://github.com/magento/magento2/pull/26560))
+    * [#26858](https://github.com/magento/magento2/issues/26858) -- Wrong gallery behavior when query url param configurable product (fixed in [magento/magento2#26560](https://github.com/magento/magento2/pull/26560))
+    * [#22251](https://github.com/magento/magento2/issues/22251) -- Admin Order - Email is Now Required - Magento 2.2.6 (fixed in [magento/magento2#24479](https://github.com/magento/magento2/pull/24479))
+    * [#24704](https://github.com/magento/magento2/issues/24704) -- Saving CMS Page Title from REST web API makes content empty (fixed in [magento/magento2#27237](https://github.com/magento/magento2/pull/27237))
+    * [#26827](https://github.com/magento/magento2/issues/26827) -- 500 when creating new product after adding attribute via API and assigning to attribute set via UI (fixed in [magento/magento2#27191](https://github.com/magento/magento2/pull/27191))
+    * [#27124](https://github.com/magento/magento2/issues/27124) -- Share Wishlist Email: Image Logic Issue (fixed in [magento/magento2#27125](https://github.com/magento/magento2/pull/27125))
+    * [#27335](https://github.com/magento/magento2/issues/27335) -- My account Address Book Additional Address Entries table issue (fixed in [magento/magento2#27336](https://github.com/magento/magento2/pull/27336))
+    * [#14080](https://github.com/magento/magento2/issues/14080) -- Category path is the same as key producing duplicate URL issue (fixed in [magento/magento2#27304](https://github.com/magento/magento2/pull/27304))
+    * [#26708](https://github.com/magento/magento2/issues/26708) -- ORDER BY has two similar conditions (fixed in [magento/magento2#27263](https://github.com/magento/magento2/pull/27263))
+    * [#26745](https://github.com/magento/magento2/issues/26745) -- OrderPaymentInterface is missing setAdditionalInformation() (fixed in [magento/magento2#26748](https://github.com/magento/magento2/pull/26748))
+    * [#26335](https://github.com/magento/magento2/issues/26335) -- Update zendframework to laminas (fixed in [magento/magento2#26436](https://github.com/magento/magento2/pull/26436))
+    * [#186](https://github.com/magento/magento2/issues/186) -- Indexing product (on save) should be done after committing the transaction (fixed in [magento/magento2#26923](https://github.com/magento/magento2/pull/26923))
+    * [#26224](https://github.com/magento/magento2/issues/26224) -- Cache type without "instance" causes exception when disabling the module through "Cache Management" in the backend (fixed in [magento/magento2#27307](https://github.com/magento/magento2/pull/27307))
+    * [#25540](https://github.com/magento/magento2/issues/25540) -- Products are not displaying infront end after updating product via importing CSV. (fixed in [magento/magento2#25664](https://github.com/magento/magento2/pull/25664))
+    * [#22010](https://github.com/magento/magento2/issues/22010) -- 22010 -Updates AbstractExtensibleObject and AbstractExtensibleModel annotations (fixed in [magento/magento2#22011](https://github.com/magento/magento2/pull/22011))
+    * [#22363](https://github.com/magento/magento2/issues/22363) -- Layered navigation breaks HTML5 Validation (fixed in [magento/magento2#26055](https://github.com/magento/magento2/pull/26055))
+    * [#26884](https://github.com/magento/magento2/issues/26884) -- Customer address is duplicated after setBillingAddressOnCart GraphQL mutation. (fixed in [magento/magento2#27107](https://github.com/magento/magento2/pull/27107))
+    * [#26742](https://github.com/magento/magento2/issues/26742) -- graphql mutation setShippingMethodsOnCart get wrong data in available_shipping_methods. (fixed in [magento/magento2#27004](https://github.com/magento/magento2/pull/27004))
+    * [#13689](https://github.com/magento/magento2/issues/13689) -- Cannot create catagory's name with thai langauge (fixed in [magento/magento2#27412](https://github.com/magento/magento2/pull/27412))
+    * [#27370](https://github.com/magento/magento2/issues/27370) -- Internet explorer issue:Default billing/shipping address not showing (fixed in [magento/magento2#27383](https://github.com/magento/magento2/pull/27383))
+    * [#27086](https://github.com/magento/magento2/issues/27086) -- Report Value doesn't matching -  "Year-To-Date Starts" (fixed in [magento/magento2#27088](https://github.com/magento/magento2/pull/27088))
+    * [#22833](https://github.com/magento/magento2/issues/22833) -- Short-term admin accounts (fixed in [magento/magento2#22837](https://github.com/magento/magento2/pull/22837))
+    * [#6310](https://github.com/magento/magento2/issues/6310) -- Changing products 'this item has weight' using 'Update Attributes' is not possible (fixed in [magento/magento2#26075](https://github.com/magento/magento2/pull/26075))
+    * [#16315](https://github.com/magento/magento2/issues/16315) -- Product save with onthefly index ignores website assignments (fixed in [magento/magento2#27365](https://github.com/magento/magento2/pull/27365))
+    * [#26762](https://github.com/magento/magento2/issues/26762) -- undefined index db-ssl-verify (fixed in [magento/magento2#26763](https://github.com/magento/magento2/pull/26763))
+    * [#26652](https://github.com/magento/magento2/issues/26652) -- In the minicart edit and remove icon is not aligned. (fixed in [magento/magento2#27493](https://github.com/magento/magento2/pull/27493))
+    * [#1002](https://github.com/magento/magento2/issues/1002) -- Database Schema: Incorrect Unique Indexes (fixed in [magento/magento2#27399](https://github.com/magento/magento2/pull/27399))
+    * [#24990](https://github.com/magento/magento2/issues/24990) -- Admin Panel logo link is not directing to admin dashboard page (fixed in [magento/magento2#26100](https://github.com/magento/magento2/pull/26100))
+    * [#27500](https://github.com/magento/magento2/issues/27500) -- Unit Tests incompatible with PHPUnit 8 (fixed in [magento/magento2#27521](https://github.com/magento/magento2/pull/27521) and [magento/magento2#27519](https://github.com/magento/magento2/pull/27519) and [magento/magento2#27627](https://github.com/magento/magento2/pull/27627) and [magento/magento2#27522](https://github.com/magento/magento2/pull/27522))
+    * [#27496](https://github.com/magento/magento2/issues/27496) -- The store logo is missing when using the Magento_blank theme (fixed in [magento/magento2#27497](https://github.com/magento/magento2/pull/27497))
+    * [#27169](https://github.com/magento/magento2/issues/27169) -- Not able to update value with "use default checkbox" for Downloadable Product's Sample and Links Title. (fixed in [magento/magento2#27295](https://github.com/magento/magento2/pull/27295))
+    * [#27320](https://github.com/magento/magento2/issues/27320) -- MFTF: Functional Tests failing due to missing data in indexes (fixed in [magento/magento2#27322](https://github.com/magento/magento2/pull/27322) and [magento/magento2#27321](https://github.com/magento/magento2/pull/27321) and [magento/magento2#27323](https://github.com/magento/magento2/pull/27323))
+    * [#171](https://github.com/magento/partners-magento2ee/issues/171) -- CMS Page modifications are not being reported in Action Log (fixed in [magento/magento2#27597](https://github.com/magento/magento2/pull/27597) and [magento/partners-magento2ee#172](https://github.com/magento/partners-magento2ee/pull/172))
+    * [#13851](https://github.com/magento/magento2/issues/13851) -- Credit doesn't recognize amount after comma (fixed in [magento/magento2#27343](https://github.com/magento/magento2/pull/27343))
+    * [#26986](https://github.com/magento/magento2/issues/26986) -- REST API Pagination Does not work as expected (fixed in [magento/magento2#26988](https://github.com/magento/magento2/pull/26988))
+    * [#27638](https://github.com/magento/partners-magento2ee/issues/27638) -- PHPUnit Tests bundled with Magento fatal errors (fixed in [magento/magento2#27701](https://github.com/magento/magento2/pull/27701) and [magento/partners-magento2ee#178](https://github.com/magento/partners-magento2ee/pull/178))
+    * [#27506](https://github.com/magento/magento2/issues/27506) -- Viewport resizing on search input focus on iphone (fixed in [magento/magento2#27603](https://github.com/magento/magento2/pull/27603))
+    * [#27607](https://github.com/magento/magento2/issues/27607) -- Integration Tests: DOM Assertion class (fixed in [magento/magento2#27606](https://github.com/magento/magento2/pull/27606))
+    * [#27299](https://github.com/magento/magento2/issues/27299) -- Integration Tests: Consecutive `dispatch($uri)` on Test AbstractController fails (fixed in [magento/magento2#27300](https://github.com/magento/magento2/pull/27300))
+    * [#27920](https://github.com/magento/magento2/issues/27920) -- [2.3.5] Incorrect html structure after MC-30989 (fixed in [magento/magento2#27926](https://github.com/magento/magento2/pull/27926))
+    * [#25769](https://github.com/magento/magento2/issues/25769) -- Arabic invoice pdf issue Magento 2.3.0 showing as Arabic letters but not correct  (fixed in [magento/magento2#27887](https://github.com/magento/magento2/pull/27887))
+    * [#27874](https://github.com/magento/magento2/issues/27874) -- Vat Validation URL for EU Vat numbers changed. (Vies Service) (fixed in [magento/magento2#27886](https://github.com/magento/magento2/pull/27886))
+    * [#27089](https://github.com/magento/magento2/issues/27089) -- BUG: `getDefaultLimitPerPageValue` returns value that is not available (fixed in [magento/magento2#27093](https://github.com/magento/magento2/pull/27093))
+    * [#1270](https://github.com/magento/magento2/issues/1270) -- back button not working in edit order status (fixed in [magento/magento2#27976](https://github.com/magento/magento2/pull/27976))
+    * [#27897](https://github.com/magento/magento2/issues/27897) -- MFTF: Inconsistent case in Section name (fixed in [magento/magento2#27955](https://github.com/magento/magento2/pull/27955))
+    * [#27503](https://github.com/magento/magento2/issues/27503) -- MFTF: Acceptance tests break the naming convention (fixed in [magento/magento2#27515](https://github.com/magento/magento2/pull/27515))
+* GitHub pull requests:
+    * [magento/magento2#25905](https://github.com/magento/magento2/pull/25905) -- [Checkout] Cover DirectoryData by Unit Test (by @edenduong)
+    * [magento/magento2#25808](https://github.com/magento/magento2/pull/25808) -- No marginal white space validation added (by @ajithkumar-maragathavel)
+    * [magento/magento2#25790](https://github.com/magento/magento2/pull/25790) -- Don't disable FPC for maintenance, instead send "no cache" headers (by @Parakoopa)
+    * [magento/magento2#25774](https://github.com/magento/magento2/pull/25774) -- [Config] Giving the possibility to have a config dependency based on empty config value (by @eduard13)
+    * [magento/magento2#25604](https://github.com/magento/magento2/pull/25604) -- Moving Ui message.js hide speed and timeout into variables for easier… (by @edward-simpson)
+    * [magento/magento2#25541](https://github.com/magento/magento2/pull/25541) -- Removes hardcoded references to country selector component (by @krzksz)
+    * [magento/magento2#25939](https://github.com/magento/magento2/pull/25939) -- [ProductAlert] Cover Helper Data by Unit Test (by @edenduong)
+    * [magento/magento2#25928](https://github.com/magento/magento2/pull/25928) -- [Variable] Cover Variable Data Model by Unit Test (by @edenduong)
+    * [magento/magento2#25913](https://github.com/magento/magento2/pull/25913) -- [Backend] Covering the Backend Grid Decoding Helper by UnitTest (by @eduard13)
+    * [magento/magento2#25822](https://github.com/magento/magento2/pull/25822) -- MFTF: Extract Action Groups to separate files - magento/module-import-export (by @lbajsarowicz)
+    * [magento/magento2#25812](https://github.com/magento/magento2/pull/25812) -- MFTF: Extract Action Groups to separate files - magento/module-reports (by @lbajsarowicz)
+    * [magento/magento2#25803](https://github.com/magento/magento2/pull/25803) -- MFTF: Extract Action Groups to separate files - magento/module-shipping (by @lbajsarowicz)
+    * [magento/magento2#25791](https://github.com/magento/magento2/pull/25791) -- MFTF: Extract Action Groups to separate files - magento/module-widget (by @lbajsarowicz)
+    * [magento/magento2#25792](https://github.com/magento/magento2/pull/25792) -- MFTF: Extract Action Groups to separate files - magento/module-variable (by @lbajsarowicz)
+    * [magento/magento2#25765](https://github.com/magento/magento2/pull/25765) -- Magento#25739: fixed issue "grunt clean does not clean generated folder" (by @andrewbess)
+    * [magento/magento2#25655](https://github.com/magento/magento2/pull/25655) -- Add escaping on meta properties for open graph (by @NathMorgan)
+    * [magento/magento2#25952](https://github.com/magento/magento2/pull/25952) -- Resolve queue_consumer.xml doesn't allow numbers in handler class issue25731 (by @edenduong)
+    * [magento/magento2#25942](https://github.com/magento/magento2/pull/25942) -- Resolve Email address mismatch with text in iPad(768) view issue25935 (by @edenduong)
+    * [magento/magento2#25932](https://github.com/magento/magento2/pull/25932) -- Resolve Refresh Statistics: Updated At = Null should be display as "Never" instead of "undefined". issue25931 (by @edenduong)
+    * [magento/magento2#25926](https://github.com/magento/magento2/pull/25926) -- Resolve Duplicate Records when sorting column in Content->Themes Grid issue25925 (by @edenduong)
+    * [magento/magento2#25918](https://github.com/magento/magento2/pull/25918) -- [Ui] Adding admin class for password input type. (by @eduard13)
+    * [magento/magento2#25912](https://github.com/magento/magento2/pull/25912) -- Category filters - Fix notice on incorrect price param (by @ihor-sviziev)
+    * [magento/magento2#25995](https://github.com/magento/magento2/pull/25995) -- Updating wee -> weee in Magento_Weee README (by @MellenIO)
+    * [magento/magento2#25984](https://github.com/magento/magento2/pull/25984) -- [Customer] Cover CustomerData\Customer and CustomerData\JsLayoutDataProviderPool by Unit Test (by @edenduong)
+    * [magento/magento2#25982](https://github.com/magento/magento2/pull/25982) -- [Catalog] Cover Price Validation Result class by Unit Test (by @edenduong)
+    * [magento/magento2#25954](https://github.com/magento/magento2/pull/25954) -- Refactor: Add method hints to Tracking Status (by @lbajsarowicz)
+    * [magento/magento2#25924](https://github.com/magento/magento2/pull/25924) -- Resolve A "500 (Internal Server Error)" appears in Developer Console if Delete the image that is added to Page Content issue25893 (by @edenduong)
+    * [magento/magento2#25904](https://github.com/magento/magento2/pull/25904) -- Resolve issue 25896: Cannot create folder using only letters (by @edenduong)
+    * [magento/magento2#25723](https://github.com/magento/magento2/pull/25723) -- Fix #24713 - Symbol of the Belarusian currency BYR is outdated (by @Bartlomiejsz)
+    * [magento/magento2#25699](https://github.com/magento/magento2/pull/25699) -- magento/magento2#23481: Billing/Shipping Address edit form design update from order backend (by @alexey-rakitin)
+    * [magento/magento2#25262](https://github.com/magento/magento2/pull/25262) -- Allow autoplay for vimeo thumb click (by @philkun)
+    * [magento/magento2#26016](https://github.com/magento/magento2/pull/26016) -- [DownloadableImportExport] Cover Helper Data by Unit Test (by @edenduong)
+    * [magento/magento2#25997](https://github.com/magento/magento2/pull/25997) -- [Newsletter] Refactor code and Cover Model/Observer class by Unit Test (by @edenduong)
+    * [magento/magento2#25993](https://github.com/magento/magento2/pull/25993) -- [InstantPurchase] Cover Ui/CustomerAddressesFormatter and Ui/ShippingMethodFormatter by Unit Test (by @edenduong)
+    * [magento/magento2#25992](https://github.com/magento/magento2/pull/25992) -- Cover magento/magento2#25556 with jasmine test (by @Nazar65)
+    * [magento/magento2#25973](https://github.com/magento/magento2/pull/25973) -- [Removed spacing in submenu on hover desktop] (by @hitesh-wagento)
+    * [magento/magento2#25975](https://github.com/magento/magento2/pull/25975) -- phpdoc fix return type (by @maslii)
+    * [magento/magento2#25624](https://github.com/magento/magento2/pull/25624) -- Add right arrow to show some items have children (by @fredden)
+    * [magento/magento2#25114](https://github.com/magento/magento2/pull/25114) -- Added translate for strings and added missing node in existing translate attribute on xml. (by @sanganinamrata)
+    * [magento/magento2#25587](https://github.com/magento/magento2/pull/25587) -- Refactor JavaScript mixins module (by @krzksz)
+    * [magento/magento2#26069](https://github.com/magento/magento2/pull/26069) -- [CMS] Improving the test coverage for UrlBuilder ViewModel  (by @eduard13)
+    * [magento/magento2#26067](https://github.com/magento/magento2/pull/26067) -- [Msrp] Cover MsrpPriceCalculator by Unit Test (by @edenduong)
+    * [magento/magento2#26063](https://github.com/magento/magento2/pull/26063) -- [Theme] Reverting removed container class (by @eduard13)
+    * [magento/magento2#26057](https://github.com/magento/magento2/pull/26057) -- [Contact] covered Model Config by Unit Test (by @srsathish92)
+    * [magento/magento2#26050](https://github.com/magento/magento2/pull/26050) -- [Catalog] covered product ViewModel AddToCompareAvailability by Unit Test (by @srsathish92)
+    * [magento/magento2#26044](https://github.com/magento/magento2/pull/26044) -- Set empty value to color picker when input is reset to update preview (by @gperis)
+    * [magento/magento2#26045](https://github.com/magento/magento2/pull/26045) -- [Downloadable] Cover Helper Data by Unit Test (by @edenduong)
+    * [magento/magento2#26042](https://github.com/magento/magento2/pull/26042) -- [Catalog] Cover Component/FilterFactory by Unit Test (by @edenduong)
+    * [magento/magento2#26043](https://github.com/magento/magento2/pull/26043) -- [Persistent] Cover CustomerData by Unit Test (by @edenduong)
+    * [magento/magento2#26037](https://github.com/magento/magento2/pull/26037) -- Fixes phpcs  errors and warnings for Magento\Framework\View\Element (by @krisdante)
+    * [magento/magento2#26034](https://github.com/magento/magento2/pull/26034) -- MAGETWO-95866 Add horizontal scroll if elements extend menu's width (by @ptylek)
+    * [magento/magento2#26003](https://github.com/magento/magento2/pull/26003) -- [Directory] Cover action directory/json/countryRegion by Integration Test (by @edenduong)
+    * [magento/magento2#26001](https://github.com/magento/magento2/pull/26001) -- Fix caching Magento Metadata getVersion (by @luklewluk)
+    * [magento/magento2#25940](https://github.com/magento/magento2/pull/25940) -- Asynchronous operation validate (by @sedonik)
+    * [magento/magento2#25697](https://github.com/magento/magento2/pull/25697) -- [New Relic] Making system configs dependent by Enabled field (by @eduard13)
+    * [magento/magento2#25523](https://github.com/magento/magento2/pull/25523) -- Contact form > Adding ViewModel (by @rafaelstz)
+    * [magento/magento2#24360](https://github.com/magento/magento2/pull/24360) -- #24357 Eav sort order by attribute option_id (by @tnsezer)
+    * [magento/magento2#26060](https://github.com/magento/magento2/pull/26060) -- [Backend] Cover Dashboard Helper Data by Unit Test (by @edenduong)
+    * [magento/magento2#26059](https://github.com/magento/magento2/pull/26059) -- [Downloadable] Cover the Observer SetHasDownloadableProductsObserver by Unit Test (by @edenduong)
+    * [magento/magento2#26058](https://github.com/magento/magento2/pull/26058) -- Fixed typo: "reviwGrid" to "reviewGrid" (by @matheusgontijo)
+    * [magento/magento2#26011](https://github.com/magento/magento2/pull/26011) -- Fixed the issue 25930 (by @divyajyothi5321)
+    * [magento/magento2#26004](https://github.com/magento/magento2/pull/26004) -- [Backend] Cover action admin/dashboard/ajaxBlock by Integration Test (by @edenduong)
+    * [magento/magento2#25920](https://github.com/magento/magento2/pull/25920) -- Code refactor in Catalog ViewModel Breadcrumbs (by @srsathish92)
+    * [magento/magento2#26082](https://github.com/magento/magento2/pull/26082) -- [GiftMessage] Cover Observer SalesEventOrderItemToQuoteItemObserver by Unit Test (by @edenduong)
+    * [magento/magento2#26076](https://github.com/magento/magento2/pull/26076) -- [Search] Cover SynonymActions Column by Unit Test (by @edenduong)
+    * [magento/magento2#26068](https://github.com/magento/magento2/pull/26068) -- [GoogleAnalytics] covered Helper Data by Unit Test (by @srsathish92)
+    * [magento/magento2#26009](https://github.com/magento/magento2/pull/26009) -- Refactor: Add information about the path that is not allowed (by @lbajsarowicz)
+    * [magento/magento2#25759](https://github.com/magento/magento2/pull/25759) -- fixed issue 25433 (by @Ashna-Jahan)
+    * [magento/magento2#25854](https://github.com/magento/magento2/pull/25854) -- MFTF: Extract Action Groups to separate files - magento/module-catalog (by @lbajsarowicz)
+    * [magento/magento2#25846](https://github.com/magento/magento2/pull/25846) -- MFTF: Extract Action Groups to separate files - magento/module-catalog-import-export (by @lbajsarowicz)
+    * [magento/magento2#25845](https://github.com/magento/magento2/pull/25845) -- MFTF: Extract Action Groups to separate files - magento/module-catalog-inventory (by @lbajsarowicz)
+    * [magento/magento2#25844](https://github.com/magento/magento2/pull/25844) -- MFTF: Extract Action Groups to separate files - magento/module-catalog-rule (by @lbajsarowicz)
+    * [magento/magento2#25842](https://github.com/magento/magento2/pull/25842) -- MFTF: Extract Action Groups to separate files - magento/module-catalog-search (by @lbajsarowicz)
+    * [magento/magento2#25841](https://github.com/magento/magento2/pull/25841) -- MFTF: Extract Action Groups to separate files - magento/module-checkout (by @lbajsarowicz)
+    * [magento/magento2#25831](https://github.com/magento/magento2/pull/25831) -- MFTF: Extract Action Groups to separate files - magento/module-config (by @lbajsarowicz)
+    * [magento/magento2#25836](https://github.com/magento/magento2/pull/25836) -- MFTF: Extract Action Groups to separate files - magento/module-cms (by @lbajsarowicz)
+    * [magento/magento2#25830](https://github.com/magento/magento2/pull/25830) -- MFTF: Extract Action Groups to separate files - magento/module-configurable-product (by @lbajsarowicz)
+    * [magento/magento2#25829](https://github.com/magento/magento2/pull/25829) -- MFTF: Extract Action Groups to separate files - magento/module-currency-symbol (by @lbajsarowicz)
+    * [magento/magento2#25825](https://github.com/magento/magento2/pull/25825) -- MFTF: Extract Action Groups to separate files - magento/module-downloadable (by @lbajsarowicz)
+    * [magento/magento2#25823](https://github.com/magento/magento2/pull/25823) -- MFTF: Extract Action Groups to separate files - magento/module-email (by @lbajsarowicz)
+    * [magento/magento2#25821](https://github.com/magento/magento2/pull/25821) -- MFTF: Extract Action Groups to separate files - magento/module-grouped-product (by @lbajsarowicz)
+    * [magento/magento2#25819](https://github.com/magento/magento2/pull/25819) -- MFTF: Extract Action Groups to separate files - magento/module-multishipping (by @lbajsarowicz)
+    * [magento/magento2#25820](https://github.com/magento/magento2/pull/25820) -- MFTF: Extract Action Groups to separate files - magento/module-indexer (by @lbajsarowicz)
+    * [magento/magento2#25818](https://github.com/magento/magento2/pull/25818) -- MFTF: Extract Action Groups to separate files - magento/module-newsletter (by @lbajsarowicz)
+    * [magento/magento2#25817](https://github.com/magento/magento2/pull/25817) -- MFTF: Replace redundant Action Group with proper one - magento/module-page-cache (by @lbajsarowicz)
+    * [magento/magento2#25816](https://github.com/magento/magento2/pull/25816) -- MFTF: Extract Action Groups to separate files - magento/module-paypal (by @lbajsarowicz)
+    * [magento/magento2#25815](https://github.com/magento/magento2/pull/25815) -- MFTF: Extract Action Groups to separate files - magento/module-persistent (by @lbajsarowicz)
+    * [magento/magento2#25813](https://github.com/magento/magento2/pull/25813) -- MFTF: Extract Action Groups to separate files - magento/module-product-video (by @lbajsarowicz)
+    * [magento/magento2#25811](https://github.com/magento/magento2/pull/25811) -- MFTF: Extract Action Groups to separate files - magento/module-sales (by @lbajsarowicz)
+    * [magento/magento2#25807](https://github.com/magento/magento2/pull/25807) -- MFTF: Extract Action Groups to separate files - magento/module-sales-rule (by @lbajsarowicz)
+    * [magento/magento2#25804](https://github.com/magento/magento2/pull/25804) -- MFTF: Extract Action Groups to separate files - magento/module-search (by @lbajsarowicz)
+    * [magento/magento2#25802](https://github.com/magento/magento2/pull/25802) -- MFTF: Extract Action Groups to separate files - magento/module-store (by @lbajsarowicz)
+    * [magento/magento2#25800](https://github.com/magento/magento2/pull/25800) -- MFTF: Extract Action Groups to separate files - magento/module-swatches (by @lbajsarowicz)
+    * [magento/magento2#25799](https://github.com/magento/magento2/pull/25799) -- MFTF: Extract Action Groups to separate files - magento/module-tax (by @lbajsarowicz)
+    * [magento/magento2#25797](https://github.com/magento/magento2/pull/25797) -- MFTF: Extract Action Groups to separate files - magento/module-ui (by @lbajsarowicz)
+    * [magento/magento2#25794](https://github.com/magento/magento2/pull/25794) -- MFTF: Extract Action Groups to separate files - magento/module-url-rewrite (by @lbajsarowicz)
+    * [magento/magento2#25793](https://github.com/magento/magento2/pull/25793) -- MFTF: Extract Action Groups to separate files - magento/module-user (by @lbajsarowicz)
+    * [magento/magento2#25788](https://github.com/magento/magento2/pull/25788) -- MFTF: Extract Action Groups to separate files - magento/module-wishlist (by @lbajsarowicz)
+    * [magento/magento2#25787](https://github.com/magento/magento2/pull/25787) -- MFTF: Extract Action Groups to separate files - magento/module-bundle (by @lbajsarowicz)
+    * [magento/magento2#25784](https://github.com/magento/magento2/pull/25784) -- MFTF: Extract Action Groups to separate files - magento/module-braintree (by @lbajsarowicz)
+    * [magento/magento2#25783](https://github.com/magento/magento2/pull/25783) -- MFTF: Extract Action Groups to separate files - magento/module-backup (by @lbajsarowicz)
+    * [magento/magento2#26157](https://github.com/magento/magento2/pull/26157) -- Remove blank space at the end of label (by @gihovani)
+    * [magento/magento2#26160](https://github.com/magento/magento2/pull/26160) -- Changing the data type for quote column customer_note (by @ravi-chandra3197)
+    * [magento/magento2#26154](https://github.com/magento/magento2/pull/26154) -- [LayeredNavigation] Covering the ProductAttributeGridBuildObserver for LayeredNavigation … (by @eduard13)
+    * [magento/magento2#26150](https://github.com/magento/magento2/pull/26150) -- [CatalogInventory] Covering the InvalidatePriceIndexUponConfigChangeObserver for Catalog… (by @eduard13)
+    * [magento/magento2#26148](https://github.com/magento/magento2/pull/26148) -- [Bundle] Covering the SetAttributeTabBlockObserver for Bundles by Unit Test (by @eduard13)
+    * [magento/magento2#26140](https://github.com/magento/magento2/pull/26140) -- [ImportExport] Cover Export Source Model by Unit Test (by @edenduong)
+    * [magento/magento2#26136](https://github.com/magento/magento2/pull/26136) -- Code refactor, updated Unit Test with JsonHexTag Serializer (by @srsathish92)
+    * [magento/magento2#26128](https://github.com/magento/magento2/pull/26128) -- Refactor Magento Version module (+ Unit Tests) (by @lbajsarowicz)
+    * [magento/magento2#26127](https://github.com/magento/magento2/pull/26127) -- [Weee] Cover Weee Plugin by Unit Test (by @edenduong)
+    * [magento/magento2#26096](https://github.com/magento/magento2/pull/26096) -- [Checkout] Covering the ResetQuoteAddresses by Unit Test (by @eduard13)
+    * [magento/magento2#26028](https://github.com/magento/magento2/pull/26028) -- Refactor: Remove deprecated methods (by @andrewbess)
+    * [magento/magento2#25864](https://github.com/magento/magento2/pull/25864) -- Adobe stock integration Issue-761: Highlight the selected image in the grid (by @serhiyzhovnir)
+    * [magento/magento2#24849](https://github.com/magento/magento2/pull/24849) -- Simplify some conditional checks (by @DanielRuf)
+    * [magento/magento2#26131](https://github.com/magento/magento2/pull/26131) -- Reduce sleep time for Unit Test of Consumer to 0 seconds (by @lbajsarowicz)
+    * [magento/magento2#26126](https://github.com/magento/magento2/pull/26126) -- [WeeeGraphQl] Covering the FixedProductTax (by @lbajsarowicz)
+    * [magento/magento2#26129](https://github.com/magento/magento2/pull/26129) -- Refactor / Cleanup: `use` section does not need leading backslash (by @lbajsarowicz)
+    * [magento/magento2#26125](https://github.com/magento/magento2/pull/26125) -- [WishlistGraphQL] Covering the CustomerWishlistResolver (by @lbajsarowicz)
+    * [magento/magento2#26033](https://github.com/magento/magento2/pull/26033) -- Normalize new line symbols in Product Text Option (type=area) (by @Leone)
+    * [magento/magento2#25915](https://github.com/magento/magento2/pull/25915) --  Tests for: magento/magento2#24907, magento/magento2#25051, magento/magento2#25149, magento/magento2#24973, magento/magento2#25666. (by @p-bystritsky)
+    * [magento/magento2#25838](https://github.com/magento/magento2/pull/25838) -- [FIXES] #25674: Elasticsearch version selections in admin are overly … (by @mautz-et-tong)
+    * [magento/magento2#25315](https://github.com/magento/magento2/pull/25315) -- Error in vendor/magento/module-shipping/Model/Config/Source/Allmethod… (by @mrodespin)
+    * [magento/magento2#25957](https://github.com/magento/magento2/pull/25957) -- Add Cron Jobs names to New Relic transactions (by @lbajsarowicz)
+    * [magento/magento2#24103](https://github.com/magento/magento2/pull/24103) -- Refactor AdminNotification Render Blocks (by @DavidLambauer)
+    * [magento/magento2#26173](https://github.com/magento/magento2/pull/26173) -- Added Fix for 26164 (by @divyajyothi5321)
+    * [magento/magento2#26170](https://github.com/magento/magento2/pull/26170) -- Fixed Special Price class not added in configurable product page (by @ravi-chandra3197)
+    * [magento/magento2#25876](https://github.com/magento/magento2/pull/25876) -- Advance the order state to processing when a capture notification is received (by @azambon)
+    * [magento/magento2#25428](https://github.com/magento/magento2/pull/25428) -- Fixed model save and ObjectManager usage (by @drpayyne)
+    * [magento/magento2#25125](https://github.com/magento/magento2/pull/25125) -- Performance optimizations (by @andrey-legayev)
+    * [magento/magento2#26225](https://github.com/magento/magento2/pull/26225) -- Hotfix for Invalid date format in Functional and hotfix for failing Integration Tests (by @lbajsarowicz)
+    * [magento/magento2#25603](https://github.com/magento/magento2/pull/25603) -- Fix removing query string from url after redirect (by @arendarenko)
+    * [magento/magento2#26182](https://github.com/magento/magento2/pull/26182) -- Fix for footer newsletter input field length in IE/Edge (by @divyajyothi5321)
+    * [magento/magento2#26130](https://github.com/magento/magento2/pull/26130) -- Fix #25390 - UPS carrier model getting error when creating plugin in to Magento 2.3.3 compatibility (by @Bartlomiejsz)
+    * [magento/magento2#26084](https://github.com/magento/magento2/pull/26084) -- Fix  #26083 - problem with unsAdditionalInformation in \Magento\Payment\Model\Info (by @marcoaacoliveira)
+    * [magento/magento2#26066](https://github.com/magento/magento2/pull/26066) -- 26064 issuefix (by @divyajyothi5321)
+    * [magento/magento2#25958](https://github.com/magento/magento2/pull/25958) -- #14663 Updating Customer through rest/all/V1/customers/:id resets group_id if group_id not passed in payload (by @MaxRomanov4669)
+    * [magento/magento2#25479](https://github.com/magento/magento2/pull/25479) -- JSON fields support (by @akaplya)
+    * [magento/magento2#25640](https://github.com/magento/magento2/pull/25640) -- set correct pram like in BlockRepository implementation (by @torhoehn)
+    * [magento/magento2#25478](https://github.com/magento/magento2/pull/25478) -- Clearer PHPDocs comment for AbstractBlock and Escaper (by @edward-simpson)
+    * [magento/magento2#25452](https://github.com/magento/magento2/pull/25452) -- Elastic Search 5 Indexing Performance Issue with product mapper (by @behnamshayani)
+    * [magento/magento2#24815](https://github.com/magento/magento2/pull/24815) -- Fix #21684 - Currency sign for "Layered Navigation Price Step" is not according to default settings (by @Bartlomiejsz)
+    * [magento/magento2#24471](https://github.com/magento/magento2/pull/24471) -- Resolve Export Coupon Code Grid redirect to DashBoard when create New Cart Price Rule issue24468 (by @edenduong)
+    * [magento/magento2#22917](https://github.com/magento/magento2/pull/22917) -- magento/magento2#22856: Catalog price rules are not working with custom options as expected. (by @p-bystritsky)
+    * [magento/magento2#26274](https://github.com/magento/magento2/pull/26274) -- MFTF: Replace incorrect URLs in Tests and ActionGroups (by @lbajsarowicz)
+    * [magento/magento2#26273](https://github.com/magento/magento2/pull/26273) -- MFTF: Replace <amOnPage> with <actionGroup> for Admin log out (by @lbajsarowicz)
+    * [magento/magento2#26268](https://github.com/magento/magento2/pull/26268) -- Fix #14001 - M2.2.3 directory_country_region_name locale fix? 8bytes zh_Hans_CN(11bytes) ca_ES_VALENCIA(14bytes) (by @Bartlomiejsz)
+    * [magento/magento2#26264](https://github.com/magento/magento2/pull/26264) -- Issue 23521 (by @aleromano89)
+    * [magento/magento2#26259](https://github.com/magento/magento2/pull/26259) -- Fix invalid XML Schema location (by @lbajsarowicz)
+    * [magento/magento2#26237](https://github.com/magento/magento2/pull/26237) -- Added Fix for 25936 (by @divyajyothi5321)
+    * [magento/magento2#26234](https://github.com/magento/magento2/pull/26234) -- [Align some space between input and update button Minicart] (by @hitesh-wagento)
+    * [magento/magento2#26215](https://github.com/magento/magento2/pull/26215) -- Disabled the sorting option in status column on cache grid (by @srsathish92)
+    * [magento/magento2#26207](https://github.com/magento/magento2/pull/26207) -- #26206 Add information about currently reindexed index. (by @lbajsarowicz)
+    * [magento/magento2#26183](https://github.com/magento/magento2/pull/26183) -- Added Fix for - 26181 (by @divyajyothi5321)
+    * [magento/magento2#26169](https://github.com/magento/magento2/pull/26169) -- Added Fix for issue 26168 (by @divyajyothi5321)
+    * [magento/magento2#26029](https://github.com/magento/magento2/pull/26029) -- Fixed keyboard arrow keys behavior for number fields in AdobeStock grid (by @rogyar)
+    * [magento/magento2#25946](https://github.com/magento/magento2/pull/25946) -- Add plugin for SalesOrderItemRepository gift message (#19093) (by @lfolco)
+    * [magento/magento2#25250](https://github.com/magento/magento2/pull/25250) -- Implement catching for all Errors - ref Magento issue #23350 (by @miszyman)
+    * [magento/magento2#26290](https://github.com/magento/magento2/pull/26290) -- [Fixed Jump Datepicker issue in Catalog Price Rule] (by @hitesh-wagento)
+    * [magento/magento2#26270](https://github.com/magento/magento2/pull/26270) -- Fix #22964 (by @marcoaacoliveira)
+    * [magento/magento2#26263](https://github.com/magento/magento2/pull/26263) -- Fix #14913 - bookmark views become uneditable after deleting the first bookmark view (by @Bartlomiejsz)
+    * [magento/magento2#26251](https://github.com/magento/magento2/pull/26251) -- [Customer] Removing the delete buttons for default customer groups (by @eduard13)
+    * [magento/magento2#26218](https://github.com/magento/magento2/pull/26218) -- FIX issue#26217 - Wrong fields selection while using fragments on GraphQL (by @phoenix128)
+    * [magento/magento2#26048](https://github.com/magento/magento2/pull/26048) -- Fixed spelling and adjusted white spaces (by @pawankparmar)
+    * [magento/magento2#25985](https://github.com/magento/magento2/pull/25985) -- Fixed ability to save configuration in field without label (by @AndreyChorniy)
+    * [magento/magento2#25337](https://github.com/magento/magento2/pull/25337) -- #14971 Improper Handling of Pagination SEO (by @chickenland)
+    * [magento/magento2#22990](https://github.com/magento/magento2/pull/22990) -- [Catalog|Sales] Fix wrong behavior of grid row click event (by @Den4ik)
+    * [magento/magento2#26360](https://github.com/magento/magento2/pull/26360) -- System xml cleanup (by @Bartlomiejsz)
+    * [magento/magento2#26359](https://github.com/magento/magento2/pull/26359) -- Remove Filename Normalization in Delete Controller (by @pmclain)
+    * [magento/magento2#26354](https://github.com/magento/magento2/pull/26354) -- Make WYSIWYG configuration options depend on wysiwyg being enabled (by @Bartlomiejsz)
+    * [magento/magento2#26312](https://github.com/magento/magento2/pull/26312) -- magento/magento2#: Unit test for \Magento\Review\Observer\CatalogProductListCollectionAppendSummaryFieldsObserver (by @atwixfirster)
+    * [magento/magento2#26311](https://github.com/magento/magento2/pull/26311) -- [CurrencySymbol] Fixing the redirect after saving the currency symbols (by @eduard13)
+    * [magento/magento2#26305](https://github.com/magento/magento2/pull/26305) -- [GoogleAdWords] Conversion ID client validation (by @eduard13)
+    * [magento/magento2#26269](https://github.com/magento/magento2/pull/26269) -- Fix #7065 - page.main.title is translating title (by @Bartlomiejsz)
+    * [magento/magento2#26258](https://github.com/magento/magento2/pull/26258) -- #11209 Wishlist Add grouped product Error (by @MaxRomanov4669)
+    * [magento/magento2#26238](https://github.com/magento/magento2/pull/26238) -- [Correct both Menu spacing issue] (by @hitesh-wagento)
+    * [magento/magento2#26185](https://github.com/magento/magento2/pull/26185) -- Allow wishlist share when all items are out of stock (by @pmclain)
+    * [magento/magento2#26051](https://github.com/magento/magento2/pull/26051) -- Issue with reorder when disabled reorder setting from admin issue25130 (by @edenduong)
+    * [magento/magento2#25909](https://github.com/magento/magento2/pull/25909) -- Resolve Admin panel is not accessible after limited permissions set to at least one admin account issue25881 (by @edenduong)
+    * [magento/magento2#25718](https://github.com/magento/magento2/pull/25718) -- add the possibility to add display mode dependant layout handles (by @brosenberger)
+    * [magento/magento2#25716](https://github.com/magento/magento2/pull/25716) -- add check if attribute value is possible to be set as configurable option (by @brosenberger)
+    * [magento/magento2#25375](https://github.com/magento/magento2/pull/25375) -- Fix minicart promotion region not rendering #25373 (by @mattijv)
+    * [magento/magento2#25333](https://github.com/magento/magento2/pull/25333) -- Fixed issue magento#25278:Incorrect @return type at getSourceModel in… (by @mkalakailo)
+    * [magento/magento2#25194](https://github.com/magento/magento2/pull/25194) -- Limit the php explode to 2 to prevent extra '=' sign content in the a… (by @dhoang89)
+    * [magento/magento2#25083](https://github.com/magento/magento2/pull/25083) -- Cleanup search api di (by @thomas-kl1)
+    * [magento/magento2#24955](https://github.com/magento/magento2/pull/24955) -- Fix: add to cart grouped product when exists a sold out option (by @gihovani)
+    * [magento/magento2#23313](https://github.com/magento/magento2/pull/23313) -- Trigger page load listeners when no longer loading (by @johnhughes1984)
+    * [magento/magento2#26407](https://github.com/magento/magento2/pull/26407) -- MFTF: Set of fixes for failing Functional Tests (by @lbajsarowicz)
+    * [magento/magento2#26395](https://github.com/magento/magento2/pull/26395) -- HotFix: Failing Magento EE check on Layered Navigation (by @lbajsarowicz)
+    * [magento/magento2#26323](https://github.com/magento/magento2/pull/26323) -- MFTF: Extract Action Groups to separate files - magento/module-ui (by @lbajsarowicz)
+    * [magento/magento2#26321](https://github.com/magento/magento2/pull/26321) -- MFTF: Extract Action Groups to separate files - magento/module-shipping (by @lbajsarowicz)
+    * [magento/magento2#26320](https://github.com/magento/magento2/pull/26320) -- MFTF: Extract Action Groups to separate files - magento/module-sales (by @lbajsarowicz)
+    * [magento/magento2#26319](https://github.com/magento/magento2/pull/26319) -- MFTF: Extract Action Groups to separate files - magento/module-catalog (by @lbajsarowicz)
+    * [magento/magento2#26424](https://github.com/magento/magento2/pull/26424) -- Add to Compare link does not show in mobile view under 640px in blank theme (by @ptylek)
+    * [magento/magento2#26402](https://github.com/magento/magento2/pull/26402) -- magento/magento2#: Unit test for \Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver (by @atwixfirster)
+    * [magento/magento2#26365](https://github.com/magento/magento2/pull/26365) -- Add to Compare link not showing in mobile view under 640px (by @tejash-wagento)
+    * [magento/magento2#26313](https://github.com/magento/magento2/pull/26313) -- Issue-25968 - Added additional checking for returning needed variable… (by @AndreyChorniy)
+    * [magento/magento2#26495](https://github.com/magento/magento2/pull/26495) -- Fix confusing phpdoc in curl client (by @tdgroot)
+    * [magento/magento2#26464](https://github.com/magento/magento2/pull/26464) -- magento/magento2#: GraphQl. RevokeCustomerToken. Test coverage. (by @atwixfirster)
+    * [magento/magento2#26452](https://github.com/magento/magento2/pull/26452) -- magento/magento2#: GraphQl. DeletePaymentToken. Remove redundant validation logic. Test coverage. (by @atwixfirster)
+    * [magento/magento2#26322](https://github.com/magento/magento2/pull/26322) -- MFTF: Extract Action Groups to separate files for dev/tests (by @lbajsarowicz)
+    * [magento/magento2#26391](https://github.com/magento/magento2/pull/26391) -- MFTF: Add missing tests annotations (by @lbajsarowicz)
+    * [magento/magento2#26628](https://github.com/magento/magento2/pull/26628) -- Fixed #26513 (by @vikalps4)
+    * [magento/magento2#26614](https://github.com/magento/magento2/pull/26614) -- #26612 Fix failure on Coupon Apply procedure when loading mask still visible (by @lbajsarowicz)
+    * [magento/magento2#26558](https://github.com/magento/magento2/pull/26558) -- [Csp] Covering the model classes by Unit Tests (by @eduard13)
+    * [magento/magento2#26540](https://github.com/magento/magento2/pull/26540) -- Added action group for cms block duplication test (by @ajithkumar-maragathavel)
+    * [magento/magento2#26537](https://github.com/magento/magento2/pull/26537) -- Covered admin cms block creatation with MFTF test (by @ajithkumar-maragathavel)
+    * [magento/magento2#26512](https://github.com/magento/magento2/pull/26512) -- Extend exception message (by @oroskodias)
+    * [magento/magento2#26511](https://github.com/magento/magento2/pull/26511) -- Extend exception message (by @oroskodias)
+    * [magento/magento2#26509](https://github.com/magento/magento2/pull/26509) -- Update PHP Docs (by @oroskodias)
+    * [magento/magento2#26490](https://github.com/magento/magento2/pull/26490) -- Fixed type issue. Create unit test for customer data model (by @AndreyChorniy)
+    * [magento/magento2#26489](https://github.com/magento/magento2/pull/26489) -- Checked if quote object contains id before looking for quote items (by @rav-redchamps)
+    * [magento/magento2#26480](https://github.com/magento/magento2/pull/26480) -- Bugfix #26479 Exception when Autoloader was not registered properly (by @lbajsarowicz)
+    * [magento/magento2#26478](https://github.com/magento/magento2/pull/26478) -- Unit Test for Magento\Fedex\Plugin\Block\DataProviders\Tracking\ChangeTitle (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26455](https://github.com/magento/magento2/pull/26455) -- 25162 fixed wrong format link (by @Usik2203)
+    * [magento/magento2#26445](https://github.com/magento/magento2/pull/26445) -- Fix #25761: Site map doesn't include home page (by @deepaksnair)
+    * [magento/magento2#26435](https://github.com/magento/magento2/pull/26435) -- #18012: added i18n wrapper to be used in underscore templates for translation (by @sergiy-v)
+    * [magento/magento2#26434](https://github.com/magento/magento2/pull/26434) -- Fix typo in sitemap product collection docblock (by @Tjitse-E)
+    * [magento/magento2#26381](https://github.com/magento/magento2/pull/26381) -- #25300 Mobile view issue on category page - Sort By label overlaps (by @akartavtsev)
+    * [magento/magento2#26327](https://github.com/magento/magento2/pull/26327) -- Fix the wrong behavior of validation scroll on the iPhone X (by @iGerchak)
+    * [magento/magento2#26285](https://github.com/magento/magento2/pull/26285) -- Remove extraneous whitespace - #26275 (by @DanielRuf)
+    * [magento/magento2#26071](https://github.com/magento/magento2/pull/26071) -- #26065 isSaleable cache and optimize result for configurable products (by @ilnytskyi)
+    * [magento/magento2#25994](https://github.com/magento/magento2/pull/25994) -- Extend exception messages (by @oroskodias)
+    * [magento/magento2#25839](https://github.com/magento/magento2/pull/25839) -- Fix gallery thumbs navigation scrolling (by @iGerchak)
+    * [magento/magento2#25385](https://github.com/magento/magento2/pull/25385) -- Prevent page scroll jumping when product gallery loads (by @krzksz)
+    * [magento/magento2#26355](https://github.com/magento/magento2/pull/26355) -- Performance: Getting rid of `array_merge` in loop (by @lbajsarowicz)
+    * [magento/magento2#26296](https://github.com/magento/magento2/pull/26296) -- Add Visual Code catalog generator (by @manuelcanepa)
+    * [magento/magento2#26000](https://github.com/magento/magento2/pull/26000) -- magento/magento2#: Remove unused “Default Email Domain” option and related to it code (by @atwixfirster)
+    * [magento/magento2#25966](https://github.com/magento/magento2/pull/25966) -- [Fixed Radio alignment issue] (by @hitesh-wagento)
+    * [magento/magento2#25875](https://github.com/magento/magento2/pull/25875) -- Prevent endless loop when duplicating product (by @JeroenVanLeusden)
+    * [magento/magento2#25764](https://github.com/magento/magento2/pull/25764) -- Cleanup, refactor and cover with tests section-config module (by @krzksz)
+    * [magento/magento2#24460](https://github.com/magento/magento2/pull/24460) -- Allow construction of products with custom_attributes in $data (by @Vinai)
+    * [magento/magento2#26634](https://github.com/magento/magento2/pull/26634) -- Xml fixes for Magento_AdvancedPricingImportExport module (by @sanganinamrata)
+    * [magento/magento2#26611](https://github.com/magento/magento2/pull/26611) -- #26610 Fix failing CI due to invalid variable handler (by @lbajsarowicz)
+    * [magento/magento2#26549](https://github.com/magento/magento2/pull/26549) -- [Fedex] covered Model/Source/Generic.php by unit test (by @srsathish92)
+    * [magento/magento2#26525](https://github.com/magento/magento2/pull/26525) -- Unit test for Magento\Reports\Observer\EventSaver (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26487](https://github.com/magento/magento2/pull/26487) -- Unit test for Magento\Fedex\Plugin\Block\Tracking\PopupDeliveryDate (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26439](https://github.com/magento/magento2/pull/26439) -- magento/magento2#: Unit test for \Magento\Bundle\Observer\InitOptionRendererObserver (by @atwixfirster)
+    * [magento/magento2#26429](https://github.com/magento/magento2/pull/26429) -- magento/magento2#: Unit test for \Magento\Bundle\Observer\AppendUpsellProductsObserver (by @atwixfirster)
+    * [magento/magento2#26241](https://github.com/magento/magento2/pull/26241) -- #26240: Fixed logic for getting option price index for selected swatch option (by @sergiy-v)
+    * [magento/magento2#26641](https://github.com/magento/magento2/pull/26641) -- Correct doc url added to README (by @rishatiwari)
+    * [magento/magento2#26579](https://github.com/magento/magento2/pull/26579) -- Unit test for Magento\Reports\Observer\CheckoutCartAddProductObserver (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26574](https://github.com/magento/magento2/pull/26574) -- Cover Search Term Entity Redirect Works on Store Front by MFTF Test (by @DmitryTsymbal)
+    * [magento/magento2#26569](https://github.com/magento/magento2/pull/26569) -- 17847 Fixed wrong state title (by @Usik2203)
+    * [magento/magento2#26568](https://github.com/magento/magento2/pull/26568) -- Action group added for existing test (by @ajithkumar-maragathavel)
+    * [magento/magento2#26542](https://github.com/magento/magento2/pull/26542) -- Typo Mistake (by @mayankzalavadia)
+    * [magento/magento2#26533](https://github.com/magento/magento2/pull/26533) -- Github #26532: di:setup:compile fails with anonymous classes (by @joni-jones)
+    * [magento/magento2#26496](https://github.com/magento/magento2/pull/26496) -- [CurrencySymbol] Fixing the disabled currency inputs (by @eduard13)
+    * [magento/magento2#26476](https://github.com/magento/magento2/pull/26476) -- magento/magento2#: Remove a redundant call to DB for guest session (by @atwixfirster)
+    * [magento/magento2#26462](https://github.com/magento/magento2/pull/26462) -- Escape dollar sign for saving content into crontab (by @Erfans)
+    * [magento/magento2#26451](https://github.com/magento/magento2/pull/26451) -- Add frontend template hints status command (by @WaPoNe)
+    * [magento/magento2#26430](https://github.com/magento/magento2/pull/26430) -- Unit Test for Magento\Sitemap\Model\Config\Backend\Priority (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26399](https://github.com/magento/magento2/pull/26399) -- Issue #26332 BeforeOrderPaymentSaveObserver override payment instructions (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26213](https://github.com/magento/magento2/pull/26213) -- SEO: Do not follow links on filter options (by @paveq)
+    * [magento/magento2#26007](https://github.com/magento/magento2/pull/26007) -- #25591 & character in SKUs is shown as & in current variations li… (by @KaushikChavda)
+    * [magento/magento2#25860](https://github.com/magento/magento2/pull/25860) -- Add mass action to invalidate indexes via admin (by @fredden)
+    * [magento/magento2#25851](https://github.com/magento/magento2/pull/25851) -- Fix SearchResult isCacheable performance (by @wigman)
+    * [magento/magento2#25742](https://github.com/magento/magento2/pull/25742) -- Http adapter curl missing delete method (by @jimuld)
+    * [magento/magento2#25324](https://github.com/magento/magento2/pull/25324) -- 13865 safari block cookies breaks javascript scripts (by @raulvOnestic91)
+    * [magento/magento2#24648](https://github.com/magento/magento2/pull/24648) -- reduce reset data actions on DeploymentConfig (by @georgebabarus)
+    * [magento/magento2#24485](https://github.com/magento/magento2/pull/24485) -- Fix return type of price currency format method (by @avstudnitz)
+    * [magento/magento2#26378](https://github.com/magento/magento2/pull/26378) -- 26375 braintree payment address issue (by @chris-pook)
+    * [magento/magento2#25641](https://github.com/magento/magento2/pull/25641) -- M2C-21768 Validate product quantity on Wishlist update (by @ptylek)
+    * [magento/magento2#25285](https://github.com/magento/magento2/pull/25285) -- Add lib wrapper for UUID validation. (by @nikolaevas)
+    * [magento/magento2#26420](https://github.com/magento/magento2/pull/26420) -- #8691: improved language pack inheritance order (by @sergiy-v)
+    * [magento/magento2#26413](https://github.com/magento/magento2/pull/26413) -- #895 Fix for Media Gallery buttons are shifted to the left (by @diazwatson)
+    * [magento/magento2#26162](https://github.com/magento/magento2/pull/26162) -- Fixed Issue with tier price 0 when saving product second time (by @ravi-chandra3197)
+    * [magento/magento2#26623](https://github.com/magento/magento2/pull/26623) -- #26622 - Check quote item for parentItem instead of parentItemId (by @aligent-lturner)
+    * [magento/magento2#26621](https://github.com/magento/magento2/pull/26621) -- Set of fixes introduced during #CoreReview 31.01.2020 (by @lbajsarowicz)
+    * [magento/magento2#26546](https://github.com/magento/magento2/pull/26546) -- [fixed My Wish List Product not showing properly between >768px and <… (by @hitesh-wagento)
+    * [magento/magento2#26423](https://github.com/magento/magento2/pull/26423) -- Update getCustomer method in order class (by @sertlab)
+    * [magento/magento2#26339](https://github.com/magento/magento2/pull/26339) -- Module xml extra end tag removed (by @tejash-wagento)
+    * [magento/magento2#24691](https://github.com/magento/magento2/pull/24691) -- Allows additional payment checks in payment method list (by @jensscherbl)
+    * [magento/magento2#26782](https://github.com/magento/magento2/pull/26782) -- Module_Cms MFTF test improvements (by @ajithkumar-maragathavel)
+    * [magento/magento2#26781](https://github.com/magento/magento2/pull/26781) -- Code hygeine in bundle option graphql resolver (by @moloughlin)
+    * [magento/magento2#26770](https://github.com/magento/magento2/pull/26770) -- Unit tests for Magento\Csp\Model\Mode\ConfigManager and Magento\Csp\Observer\Render (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26764](https://github.com/magento/magento2/pull/26764) -- LoadCssAsync html format fixed for critical css  (by @srsathish92)
+    * [magento/magento2#26714](https://github.com/magento/magento2/pull/26714) -- Deprecated redundant class (by @drpayyne)
+    * [magento/magento2#26715](https://github.com/magento/magento2/pull/26715) -- Unit test for \Magento\Captcha\Observer\ResetAttemptForBackendObserver and ResetAttemptForFrontendObserver (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26502](https://github.com/magento/magento2/pull/26502) -- {ASI} :- Error message to be cached for grid data storage component (by @konarshankar07)
+    * [magento/magento2#26279](https://github.com/magento/magento2/pull/26279) -- Fix issue #26276 with clonning quote billing address street (by @yutv)
+    * [magento/magento2#26246](https://github.com/magento/magento2/pull/26246) -- magento/magento2#26245: Magento does not send an email about a refunded grouped product (by @atwixfirster)
+    * [magento/magento2#26142](https://github.com/magento/magento2/pull/26142) -- Textarea patch 1 (by @textarea)
+    * [magento/magento2#25488](https://github.com/magento/magento2/pull/25488) -- Update composer dependency to fix Redis Key Expiery (by @toxix)
+    * [magento/magento2#25249](https://github.com/magento/magento2/pull/25249) -- upgrade method delete by ids to inject array skus (by @sarron93)
+    * [magento/magento2#25246](https://github.com/magento/magento2/pull/25246) -- Warning when Search Terms page is opened by clicking option at the footer  (by @vishalverma279)
+    * [magento/magento2#24843](https://github.com/magento/magento2/pull/24843) -- Issue #24842: Unable to delete custom option file in admin order create (by @adrian-martinez-interactiv4)
+    * [magento/magento2#26820](https://github.com/magento/magento2/pull/26820) -- [Theme] Covered Unit Test for \Magento\Theme\Controller\Result\JsFooterPlugin (by @srsathish92)
+    * [magento/magento2#26816](https://github.com/magento/magento2/pull/26816) -- Unit Test for \Magento\Directory\Block\Adminhtml\Frontend\Currency\Base (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26771](https://github.com/magento/magento2/pull/26771) -- Removed unnecessary function argument (by @ajithkumar-maragathavel)
+    * [magento/magento2#26684](https://github.com/magento/magento2/pull/26684) -- Move additional dependencies from private getters to constructor - Magento_PageCache (by @Bartlomiejsz)
+    * [magento/magento2#26674](https://github.com/magento/magento2/pull/26674) -- Comment add in translate. (by @pratikhmehta)
+    * [magento/magento2#26342](https://github.com/magento/magento2/pull/26342) -- Remove extra space before semicolon and remove extra comma in php, phtml and js files (by @tejash-wagento)
+    * [magento/magento2#25991](https://github.com/magento/magento2/pull/25991) -- Fixed issue when the preview images navigation is triggered by moving the input filed cursor using arrow keys (by @drpayyne)
+    * [magento/magento2#26857](https://github.com/magento/magento2/pull/26857) -- Issue/26843: Fix es_US Spanish (United States ) Locale is not support… (by @vincent-le89)
+    * [magento/magento2#26846](https://github.com/magento/magento2/pull/26846) -- magento/magento2#: GraphQL. setPaymentMethodOnCart mutation. Extend list of required parameters for testSetPaymentMethodWithoutRequiredParameters (by @atwixfirster)
+    * [magento/magento2#26844](https://github.com/magento/magento2/pull/26844) -- Unit Tests for observers from Magento_Reports (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26835](https://github.com/magento/magento2/pull/26835) -- Unit test for Magento\Downloadable\Model\Sample\DeleteHandler (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26839](https://github.com/magento/magento2/pull/26839) -- Unit test for \Magento\MediaGallery\Plugin\Wysiwyg\Images\Storage (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26769](https://github.com/magento/magento2/pull/26769) -- Fix return type in ResetAttemptForFrontendObserver and ResetAttemptForBackendObserver (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26768](https://github.com/magento/magento2/pull/26768) -- Marginal space validation (by @ajithkumar-maragathavel)
+    * [magento/magento2#26712](https://github.com/magento/magento2/pull/26712) -- Unit test for \Magento\Captcha\Observer\CheckUserForgotPasswordBackendObserver (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26688](https://github.com/magento/magento2/pull/26688) -- Use '===' operator to check if file was written. (by @vovayatsyuk)
+    * [magento/magento2#26659](https://github.com/magento/magento2/pull/26659) -- [26054-Do not duplicate SEO meta data when duplicating a product] (by @dasharath-wagento)
+    * [magento/magento2#26398](https://github.com/magento/magento2/pull/26398) -- Move additional dependencies from private getters to constructor - Magento_Captcha (by @Bartlomiejsz)
+    * [magento/magento2#26317](https://github.com/magento/magento2/pull/26317) -- #26314: fixed logic for updating map price for selected swatch (by @sergiy-v)
+    * [magento/magento2#24612](https://github.com/magento/magento2/pull/24612) -- Fix for the issue #24547 Magento\Customer\Model\Account\Redirect::setRedirectCookie() not properly working (by @sashas777)
+    * [magento/magento2#26904](https://github.com/magento/magento2/pull/26904) -- [Layout] Adding 'article' as an additional supported layout tag (by @eduard13)
+    * [magento/magento2#26899](https://github.com/magento/magento2/pull/26899) -- Unit test for Magento\Vault\Plugin\PaymentVaultAttributesLoad (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26897](https://github.com/magento/magento2/pull/26897) -- Swatches options: eliminate objects instantiation since only their data needed (by @ilnytskyi)
+    * [magento/magento2#26894](https://github.com/magento/magento2/pull/26894) -- Unit test for Magento\GiftMessage\Model\Plugin\MergeQuoteItems (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26878](https://github.com/magento/magento2/pull/26878) -- [NewRelicReporting] Covering the New Relic plugins by Unit Tests (by @eduard13)
+    * [magento/magento2#26869](https://github.com/magento/magento2/pull/26869) -- Update MockObject class in Widget module (by @hws47a)
+    * [magento/magento2#26868](https://github.com/magento/magento2/pull/26868) -- Update MockObject class in Wishlist module (by @hws47a)
+    * [magento/magento2#26863](https://github.com/magento/magento2/pull/26863) -- TierPriceBox toHtml method should be return with string (by @tufahu)
+    * [magento/magento2#26790](https://github.com/magento/magento2/pull/26790) -- Disabled flat: cast $attributeId as (int) in selects (by @ilnytskyi)
+    * [magento/magento2#26761](https://github.com/magento/magento2/pull/26761) -- [Analytics] Code refactor & covered unit test in Analytics/ReportXml/QueryFactory (by @srsathish92)
+    * [magento/magento2#26710](https://github.com/magento/magento2/pull/26710) -- [Customer] Fixing the code style for account edit template and Integration test (by @eduard13)
+    * [magento/magento2#26701](https://github.com/magento/magento2/pull/26701) -- Date incorrect on pdf invoice issue26675 (by @edenduong)
+    * [magento/magento2#26650](https://github.com/magento/magento2/pull/26650) -- issue-#25675 Added fix for #25675 issue to the 2.4 Magento version (by @molneek)
+    * [magento/magento2#26617](https://github.com/magento/magento2/pull/26617) -- Unit Test for Magento\LayeredNavigation\Observer\Edit\Tab\Front\ProductAttributeFormBuildFrontTabObserver (by @karyna-tsymbal-atwix)
+    * [magento/magento2#26584](https://github.com/magento/magento2/pull/26584) -- #26583 Tier pricing save percent showing logic updated in product detail page (by @srsathish92)
+    * [magento/magento2#26523](https://github.com/magento/magento2/pull/26523) -- [#25963] Fixed grids export: option labels are taken from grid filters and columns now. (by @novikor)
+    * [magento/magento2#26418](https://github.com/magento/magento2/pull/26418) -- [Fixed Compare Products section not showing in mobile view under 767px] (by @hitesh-wagento)
+    * [magento/magento2#25806](https://github.com/magento/magento2/pull/25806) -- Reflection: Fix null as first return type (by @Parakoopa)
+    * [magento/magento2#25626](https://github.com/magento/magento2/pull/25626) -- Fix translation retrieval (by @brosenberger)
+    * [magento/magento2#25426](https://github.com/magento/magento2/pull/25426) -- Ui: log exception correctly (by @bchatard)
+    * [magento/magento2#25417](https://github.com/magento/magento2/pull/25417) -- README > Improving the apresentation (by @rafaelstz)
+    * [magento/magento2#25321](https://github.com/magento/magento2/pull/25321) -- Changing input phone type to tel in Contact, Error Report and Customer widget pages (by @rafaelstz)
+    * [magento/magento2#24976](https://github.com/magento/magento2/pull/24976) -- Fix doc block for $queueIterator Magento\Framework\MessageQueue\Topology\Config (by @UncleTioma)
+    * [magento/magento2#22296](https://github.com/magento/magento2/pull/22296) -- Fix #14958 - remove sales sequence data on store view delete (by @Bartlomiejsz)
+    * [magento/magento2#26833](https://github.com/magento/magento2/pull/26833) -- magento/magento2#: GraphQL. MergeCarts mutation. Add additional API-functional test cases (by @atwixfirster)
+    * [magento/magento2#26608](https://github.com/magento/magento2/pull/26608) -- HOTFIX: #26607 Fix failing CI due to Functional Tests (by @lbajsarowicz)
+    * [magento/magento2#26772](https://github.com/magento/magento2/pull/26772) -- Clean up 'isset' coding style (by @GraysonChiang)
+    * [magento/magento2#25858](https://github.com/magento/magento2/pull/25858) -- FIX #25856 / Group Ordered Products report by SKU (by @lbajsarowicz)
+    * [magento/magento2#23570](https://github.com/magento/magento2/pull/23570) -- Improve: [UrlRewrite] Move grid implementation to ui components (by @Den4ik)
+    * [magento/magento2#26995](https://github.com/magento/magento2/pull/26995) -- Fix typo in description node. (by @BorisovskiP)
+    * [magento/magento2#26982](https://github.com/magento/magento2/pull/26982) -- Remove app/functions.php (by @Bartlomiejsz)
+    * [magento/magento2#26974](https://github.com/magento/magento2/pull/26974) -- Fix: #26973 Fatal error when Product Image size is not defined (by @lbajsarowicz)
+    * [magento/magento2#26947](https://github.com/magento/magento2/pull/26947) -- Unit test for AssignCouponDataAfterOrderCustomerAssignObserver (by @mmezhensky)
+    * [magento/magento2#26944](https://github.com/magento/magento2/pull/26944) -- Unit test for CatalogProductCompareClearObserver (by @mmezhensky)
+    * [magento/magento2#26932](https://github.com/magento/magento2/pull/26932) -- Fix #26917 Tax rate zip/post range check box alignment issue (by @srsathish92)
+    * [magento/magento2#26928](https://github.com/magento/magento2/pull/26928) -- Module_Cms MFTF test improvements (by @nandhini-nagaraj)
+    * [magento/magento2#26916](https://github.com/magento/magento2/pull/26916) -- Move cache cleanup operation on state modification operation (by @kandy)
+    * [magento/magento2#26912](https://github.com/magento/magento2/pull/26912) -- Unit test for ProductProcessUrlRewriteRemovingObserver (by @mmezhensky)
+    * [magento/magento2#26862](https://github.com/magento/magento2/pull/26862) -- Removed disabled products from low stock report grid (by @Mohamed-Asar)
+    * [magento/magento2#26821](https://github.com/magento/magento2/pull/26821) -- Reduce requirements for parameter in catalog product type factory (by @hws47a)
+    * [magento/magento2#26755](https://github.com/magento/magento2/pull/26755) -- Fix wrong type of argument appendSummaryFieldsToCollection (by @Usik2203)
+    * [magento/magento2#26697](https://github.com/magento/magento2/pull/26697) -- Update the product model custom option methods PHPdoc (by @hws47a)
+    * [magento/magento2#26586](https://github.com/magento/magento2/pull/26586) -- Improve exception message (by @oroskodias)
+    * [magento/magento2#26230](https://github.com/magento/magento2/pull/26230) -- Activated "Pending Reviews" menu item when merchant opens 'Pending Reviews' section (by @rav-redchamps)
+    * [magento/magento2#26090](https://github.com/magento/magento2/pull/26090) -- Fixed issue 25910 choose drop down not close when open another (by @Usik2203)
+    * [magento/magento2#25895](https://github.com/magento/magento2/pull/25895) -- Change tag name (by @AndreyChorniy)
+    * [magento/magento2#25349](https://github.com/magento/magento2/pull/25349) -- Fixed issue when escape key is pressed to close prompt (by @konarshankar07)
+    * [magento/magento2#25161](https://github.com/magento/magento2/pull/25161) -- fixed confusing grammar in the backend formatDate() function (by @princefishthrower)
+    * [magento/magento2#26979](https://github.com/magento/magento2/pull/26979) -- #26800 Fixed Undefined variable  in ProductLink/Management (by @srsathish92)
+    * [magento/magento2#26842](https://github.com/magento/magento2/pull/26842) -- Unit test for Magento\Catalog\Observer\SetSpecialPriceStartDate has added (by @mmezhensky)
+    * [magento/magento2#26615](https://github.com/magento/magento2/pull/26615) -- Add missing annotations to MFTF tests (by @sta1r)
+    * [magento/magento2#25828](https://github.com/magento/magento2/pull/25828) -- MFTF: Extract Action Groups to separate files - magento/module-customer (by @lbajsarowicz)
+    * [magento/magento2#25311](https://github.com/magento/magento2/pull/25311) -- Add afterGetList method in CustomerRepository plugin to retrieve is_s… (by @enriquei4)
+    * [magento/magento2#27054](https://github.com/magento/magento2/pull/27054) -- Cleanup ObjectManager usage - Magento_Authorization (by @Bartlomiejsz)
+    * [magento/magento2#27048](https://github.com/magento/magento2/pull/27048) -- #27044 Integration Test to cover `$storeId` on Category Repository `get()` (by @lbajsarowicz)
+    * [magento/magento2#27041](https://github.com/magento/magento2/pull/27041) -- FIX: responsiveness for images (by @GrimLink)
+    * [magento/magento2#27021](https://github.com/magento/magento2/pull/27021) -- Unit test for \Magento\MediaGallery\Plugin\Product\Gallery\Processor (by @karyna-tsymbal-atwix)
+    * [magento/magento2#27010](https://github.com/magento/magento2/pull/27010) -- Unit test for UpdateElementTypesObserver (by @mmezhensky)
+    * [magento/magento2#26779](https://github.com/magento/magento2/pull/26779) -- Fix failure for missing product on Storefront (by @lbajsarowicz)
+    * [magento/magento2#26765](https://github.com/magento/magento2/pull/26765) -- Fix #17933 - Bank Transfer Payment Instructions switch back to default (by @Bartlomiejsz)
+    * [magento/magento2#26548](https://github.com/magento/magento2/pull/26548) -- issue/26384 Fix store switcher when using different base url on stores (by @TobiasCodeNull)
+    * [magento/magento2#26329](https://github.com/magento/magento2/pull/26329) -- MFTF: Replace invalid ActionGroup for AdminLogin (by @lbajsarowicz)
+    * [magento/magento2#25359](https://github.com/magento/magento2/pull/25359) -- Fix #25243 (by @korostii)
+    * [magento/magento2#24003](https://github.com/magento/magento2/pull/24003) -- Fixes less compilation problems in the Magento/luma theme (by @hostep)
+    * [magento/magento2#27114](https://github.com/magento/magento2/pull/27114) -- magento/magento2#: Remove a redundant PHP5 directives from .htaccess (by @atwixfirster)
+    * [magento/magento2#27057](https://github.com/magento/magento2/pull/27057) -- Removed redundant method _beforeToHtml (by @Usik2203)
+    * [magento/magento2#27033](https://github.com/magento/magento2/pull/27033) -- Catalog image lazy load (by @tdgroot)
+    * [magento/magento2#26907](https://github.com/magento/magento2/pull/26907) -- Open separate page when click 'View' in CMS pages(Grid) (by @dominicfernando)
+    * [magento/magento2#26619](https://github.com/magento/magento2/pull/26619) -- Cover CartTotalRepositoryPlugin by unit test and correct docblock (by @mrtuvn)
+    * [magento/magento2#26778](https://github.com/magento/magento2/pull/26778) -- Eliminate the need for inheritance for action controllers. (by @lbajsarowicz)
+    * [magento/magento2#26990](https://github.com/magento/magento2/pull/26990) -- #26989 MFTF: Use <magentoCron> for reindex (by @lbajsarowicz)
+    * [magento/magento2#27196](https://github.com/magento/magento2/pull/27196) -- Remove @author annotation from Magento framework (by @diazwatson)
+    * [magento/magento2#27149](https://github.com/magento/magento2/pull/27149) -- 27027 added date format adjustment for 'validate-dob' rule (by @sergiy-v)
+    * [magento/magento2#27138](https://github.com/magento/magento2/pull/27138) -- Removed unnecessary tabindex property (by @drpayyne)
+    * [magento/magento2#27131](https://github.com/magento/magento2/pull/27131) -- 26758 improved cms page custom layout update logic (by @sergiy-v)
+    * [magento/magento2#27084](https://github.com/magento/magento2/pull/27084) -- Cleanup ObjectManager usage - Magento_CacheInvalidate (by @Bartlomiejsz)
+    * [magento/magento2#27083](https://github.com/magento/magento2/pull/27083) -- Cleanup ObjectManager usage - Magento_AsynchronousOperations (by @Bartlomiejsz)
+    * [magento/magento2#27082](https://github.com/magento/magento2/pull/27082) -- Cleanup ObjectManager usage - Magento_Analytics (by @Bartlomiejsz)
+    * [magento/magento2#27080](https://github.com/magento/magento2/pull/27080) -- Cleanup ObjectManager usage - Magento_EncryptionKey (by @Bartlomiejsz)
+    * [magento/magento2#27029](https://github.com/magento/magento2/pull/27029) -- #26847: Added 'enterKey' event handler to prompt widget (by @sergiy-v)
+    * [magento/magento2#27026](https://github.com/magento/magento2/pull/27026) -- Issue 27009: Fix error fire on catch when create new theme (by @vincent-le89)
+    * [magento/magento2#27014](https://github.com/magento/magento2/pull/27014) -- Fix #26992 Add new rating is active checkbox alignment issue (by @srsathish92)
+    * [magento/magento2#26964](https://github.com/magento/magento2/pull/26964) -- Cleanup ObjectManager usage - Magento_Elasticsearch (by @Bartlomiejsz)
+    * [magento/magento2#26939](https://github.com/magento/magento2/pull/26939) -- ObjectManager cleanup - Remove usage from AdminNotification module (by @ihor-sviziev)
+    * [magento/magento2#26902](https://github.com/magento/magento2/pull/26902) -- Fix #20309 - URL Rewrites redirect loop (by @Bartlomiejsz)
+    * [magento/magento2#26649](https://github.com/magento/magento2/pull/26649) -- table bottom color different then thead and tbody border color (by @tejash-wagento)
+    * [magento/magento2#26642](https://github.com/magento/magento2/pull/26642) -- MAG-251090-26590: Fixed Customer registration multiple form submit (by @princeCB)
+    * [magento/magento2#26563](https://github.com/magento/magento2/pull/26563) -- magento/magento2#: Test Coverage. API functional tests. removeItemFromCart (by @atwixfirster)
+    * [magento/magento2#25454](https://github.com/magento/magento2/pull/25454) -- TinyMCE4 hard to input double byte characters on chrome (by @HirokazuNishi)
+    * [magento/magento2#24878](https://github.com/magento/magento2/pull/24878) -- Create missing directories in imageuploader tree if they don't alread… (by @hostep)
+    * [magento/magento2#24743](https://github.com/magento/magento2/pull/24743) -- fix issue 24735 (by @dmdanilchenko)
+    * [magento/magento2#23742](https://github.com/magento/magento2/pull/23742) -- Add Header (h1 - h6) tags to layout xml htmlTags Allowed types (by @furan917)
+    * [magento/magento2#22442](https://github.com/magento/magento2/pull/22442) -- Add support for char element to dto factory (by @wardcapp)
+    * [magento/magento2#27172](https://github.com/magento/magento2/pull/27172) -- magento/magento2#14086: Guest cart API ignoring cartId in url for some methods (by @engcom-Charlie)
+    * [magento/magento2#27179](https://github.com/magento/magento2/pull/27179) -- improve Magento\Catalog\Model\ImageUploader error handler (by @fsw)
+    * [magento/magento2#27145](https://github.com/magento/magento2/pull/27145) -- Cleanup ObjectManager usage - Magento_WebapiAsync (by @Bartlomiejsz)
+    * [magento/magento2#26959](https://github.com/magento/magento2/pull/26959) -- Correctly escape custom product image attributes (by @alexander-aleman)
+    * [magento/magento2#26506](https://github.com/magento/magento2/pull/26506) -- #26499 Always transliterate product url key (by @DanieliMi)
+    * [magento/magento2#25722](https://github.com/magento/magento2/pull/25722) -- Magento#25669: fixed issue "health_check.php fails if any database cache engine configured" (by @andrewbess)
+    * [magento/magento2#27284](https://github.com/magento/magento2/pull/27284) -- Fix static test failures for class annotaions (by @ihor-sviziev)
+    * [magento/magento2#27281](https://github.com/magento/magento2/pull/27281) -- TYPO: Fix annoying typo in Quantity word (by @lbajsarowicz)
+    * [magento/magento2#27277](https://github.com/magento/magento2/pull/27277) -- MFTF: Rename and rewrite Test that fake expired session (by @lbajsarowicz)
+    * [magento/magento2#27274](https://github.com/magento/magento2/pull/27274) -- MFTF: Create Account tests (Success & Failure) with `extend` (by @lbajsarowicz)
+    * [magento/magento2#27261](https://github.com/magento/magento2/pull/27261) -- 20472 added product list price modifier (by @sergiy-v)
+    * [magento/magento2#27249](https://github.com/magento/magento2/pull/27249) -- Update Frontend Development Workflow type's comment to be clearer (by @navarr)
+    * [magento/magento2#26784](https://github.com/magento/magento2/pull/26784) -- [Forward Port PR-14344] Fix generating product URL rewrites for anchor categories (by @hostep)
+    * [magento/magento2#26746](https://github.com/magento/magento2/pull/26746) -- In System/Export controlers use MessageManager instead of throwing exceptions (by @pmarki)
+    * [magento/magento2#26348](https://github.com/magento/magento2/pull/26348) -- Fixed #26345 Reorder in Admin panel leads to report page in case of changed product custom option max characters (by @cedmudit)
+    * [magento/magento2#27187](https://github.com/magento/magento2/pull/27187) -- 26117: "Current user does not have an active cart" even when he actually has one (by @engcom-Charlie)
+    * [magento/magento2#27170](https://github.com/magento/magento2/pull/27170) -- 26825 add all image roles for first product entity (by @sergiy-v)
+    * [magento/magento2#25733](https://github.com/magento/magento2/pull/25733) -- Resolve Mass Delete Widget should have "Confirmation Modal" (by @edenduong)
+    * [magento/magento2#27118](https://github.com/magento/magento2/pull/27118) -- FIX #27117 Invalid functional Test names (by @lbajsarowicz)
+    * [magento/magento2#27266](https://github.com/magento/magento2/pull/27266) -- MFTF: Enable Persistent Shopping Cart. Assert Options (by @DmitryTsymbal)
+    * [magento/magento2#27255](https://github.com/magento/magento2/pull/27255) -- MFTF: Replace fragile test `AdminLoginTest` with `AdminLoginSuccessfulTest` (by @lbajsarowicz)
+    * [magento/magento2#27165](https://github.com/magento/magento2/pull/27165) -- [feature] Display category filter item in layered navigation based on the system configuration from admin area (by @vasilii-b)
+    * [magento/magento2#27015](https://github.com/magento/magento2/pull/27015) -- MC-26683: Removed get errors of cart allowing to add product to cart (by @AleksLi)
+    * [magento/magento2#26987](https://github.com/magento/magento2/pull/26987) -- Remove unused requirejs alias defined (by @mrtuvn)
+    * [magento/magento2#26560](https://github.com/magento/magento2/pull/26560) -- #26473: Improved logic for product image updating for configurable products (by @sergiy-v)
+    * [magento/magento2#25297](https://github.com/magento/magento2/pull/25297) -- Add 'schedule status' column to admin indexer grid (by @fredden)
+    * [magento/magento2#24479](https://github.com/magento/magento2/pull/24479) -- 22251 admin order email is now required 1 (by @solwininfotech)
+    * [magento/magento2#27273](https://github.com/magento/magento2/pull/27273) -- MFTF: Test isolation, consistent naming (backwards-compatible) (by @lbajsarowicz)
+    * [magento/magento2#27237](https://github.com/magento/magento2/pull/27237) -- magento/magento2#26749: Saving CMS Page Title from REST web API makes content empty (by @engcom-Charlie)
+    * [magento/magento2#27215](https://github.com/magento/magento2/pull/27215) -- Cleanup ObjectManager usage - Magento_Translation (by @Bartlomiejsz)
+    * [magento/magento2#27191](https://github.com/magento/magento2/pull/27191) -- 26827 Added improvements to product attribute repository (save method) (by @sergiy-v)
+    * [magento/magento2#27125](https://github.com/magento/magento2/pull/27125) -- #27124: Update wishlist image logic to match logic on wishlist page (by @mtbottens)
+    * [magento/magento2#26015](https://github.com/magento/magento2/pull/26015) -- Remove media gallery assets metadata when a directory removed (by @rogyar)
+    * [magento/magento2#25734](https://github.com/magento/magento2/pull/25734) -- Experius 2.3 patch catalog flat (by @lewisvoncken)
+    * [magento/magento2#23191](https://github.com/magento/magento2/pull/23191) -- Refactor addlinks to own class take 3 (follows #21658) (by @amenk)
+    * [magento/magento2#27336](https://github.com/magento/magento2/pull/27336) -- fixed My account Address Book Additional Address Entries table issue #27335 (by @abrarpathan19)
+    * [magento/magento2#27304](https://github.com/magento/magento2/pull/27304) -- FIX #14080 Added improvements to Category repository (save method) (by @sergiy-v)
+    * [magento/magento2#27298](https://github.com/magento/magento2/pull/27298) -- Implement ActionInterface for `cms/page/view` (by @lbajsarowicz)
+    * [magento/magento2#27292](https://github.com/magento/magento2/pull/27292) -- Magento_Bundle / Remove `cache:flush` and extract Tests to separate files (by @lbajsarowicz)
+    * [magento/magento2#27263](https://github.com/magento/magento2/pull/27263) -- #26708 Fix: ORDER BY has two similar conditions in the SQL query (by @vasilii-b)
+    * [magento/magento2#27214](https://github.com/magento/magento2/pull/27214) -- Mark AbstractAccount as DEPRECATED for Magento_Customer controllers (by @lbajsarowicz)
+    * [magento/magento2#27116](https://github.com/magento/magento2/pull/27116) -- Add Italy States (by @WaPoNe)
+    * [magento/magento2#26748](https://github.com/magento/magento2/pull/26748) -- magento#26745 add method setAdditionalInformation to OrderPaymentInte… (by @antoninobonumore)
+    * [magento/magento2#26923](https://github.com/magento/magento2/pull/26923) -- Improve dashboard charts - migrate to chart.js (by @Bartlomiejsz)
+    * [magento/magento2#27390](https://github.com/magento/magento2/pull/27390) -- magento/magento2: fixes PHPDocs for module Magento_reports (by @andrewbess)
+    * [magento/magento2#27375](https://github.com/magento/magento2/pull/27375) -- Updating link to Adobe CLA in contributing.md (by @filmaj)
+    * [magento/magento2#27353](https://github.com/magento/magento2/pull/27353) -- Add xml declaration for catalog_widget_product_list.xml file (by @Usik2203)
+    * [magento/magento2#27334](https://github.com/magento/magento2/pull/27334) -- MFTF: Customer Subscribes To Newsletter Subscription On StoreFront (by @DmitryTsymbal)
+    * [magento/magento2#27319](https://github.com/magento/magento2/pull/27319) -- Cleanup ObjectManager usage - Magento_Catalog ViewModel,Plugin (by @Bartlomiejsz)
+    * [magento/magento2#27307](https://github.com/magento/magento2/pull/27307) -- magento/magento2: Fixes for the schema cache.xsd (by @andrewbess)
+    * [magento/magento2#27276](https://github.com/magento/magento2/pull/27276) -- Add "Admin" prefix to Test and ActionGroup (by @lbajsarowicz)
+    * [magento/magento2#27000](https://github.com/magento/magento2/pull/27000) -- MFTF FIX: Remove Customer by e-mail does not filter by e-mail (by @lbajsarowicz)
+    * [magento/magento2#26538](https://github.com/magento/magento2/pull/26538) -- Refactor datetime class (by @Tjitse-E)
+    * [magento/magento2#25664](https://github.com/magento/magento2/pull/25664) -- magento/magento2#25540: Products are not displaying infront end after updating product via importing CSV. (by @p-bystritsky)
+    * [magento/magento2#22011](https://github.com/magento/magento2/pull/22011) -- magento/magento2#22010: Updates AbstractExtensibleObject and AbstractExtensibleModel annotations (by @atwixfirster)
+    * [magento/magento2#27378](https://github.com/magento/magento2/pull/27378) -- MFTF: Refactor `amOnPage` for Admin product edit page (by @lbajsarowicz)
+    * [magento/magento2#26055](https://github.com/magento/magento2/pull/26055) -- [Fixed] - HTML Validation issue Replace Attribute with data-* attribute (by @niravkrish)
+    * [magento/magento2#27412](https://github.com/magento/magento2/pull/27412) -- Added improvements to category url key validation logic (by @sergiy-v)
+    * [magento/magento2#27393](https://github.com/magento/magento2/pull/27393) -- Implement ActionInterface for /robots/index/index (by @Bartlomiejsz)
+    * [magento/magento2#27385](https://github.com/magento/magento2/pull/27385) -- Cleanup ObjectManager usage - Magento_SendFriend (by @Bartlomiejsz)
+    * [magento/magento2#27384](https://github.com/magento/magento2/pull/27384) -- Cleanup ObjectManager usage - Magento_Sitemap (by @Bartlomiejsz)
+    * [magento/magento2#27383](https://github.com/magento/magento2/pull/27383) -- #27370 Internet explorer issue:Default billing/shipping address not showing (by @vasilii-b)
+    * [magento/magento2#27381](https://github.com/magento/magento2/pull/27381) -- Implement ActionInterface for /captcha/refresh (by @lbajsarowicz)
+    * [magento/magento2#27360](https://github.com/magento/magento2/pull/27360) -- Move JS module initialization to separate tasks (by @krzksz)
+    * [magento/magento2#27088](https://github.com/magento/magento2/pull/27088) -- Fix Report date doesn't matching in configuration setting (by @Priya-V-Panchal)
+    * [magento/magento2#22837](https://github.com/magento/magento2/pull/22837) -- Short-term admin accounts #22833 (by @lfolco)
+    * [magento/magento2#26075](https://github.com/magento/magento2/pull/26075) -- Fix #6310 - Changing products 'this item has weight' using 'Update Attributes' is not possible (by @Bartlomiejsz)
+    * [magento/magento2#27388](https://github.com/magento/magento2/pull/27388) -- {ASI} :- Image size is not passed to image-uploader when inserting an image from new media gallery (by @konarshankar07)
+    * [magento/magento2#26999](https://github.com/magento/magento2/pull/26999) -- Fixed URL Rewrite addition/removal on product website add/remove (by @gwharton)
+    * [magento/magento2#27371](https://github.com/magento/magento2/pull/27371) -- [Admin] Do not allow HTML tags for the Product Attribute labels on save (by @vasilii-b)
+    * [magento/magento2#27509](https://github.com/magento/magento2/pull/27509) -- [MFTF] fixed test `AdminLoginWithRestrictPermissionTest` (by @engcom-Charlie)
+    * [magento/magento2#27462](https://github.com/magento/magento2/pull/27462) -- Implement ActionInterface for /search/term/popular (by @Bartlomiejsz)
+    * [magento/magento2#27427](https://github.com/magento/magento2/pull/27427) -- Implement ActionInterface for /swagger/ (by @lbajsarowicz)
+    * [magento/magento2#27425](https://github.com/magento/magento2/pull/27425) -- Implement ActionInterface for /version/ (by @lbajsarowicz)
+    * [magento/magento2#27413](https://github.com/magento/magento2/pull/27413) -- Add follow symlinks to support linked folders (by @Nazar65)
+    * [magento/magento2#27365](https://github.com/magento/magento2/pull/27365) -- Fix issue 16315: Product save with onthefly index ignores website assignments (by @tna274)
+    * [magento/magento2#27257](https://github.com/magento/magento2/pull/27257) -- Save Asynchronous Operations with one Batch improvement (by @nuzil)
+    * [magento/magento2#26763](https://github.com/magento/magento2/pull/26763) -- fix: prevent undefined index error - closes #26762 (by @DanielRuf)
+    * [magento/magento2#26736](https://github.com/magento/magento2/pull/26736) -- {ASI} : SortBy component added (by @konarshankar07)
+    * [magento/magento2#26618](https://github.com/magento/magento2/pull/26618) -- Correct docblock CartTotalRepository get method (by @mrtuvn)
+    * [magento/magento2#26417](https://github.com/magento/magento2/pull/26417) -- translate.js Not shows empty values  (by @ilnytskyi)
+    * [magento/magento2#27493](https://github.com/magento/magento2/pull/27493) -- Fix the minicart items actions alignment for tablet and desktop devices (by @vasilii-b)
+    * [magento/magento2#27492](https://github.com/magento/magento2/pull/27492) -- Fixed tests for Magento\Framework\Stdlib\DateTime\DateTime (by @andrewbess)
+    * [magento/magento2#27399](https://github.com/magento/magento2/pull/27399) -- Fixed the wrong behavior for a prompt modal when a user clicks on the modal overlay (by @serhiyzhovnir)
+    * [magento/magento2#26397](https://github.com/magento/magento2/pull/26397) -- Cleanup ObjectManager usage - Magento_Bundle (by @Bartlomiejsz)
+    * [magento/magento2#26100](https://github.com/magento/magento2/pull/26100) -- Fixed 24990: link doesn't redirect to dashboard (by @Usik2203)
+    * [magento/magento2#27545](https://github.com/magento/magento2/pull/27545) -- Fix XML Schema Location (by @sprankhub)
+    * [magento/magento2#27544](https://github.com/magento/magento2/pull/27544) -- Fix incorrect alignment element in login container theme blank (by @mrtuvn)
+    * [magento/magento2#27526](https://github.com/magento/magento2/pull/27526) -- [MFTF] using StorefrontOpenHomePageActionGroup for navigation to Home Page (by @Usik2203)
+    * [magento/magento2#27521](https://github.com/magento/magento2/pull/27521) -- PhpUnit 8 Migration - AdminNotification (by @ihor-sviziev)
+    * [magento/magento2#27497](https://github.com/magento/magento2/pull/27497) -- [bugfix] The store logo is missing when using the Magento_blank theme  (by @vasilii-b)
+    * [magento/magento2#27495](https://github.com/magento/magento2/pull/27495) -- Make the header switcher styles more flexible (by @vasilii-b)
+    * [magento/magento2#27463](https://github.com/magento/magento2/pull/27463) -- Implement ActionInterface for /checkout/sidebar/removeItem (by @Bartlomiejsz)
+    * [magento/magento2#27295](https://github.com/magento/magento2/pull/27295) -- Fix the error that is wrong link title of a downloadable product when enabling "Use Default Value" (by @tna274)
+    * [magento/magento2#26900](https://github.com/magento/magento2/pull/26900) -- Removed references to '%context%'  (dead code) (by @markshust)
+    * [magento/magento2#26801](https://github.com/magento/magento2/pull/26801) -- Prevent resizing an image if it was already resized before (by @hostep)
+    * [magento/magento2#27519](https://github.com/magento/magento2/pull/27519) -- PhpUnit 8 Migration - Framework & AdminAnalytics (by @ihor-sviziev)
+    * [magento/magento2#27322](https://github.com/magento/magento2/pull/27322) -- MFTF: Add `<magentoCron` instruction - Magento: Backend / Braintree / Captcha (by @lbajsarowicz)
+    * [magento/magento2#27321](https://github.com/magento/magento2/pull/27321) -- MFTF: Add `<magentoCron` instruction - Magento_Bundle (by @lbajsarowicz)
+    * [magento/magento2#27652](https://github.com/magento/magento2/pull/27652) -- Fix An error occurred during delete folder from a media gallery. (by @Nazar65)
+    * [magento/magento2#27627](https://github.com/magento/magento2/pull/27627) -- magento/magento2#27500 - Replace deprecated constructs from OfflinePa… (by @cristiano-pacheco)
+    * [magento/magento2#27597](https://github.com/magento/magento2/pull/27597) -- magento/partners-magento2ee#171  Cover reported Admin Log bug with MFTF tests (by @lbajsarowicz)
+    * [magento/magento2#27563](https://github.com/magento/magento2/pull/27563) -- [MFTF] Set correct url for CmsPageEditPage (by @Usik2203)
+    * [magento/magento2#27491](https://github.com/magento/magento2/pull/27491) -- Cleanup ObjectManager usage - Magento_Developer (by @Bartlomiejsz)
+    * [magento/magento2#27343](https://github.com/magento/magento2/pull/27343) -- 13851 Added improvements for credit memo total fields (by @sergiy-v)
+    * [magento/magento2#26988](https://github.com/magento/magento2/pull/26988) -- #26986 REST API Pagination issue (by @lbajsarowicz)
+    * [magento/magento2#26926](https://github.com/magento/magento2/pull/26926) -- Fix hard-code scope store string (by @mrtuvn)
+    * [magento/magento2#26036](https://github.com/magento/magento2/pull/26036) -- Fixes phpcs  errors and warnings for Magento\Framework\Image (by @krisdante)
+    * [magento/magento2#27671](https://github.com/magento/magento2/pull/27671) -- [MFTF] Use Action Group to click on minicart (by @Usik2203)
+    * [magento/magento2#27552](https://github.com/magento/magento2/pull/27552) -- Fix issue with loading mask on Admin Checkout (by @lbajsarowicz)
+    * [magento/magento2#27547](https://github.com/magento/magento2/pull/27547) -- Fix type hint for Select::where (by @marcusirgens)
+    * [magento/magento2#27676](https://github.com/magento/magento2/pull/27676) -- [MFTF] Added new actionGroup to click on first row on order grid (by @Usik2203)
+    * [magento/magento2#27522](https://github.com/magento/magento2/pull/27522) -- PhpUnit 8 Migration - Amqp (by @ihor-sviziev)
+    * [magento/magento2#27448](https://github.com/magento/magento2/pull/27448) -- Sitemap Observer Unit Test improvement: Expect email notification to send, and simplify setup a bit. (by @evktalo)
+    * [magento/magento2#27701](https://github.com/magento/magento2/pull/27701) -- #27638 Fix fatal errors in Unit Tests (by @lbajsarowicz)
+    * [magento/magento2#27689](https://github.com/magento/magento2/pull/27689) -- [MFTF] Using action group to go to admin category page (by @Usik2203)
+    * [magento/magento2#27685](https://github.com/magento/magento2/pull/27685) -- Removed a duplicate variable in Magento\QuoteGraphQl\Model\Resolver\Cart and in \Magento\QuoteGraphQl\Model\Resolver\SetBillingAddressOnCart (by @bgorski)
+    * [magento/magento2#27677](https://github.com/magento/magento2/pull/27677) -- [MFTF] Removed redundant ActionGroup (by @Usik2203)
+    * [magento/magento2#27603](https://github.com/magento/magento2/pull/27603) -- Fix zoom on search input #27506 (by @ptylek)
+    * [magento/magento2#27325](https://github.com/magento/magento2/pull/27325) -- MFTF: Fix failing CMS tests due to PageBuilder conflict (by @lbajsarowicz)
+    * [magento/magento2#27843](https://github.com/magento/magento2/pull/27843) -- [MFTF] Added assertion to AssertAdminSuccessLoginActionGroup (by @Usik2203)
+    * [magento/magento2#27841](https://github.com/magento/magento2/pull/27841) -- [MFTF] Remove redundant Index and Flush Cache action group (by @Usik2203)
+    * [magento/magento2#27692](https://github.com/magento/magento2/pull/27692) -- [MFTF] Use ActionGroup for checking category save success message. (by @Usik2203)
+    * [magento/magento2#27606](https://github.com/magento/magento2/pull/27606) -- Test coverage for PR #27589 (E-mail templates) (by @lbajsarowicz)
+    * [magento/magento2#26293](https://github.com/magento/magento2/pull/26293) -- Bugfix - Customer emails are not being sent from admin if customer is from store "0" (by @matheusgontijo)
+    * [magento/magento2#27846](https://github.com/magento/magento2/pull/27846) -- [MFTF] Use StorefrontOpenCartPageActionGroup to go to Checkout page (by @Usik2203)
+    * [magento/magento2#27300](https://github.com/magento/magento2/pull/27300) -- FIX #27299 Consecutive Requests in Integration Tests failing (by @lbajsarowicz)
+    * [magento/magento2#27499](https://github.com/magento/magento2/pull/27499) -- Updated MediaGallery modules and marked as API (by @sivaschenko)
+    * [magento/magento2#27536](https://github.com/magento/magento2/pull/27536) -- Introduced MediaContent and MediaContentApi modules (by @sivaschenko)
+    * [magento/magento2#27566](https://github.com/magento/magento2/pull/27566) -- Improve openDialog method initialization (by @Nazar65)
+    * [magento/magento2#27966](https://github.com/magento/magento2/pull/27966) -- Correct used in sections image pattern, minor fixes (by @Nazar65)
+    * [magento/magento2#27926](https://github.com/magento/magento2/pull/27926) -- Fixes incorrectly nested html in the product items list template. (by @hostep)
+    * [magento/magento2#27892](https://github.com/magento/magento2/pull/27892) -- Fixes unstable email integration tests (by @hostep)
+    * [magento/magento2#27887](https://github.com/magento/magento2/pull/27887) -- Fix Arabic and Hebrew in invoices (by @ihor-sviziev)
+    * [magento/magento2#27886](https://github.com/magento/magento2/pull/27886) -- Fixed #27874 Vat Validation URL for EU Vat numbers changed. (by @shikhamis11)
+    * [magento/magento2#27740](https://github.com/magento/magento2/pull/27740) -- Redirecting users to sales order history page (by @ajithkumar-maragathavel)
+    * [magento/magento2#27578](https://github.com/magento/magento2/pull/27578) -- Fix Magento Integrity Dependency test in case to be used not in scope of app/code isntallation. (by @swnsma)
+    * [magento/magento2#27323](https://github.com/magento/magento2/pull/27323) -- MFTF: Add `<magentoCron` instruction - CatalogImportExport / CatalogInventory / CatalogRule (by @lbajsarowicz)
+    * [magento/magento2#27093](https://github.com/magento/magento2/pull/27093) -- #27089 Fix issue with returning non-available default limit (by @lbajsarowicz)
+    * [magento/magento2#27994](https://github.com/magento/magento2/pull/27994) -- Refactoring of the plugin responsible for the image/directory delete functionality + adjust tests (by @coderimus)
+    * [magento/magento2#27976](https://github.com/magento/magento2/pull/27976) -- Can not create a subfolder with the same name as the main folder (by @engcom-Charlie)
+    * [magento/magento2#27964](https://github.com/magento/magento2/pull/27964) -- Deprecate AbstractAction and it's public methods (by @lbajsarowicz)
+    * [magento/magento2#27955](https://github.com/magento/magento2/pull/27955) -- compliance to StorefrontMinicartSection (by @engcom-Echo)
+    * [magento/magento2#27515](https://github.com/magento/magento2/pull/27515) -- #27503 : MFTF: Acceptance tests break the naming convention (Indexer + Backup) (by @konarshankar07)
+    * [magento/magento2#26886](https://github.com/magento/magento2/pull/26886) -- comments & validation added in cookie configuration (by @ajithkumar-maragathavel)
+
 2.3.3
 =============
 * GitHub issues:

From 9de0cf28a4c1f7fd775a9c74b1fcafb65d052362 Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Thu, 16 Jul 2020 18:41:20 -0500
Subject: [PATCH 290/307] Release artifact preparation

---
 CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc0f5b058862b..462141ea4100d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -227,6 +227,26 @@
     * [#1270](https://github.com/magento/magento2/issues/1270) -- back button not working in edit order status (fixed in [magento/magento2#27976](https://github.com/magento/magento2/pull/27976))
     * [#27897](https://github.com/magento/magento2/issues/27897) -- MFTF: Inconsistent case in Section name (fixed in [magento/magento2#27955](https://github.com/magento/magento2/pull/27955))
     * [#27503](https://github.com/magento/magento2/issues/27503) -- MFTF: Acceptance tests break the naming convention (fixed in [magento/magento2#27515](https://github.com/magento/magento2/pull/27515))
+    * [#15](https://github.com/magento/magento2-login-as-customer/issues/15) -- Remove Login as Customer actions from admin grids (fixed in [magento/magento2-login-as-customer#23](https://github.com/magento/magento2-login-as-customer/pull/23))
+    * [#34](https://github.com/magento/magento2-login-as-customer/issues/34) -- Remove option to merge guest cart (fixed in [magento/magento2-login-as-customer#49](https://github.com/magento/magento2-login-as-customer/pull/49))
+    * [#110](https://github.com/magento/magento2-login-as-customer/issues/110) -- Need to add spinner/loader while Admin is logging in as Customer (fixed in [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123))
+    * [#159](https://github.com/magento/magento2-login-as-customer/issues/159) -- Error is shown on the page if customer is not sign out from account (fixed in [magento/magento2-login-as-customer#164](https://github.com/magento/magento2-login-as-customer/pull/164))
+    * [#102](https://github.com/magento/magento2-login-as-customer/issues/102) -- Admin user is logged into the default website if customer registered on second website (fixed in [magento/magento2-login-as-customer#148](https://github.com/magento/magento2-login-as-customer/pull/148))
+    * [#59](https://github.com/magento/magento2-login-as-customer/issues/59) -- Customer data not invalidated private content after logged in (fixed in [magento/magento2-login-as-customer#68](https://github.com/magento/magento2-login-as-customer/pull/68))
+    * [#33](https://github.com/magento/magento2-login-as-customer/issues/33) -- Update Readme.txt (fixed in [magento/magento2-login-as-customer#64](https://github.com/magento/magento2-login-as-customer/pull/64))
+    * [#60](https://github.com/magento/magento2-login-as-customer/issues/60) -- Customer data sometimes not being cleared when logging in as customer (fixed in [magento/magento2-login-as-customer#75](https://github.com/magento/magento2-login-as-customer/pull/75))
+    * [#73](https://github.com/magento/magento2-login-as-customer/issues/73) -- Page title is empty when admin login as customer (fixed in [magento/magento2-login-as-customer#92](https://github.com/magento/magento2-login-as-customer/pull/92))
+    * [#55](https://github.com/magento/magento2-login-as-customer/issues/55) -- [DEV] Need to update/change titles for ACL resource tree related to Login as Customer (fixed in [magento/magento2-login-as-customer#69](https://github.com/magento/magento2-login-as-customer/pull/69))
+    * [#8](https://github.com/magento/magento2-login-as-customer/issues/8) -- Merge initial module (fixed in [magento/magento2-login-as-customer#7](https://github.com/magento/magento2-login-as-customer/pull/7))
+    * [#122](https://github.com/magento/magento2-login-as-customer/issues/122) -- Issue 96 (fixed in [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123))
+    * [#71](https://github.com/magento/magento2-login-as-customer/issues/71) -- Login As Customer functionality is available when Login As Customer->Enable Extension=No (fixed in [magento/magento2-login-as-customer#121](https://github.com/magento/magento2-login-as-customer/pull/121))
+    * [#16](https://github.com/magento/magento2-login-as-customer/issues/16) -- All System Configuration settings should be on Global level (fixed in [magento/magento2-login-as-customer#120](https://github.com/magento/magento2-login-as-customer/pull/120))
+    * [#56](https://github.com/magento/magento2-login-as-customer/issues/56) -- [DEV] Confirmation pop-up window for "Login as Customer" if the setting "Store View To Log In" = "Manual Chooser" (fixed in [magento/magento2-login-as-customer#119](https://github.com/magento/magento2-login-as-customer/pull/119))
+    * [#100](https://github.com/magento/magento2-login-as-customer/issues/100) -- Moved all UI from LoginAsCustomer to new LoginAsCustomerUi module (fixed in [magento/magento2-login-as-customer#101](https://github.com/magento/magento2-login-as-customer/pull/101))
+    * [#97](https://github.com/magento/magento2-login-as-customer/issues/97) -- Refactor Magento\LoginAsCustomer\Model\Login Model (fixed in [magento/magento2-login-as-customer#99](https://github.com/magento/magento2-login-as-customer/pull/99))
+    * [#17](https://github.com/magento/magento2-login-as-customer/issues/17) -- Notification banner on storefront (fixed in [magento/magento2-login-as-customer#87](https://github.com/magento/magento2-login-as-customer/pull/87))
+    * [#10](https://github.com/magento/magento2-login-as-customer/issues/10) -- Controllers refactoring (fixed in [magento/magento2-login-as-customer#21](https://github.com/magento/magento2-login-as-customer/pull/21))
+
 * GitHub pull requests:
     * [magento/magento2#25905](https://github.com/magento/magento2/pull/25905) -- [Checkout] Cover DirectoryData by Unit Test (by @edenduong)
     * [magento/magento2#25808](https://github.com/magento/magento2/pull/25808) -- No marginal white space validation added (by @ajithkumar-maragathavel)
@@ -1184,6 +1204,25 @@
     * [magento/magento2#23917](https://github.com/magento/magento2/pull/23917) -- Resolve Missing Validation at some Payment Method Settings issue 23916 (by @edenduong)
     * [magento/magento2#23919](https://github.com/magento/magento2/pull/23919) -- class ApplyAttributesUpdate  should use \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE instead of fixing "bundle" (by @edenduong)
     * [magento/magento2#23933](https://github.com/magento/magento2/pull/23933) -- Fix display of decimal quantities for wishlist items (by @mfickers)
+    * [magento/magento2-login-as-customer#23](https://github.com/magento/magento2-login-as-customer/pull/23) -- Removed "Login As Customer" action from Orders & Customers grid (by @ihorvansach)
+    * [magento/magento2-login-as-customer#49](https://github.com/magento/magento2-login-as-customer/pull/49) -- 34 remove option to merge guest cart v2 (by @ihorvansach)
+    * [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123) -- Added spinner/loader while Admin is logging in as Customer (by @ihorvansach)
+    * [magento/magento2-login-as-customer#164](https://github.com/magento/magento2-login-as-customer/pull/164) -- Magento2 login as customer/issues/159 (by @ihorvansach)
+    * [magento/magento2-login-as-customer#148](https://github.com/magento/magento2-login-as-customer/pull/148) -- magento2-login-as-customer/issues/102 (by @ihorvansach)
+    * [magento/magento2-login-as-customer#68](https://github.com/magento/magento2-login-as-customer/pull/68) -- login-as-customer/issues/59: Customer data not invalidated private content after logged in (by @nntoan)
+    * [magento/magento2-login-as-customer#64](https://github.com/magento/magento2-login-as-customer/pull/64) -- Update readme installation instructions (by @barryvdh)
+    * [magento/magento2-login-as-customer#75](https://github.com/magento/magento2-login-as-customer/pull/75) -- Resolved login-as-customer/issues/60 (by @erfanimani)
+    * [magento/magento2-login-as-customer#92](https://github.com/magento/magento2-login-as-customer/pull/92) -- Page title is empty when admin login as customer (by @konarshankar07)
+    * [magento/magento2-login-as-customer#69](https://github.com/magento/magento2-login-as-customer/pull/69) -- Need to update/change titles for ACL resource tree related to Login as Customer (by @konarshankar07)
+    * [magento/magento2-login-as-customer#7](https://github.com/magento/magento2-login-as-customer/pull/7) -- Merge module code improvements (by @ihorvansach)
+    * [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123) -- Added spinner/loader while Admin is logging in as Customer (by @ihorvansach)
+    * [magento/magento2-login-as-customer#121](https://github.com/magento/magento2-login-as-customer/pull/121) -- Login As Customer functionality is available when Login As Customer is disabled [fixed] (by @ihorvansach)
+    * [magento/magento2-login-as-customer#120](https://github.com/magento/magento2-login-as-customer/pull/120) -- All System Configuration settings should be on Global level (by @ihorvansach)
+    * [magento/magento2-login-as-customer#119](https://github.com/magento/magento2-login-as-customer/pull/119) -- Confirmation pop-up window for "Login as Customer" (New Request) (by @ihorvansach)
+    * [magento/magento2-login-as-customer#101](https://github.com/magento/magento2-login-as-customer/pull/101) -- Moved all UI from LoginAsCustomer to new LoginAsCustomerUi module (by @ihorvansach)
+    * [magento/magento2-login-as-customer#99](https://github.com/magento/magento2-login-as-customer/pull/99) -- Moved code related to the shopping cart from LoginAsCustomer to LogiAsCustomerSales extension (by @ihorvansach)
+    * [magento/magento2-login-as-customer#87](https://github.com/magento/magento2-login-as-customer/pull/87) -- 17 Notification banner on storefront [fixed: The banner is not showing] (by @ihorvansach)
+    * [magento/magento2-login-as-customer#21](https://github.com/magento/magento2-login-as-customer/pull/21) -- Login As Customer Controllers refactoring (by @ihorvansach)
 
 2.3.2
 =============

From 7d23468710305c2d97a48352167c4c9b372fe7bd Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Thu, 16 Jul 2020 18:45:48 -0500
Subject: [PATCH 291/307] Release artifact preparation

---
 CHANGELOG.md | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 462141ea4100d..2f6417854c9f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -792,6 +792,25 @@
     * [magento/magento2#27955](https://github.com/magento/magento2/pull/27955) -- compliance to StorefrontMinicartSection (by @engcom-Echo)
     * [magento/magento2#27515](https://github.com/magento/magento2/pull/27515) -- #27503 : MFTF: Acceptance tests break the naming convention (Indexer + Backup) (by @konarshankar07)
     * [magento/magento2#26886](https://github.com/magento/magento2/pull/26886) -- comments & validation added in cookie configuration (by @ajithkumar-maragathavel)
+    * [magento/magento2-login-as-customer#23](https://github.com/magento/magento2-login-as-customer/pull/23) -- Removed "Login As Customer" action from Orders & Customers grid (by @ihorvansach)
+    * [magento/magento2-login-as-customer#49](https://github.com/magento/magento2-login-as-customer/pull/49) -- 34 remove option to merge guest cart v2 (by @ihorvansach)
+    * [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123) -- Added spinner/loader while Admin is logging in as Customer (by @ihorvansach)
+    * [magento/magento2-login-as-customer#164](https://github.com/magento/magento2-login-as-customer/pull/164) -- Magento2 login as customer/issues/159 (by @ihorvansach)
+    * [magento/magento2-login-as-customer#148](https://github.com/magento/magento2-login-as-customer/pull/148) -- magento2-login-as-customer/issues/102 (by @ihorvansach)
+    * [magento/magento2-login-as-customer#68](https://github.com/magento/magento2-login-as-customer/pull/68) -- login-as-customer/issues/59: Customer data not invalidated private content after logged in (by @nntoan)
+    * [magento/magento2-login-as-customer#64](https://github.com/magento/magento2-login-as-customer/pull/64) -- Update readme installation instructions (by @barryvdh)
+    * [magento/magento2-login-as-customer#75](https://github.com/magento/magento2-login-as-customer/pull/75) -- Resolved login-as-customer/issues/60 (by @erfanimani)
+    * [magento/magento2-login-as-customer#92](https://github.com/magento/magento2-login-as-customer/pull/92) -- Page title is empty when admin login as customer (by @konarshankar07)
+    * [magento/magento2-login-as-customer#69](https://github.com/magento/magento2-login-as-customer/pull/69) -- Need to update/change titles for ACL resource tree related to Login as Customer (by @konarshankar07)
+    * [magento/magento2-login-as-customer#7](https://github.com/magento/magento2-login-as-customer/pull/7) -- Merge module code improvements (by @ihorvansach)
+    * [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123) -- Added spinner/loader while Admin is logging in as Customer (by @ihorvansach)
+    * [magento/magento2-login-as-customer#121](https://github.com/magento/magento2-login-as-customer/pull/121) -- Login As Customer functionality is available when Login As Customer is disabled [fixed] (by @ihorvansach)
+    * [magento/magento2-login-as-customer#120](https://github.com/magento/magento2-login-as-customer/pull/120) -- All System Configuration settings should be on Global level (by @ihorvansach)
+    * [magento/magento2-login-as-customer#119](https://github.com/magento/magento2-login-as-customer/pull/119) -- Confirmation pop-up window for "Login as Customer" (New Request) (by @ihorvansach)
+    * [magento/magento2-login-as-customer#101](https://github.com/magento/magento2-login-as-customer/pull/101) -- Moved all UI from LoginAsCustomer to new LoginAsCustomerUi module (by @ihorvansach)
+    * [magento/magento2-login-as-customer#99](https://github.com/magento/magento2-login-as-customer/pull/99) -- Moved code related to the shopping cart from LoginAsCustomer to LogiAsCustomerSales extension (by @ihorvansach)
+    * [magento/magento2-login-as-customer#87](https://github.com/magento/magento2-login-as-customer/pull/87) -- 17 Notification banner on storefront [fixed: The banner is not showing] (by @ihorvansach)
+    * [magento/magento2-login-as-customer#21](https://github.com/magento/magento2-login-as-customer/pull/21) -- Login As Customer Controllers refactoring (by @ihorvansach)
 
 2.3.3
 =============
@@ -1204,26 +1223,7 @@
     * [magento/magento2#23917](https://github.com/magento/magento2/pull/23917) -- Resolve Missing Validation at some Payment Method Settings issue 23916 (by @edenduong)
     * [magento/magento2#23919](https://github.com/magento/magento2/pull/23919) -- class ApplyAttributesUpdate  should use \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE instead of fixing "bundle" (by @edenduong)
     * [magento/magento2#23933](https://github.com/magento/magento2/pull/23933) -- Fix display of decimal quantities for wishlist items (by @mfickers)
-    * [magento/magento2-login-as-customer#23](https://github.com/magento/magento2-login-as-customer/pull/23) -- Removed "Login As Customer" action from Orders & Customers grid (by @ihorvansach)
-    * [magento/magento2-login-as-customer#49](https://github.com/magento/magento2-login-as-customer/pull/49) -- 34 remove option to merge guest cart v2 (by @ihorvansach)
-    * [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123) -- Added spinner/loader while Admin is logging in as Customer (by @ihorvansach)
-    * [magento/magento2-login-as-customer#164](https://github.com/magento/magento2-login-as-customer/pull/164) -- Magento2 login as customer/issues/159 (by @ihorvansach)
-    * [magento/magento2-login-as-customer#148](https://github.com/magento/magento2-login-as-customer/pull/148) -- magento2-login-as-customer/issues/102 (by @ihorvansach)
-    * [magento/magento2-login-as-customer#68](https://github.com/magento/magento2-login-as-customer/pull/68) -- login-as-customer/issues/59: Customer data not invalidated private content after logged in (by @nntoan)
-    * [magento/magento2-login-as-customer#64](https://github.com/magento/magento2-login-as-customer/pull/64) -- Update readme installation instructions (by @barryvdh)
-    * [magento/magento2-login-as-customer#75](https://github.com/magento/magento2-login-as-customer/pull/75) -- Resolved login-as-customer/issues/60 (by @erfanimani)
-    * [magento/magento2-login-as-customer#92](https://github.com/magento/magento2-login-as-customer/pull/92) -- Page title is empty when admin login as customer (by @konarshankar07)
-    * [magento/magento2-login-as-customer#69](https://github.com/magento/magento2-login-as-customer/pull/69) -- Need to update/change titles for ACL resource tree related to Login as Customer (by @konarshankar07)
-    * [magento/magento2-login-as-customer#7](https://github.com/magento/magento2-login-as-customer/pull/7) -- Merge module code improvements (by @ihorvansach)
-    * [magento/magento2-login-as-customer#123](https://github.com/magento/magento2-login-as-customer/pull/123) -- Added spinner/loader while Admin is logging in as Customer (by @ihorvansach)
-    * [magento/magento2-login-as-customer#121](https://github.com/magento/magento2-login-as-customer/pull/121) -- Login As Customer functionality is available when Login As Customer is disabled [fixed] (by @ihorvansach)
-    * [magento/magento2-login-as-customer#120](https://github.com/magento/magento2-login-as-customer/pull/120) -- All System Configuration settings should be on Global level (by @ihorvansach)
-    * [magento/magento2-login-as-customer#119](https://github.com/magento/magento2-login-as-customer/pull/119) -- Confirmation pop-up window for "Login as Customer" (New Request) (by @ihorvansach)
-    * [magento/magento2-login-as-customer#101](https://github.com/magento/magento2-login-as-customer/pull/101) -- Moved all UI from LoginAsCustomer to new LoginAsCustomerUi module (by @ihorvansach)
-    * [magento/magento2-login-as-customer#99](https://github.com/magento/magento2-login-as-customer/pull/99) -- Moved code related to the shopping cart from LoginAsCustomer to LogiAsCustomerSales extension (by @ihorvansach)
-    * [magento/magento2-login-as-customer#87](https://github.com/magento/magento2-login-as-customer/pull/87) -- 17 Notification banner on storefront [fixed: The banner is not showing] (by @ihorvansach)
-    * [magento/magento2-login-as-customer#21](https://github.com/magento/magento2-login-as-customer/pull/21) -- Login As Customer Controllers refactoring (by @ihorvansach)
-
+    
 2.3.2
 =============
 * GitHub issues:

From c5f1291bfd70249db5b060c6500031484ffa423d Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Thu, 16 Jul 2020 18:47:03 -0500
Subject: [PATCH 292/307] Release artifact preparation

---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2f6417854c9f9..919f3f020088b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1223,7 +1223,7 @@
     * [magento/magento2#23917](https://github.com/magento/magento2/pull/23917) -- Resolve Missing Validation at some Payment Method Settings issue 23916 (by @edenduong)
     * [magento/magento2#23919](https://github.com/magento/magento2/pull/23919) -- class ApplyAttributesUpdate  should use \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE instead of fixing "bundle" (by @edenduong)
     * [magento/magento2#23933](https://github.com/magento/magento2/pull/23933) -- Fix display of decimal quantities for wishlist items (by @mfickers)
-    
+
 2.3.2
 =============
 * GitHub issues:

From 5dbcd2c5bede48d0ad322f502adbf97a1b6da98d Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Fri, 17 Jul 2020 15:13:46 +0300
Subject: [PATCH 293/307] MC-35891: Automate MC-28963 tests

---
 .../Catalog/Test/Mftf/Data/ProductData.xml    |   4 +
 .../Data/ConfigurableProductOptionData.xml    |  19 +
 .../Test/Mftf/Data/ConfigData.xml             |  20 +
 ...OptionsAreShownInLayeredNavigationTest.xml | 397 ++++++++++++++++++
 4 files changed, 440 insertions(+)
 create mode 100644 app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
 create mode 100644 app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml

diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
index 7aabedbf1c3f7..e5b38533747f9 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
@@ -284,6 +284,10 @@
         <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
         <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
     </entity>
+    <entity name="ApiSimpleProductWithCategory" type="product2" extends="ApiSimpleOne">
+        <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
+        <requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
+    </entity>
     <entity name="ApiSimpleProductWithShortSKU" type="product2" extends="ApiSimpleOne">
         <data key="sku" unique="suffix">pr</data>
     </entity>
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml
index a1a499f33eda0..c827b9998450a 100644
--- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml
+++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Data/ConfigurableProductOptionData.xml
@@ -26,4 +26,23 @@
         <requiredEntity type="ValueIndex">ValueIndex2</requiredEntity>
         <requiredEntity type="ValueIndex">ValueIndex3</requiredEntity>
     </entity>
+    <entity name="ConfigurableProduct15Options" type="ConfigurableProductOption">
+        <var key="attribute_id" entityKey="attribute_id" entityType="ProductAttribute" />
+        <data key="label">option</data>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+        <requiredEntity type="ValueIndex">ValueIndex1</requiredEntity>
+    </entity>
 </entities>
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
new file mode 100644
index 0000000000000..a745397403cd2
--- /dev/null
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ /**
+  * Copyright © Magento, Inc. All rights reserved.
+  * See COPYING.txt for license details.
+  */
+-->
+
+<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
+    <entity name="DisplayProductCountDefaultValue">
+        <data key="path">catalog/layered_navigation/display_product_count</data>
+        <data key="value">1</data>
+    </entity>
+    <entity name="PriceNavigationStepCalculationDefaultValue">
+        <data key="path">catalog/layered_navigation/price_range_calculation</data>
+        <data key="value">auto</data>
+    </entity>
+
+</entities>
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml
new file mode 100644
index 0000000000000..4f547120f14d2
--- /dev/null
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml
@@ -0,0 +1,397 @@
+<?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="StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest">
+        <annotations>
+            <features value="Layered Navigation"/>
+            <stories value="Product attributes in Layered Navigation"/>
+            <title value="Limitation of displayed attribute options number in layered navigation with ElasticSearch"/>
+            <description value="All attribute options are shown in Layered navigation"/>
+            <severity value="CRITICAL"/>
+            <testCaseId value="MC-28963"/>
+            <group value="LayeredNavigation"/>
+            <group value="SearchEngineElasticsearch"/>
+        </annotations>
+
+        <before>
+            <magentoCLI command="config:set {{DisplayProductCountDefaultValue.path}} {{DisplayProductCountDefaultValue.value}}" stepKey="enableDisplayProductCount"/>
+            <magentoCLI command="config:set {{PriceNavigationStepCalculationDefaultValue.path}} {{PriceNavigationStepCalculationDefaultValue.value}}" stepKey="setPriceNavigationStepCalculationDefaultValue"/>
+            <createData entity="ApiCategory" stepKey="createCategory"/>
+            <!-- Create an attribute -->
+            <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/>
+            <!--Create 15 attribute options-->
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption1">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption2">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption3">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption4">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption5">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption6">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption7">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption8">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption9">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption10">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption11">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption12">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption13">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption14">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption15">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+            <!--Cet Created options data-->
+            <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getConfigAttributeOption2">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="3" stepKey="getConfigAttributeOption3">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="4" stepKey="getConfigAttributeOption4">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="5" stepKey="getConfigAttributeOption5">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="6" stepKey="getConfigAttributeOption6">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="7" stepKey="getConfigAttributeOption7">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="8" stepKey="getConfigAttributeOption8">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="9" stepKey="getConfigAttributeOption9">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="10" stepKey="getConfigAttributeOption10">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="11" stepKey="getConfigAttributeOption11">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="12" stepKey="getConfigAttributeOption12">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="13" stepKey="getConfigAttributeOption13">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="14" stepKey="getConfigAttributeOption14">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="15" stepKey="getConfigAttributeOption15">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </getData>
+
+            <!-- Add attribute to attribute set-->
+            <createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+            </createData>
+
+            <!-- Create Configurable product -->
+            <createData entity="BaseConfigurableProduct" stepKey="createConfigProduct">
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+
+            <!-- Create simple products and set them created attribute value -->
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct1">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption1"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct2">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption2"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct3">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption3"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct4">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption4"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct5">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption5"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct6">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption6"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct7">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption7"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct8">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption8"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct9">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption9"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct10">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption10"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct11">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption11"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct12">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption12"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct13">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption13"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct14">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption14"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ApiSimpleProductWithCategory" stepKey="createConfigChildProduct15">
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption15"/>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+
+            <!-- Create the configurable product -->
+            <createData entity="ConfigurableProduct15Options" stepKey="createConfigProductOption">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigProductAttribute"/>
+                <requiredEntity createDataKey="getConfigAttributeOption1"/>
+                <requiredEntity createDataKey="getConfigAttributeOption2"/>
+                <requiredEntity createDataKey="getConfigAttributeOption3"/>
+                <requiredEntity createDataKey="getConfigAttributeOption4"/>
+                <requiredEntity createDataKey="getConfigAttributeOption5"/>
+                <requiredEntity createDataKey="getConfigAttributeOption6"/>
+                <requiredEntity createDataKey="getConfigAttributeOption7"/>
+                <requiredEntity createDataKey="getConfigAttributeOption8"/>
+                <requiredEntity createDataKey="getConfigAttributeOption9"/>
+                <requiredEntity createDataKey="getConfigAttributeOption10"/>
+                <requiredEntity createDataKey="getConfigAttributeOption11"/>
+                <requiredEntity createDataKey="getConfigAttributeOption12"/>
+                <requiredEntity createDataKey="getConfigAttributeOption13"/>
+                <requiredEntity createDataKey="getConfigAttributeOption14"/>
+                <requiredEntity createDataKey="getConfigAttributeOption15"/>
+            </createData>
+
+            <!-- Add simple products to the configurable product -->
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild1">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct1"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct2"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild3">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct3"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild4">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct4"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild5">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct5"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild6">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct6"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild7">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct7"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild8">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct8"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild9">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct9"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild10">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct10"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild11">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct11"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild12">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct12"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild13">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct13"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild14">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct14"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild15">
+                <requiredEntity createDataKey="createConfigProduct"/>
+                <requiredEntity createDataKey="createConfigChildProduct15"/>
+            </createData>
+        </before>
+
+        <after>
+            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+            <deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
+            <deleteData createDataKey="createConfigChildProduct1" stepKey="deleteConfigChildProduct1"/>
+            <deleteData createDataKey="createConfigChildProduct2" stepKey="deleteConfigChildProduct2"/>
+            <deleteData createDataKey="createConfigChildProduct3" stepKey="deleteConfigChildProduct3"/>
+            <deleteData createDataKey="createConfigChildProduct4" stepKey="deleteConfigChildProduct4"/>
+            <deleteData createDataKey="createConfigChildProduct5" stepKey="deleteConfigChildProduct5"/>
+            <deleteData createDataKey="createConfigChildProduct6" stepKey="deleteConfigChildProduct6"/>
+            <deleteData createDataKey="createConfigChildProduct7" stepKey="deleteConfigChildProduct7"/>
+            <deleteData createDataKey="createConfigChildProduct8" stepKey="deleteConfigChildProduct8"/>
+            <deleteData createDataKey="createConfigChildProduct9" stepKey="deleteConfigChildProduct9"/>
+            <deleteData createDataKey="createConfigChildProduct10" stepKey="deleteConfigChildProduct10"/>
+            <deleteData createDataKey="createConfigChildProduct11" stepKey="deleteConfigChildProduct11"/>
+            <deleteData createDataKey="createConfigChildProduct12" stepKey="deleteConfigChildProduct12"/>
+            <deleteData createDataKey="createConfigChildProduct13" stepKey="deleteConfigChildProduct13"/>
+            <deleteData createDataKey="createConfigChildProduct14" stepKey="deleteConfigChildProduct14"/>
+            <deleteData createDataKey="createConfigChildProduct15" stepKey="deleteConfigChildProduct15"/>
+            <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/>
+            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
+                <argument name="indices" value="catalogsearch_fulltext"/>
+            </actionGroup>
+        </after>
+
+        <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategory">
+            <argument name="category" value="$createCategory$"/>
+        </actionGroup>
+        <!--Check filtration options for created attribute. All attribute options should be displayed -->
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption1PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption1.label$"/>
+            <argument name="attributeOptionPosition" value="1"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption2PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption2.label$"/>
+            <argument name="attributeOptionPosition" value="2"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption3PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption3.label$"/>
+            <argument name="attributeOptionPosition" value="3"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption4PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption4.label$"/>
+            <argument name="attributeOptionPosition" value="4"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption5PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption5.label$"/>
+            <argument name="attributeOptionPosition" value="5"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption6PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption6.label$"/>
+            <argument name="attributeOptionPosition" value="6"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption7PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption7.label$"/>
+            <argument name="attributeOptionPosition" value="7"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption8PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption8.label$"/>
+            <argument name="attributeOptionPosition" value="8"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption9PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption9.label$"/>
+            <argument name="attributeOptionPosition" value="9"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption10PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption10.label$"/>
+            <argument name="attributeOptionPosition" value="10"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption11PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption11.label$"/>
+            <argument name="attributeOptionPosition" value="11"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption12PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption12.label$"/>
+            <argument name="attributeOptionPosition" value="12"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption13PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption13.label$"/>
+            <argument name="attributeOptionPosition" value="13"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption14PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption14.label$"/>
+            <argument name="attributeOptionPosition" value="14"/>
+        </actionGroup>
+        <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeOption15PresentInLayeredNavigation">
+            <argument name="attributeLabel" value="$createConfigProductAttribute.attribute[frontend_labels][0][label]$"/>
+            <argument name="attributeOptionLabel" value="$getConfigAttributeOption15.label$"/>
+            <argument name="attributeOptionPosition" value="15"/>
+        </actionGroup>
+    </test>
+</tests>

From a24b11fd8799e4ffb9ea452f821befb30cdc7577 Mon Sep 17 00:00:00 2001
From: Peter Dohogne <pdohogne@magento.com>
Date: Mon, 20 Jul 2020 09:12:19 -0500
Subject: [PATCH 294/307] MC-34399: Removing upgrade script

---
 .../pre_composer_update_2.3.php               | 419 ------------------
 1 file changed, 419 deletions(-)
 delete mode 100644 dev/tools/UpgradeScripts/pre_composer_update_2.3.php

diff --git a/dev/tools/UpgradeScripts/pre_composer_update_2.3.php b/dev/tools/UpgradeScripts/pre_composer_update_2.3.php
deleted file mode 100644
index e6f1ddb31c4a3..0000000000000
--- a/dev/tools/UpgradeScripts/pre_composer_update_2.3.php
+++ /dev/null
@@ -1,419 +0,0 @@
-#!/usr/bin/php
-<?php
-/**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
-declare(strict_types=1);
-
-$_scriptName = basename(__FILE__);
-
-define(
-    'SYNOPSIS',
-<<<SYNOPSIS
-Updates Magento with 2.3 requirements that can't be done by `composer update` or `bin/magento setup:upgrade`. 
-Run this script after upgrading to PHP 7.1/7.2 and before running `composer update` or `bin/magento setup:upgrade`.
-
-Steps included:
- - Require new version of the metapackage
- - Update "require-dev" section
- - Add "Laminas\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/" to composer.json "autoload":"psr-4" section
- - Update Magento/Updater if it's installed
- - Update name, version, and description fields in the root composer.json 
-
-Usage: php -f $_scriptName -- --root='</path/to/magento/root/>' [--composer='</path/to/composer/executable>'] 
-           [--edition='<community|enterprise>'] [--repo='<composer_repo_url>'] [--version='<version_constraint>']
-           [--help]
-
-Required:
- --root='</path/to/magento/root/>'
-    Path to the Magento installation root directory
-
-Optional:
- --composer='</path/to/composer/executable>'
-    Path to the composer executable
-    - Default: The composer found in the system PATH
-    
- --edition='<community|enterprise>'
-    Target Magento edition for the update.  Open Source = 'community', Commerce = 'enterprise'
-    - Default: The edition currently required in composer.json
-    
- --repo='<composer_repo_url>'
-    The Magento repository url to use to pull the new packages
-    - Default: The Magento repository configured in composer.json
-    
- --version='<version_constraint>'
-    A composer version constraint for allowable 2.3 packages. Versions other than 2.3 are not handled by this script
-    See https://getcomposer.org/doc/articles/versions.md#writing-version-constraints for more information.
-    - Default: The latest 2.3 version available in the Magento repository
-
- --help
-    Display this message
-SYNOPSIS
-);
-
-$opts = getopt('', [
-    'root:',
-    'composer:',
-    'edition:',
-    'repo:',
-    'version:',
-    'help'
-]);
-
-// Log levels available for use with output() function
-define('INFO', 0);
-define('WARN', 1);
-define('ERROR', 2);
-
-if (isset($opts['help'])) {
-    output(SYNOPSIS);
-    exit(0);
-}
-
-try {
-    if (version_compare(PHP_VERSION, '7.1', '<') || version_compare(PHP_VERSION, '7.3', '>=')) {
-        preg_match('/^\d+\.\d+\.\d+/',PHP_VERSION, $matches);
-        $phpVersion = $matches[0];
-        throw new Exception("Invalid PHP version '$phpVersion'. Magento 2.3 requires PHP 7.1 or 7.2");
-    }
-
-    /**** Populate and Validate Settings ****/
-
-    if (empty($opts['root']) || !is_dir($opts['root'])) {
-        throw new BadMethodCallException('Existing Magento root directory must be supplied with --root');
-    }
-    $rootDir = $opts['root'];
-
-    $composerFile = "$rootDir/composer.json";
-    if (!file_exists($composerFile)) {
-        throw new InvalidArgumentException("Supplied Magento root directory '$rootDir' does not contain composer.json");
-    }
-
-    $composerData = json_decode(file_get_contents($composerFile), true);
-
-    $metapackageMatcher = '/^magento\/product\-(?<edition>community|enterprise)\-edition$/';
-    foreach (array_keys($composerData['require']) as $requiredPackage) {
-        if (preg_match($metapackageMatcher, $requiredPackage, $matches)) {
-            $edition = $matches['edition'];
-            break;
-        }
-    }
-    if (empty($edition)) {
-        throw new InvalidArgumentException("No Magento metapackage found in $composerFile");
-    }
-
-    // Override composer.json edition if one is passed to the script
-    if (!empty($opts['edition'])) {
-        $edition = $opts['edition'];
-    }
-    $edition = strtolower($edition);
-
-    if ($edition !== 'community' && $edition !== 'enterprise') {
-        throw new InvalidArgumentException("Only 'community' and 'enterprise' editions allowed; '$edition' given");
-    }
-
-    $composerExec = (!empty($opts['composer']) ? $opts['composer'] : 'composer');
-    if (basename($composerExec, '.phar') != 'composer') {
-        throw new InvalidArgumentException("'$composerExec' is not a composer executable");
-    }
-
-    // Use 'command -v' to check if composer is executable
-    exec("command -v $composerExec", $out, $composerFailed);
-    if ($composerFailed) {
-        if ($composerExec == 'composer') {
-            $message = 'Composer executable is not available in the system PATH';
-        }
-        else {
-            $message = "Invalid composer executable '$composerExec'";
-        }
-        throw new InvalidArgumentException($message);
-    }
-
-    // The composer command uses the Magento root as the working directory so this script can be run from anywhere
-    $composerExec = "$composerExec --working-dir='$rootDir'";
-
-    // Set the version constraint to any 2.3 package if not specified
-    $constraint = !empty($opts['version']) ? $opts['version'] : '2.3.*';
-
-    // Composer package names
-    $project = "magento/project-$edition-edition";
-    $metapackage = "magento/product-$edition-edition";
-
-    // Get the list of potential Magento repositories to search for the update package
-    $mageUrls = [];
-    $authFailed = [];
-    if (!empty($opts['repo'])) {
-        $mageUrls[] = $opts['repo'];
-    }
-    else {
-        foreach ($composerData['repositories'] as $label => $repo) {
-            if (is_string($label) && strpos(strtolower($label), 'mage') !== false || strpos($repo['url'], '.mage') !== false) {
-                $mageUrls[] = $repo['url'];
-            }
-        }
-
-        if (count($mageUrls) == 0) {
-            throw new InvalidArgumentException('No Magento repository urls found in composer.json');
-        }
-    }
-
-    $tempDir = findUnusedFilename($rootDir, 'temp_project');
-    $projectConstraint = "$project='$constraint'";
-    $version = null;
-    $description = null;
-
-    output("**** Searching for a matching version of $project ****");
-
-    // Try to retrieve a 2.3 package from each Magento repository until one is found
-    foreach ($mageUrls as $repoUrl) {
-        try {
-            output("\\nChecking $repoUrl");
-            deleteFilepath($tempDir);
-            runComposer("create-project --repository=$repoUrl $projectConstraint $tempDir --no-install");
-
-            // Make sure the downloaded package is 2.3
-            $newComposer = json_decode(file_get_contents("$tempDir/composer.json"), true);
-            $version = $newComposer['version'];
-            $description = $newComposer['description'];
-
-            if (strpos($version, '2.3.') !== 0) {
-                throw new InvalidArgumentException("Bad 2.3 version constraint '$constraint'; version $version found");
-            }
-
-            // If no errors occurred, set this as the correct repo, forget errors from previous repos, and move forward
-            output("\\n**** Found compatible $project version: $version ****");
-            $repo = $repoUrl;
-            unset($exception);
-            break;
-        }
-        catch (Exception $e) {
-            // If this repository doesn't have a valid package, save the error but continue checking any others
-            output("Failed to find a valid 2.3 $project package on $repoUrl", WARN);
-            $exception = $e;
-        }
-    }
-
-    // If a valid project package hasn't been found, throw the last error
-    if (isset($exception)) {
-        throw $exception;
-    }
-
-    output("\\n**** Executing Updates ****");
-
-    $composerBackup = findUnusedFilename($rootDir, 'composer.json.bak');
-    output("\\nBacking up $composerFile to $composerBackup");
-    copy($composerFile, $composerBackup);
-
-    // Add the repository to composer.json if needed without overwriting any existing ones
-    $repoUrls = array_map(function ($r) { return $r['url']; }, $composerData['repositories']);
-    if (!in_array($repo, $repoUrls)) {
-        $repoLabels = array_map('strtolower',array_keys($composerData['repositories']));
-        $newLabel = 'magento';
-        if (in_array($newLabel, $repoLabels)) {
-            $count = count($repoLabels);
-            for ($i = 1; $i <= $count; $i++) {
-                if (!in_array("$newLabel-$i", $repoLabels)) {
-                    $newLabel = "$newLabel-$i";
-                    break;
-                }
-            }
-        }
-        output("\\nAdding $repo to composer repositories under label '$newLabel'");
-        runComposer("config repositories.$newLabel composer $repo");
-    }
-
-    output("\\nUpdating Magento metapackage requirement to $metapackage=$version");
-    if ($edition == 'enterprise') {
-        // Community -> Enterprise upgrades need to remove the community edition metapackage
-        runComposer('remove magento/product-community-edition --no-update');
-        output('');
-    }
-    runComposer("require $metapackage=$version --no-update");
-
-    output('\nUpdating "require-dev" section of composer.json');
-    runComposer('require --dev ' .
-        'allure-framework/allure-phpunit:~1.2.0 ' .
-        'friendsofphp/php-cs-fixer:~2.14.0 ' .
-        'lusitanian/oauth:~0.8.10 ' .
-        'magento/magento-coding-standard:~3.0.0 ' .
-        'magento/magento2-functional-testing-framework:~2.4.3 ' .
-        'pdepend/pdepend:2.5.2 ' .
-        'phpmd/phpmd:@stable ' .
-        'phpunit/phpunit:~6.5.0 ' .
-        'sebastian/phpcpd:~3.0.0 ' .
-        'squizlabs/php_codesniffer:3.4.0 ' .
-        '--sort-packages --no-update');
-    output('');
-    runComposer('remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update');
-
-    output('\nAdding "Zend\\\\Mvc\\\\Controller\\\\": "setup/src/Zend/Mvc/Controller/" to "autoload": "psr-4"');
-    $composerData['autoload']['psr-4']['Laminas\\Mvc\\Controller\\'] = 'setup/src/Zend/Mvc/Controller/';
-
-    if (preg_match('/^magento\/project\-(community|enterprise)\-edition$/', $composerData['name'])) {
-        output('\nUpdating project name, version, and description');
-        $composerData['name'] = $project;
-        $composerData['version'] = $version;
-        $composerData['description'] = $description;
-    }
-
-    file_put_contents($composerFile, json_encode($composerData, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));
-
-    // Update Magento/Updater if it's installed
-    $updateDir = "$rootDir/update";
-    if (file_exists($updateDir)) {
-        $updateBackup = findUnusedFilename($rootDir, 'update.bak');
-        output("\\nBacking up Magento/Updater directory $updateDir to $updateBackup");
-        rename($updateDir, $updateBackup);
-        output('\nUpdating Magento/Updater');
-        rename("$tempDir/update", $updateDir);
-    }
-
-    // Remove temp project directory that was used for repo/version validation and new source for Magento/Updater
-    deleteFilepath($tempDir);
-
-    output("\\n**** Script Complete! $composerFile updated to Magento version $version ****");
-    if (count($authFailed) > 0) {
-        output('Repository authentication failures occurred!', WARN);
-        output(' * Failed authentication could result in incorrect package versions', WARN);
-        output(' * To resolve, add credentials for the repositories to auth.json', WARN);
-        output(' * URL(s) failing authentication: ' . join(', ', array_keys($authFailed)), WARN);
-    }
-} catch (Exception $e) {
-    if ($e->getPrevious()) {
-        $e = $e->getPrevious();
-    }
-
-    try {
-        output($e->getMessage(), ERROR, get_class($e));
-        output('Script failed! See usage information with --help', ERROR);
-
-        if (isset($composerBackup) && file_exists($composerBackup)) {
-            output("Resetting $composerFile backup");
-            deleteFilepath($composerFile);
-            rename($composerBackup, $composerFile);
-        }
-        if (isset($updateBackup) && file_exists($updateBackup)) {
-            output("Resetting $updateDir backup");
-            deleteFilepath($updateDir);
-            rename($updateBackup, $updateDir);
-        }
-        if (isset($tempDir) && file_exists($tempDir)) {
-            output('Removing temporary project directory');
-            deleteFilepath($tempDir);
-        }
-    }
-    catch (Exception $e2) {
-        output($e2->getMessage(), ERROR, get_class($e2));
-        output('Backup restoration or directory cleanup failed', ERROR);
-    }
-
-    exit($e->getCode() == 0 ? 1 : $e->getCode());
-}
-
-/**
- * Gets a variant of a filename that doesn't already exist so we don't overwrite anything
- *
- * @param string $dir
- * @param string $filename
- * @return string
- */
-function findUnusedFilename($dir, $filename) {
-    $unique = "$dir/$filename";
-    if (file_exists($unique)) {
-        $unique = tempnam($dir, "$filename.");
-        unlink($unique);
-    }
-    return $unique;
-}
-
-/**
- * Execute a composer command, reload $composerData afterwards, and check for repo authentication warnings
- *
- * @param string $command
- * @return array Command output split by lines
- * @throws RuntimeException
- */
-function runComposer($command)
-{
-    global $composerExec, $composerData, $composerFile, $authFailed;
-    $command = "$composerExec $command --no-interaction";
-    output(" Running command:\\n  $command");
-    exec("$command 2>&1", $lines, $exitCode);
-    $output = '    ' . join('\n    ', $lines);
-
-    // Reload composer object from the updated composer.json
-    $composerData = json_decode(file_get_contents($composerFile), true);
-
-    if (0 !== $exitCode) {
-        $output = "Error encountered running command:\\n $command\\n$output";
-        throw new RuntimeException($output, $exitCode);
-    }
-    output($output);
-
-    if (strpos($output, 'URL required authentication.') !== false) {
-        preg_match("/'(https?:\/\/)?(?<url>[^\/']+)(\/[^']*)?' URL required authentication/", $output, $matches);
-        $authUrl = $matches['url'];
-        $authFailed[$authUrl] = 1;
-        output("Repository authentication failed; make sure '$authUrl' exists in auth.json", WARN);
-    }
-
-    return $lines;
-}
-
-/**
- * Deletes a file or a directory and all its contents
- *
- * @param string $path
- * @throws Exception
- */
-function deleteFilepath($path) {
-    if (!file_exists($path)) {
-        return;
-    }
-    if (is_dir($path)) {
-        $files = array_diff(scandir($path), array('..', '.'));
-        foreach ($files as $file) {
-            deleteFilepath("$path/$file");
-        }
-        rmdir($path);
-    }
-    else {
-        unlink($path);
-    }
-    if (file_exists($path)) {
-        throw new Exception("Failed to delete $path");
-    }
-}
-
-/**
- * Logs the given text with \n newline replacement and log level formatting
- *
- * @param string $string Text to log
- * @param int $level One of INFO, WARN, or ERROR
- * @param string $label Optional message label; defaults to WARNING for $level = WARN and ERROR for $level = ERROR
- */
-function output($string, $level = INFO, $label = '') {
-    $string = str_replace('\n', PHP_EOL, $string);
-
-    if (!empty($label)) {
-        $label = "$label: ";
-    }
-    else if ($level == WARN) {
-        $label = 'WARNING: ';
-    }
-    else if ($level == ERROR) {
-        $label = 'ERROR: ';
-    }
-    $string = "$label$string";
-
-    if ($level == WARN) {
-        error_log($string);
-    }
-    elseif ($level == ERROR) {
-        error_log(PHP_EOL . $string);
-    }
-    else {
-        echo $string . PHP_EOL;
-    }
-}

From 19af792cb315a6f3a84270b80d4f93fe6814a13a Mon Sep 17 00:00:00 2001
From: mage2-team <mage2-team@magento.com>
Date: Mon, 20 Jul 2020 09:52:17 -0700
Subject: [PATCH 295/307] COMOPS-1042: 2.4.0 packaging

 (build 2.4.0.080)
---
 app/code/Magento/AdminAnalytics/composer.json |  13 +-
 .../Magento/AdminNotification/composer.json   |  15 +-
 .../AdvancedPricingImportExport/composer.json |  19 +-
 app/code/Magento/AdvancedSearch/composer.json |  19 +-
 app/code/Magento/Amqp/composer.json           |   9 +-
 app/code/Magento/AmqpStore/composer.json      |  13 +-
 app/code/Magento/Analytics/composer.json      |  13 +-
 .../AsynchronousOperations/composer.json      |  19 +-
 app/code/Magento/Authorization/composer.json  |   7 +-
 app/code/Magento/Backend/composer.json        |  39 +-
 app/code/Magento/Backup/composer.json         |  11 +-
 app/code/Magento/Bundle/composer.json         |  41 +-
 app/code/Magento/BundleGraphQl/composer.json  |  17 +-
 .../Magento/BundleImportExport/composer.json  |  17 +-
 .../Magento/CacheInvalidate/composer.json     |   7 +-
 app/code/Magento/Captcha/composer.json        |  13 +-
 .../Magento/CardinalCommerce/composer.json    |  11 +-
 app/code/Magento/Catalog/composer.json        |  61 +-
 .../Magento/CatalogAnalytics/composer.json    |   9 +-
 .../Magento/CatalogCmsGraphQl/composer.json   |  15 +-
 .../CatalogCustomerGraphQl/composer.json      |  13 +-
 app/code/Magento/CatalogGraphQl/composer.json |  25 +-
 .../Magento/CatalogImportExport/composer.json |  25 +-
 .../Magento/CatalogInventory/composer.json    |  19 +-
 .../CatalogInventoryGraphQl/composer.json     |  11 +-
 app/code/Magento/CatalogRule/composer.json    |  23 +-
 .../CatalogRuleConfigurable/composer.json     |  13 +-
 .../Magento/CatalogRuleGraphQl/composer.json  |   7 +-
 app/code/Magento/CatalogSearch/composer.json  |  29 +-
 .../Magento/CatalogUrlRewrite/composer.json   |  23 +-
 .../CatalogUrlRewriteGraphQl/composer.json    |  15 +-
 app/code/Magento/CatalogWidget/composer.json  |  23 +-
 app/code/Magento/Checkout/composer.json       |  43 +-
 .../Magento/CheckoutAgreements/composer.json  |  13 +-
 .../CheckoutAgreementsGraphQl/composer.json   |  11 +-
 app/code/Magento/Cms/composer.json            |  25 +-
 app/code/Magento/CmsGraphQl/composer.json     |  17 +-
 app/code/Magento/CmsUrlRewrite/composer.json  |  11 +-
 .../CmsUrlRewriteGraphQl/composer.json        |  15 +-
 app/code/Magento/Config/composer.json         |  19 +-
 .../ConfigurableImportExport/composer.json    |  17 +-
 .../Magento/ConfigurableProduct/composer.json |  41 +-
 .../ConfigurableProductGraphQl/composer.json  |  15 +-
 .../ConfigurableProductSales/composer.json    |  13 +-
 app/code/Magento/Contact/composer.json        |  13 +-
 app/code/Magento/Cookie/composer.json         |   9 +-
 app/code/Magento/Cron/composer.json           |   9 +-
 app/code/Magento/Csp/composer.json            |   7 +-
 app/code/Magento/CurrencySymbol/composer.json |  15 +-
 app/code/Magento/Customer/composer.json       |  45 +-
 .../Magento/CustomerAnalytics/composer.json   |   9 +-
 .../CustomerDownloadableGraphQl/composer.json |  11 +-
 .../Magento/CustomerGraphQl/composer.json     |  21 +-
 .../CustomerImportExport/composer.json        |  17 +-
 app/code/Magento/Deploy/composer.json         |  13 +-
 app/code/Magento/Developer/composer.json      |   9 +-
 app/code/Magento/Dhl/composer.json            |  25 +-
 app/code/Magento/Directory/composer.json      |  11 +-
 .../Magento/DirectoryGraphQl/composer.json    |  11 +-
 app/code/Magento/Downloadable/composer.json   |  39 +-
 .../Magento/DownloadableGraphQl/composer.json |  15 +-
 .../DownloadableImportExport/composer.json    |  17 +-
 app/code/Magento/Eav/composer.json            |  15 +-
 app/code/Magento/EavGraphQl/composer.json     |   9 +-
 app/code/Magento/Elasticsearch/composer.json  |  23 +-
 app/code/Magento/Elasticsearch6/composer.json |  15 +-
 app/code/Magento/Elasticsearch7/composer.json |  15 +-
 app/code/Magento/Email/composer.json          |  25 +-
 app/code/Magento/EncryptionKey/composer.json  |   9 +-
 app/code/Magento/Fedex/composer.json          |  21 +-
 app/code/Magento/GiftMessage/composer.json    |  25 +-
 app/code/Magento/GoogleAdwords/composer.json  |   9 +-
 .../Magento/GoogleAnalytics/composer.json     |  13 +-
 .../Magento/GoogleOptimizer/composer.json     |  17 +-
 app/code/Magento/GraphQl/composer.json        |  11 +-
 app/code/Magento/GraphQlCache/composer.json   |   9 +-
 .../GroupedCatalogInventory/composer.json     |  11 +-
 .../Magento/GroupedImportExport/composer.json |  15 +-
 app/code/Magento/GroupedProduct/composer.json |  33 +-
 .../GroupedProductGraphQl/composer.json       |  11 +-
 app/code/Magento/ImportExport/composer.json   |  17 +-
 app/code/Magento/Indexer/composer.json        |   7 +-
 .../Magento/InstantPurchase/composer.json     |  19 +-
 app/code/Magento/Integration/composer.json    |  19 +-
 .../Magento/LayeredNavigation/composer.json   |   9 +-
 .../Magento/LoginAsCustomer/composer.json     |  15 +-
 .../LoginAsCustomerAdminUi/composer.json      |  21 +-
 .../Magento/LoginAsCustomerApi/composer.json  |   9 +-
 .../LoginAsCustomerFrontendUi/composer.json   |  15 +-
 .../Magento/LoginAsCustomerLog/composer.json  |  21 +-
 .../LoginAsCustomerPageCache/composer.json    |  15 +-
 .../LoginAsCustomerQuote/composer.json        |  13 +-
 .../LoginAsCustomerSales/composer.json        |  13 +-
 app/code/Magento/Marketplace/composer.json    |   7 +-
 app/code/Magento/MediaContent/composer.json   |   9 +-
 .../Magento/MediaContentApi/composer.json     |   7 +-
 .../Magento/MediaContentCatalog/composer.json |  11 +-
 .../Magento/MediaContentCms/composer.json     |   9 +-
 app/code/Magento/MediaGallery/composer.json   |   9 +-
 .../Magento/MediaGalleryApi/composer.json     |   5 +-
 .../Magento/MediaGalleryCatalog/composer.json |   9 +-
 app/code/Magento/MediaStorage/composer.json   |  21 +-
 app/code/Magento/MessageQueue/composer.json   |   7 +-
 app/code/Magento/Msrp/composer.json           |  19 +-
 .../MsrpConfigurableProduct/composer.json     |  11 +-
 .../Magento/MsrpGroupedProduct/composer.json  |  11 +-
 app/code/Magento/Multishipping/composer.json  |  23 +-
 app/code/Magento/MysqlMq/composer.json        |   9 +-
 .../Magento/NewRelicReporting/composer.json   |  17 +-
 app/code/Magento/Newsletter/composer.json     |  23 +-
 .../Magento/OfflinePayments/composer.json     |  11 +-
 .../Magento/OfflineShipping/composer.json     |  27 +-
 app/code/Magento/PageCache/composer.json      |  11 +-
 app/code/Magento/Payment/composer.json        |  19 +-
 app/code/Magento/Paypal/composer.json         |  39 +-
 app/code/Magento/PaypalCaptcha/composer.json  |  13 +-
 app/code/Magento/PaypalGraphQl/composer.json  |  21 +-
 app/code/Magento/Persistent/composer.json     |  17 +-
 app/code/Magento/ProductAlert/composer.json   |  17 +-
 app/code/Magento/ProductVideo/composer.json   |  19 +-
 app/code/Magento/Quote/composer.json          |  35 +-
 app/code/Magento/QuoteAnalytics/composer.json |   9 +-
 app/code/Magento/QuoteGraphQl/composer.json   |  25 +-
 .../RelatedProductGraphQl/composer.json       |  11 +-
 .../Magento/ReleaseNotification/composer.json |  13 +-
 app/code/Magento/Reports/composer.json        |  37 +-
 app/code/Magento/RequireJs/composer.json      |   5 +-
 app/code/Magento/Review/composer.json         |  25 +-
 .../Magento/ReviewAnalytics/composer.json     |   9 +-
 app/code/Magento/Robots/composer.json         |   9 +-
 app/code/Magento/Rss/composer.json            |  11 +-
 app/code/Magento/Rule/composer.json           |  13 +-
 app/code/Magento/Sales/composer.json          |  55 +-
 app/code/Magento/SalesAnalytics/composer.json |   9 +-
 app/code/Magento/SalesGraphQl/composer.json   |   9 +-
 app/code/Magento/SalesInventory/composer.json |  13 +-
 app/code/Magento/SalesRule/composer.json      |  45 +-
 app/code/Magento/SalesSequence/composer.json  |   5 +-
 app/code/Magento/SampleData/composer.json     |   7 +-
 app/code/Magento/Search/composer.json         |  15 +-
 app/code/Magento/Security/composer.json       |  13 +-
 app/code/Magento/SendFriend/composer.json     |  17 +-
 .../Magento/SendFriendGraphQl/composer.json   |  11 +-
 app/code/Magento/Shipping/composer.json       |  37 +-
 app/code/Magento/Sitemap/composer.json        |  25 +-
 app/code/Magento/Store/composer.json          |  23 +-
 app/code/Magento/StoreGraphQl/composer.json   |   9 +-
 app/code/Magento/Swagger/composer.json        |   5 +-
 app/code/Magento/SwaggerWebapi/composer.json  |   7 +-
 .../Magento/SwaggerWebapiAsync/composer.json  |   9 +-
 app/code/Magento/Swatches/composer.json       |  29 +-
 .../Magento/SwatchesGraphQl/composer.json     |  11 +-
 .../SwatchesLayeredNavigation/composer.json   |   5 +-
 app/code/Magento/Tax/composer.json            |  35 +-
 app/code/Magento/TaxGraphQl/composer.json     |   9 +-
 .../Magento/TaxImportExport/composer.json     |  15 +-
 app/code/Magento/Theme/composer.json          |  31 +-
 app/code/Magento/ThemeGraphQl/composer.json   |   7 +-
 app/code/Magento/Tinymce3/composer.json       |  15 +-
 app/code/Magento/Translation/composer.json    |  15 +-
 app/code/Magento/Ui/composer.json             |  17 +-
 app/code/Magento/Ups/composer.json            |  21 +-
 app/code/Magento/UrlRewrite/composer.json     |  19 +-
 .../Magento/UrlRewriteGraphQl/composer.json   |   9 +-
 app/code/Magento/User/composer.json           |  19 +-
 app/code/Magento/Usps/composer.json           |  21 +-
 app/code/Magento/Variable/composer.json       |  13 +-
 app/code/Magento/Vault/composer.json          |  19 +-
 app/code/Magento/VaultGraphQl/composer.json   |   9 +-
 app/code/Magento/Version/composer.json        |   5 +-
 app/code/Magento/Webapi/composer.json         |  17 +-
 app/code/Magento/WebapiAsync/composer.json    |  15 +-
 app/code/Magento/WebapiSecurity/composer.json |   7 +-
 app/code/Magento/Weee/composer.json           |  31 +-
 app/code/Magento/WeeeGraphQl/composer.json    |  13 +-
 app/code/Magento/Widget/composer.json         |  21 +-
 app/code/Magento/Wishlist/composer.json       |  39 +-
 .../Magento/WishlistAnalytics/composer.json   |   9 +-
 .../Magento/WishlistGraphQl/composer.json     |  11 +-
 .../adminhtml/Magento/backend/composer.json   |   5 +-
 .../frontend/Magento/blank/composer.json      |   5 +-
 .../frontend/Magento/luma/composer.json       |   7 +-
 app/i18n/Magento/de_DE/composer.json          |   5 +-
 app/i18n/Magento/en_US/composer.json          |   5 +-
 app/i18n/Magento/es_ES/composer.json          |   5 +-
 app/i18n/Magento/fr_FR/composer.json          |   5 +-
 app/i18n/Magento/nl_NL/composer.json          |   5 +-
 app/i18n/Magento/pt_BR/composer.json          |   5 +-
 app/i18n/Magento/zh_Hans_CN/composer.json     |   5 +-
 composer.json                                 | 389 ++++----
 composer.lock                                 | 861 ++++++++++--------
 .../Magento/Framework/Amqp/composer.json      |   5 +-
 .../Magento/Framework/Bulk/composer.json      |   5 +-
 .../Framework/MessageQueue/composer.json      |   5 +-
 lib/internal/Magento/Framework/composer.json  |   3 +-
 195 files changed, 2327 insertions(+), 2006 deletions(-)

diff --git a/app/code/Magento/AdminAnalytics/composer.json b/app/code/Magento/AdminAnalytics/composer.json
index cf60b1d88ae55..5f92f9d706fd4 100644
--- a/app/code/Magento/AdminAnalytics/composer.json
+++ b/app/code/Magento/AdminAnalytics/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-backend": "*",
-        "magento/module-config": "*",
-        "magento/module-ui": "*",
-        "magento/module-release-notification": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-backend": "102.0.*",
+        "magento/module-config": "101.2.*",
+        "magento/module-ui": "101.2.*",
+        "magento/module-release-notification": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\AdminAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json
index d421fc869621b..b579f61dbc900 100644
--- a/app/code/Magento/AdminNotification/composer.json
+++ b/app/code/Magento/AdminNotification/composer.json
@@ -7,12 +7,12 @@
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\AdminNotification\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json
index ea6a39fba2c3d..9954b6484ad42 100644
--- a/app/code/Magento/AdvancedPricingImportExport/composer.json
+++ b/app/code/Magento/AdvancedPricingImportExport/composer.json
@@ -6,14 +6,14 @@
     },
     "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": "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.*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\AdvancedPricingImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/AdvancedSearch/composer.json b/app/code/Magento/AdvancedSearch/composer.json
index 720309b619e43..c90d97312d7a7 100644
--- a/app/code/Magento/AdvancedSearch/composer.json
+++ b/app/code/Magento/AdvancedSearch/composer.json
@@ -5,14 +5,14 @@
         "sort-packages": true
     },
     "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",
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\AdvancedSearch\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Amqp/composer.json b/app/code/Magento/Amqp/composer.json
index 9e7a035112b04..e35a4b9307b3e 100644
--- a/app/code/Magento/Amqp/composer.json
+++ b/app/code/Magento/Amqp/composer.json
@@ -5,9 +5,9 @@
         "sort-packages": true
     },
     "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",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\Amqp\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/AmqpStore/composer.json b/app/code/Magento/AmqpStore/composer.json
index 70a10810ece21..f361806fb50ca 100644
--- a/app/code/Magento/AmqpStore/composer.json
+++ b/app/code/Magento/AmqpStore/composer.json
@@ -5,14 +5,14 @@
         "sort-packages": true
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\AmqpStore\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json
index 84f8af066bf11..5824ce3e240b4 100644
--- a/app/code/Magento/Analytics/composer.json
+++ b/app/code/Magento/Analytics/composer.json
@@ -3,11 +3,11 @@
     "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": "*"
+        "magento/module-backend": "102.0.*",
+        "magento/module-config": "101.2.*",
+        "magento/module-integration": "100.4.*",
+        "magento/module-store": "101.1.*",
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\Analytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/AsynchronousOperations/composer.json b/app/code/Magento/AsynchronousOperations/composer.json
index b5de631418e72..ec4c221c239cc 100644
--- a/app/code/Magento/AsynchronousOperations/composer.json
+++ b/app/code/Magento/AsynchronousOperations/composer.json
@@ -5,17 +5,17 @@
         "sort-packages": true
     },
     "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-logging": "*"
+        "magento/module-admin-notification": "100.4.*",
+        "magento/module-logging": "101.2.*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\AsynchronousOperations\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json
index 401444404ca3e..4a586a3d24e9c 100644
--- a/app/code/Magento/Authorization/composer.json
+++ b/app/code/Magento/Authorization/composer.json
@@ -6,8 +6,8 @@
     },
     "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": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\Authorization\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json
index ee5491057d861..623c58c9827f4 100644
--- a/app/code/Magento/Backend/composer.json
+++ b/app/code/Magento/Backend/composer.json
@@ -6,26 +6,26 @@
     },
     "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": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-backup": "100.4.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-config": "101.2.*",
+        "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": [
@@ -39,5 +39,6 @@
         "psr-4": {
             "Magento\\Backend\\": ""
         }
-    }
+    },
+    "version": "102.0.0"
 }
diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json
index 9a5904beda550..1cb489eef2f3a 100644
--- a/app/code/Magento/Backup/composer.json
+++ b/app/code/Magento/Backup/composer.json
@@ -6,10 +6,10 @@
     },
     "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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\Backup\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json
index 1b5ca24ee098c..9cd1e7e331502 100644
--- a/app/code/Magento/Bundle/composer.json
+++ b/app/code/Magento/Bundle/composer.json
@@ -6,27 +6,27 @@
     },
     "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": [
@@ -40,5 +40,6 @@
         "psr-4": {
             "Magento\\Bundle\\": ""
         }
-    }
+    },
+    "version": "101.0.0"
 }
diff --git a/app/code/Magento/BundleGraphQl/composer.json b/app/code/Magento/BundleGraphQl/composer.json
index cb49ab78588b3..47d8fcc1aeb88 100644
--- a/app/code/Magento/BundleGraphQl/composer.json
+++ b/app/code/Magento/BundleGraphQl/composer.json
@@ -4,13 +4,13 @@
     "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": "*"
+        "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/framework": "103.0.*"
     },
     "license": [
         "OSL-3.0",
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\BundleGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json
index faca3eac9a721..7fcc00b096ed4 100644
--- a/app/code/Magento/BundleImportExport/composer.json
+++ b/app/code/Magento/BundleImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\BundleImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json
index 7801554c890e1..e3f021f24d1a1 100644
--- a/app/code/Magento/CacheInvalidate/composer.json
+++ b/app/code/Magento/CacheInvalidate/composer.json
@@ -6,8 +6,8 @@
     },
     "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": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\CacheInvalidate\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json
index a6ee83d3f0924..c45119bff4b7a 100644
--- a/app/code/Magento/Captcha/composer.json
+++ b/app/code/Magento/Captcha/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-backend": "*",
-        "magento/module-checkout": "*",
-        "magento/module-customer": "*",
-        "magento/module-store": "*",
+        "magento/framework": "103.0.*",
+        "magento/module-backend": "102.0.*",
+        "magento/module-checkout": "100.4.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-store": "101.1.*",
         "laminas/laminas-captcha": "^2.7.1",
         "laminas/laminas-db": "^2.8.2",
         "laminas/laminas-session": "^2.7.3"
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\Captcha\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CardinalCommerce/composer.json b/app/code/Magento/CardinalCommerce/composer.json
index 8b2989ef915e1..c2fcc19baa926 100644
--- a/app/code/Magento/CardinalCommerce/composer.json
+++ b/app/code/Magento/CardinalCommerce/composer.json
@@ -6,10 +6,10 @@
     },
     "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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\CardinalCommerce\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json
index 6dde1d76e5e81..85f33c5c85c6c 100644
--- a/app/code/Magento/Catalog/composer.json
+++ b/app/code/Magento/Catalog/composer.json
@@ -6,37 +6,37 @@
     },
     "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": [
@@ -50,5 +50,6 @@
         "psr-4": {
             "Magento\\Catalog\\": ""
         }
-    }
+    },
+    "version": "104.0.0"
 }
diff --git a/app/code/Magento/CatalogAnalytics/composer.json b/app/code/Magento/CatalogAnalytics/composer.json
index 43fb4c8a6f433..581331b83207c 100644
--- a/app/code/Magento/CatalogAnalytics/composer.json
+++ b/app/code/Magento/CatalogAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-catalog": "*",
-        "magento/module-analytics": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-analytics": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\CatalogAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogCmsGraphQl/composer.json b/app/code/Magento/CatalogCmsGraphQl/composer.json
index aa7a742f2f315..351f54f1f99b3 100644
--- a/app/code/Magento/CatalogCmsGraphQl/composer.json
+++ b/app/code/Magento/CatalogCmsGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "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",
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\CatalogCmsGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogCustomerGraphQl/composer.json b/app/code/Magento/CatalogCustomerGraphQl/composer.json
index a7c887af0379b..eca6ebb34f5b3 100644
--- a/app/code/Magento/CatalogCustomerGraphQl/composer.json
+++ b/app/code/Magento/CatalogCustomerGraphQl/composer.json
@@ -4,11 +4,11 @@
     "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": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-catalog-graph-ql": "100.4.*",
+        "magento/module-store": "101.1.*"
     },
     "license": [
         "OSL-3.0",
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\CatalogCustomerGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogGraphQl/composer.json b/app/code/Magento/CatalogGraphQl/composer.json
index d6e9bfa3c0505..ba8a843dfc8e9 100644
--- a/app/code/Magento/CatalogGraphQl/composer.json
+++ b/app/code/Magento/CatalogGraphQl/composer.json
@@ -4,19 +4,19 @@
     "type": "magento2-module",
     "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.1.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-catalog-inventory": "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.*"
     },
     "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",
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\CatalogGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json
index 92a6620827990..f95f9109bb931 100644
--- a/app/code/Magento/CatalogImportExport/composer.json
+++ b/app/code/Magento/CatalogImportExport/composer.json
@@ -7,17 +7,17 @@
     "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": [
@@ -31,5 +31,6 @@
         "psr-4": {
             "Magento\\CatalogImportExport\\": ""
         }
-    }
+    },
+    "version": "101.1.0"
 }
diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json
index b810e6613aebb..4ad28b4988aeb 100644
--- a/app/code/Magento/CatalogInventory/composer.json
+++ b/app/code/Magento/CatalogInventory/composer.json
@@ -6,14 +6,14 @@
     },
     "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": [
@@ -28,5 +28,6 @@
             "Magento\\CatalogInventory\\": ""
         }
     },
-    "abandoned": "magento/inventory-composer-metapackage"
+    "abandoned": "magento/inventory-composer-metapackage",
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogInventoryGraphQl/composer.json b/app/code/Magento/CatalogInventoryGraphQl/composer.json
index d6d5b01091341..b042cf3eb076f 100644
--- a/app/code/Magento/CatalogInventoryGraphQl/composer.json
+++ b/app/code/Magento/CatalogInventoryGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-store": "*",
-        "magento/module-catalog": "*",
-        "magento/module-catalog-inventory": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-store": "101.1.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-catalog-inventory": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\CatalogInventoryGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json
index 7c40ca8a9a33a..be32b3ae95375 100644
--- a/app/code/Magento/CatalogRule/composer.json
+++ b/app/code/Magento/CatalogRule/composer.json
@@ -6,18 +6,18 @@
     },
     "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": [
@@ -31,5 +31,6 @@
         "psr-4": {
             "Magento\\CatalogRule\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json
index 19274fbae146f..0048ace2cac55 100644
--- a/app/code/Magento/CatalogRuleConfigurable/composer.json
+++ b/app/code/Magento/CatalogRuleConfigurable/composer.json
@@ -6,14 +6,14 @@
     },
     "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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\CatalogRuleConfigurable\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogRuleGraphQl/composer.json b/app/code/Magento/CatalogRuleGraphQl/composer.json
index c82d9bb20ddab..05f4b08b1f39f 100644
--- a/app/code/Magento/CatalogRuleGraphQl/composer.json
+++ b/app/code/Magento/CatalogRuleGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "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",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\CatalogRuleGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json
index 1efece402fd84..c962d07b4825a 100644
--- a/app/code/Magento/CatalogSearch/composer.json
+++ b/app/code/Magento/CatalogSearch/composer.json
@@ -6,21 +6,21 @@
     },
     "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": [
@@ -34,5 +34,6 @@
         "psr-4": {
             "Magento\\CatalogSearch\\": ""
         }
-    }
+    },
+    "version": "102.0.0"
 }
diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json
index fe489bcf0a3a0..224cbae6e0dff 100644
--- a/app/code/Magento/CatalogUrlRewrite/composer.json
+++ b/app/code/Magento/CatalogUrlRewrite/composer.json
@@ -6,18 +6,18 @@
     },
     "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": [
@@ -31,5 +31,6 @@
         "psr-4": {
             "Magento\\CatalogUrlRewrite\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json
index 3b64d51b85568..2871803f795c7 100644
--- a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json
+++ b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-store": "*",
-        "magento/module-catalog": "*",
-        "magento/framework": "*"
+        "magento/module-store": "101.1.*",
+        "magento/module-catalog": "104.0.*",
+        "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",
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\CatalogUrlRewriteGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json
index 305fb3ec47ad6..b13b562084614 100644
--- a/app/code/Magento/CatalogWidget/composer.json
+++ b/app/code/Magento/CatalogWidget/composer.json
@@ -6,16 +6,16 @@
     },
     "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": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\CatalogWidget\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json
index 2b4fce7dc011a..e976fbc08267f 100644
--- a/app/code/Magento/Checkout/composer.json
+++ b/app/code/Magento/Checkout/composer.json
@@ -6,28 +6,28 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "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-shipping": "*",
-        "magento/module-store": "*",
-        "magento/module-tax": "*",
-        "magento/module-theme": "*",
-        "magento/module-ui": "*",
-        "magento/module-captcha": "*"
+        "magento/framework": "103.0.*",
+        "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-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-captcha": "100.4.*"
     },
     "suggest": {
-        "magento/module-cookie": "*"
+        "magento/module-cookie": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -41,5 +41,6 @@
         "psr-4": {
             "Magento\\Checkout\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json
index 1741de53e8637..3028ac24b4cee 100644
--- a/app/code/Magento/CheckoutAgreements/composer.json
+++ b/app/code/Magento/CheckoutAgreements/composer.json
@@ -6,11 +6,11 @@
     },
     "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\CheckoutAgreements\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json
index 26b80a4457b4a..aa1592d4c3378 100644
--- a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json
+++ b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "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",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\CheckoutAgreementsGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json
index 8d69320102b5e..b47f5bc803048 100644
--- a/app/code/Magento/Cms/composer.json
+++ b/app/code/Magento/Cms/composer.json
@@ -6,19 +6,19 @@
     },
     "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": [
@@ -32,5 +32,6 @@
         "psr-4": {
             "Magento\\Cms\\": ""
         }
-    }
+    },
+    "version": "104.0.0"
 }
diff --git a/app/code/Magento/CmsGraphQl/composer.json b/app/code/Magento/CmsGraphQl/composer.json
index 0e4c849fe8344..22c1ad7f7c2f0 100644
--- a/app/code/Magento/CmsGraphQl/composer.json
+++ b/app/code/Magento/CmsGraphQl/composer.json
@@ -4,15 +4,15 @@
     "type": "magento2-module",
     "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",
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\CmsGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json
index 80e150771975f..6f6a3f5916944 100644
--- a/app/code/Magento/CmsUrlRewrite/composer.json
+++ b/app/code/Magento/CmsUrlRewrite/composer.json
@@ -6,10 +6,10 @@
     },
     "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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\CmsUrlRewrite\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json
index d8fbbb4c2e6fd..13d16d49f7a44 100644
--- a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json
+++ b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-cms": "*",
-        "magento/module-store": "*",
-        "magento/module-url-rewrite-graph-ql": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-cms": "104.0.*",
+        "magento/module-store": "101.1.*",
+        "magento/module-url-rewrite-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",
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\CmsUrlRewriteGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json
index 63eca42a6ac48..b3ea162b34a4a 100644
--- a/app/code/Magento/Config/composer.json
+++ b/app/code/Magento/Config/composer.json
@@ -6,14 +6,14 @@
     },
     "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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\Config\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json
index e27510166a421..707b02f1396e7 100644
--- a/app/code/Magento/ConfigurableImportExport/composer.json
+++ b/app/code/Magento/ConfigurableImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\ConfigurableImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json
index 7b1b1a18416f5..6b61f490707bb 100644
--- a/app/code/Magento/ConfigurableProduct/composer.json
+++ b/app/code/Magento/ConfigurableProduct/composer.json
@@ -6,27 +6,27 @@
     },
     "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": [
@@ -40,5 +40,6 @@
         "psr-4": {
             "Magento\\ConfigurableProduct\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ConfigurableProductGraphQl/composer.json b/app/code/Magento/ConfigurableProductGraphQl/composer.json
index 76ec4ad3153e2..a69eace085a9f 100644
--- a/app/code/Magento/ConfigurableProductGraphQl/composer.json
+++ b/app/code/Magento/ConfigurableProductGraphQl/composer.json
@@ -4,12 +4,12 @@
     "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": "*"
+        "magento/module-catalog": "104.0.*",
+        "magento/module-configurable-product": "100.4.*",
+        "magento/module-catalog-graph-ql": "100.4.*",
+        "magento/module-quote": "101.2.*",
+        "magento/module-quote-graph-ql": "100.4.*",
+        "magento/framework": "103.0.*"
     },
     "license": [
         "OSL-3.0",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\ConfigurableProductGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json
index edac2b7782dcc..2ae309e0ecf23 100644
--- a/app/code/Magento/ConfigurableProductSales/composer.json
+++ b/app/code/Magento/ConfigurableProductSales/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-catalog": "*",
-        "magento/module-sales": "*",
-        "magento/module-store": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-sales": "103.0.*",
+        "magento/module-store": "101.1.*"
     },
     "suggest": {
-        "magento/module-configurable-product": "*"
+        "magento/module-configurable-product": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\ConfigurableProductSales\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json
index 1600c1e0c2543..93e6274919a81 100644
--- a/app/code/Magento/Contact/composer.json
+++ b/app/code/Magento/Contact/composer.json
@@ -6,11 +6,11 @@
     },
     "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Contact\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json
index 5a47a5c7993bf..075bd5a23f847 100644
--- a/app/code/Magento/Cookie/composer.json
+++ b/app/code/Magento/Cookie/composer.json
@@ -6,11 +6,11 @@
     },
     "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Cookie\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json
index 00da35140744b..bd2c0d4551a9b 100644
--- a/app/code/Magento/Cron/composer.json
+++ b/app/code/Magento/Cron/composer.json
@@ -6,11 +6,11 @@
     },
     "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Cron\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Csp/composer.json b/app/code/Magento/Csp/composer.json
index 352735712b1b0..759819a637c4a 100644
--- a/app/code/Magento/Csp/composer.json
+++ b/app/code/Magento/Csp/composer.json
@@ -6,8 +6,8 @@
     },
     "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": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\Csp\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json
index 746cfa0ed033d..016207fd9ea9a 100644
--- a/app/code/Magento/CurrencySymbol/composer.json
+++ b/app/code/Magento/CurrencySymbol/composer.json
@@ -6,12 +6,12 @@
     },
     "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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\CurrencySymbol\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json
index db3108a78e9aa..ce8dd3d6c0bf9 100644
--- a/app/code/Magento/Customer/composer.json
+++ b/app/code/Magento/Customer/composer.json
@@ -6,29 +6,29 @@
     },
     "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-cookie": "100.4.*",
+        "magento/module-customer-sample-data": "Sample Data version: 100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -42,5 +42,6 @@
         "psr-4": {
             "Magento\\Customer\\": ""
         }
-    }
+    },
+    "version": "103.0.0"
 }
diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json
index abd9e93d89583..4d9ce2a9a38de 100644
--- a/app/code/Magento/CustomerAnalytics/composer.json
+++ b/app/code/Magento/CustomerAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-customer": "*",
-        "magento/module-analytics": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-analytics": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\CustomerAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CustomerDownloadableGraphQl/composer.json b/app/code/Magento/CustomerDownloadableGraphQl/composer.json
index f7cdbb0dc86d6..4cb2b10e5f25c 100644
--- a/app/code/Magento/CustomerDownloadableGraphQl/composer.json
+++ b/app/code/Magento/CustomerDownloadableGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "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",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\CustomerDownloadableGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CustomerGraphQl/composer.json b/app/code/Magento/CustomerGraphQl/composer.json
index 2ec396ca8ee92..8ae74e5cf803d 100644
--- a/app/code/Magento/CustomerGraphQl/composer.json
+++ b/app/code/Magento/CustomerGraphQl/composer.json
@@ -4,15 +4,15 @@
     "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": "*"
+        "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.*"
     },
     "license": [
         "OSL-3.0",
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\CustomerGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json
index 8104ea01875a6..46a69480b7f71 100644
--- a/app/code/Magento/CustomerImportExport/composer.json
+++ b/app/code/Magento/CustomerImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\CustomerImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json
index d8668dbb84874..2fe81eb47dc24 100644
--- a/app/code/Magento/Deploy/composer.json
+++ b/app/code/Magento/Deploy/composer.json
@@ -6,11 +6,11 @@
     },
     "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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\Deploy\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json
index c5c949ec45f62..ef65ea9e163f1 100644
--- a/app/code/Magento/Developer/composer.json
+++ b/app/code/Magento/Developer/composer.json
@@ -6,9 +6,9 @@
     },
     "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": [
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\Developer\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json
index d81ae0d7b4969..85ec969695e81 100644
--- a/app/code/Magento/Dhl/composer.json
+++ b/app/code/Magento/Dhl/composer.json
@@ -7,19 +7,19 @@
     "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": [
@@ -33,5 +33,6 @@
         "psr-4": {
             "Magento\\Dhl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json
index e3646d38fe64d..bb3b89c00b579 100644
--- a/app/code/Magento/Directory/composer.json
+++ b/app/code/Magento/Directory/composer.json
@@ -7,10 +7,10 @@
     "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Directory\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/DirectoryGraphQl/composer.json b/app/code/Magento/DirectoryGraphQl/composer.json
index ef473e1c43b94..946ba097e9a11 100644
--- a/app/code/Magento/DirectoryGraphQl/composer.json
+++ b/app/code/Magento/DirectoryGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-directory": "*",
-        "magento/module-store": "*",
-        "magento/module-graph-ql": "*",
-        "magento/framework": "*"
+        "magento/module-directory": "100.4.*",
+        "magento/module-store": "101.1.*",
+        "magento/module-graph-ql": "100.4.*",
+        "magento/framework": "103.0.*"
     },
     "license": [
         "OSL-3.0",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\DirectoryGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json
index 992bdbd1e263c..ad42097868b74 100644
--- a/app/code/Magento/Downloadable/composer.json
+++ b/app/code/Magento/Downloadable/composer.json
@@ -6,26 +6,26 @@
     },
     "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": [
@@ -39,5 +39,6 @@
         "psr-4": {
             "Magento\\Downloadable\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/DownloadableGraphQl/composer.json b/app/code/Magento/DownloadableGraphQl/composer.json
index 185a50f77cc15..80bc7fa08694c 100644
--- a/app/code/Magento/DownloadableGraphQl/composer.json
+++ b/app/code/Magento/DownloadableGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "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": "104.0.*",
+        "magento/module-downloadable": "100.4.*",
+        "magento/module-quote": "101.2.*",
+        "magento/module-quote-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",
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\DownloadableGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json
index 6dd7043fc02a9..1a926bc97fcc9 100644
--- a/app/code/Magento/DownloadableImportExport/composer.json
+++ b/app/code/Magento/DownloadableImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\DownloadableImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json
index 5636b0d05841c..56e75d533b29f 100644
--- a/app/code/Magento/Eav/composer.json
+++ b/app/code/Magento/Eav/composer.json
@@ -6,12 +6,12 @@
     },
     "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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\Eav\\": ""
         }
-    }
+    },
+    "version": "102.1.0"
 }
diff --git a/app/code/Magento/EavGraphQl/composer.json b/app/code/Magento/EavGraphQl/composer.json
index ba4138f67cf62..29a6d4fbb7187 100644
--- a/app/code/Magento/EavGraphQl/composer.json
+++ b/app/code/Magento/EavGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "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",
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\EavGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json
index b79ae7bc5cc47..21ff9ca3b1aa1 100644
--- a/app/code/Magento/Elasticsearch/composer.json
+++ b/app/code/Magento/Elasticsearch/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "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.7.0"
     },
     "suggest": {
-        "magento/module-config": "*"
+        "magento/module-config": "101.2.*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\Elasticsearch\\": ""
         }
-    }
+    },
+    "version": "101.0.0"
 }
diff --git a/app/code/Magento/Elasticsearch6/composer.json b/app/code/Magento/Elasticsearch6/composer.json
index 1ee92c0b0a3b3..0bcfee63b80f9 100644
--- a/app/code/Magento/Elasticsearch6/composer.json
+++ b/app/code/Magento/Elasticsearch6/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "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.7.0"
     },
     "suggest": {
-        "magento/module-config": "*"
+        "magento/module-config": "101.2.*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\Elasticsearch6\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json
index 1e59ceaebaf84..03aeedafe7b60 100644
--- a/app/code/Magento/Elasticsearch7/composer.json
+++ b/app/code/Magento/Elasticsearch7/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "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.7.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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\Elasticsearch7\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json
index 334bbcf9d4617..faa72bacc8b80 100644
--- a/app/code/Magento/Email/composer.json
+++ b/app/code/Magento/Email/composer.json
@@ -6,19 +6,19 @@
     },
     "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": [
@@ -32,5 +32,6 @@
         "psr-4": {
             "Magento\\Email\\": ""
         }
-    }
+    },
+    "version": "101.1.0"
 }
diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json
index 6677a5b181f83..ef05a0dfaad14 100644
--- a/app/code/Magento/EncryptionKey/composer.json
+++ b/app/code/Magento/EncryptionKey/composer.json
@@ -6,9 +6,9 @@
     },
     "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": [
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\EncryptionKey\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json
index 575311e148457..97a1759102cf6 100644
--- a/app/code/Magento/Fedex/composer.json
+++ b/app/code/Magento/Fedex/composer.json
@@ -7,15 +7,15 @@
     "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": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\Fedex\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json
index cdf0533c3270d..f6af0767a4cf8 100644
--- a/app/code/Magento/GiftMessage/composer.json
+++ b/app/code/Magento/GiftMessage/composer.json
@@ -6,19 +6,19 @@
     },
     "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": [
@@ -32,5 +32,6 @@
         "psr-4": {
             "Magento\\GiftMessage\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json
index a37470115584f..98af74380cae9 100644
--- a/app/code/Magento/GoogleAdwords/composer.json
+++ b/app/code/Magento/GoogleAdwords/composer.json
@@ -6,9 +6,9 @@
     },
     "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": [
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\GoogleAdwords\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json
index 64d210c4f4811..ebae982ac3cf9 100644
--- a/app/code/Magento/GoogleAnalytics/composer.json
+++ b/app/code/Magento/GoogleAnalytics/composer.json
@@ -6,13 +6,13 @@
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\GoogleAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json
index 426526a922ec8..9938a1409c5f2 100644
--- a/app/code/Magento/GoogleOptimizer/composer.json
+++ b/app/code/Magento/GoogleOptimizer/composer.json
@@ -6,13 +6,13 @@
     },
     "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\GoogleOptimizer\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GraphQl/composer.json b/app/code/Magento/GraphQl/composer.json
index 904d41c97953e..e52cfcb8f7332 100644
--- a/app/code/Magento/GraphQl/composer.json
+++ b/app/code/Magento/GraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-eav": "*",
-        "magento/framework": "*"
+        "magento/module-eav": "102.1.*",
+        "magento/framework": "103.0.*"
     },
     "suggest": {
-        "magento/module-webapi": "*",
-        "magento/module-graph-ql-cache": "*"
+        "magento/module-webapi": "100.4.*",
+        "magento/module-graph-ql-cache": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\GraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GraphQlCache/composer.json b/app/code/Magento/GraphQlCache/composer.json
index 4cfdd0c4f660a..7edc82471b181 100644
--- a/app/code/Magento/GraphQlCache/composer.json
+++ b/app/code/Magento/GraphQlCache/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-page-cache": "*",
-        "magento/module-graph-ql": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-page-cache": "100.4.*",
+        "magento/module-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\GraphQlCache\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GroupedCatalogInventory/composer.json b/app/code/Magento/GroupedCatalogInventory/composer.json
index 0d91d939494a8..db81d649ede37 100644
--- a/app/code/Magento/GroupedCatalogInventory/composer.json
+++ b/app/code/Magento/GroupedCatalogInventory/composer.json
@@ -6,10 +6,10 @@
     },
     "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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\GroupedCatalogInventory\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json
index 8806058c2bfc8..527df378c3265 100644
--- a/app/code/Magento/GroupedImportExport/composer.json
+++ b/app/code/Magento/GroupedImportExport/composer.json
@@ -6,12 +6,12 @@
     },
     "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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\GroupedImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json
index 554b0c239c8fb..b135e1fdaa254 100644
--- a/app/code/Magento/GroupedProduct/composer.json
+++ b/app/code/Magento/GroupedProduct/composer.json
@@ -6,23 +6,23 @@
     },
     "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": [
@@ -36,5 +36,6 @@
         "psr-4": {
             "Magento\\GroupedProduct\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/GroupedProductGraphQl/composer.json b/app/code/Magento/GroupedProductGraphQl/composer.json
index 5784acb5f5d04..e8d1400736077 100644
--- a/app/code/Magento/GroupedProductGraphQl/composer.json
+++ b/app/code/Magento/GroupedProductGraphQl/composer.json
@@ -4,10 +4,10 @@
     "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": "*"
+        "magento/module-grouped-product": "100.4.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-catalog-graph-ql": "100.4.*",
+        "magento/framework": "103.0.*"
     },
     "license": [
         "OSL-3.0",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\GroupedProductGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json
index 3be5c03dc2828..17ae89a722a91 100644
--- a/app/code/Magento/ImportExport/composer.json
+++ b/app/code/Magento/ImportExport/composer.json
@@ -7,13 +7,13 @@
     "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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\ImportExport\\": ""
         }
-    }
+    },
+    "version": "101.0.0"
 }
diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json
index 07d652e9fa2b5..73b5625e1cd3d 100644
--- a/app/code/Magento/Indexer/composer.json
+++ b/app/code/Magento/Indexer/composer.json
@@ -6,8 +6,8 @@
     },
     "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": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\Indexer\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/InstantPurchase/composer.json b/app/code/Magento/InstantPurchase/composer.json
index 0807926b755a0..90a18e86c853d 100644
--- a/app/code/Magento/InstantPurchase/composer.json
+++ b/app/code/Magento/InstantPurchase/composer.json
@@ -8,14 +8,14 @@
     ],
     "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\InstantPurchase\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json
index c85e84284b43f..4e5f9615924ab 100644
--- a/app/code/Magento/Integration/composer.json
+++ b/app/code/Magento/Integration/composer.json
@@ -6,14 +6,14 @@
     },
     "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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\Integration\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json
index fa3c90dbbd774..5f214d02c9258 100644
--- a/app/code/Magento/LayeredNavigation/composer.json
+++ b/app/code/Magento/LayeredNavigation/composer.json
@@ -6,9 +6,9 @@
     },
     "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": [
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\LayeredNavigation\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomer/composer.json b/app/code/Magento/LoginAsCustomer/composer.json
index ec81374528e7b..62e30db212828 100755
--- a/app/code/Magento/LoginAsCustomer/composer.json
+++ b/app/code/Magento/LoginAsCustomer/composer.json
@@ -3,12 +3,12 @@
     "description": "Allow for admin to enter a customer account",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-customer": "*",
-        "magento/module-login-as-customer-api": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-login-as-customer-api": "100.4.*"
     },
     "suggest": {
-        "magento/module-backend": "*"
+        "magento/module-backend": "102.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -16,9 +16,12 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [ "registration.php" ],
+        "files": [
+            "registration.php"
+        ],
         "psr-4": {
             "Magento\\LoginAsCustomer\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/composer.json b/app/code/Magento/LoginAsCustomerAdminUi/composer.json
index 8bbe0e2bd6c9e..16ed6072554d2 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/composer.json
+++ b/app/code/Magento/LoginAsCustomerAdminUi/composer.json
@@ -3,15 +3,15 @@
     "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-store": "*"
+        "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-store": "101.1.*"
     },
     "suggest": {
-        "magento/module-login-as-customer": "*"
+        "magento/module-login-as-customer": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,9 +19,12 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [ "registration.php" ],
+        "files": [
+            "registration.php"
+        ],
         "psr-4": {
             "Magento\\LoginAsCustomerAdminUi\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerApi/composer.json b/app/code/Magento/LoginAsCustomerApi/composer.json
index b48319b61398f..b9f3db0559462 100644
--- a/app/code/Magento/LoginAsCustomerApi/composer.json
+++ b/app/code/Magento/LoginAsCustomerApi/composer.json
@@ -3,7 +3,7 @@
     "description": "Allow for admin to enter a customer account",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -11,9 +11,12 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [ "registration.php" ],
+        "files": [
+            "registration.php"
+        ],
         "psr-4": {
             "Magento\\LoginAsCustomerApi\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json
index 279d8ae3ec79e..600f34c843a23 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json
@@ -3,10 +3,10 @@
     "description": "",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-login-as-customer-api": "*",
-        "magento/module-customer": "*",
-        "magento/module-store": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-login-as-customer-api": "100.4.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-store": "101.1.*"
     },
     "type": "magento2-module",
     "license": [
@@ -14,9 +14,12 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [ "registration.php" ],
+        "files": [
+            "registration.php"
+        ],
         "psr-4": {
             "Magento\\LoginAsCustomerFrontendUi\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerLog/composer.json b/app/code/Magento/LoginAsCustomerLog/composer.json
index cf888f8cb1a59..3939888226045 100644
--- a/app/code/Magento/LoginAsCustomerLog/composer.json
+++ b/app/code/Magento/LoginAsCustomerLog/composer.json
@@ -3,15 +3,15 @@
     "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": "*"
+        "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": "*"
+        "magento/module-login-as-customer": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,9 +19,12 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [ "registration.php" ],
+        "files": [
+            "registration.php"
+        ],
         "psr-4": {
             "Magento\\LoginAsCustomerLog\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerPageCache/composer.json b/app/code/Magento/LoginAsCustomerPageCache/composer.json
index 195a08fc19d83..99ac2aacb05d8 100644
--- a/app/code/Magento/LoginAsCustomerPageCache/composer.json
+++ b/app/code/Magento/LoginAsCustomerPageCache/composer.json
@@ -3,12 +3,12 @@
     "description": "",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-customer": "*",
-        "magento/module-store": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-store": "101.1.*"
     },
     "suggest": {
-        "magento/module-page-cache": "*"
+        "magento/module-page-cache": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -16,9 +16,12 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [ "registration.php" ],
+        "files": [
+            "registration.php"
+        ],
         "psr-4": {
             "Magento\\LoginAsCustomerPageCache\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerQuote/composer.json b/app/code/Magento/LoginAsCustomerQuote/composer.json
index 556ffc0d3be43..c8d7d6d8006e7 100644
--- a/app/code/Magento/LoginAsCustomerQuote/composer.json
+++ b/app/code/Magento/LoginAsCustomerQuote/composer.json
@@ -3,13 +3,13 @@
     "description": "",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-checkout": "*",
-        "magento/module-customer": "*",
-        "magento/module-quote": "*"
+        "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": "*"
+        "magento/module-login-as-customer-api": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\LoginAsCustomerQuote\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/LoginAsCustomerSales/composer.json b/app/code/Magento/LoginAsCustomerSales/composer.json
index 3965e8acf87d8..58a57d9f3ac71 100644
--- a/app/code/Magento/LoginAsCustomerSales/composer.json
+++ b/app/code/Magento/LoginAsCustomerSales/composer.json
@@ -3,13 +3,13 @@
     "description": "",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-backend": "*",
-        "magento/module-customer": "*",
-        "magento/module-user": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-backend": "102.0.*",
+        "magento/module-customer": "103.0.*",
+        "magento/module-user": "101.2.*"
     },
     "suggest": {
-        "magento/module-sales": "*"
+        "magento/module-sales": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\LoginAsCustomerSales\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json
index 42bbcf151a17b..94827e2e2dd92 100644
--- a/app/code/Magento/Marketplace/composer.json
+++ b/app/code/Magento/Marketplace/composer.json
@@ -6,8 +6,8 @@
     },
     "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": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\Marketplace\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaContent/composer.json b/app/code/Magento/MediaContent/composer.json
index 4dc2b3eba0f68..253ca2d50be1b 100644
--- a/app/code/Magento/MediaContent/composer.json
+++ b/app/code/Magento/MediaContent/composer.json
@@ -3,9 +3,9 @@
     "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": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-media-content-api": "100.4.*",
+        "magento/module-media-gallery-api": "101.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\MediaContent\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaContentApi/composer.json b/app/code/Magento/MediaContentApi/composer.json
index fd1f2f9a0f265..35a6ea8034d73 100644
--- a/app/code/Magento/MediaContentApi/composer.json
+++ b/app/code/Magento/MediaContentApi/composer.json
@@ -3,8 +3,8 @@
     "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": "*"
+        "magento/module-media-gallery-api": "101.0.*",
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -18,5 +18,6 @@
         "psr-4": {
             "Magento\\MediaContentApi\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaContentCatalog/composer.json b/app/code/Magento/MediaContentCatalog/composer.json
index 21e23e6b18bdc..042d7dd0c4ec0 100644
--- a/app/code/Magento/MediaContentCatalog/composer.json
+++ b/app/code/Magento/MediaContentCatalog/composer.json
@@ -3,10 +3,10 @@
     "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/framework": "*"
+        "magento/module-media-content-api": "100.4.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-eav": "102.1.*",
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\MediaContentCatalog\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaContentCms/composer.json b/app/code/Magento/MediaContentCms/composer.json
index ea32fdd7a49fa..16880d72c1a92 100644
--- a/app/code/Magento/MediaContentCms/composer.json
+++ b/app/code/Magento/MediaContentCms/composer.json
@@ -3,9 +3,9 @@
     "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": "*"
+        "magento/module-media-content-api": "100.4.*",
+        "magento/module-cms": "104.0.*",
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\MediaContentCms\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaGallery/composer.json b/app/code/Magento/MediaGallery/composer.json
index d430a174a9738..3664941f59615 100644
--- a/app/code/Magento/MediaGallery/composer.json
+++ b/app/code/Magento/MediaGallery/composer.json
@@ -3,9 +3,9 @@
     "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/framework": "103.0.*",
+        "magento/module-media-gallery-api": "101.0.*",
+        "magento/module-cms": "104.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\MediaGallery\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaGalleryApi/composer.json b/app/code/Magento/MediaGalleryApi/composer.json
index 8bea8ee95b55a..512459328707d 100644
--- a/app/code/Magento/MediaGalleryApi/composer.json
+++ b/app/code/Magento/MediaGalleryApi/composer.json
@@ -3,7 +3,7 @@
     "description": "Magento module responsible for media gallery asset attributes storage and management",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -17,5 +17,6 @@
         "psr-4": {
             "Magento\\MediaGalleryApi\\": ""
         }
-    }
+    },
+    "version": "101.0.0"
 }
diff --git a/app/code/Magento/MediaGalleryCatalog/composer.json b/app/code/Magento/MediaGalleryCatalog/composer.json
index 192d86684aa76..c83f6b8b2549f 100644
--- a/app/code/Magento/MediaGalleryCatalog/composer.json
+++ b/app/code/Magento/MediaGalleryCatalog/composer.json
@@ -3,9 +3,9 @@
     "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": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-media-gallery-api": "101.0.*",
+        "magento/module-catalog": "104.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\MediaGalleryCatalog\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json
index cb1057febb23e..390f398b2531c 100644
--- a/app/code/Magento/MediaStorage/composer.json
+++ b/app/code/Magento/MediaStorage/composer.json
@@ -6,15 +6,15 @@
     },
     "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": [
@@ -28,5 +28,6 @@
         "psr-4": {
             "Magento\\MediaStorage\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MessageQueue/composer.json b/app/code/Magento/MessageQueue/composer.json
index 57603f0a73acc..56ad421b9b824 100644
--- a/app/code/Magento/MessageQueue/composer.json
+++ b/app/code/Magento/MessageQueue/composer.json
@@ -5,8 +5,8 @@
         "sort-packages": true
     },
     "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"
     },
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\MessageQueue\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json
index 5c9d2e4cf58fa..d6a6e4576debf 100644
--- a/app/code/Magento/Msrp/composer.json
+++ b/app/code/Magento/Msrp/composer.json
@@ -6,16 +6,16 @@
     },
     "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": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\Msrp\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MsrpConfigurableProduct/composer.json b/app/code/Magento/MsrpConfigurableProduct/composer.json
index 53d274a3c4006..40ce8895fb0ee 100644
--- a/app/code/Magento/MsrpConfigurableProduct/composer.json
+++ b/app/code/Magento/MsrpConfigurableProduct/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\MsrpConfigurableProduct\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MsrpGroupedProduct/composer.json b/app/code/Magento/MsrpGroupedProduct/composer.json
index 5c426b5910ad7..18f8fa7b2658d 100644
--- a/app/code/Magento/MsrpGroupedProduct/composer.json
+++ b/app/code/Magento/MsrpGroupedProduct/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\MsrpGroupedProduct\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json
index 85f60985fe1b0..e05bce8b3d6be 100644
--- a/app/code/Magento/Multishipping/composer.json
+++ b/app/code/Magento/Multishipping/composer.json
@@ -6,16 +6,16 @@
     },
     "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/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.*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\Multishipping\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/MysqlMq/composer.json b/app/code/Magento/MysqlMq/composer.json
index 225b3a091a462..bdcde982e27ce 100644
--- a/app/code/Magento/MysqlMq/composer.json
+++ b/app/code/Magento/MysqlMq/composer.json
@@ -5,10 +5,10 @@
         "sort-packages": true
     },
     "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.3.0||~7.4.0"
     },
     "type": "magento2-module",
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\MysqlMq\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json
index ca4c72d5a3aad..de7153c41455f 100644
--- a/app/code/Magento/NewRelicReporting/composer.json
+++ b/app/code/Magento/NewRelicReporting/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\NewRelicReporting\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json
index 790370c328644..5ca8cda80e8d8 100644
--- a/app/code/Magento/Newsletter/composer.json
+++ b/app/code/Magento/Newsletter/composer.json
@@ -6,16 +6,16 @@
     },
     "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/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": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\Newsletter\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json
index 56c7eb2778c48..1a98e9f83cb37 100644
--- a/app/code/Magento/OfflinePayments/composer.json
+++ b/app/code/Magento/OfflinePayments/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-checkout": "*",
-        "magento/module-payment": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-checkout": "100.4.*",
+        "magento/module-payment": "100.4.*"
     },
     "suggest": {
-        "magento/module-config": "*"
+        "magento/module-config": "101.2.*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\OfflinePayments\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json
index 7cd6f05f8ad1c..be24eb428c588 100644
--- a/app/code/Magento/OfflineShipping/composer.json
+++ b/app/code/Magento/OfflineShipping/composer.json
@@ -6,20 +6,20 @@
     },
     "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": "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": [
@@ -33,5 +33,6 @@
         "psr-4": {
             "Magento\\OfflineShipping\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json
index 506fd54886d92..9dd88e64d572f 100644
--- a/app/code/Magento/PageCache/composer.json
+++ b/app/code/Magento/PageCache/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\PageCache\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json
index 72246c5698f80..9e0a9c5fb0ca6 100644
--- a/app/code/Magento/Payment/composer.json
+++ b/app/code/Magento/Payment/composer.json
@@ -6,14 +6,14 @@
     },
     "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/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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\Payment\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json
index 1b35fae2de1bc..510afa1852c86 100644
--- a/app/code/Magento/Paypal/composer.json
+++ b/app/code/Magento/Paypal/composer.json
@@ -7,26 +7,26 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "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-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-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": [
@@ -40,5 +40,6 @@
         "psr-4": {
             "Magento\\Paypal\\": ""
         }
-    }
+    },
+    "version": "101.0.0"
 }
diff --git a/app/code/Magento/PaypalCaptcha/composer.json b/app/code/Magento/PaypalCaptcha/composer.json
index b88eb2f1a552e..7d3be0012a6f2 100644
--- a/app/code/Magento/PaypalCaptcha/composer.json
+++ b/app/code/Magento/PaypalCaptcha/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\PaypalCaptcha\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/PaypalGraphQl/composer.json b/app/code/Magento/PaypalGraphQl/composer.json
index 8d012be3492dd..e033e6f6994de 100644
--- a/app/code/Magento/PaypalGraphQl/composer.json
+++ b/app/code/Magento/PaypalGraphQl/composer.json
@@ -6,17 +6,17 @@
     },
     "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": "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.*"
     },
     "suggest": {
-        "magento/module-graph-ql": "*"
+        "magento/module-graph-ql": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -30,5 +30,6 @@
         "psr-4": {
             "Magento\\PaypalGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json
index 68fe5cb47c00e..67916942300a8 100644
--- a/app/code/Magento/Persistent/composer.json
+++ b/app/code/Magento/Persistent/composer.json
@@ -6,13 +6,13 @@
     },
     "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": "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\Persistent\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json
index bfe2a43b373ce..5c856b6f50341 100644
--- a/app/code/Magento/ProductAlert/composer.json
+++ b/app/code/Magento/ProductAlert/composer.json
@@ -6,15 +6,15 @@
     },
     "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": "103.0.*",
+        "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": [
@@ -28,5 +28,6 @@
         "psr-4": {
             "Magento\\ProductAlert\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json
index b7268338398a7..d98a21d2eace9 100644
--- a/app/code/Magento/ProductVideo/composer.json
+++ b/app/code/Magento/ProductVideo/composer.json
@@ -6,17 +6,17 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -30,5 +30,6 @@
         "psr-4": {
             "Magento\\ProductVideo\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json
index 31312fae26e78..0014b209422bf 100644
--- a/app/code/Magento/Quote/composer.json
+++ b/app/code/Magento/Quote/composer.json
@@ -6,24 +6,24 @@
     },
     "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": "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": [
@@ -37,5 +37,6 @@
         "psr-4": {
             "Magento\\Quote\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/QuoteAnalytics/composer.json b/app/code/Magento/QuoteAnalytics/composer.json
index 4bfb7172c4c83..b6b6ac017f180 100644
--- a/app/code/Magento/QuoteAnalytics/composer.json
+++ b/app/code/Magento/QuoteAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-quote": "*",
-        "magento/module-analytics": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-quote": "101.2.*",
+        "magento/module-analytics": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\QuoteAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/QuoteGraphQl/composer.json b/app/code/Magento/QuoteGraphQl/composer.json
index 0652d39b5f426..85ee29eebd0cc 100644
--- a/app/code/Magento/QuoteGraphQl/composer.json
+++ b/app/code/Magento/QuoteGraphQl/composer.json
@@ -4,19 +4,19 @@
     "type": "magento2-module",
     "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": "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.*"
     },
     "suggest": {
-        "magento/module-graph-ql-cache": "*"
+        "magento/module-graph-ql-cache": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\QuoteGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/RelatedProductGraphQl/composer.json b/app/code/Magento/RelatedProductGraphQl/composer.json
index 2cb851d56e58e..63188b5fd0817 100644
--- a/app/code/Magento/RelatedProductGraphQl/composer.json
+++ b/app/code/Magento/RelatedProductGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.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",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\RelatedProductGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ReleaseNotification/composer.json b/app/code/Magento/ReleaseNotification/composer.json
index c2e347bc66ef0..10de55ad63375 100644
--- a/app/code/Magento/ReleaseNotification/composer.json
+++ b/app/code/Magento/ReleaseNotification/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-user": "*",
-        "magento/module-backend": "*",
-        "magento/module-ui": "*",
-        "magento/framework": "*"
+        "magento/module-user": "101.2.*",
+        "magento/module-backend": "102.0.*",
+        "magento/module-ui": "101.2.*",
+        "magento/framework": "103.0.*"
     },
     "suggest": {
-        "magento/module-config": "*"
+        "magento/module-config": "101.2.*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\ReleaseNotification\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json
index f1fe6c1e2c83a..97d6e8a476e03 100644
--- a/app/code/Magento/Reports/composer.json
+++ b/app/code/Magento/Reports/composer.json
@@ -6,23 +6,23 @@
     },
     "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": "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.*"
     },
     "type": "magento2-module",
     "license": [
@@ -36,5 +36,6 @@
         "psr-4": {
             "Magento\\Reports\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json
index 9c3b84e88df53..1946df38f0af0 100644
--- a/app/code/Magento/RequireJs/composer.json
+++ b/app/code/Magento/RequireJs/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\RequireJs\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json
index 5a428ae15fd67..7be475cb4e96f 100644
--- a/app/code/Magento/Review/composer.json
+++ b/app/code/Magento/Review/composer.json
@@ -6,19 +6,19 @@
     },
     "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": "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": [
@@ -32,5 +32,6 @@
         "psr-4": {
             "Magento\\Review\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/ReviewAnalytics/composer.json b/app/code/Magento/ReviewAnalytics/composer.json
index d18ec43a93ac1..0a18612dba40d 100644
--- a/app/code/Magento/ReviewAnalytics/composer.json
+++ b/app/code/Magento/ReviewAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-review": "*",
-        "magento/module-analytics": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-review": "100.4.*",
+        "magento/module-analytics": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\ReviewAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Robots/composer.json b/app/code/Magento/Robots/composer.json
index 2035010b0ce8b..775666fa64f6b 100644
--- a/app/code/Magento/Robots/composer.json
+++ b/app/code/Magento/Robots/composer.json
@@ -6,11 +6,11 @@
     },
     "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-theme": "*"
+        "magento/module-theme": "101.1.*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Robots\\": ""
         }
-    }
+    },
+    "version": "101.1.0"
 }
diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json
index bd845acc12f9a..f50ef0488081d 100644
--- a/app/code/Magento/Rss/composer.json
+++ b/app/code/Magento/Rss/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\Rss\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json
index 0ab2b6780dcad..b516551b5f565 100644
--- a/app/code/Magento/Rule/composer.json
+++ b/app/code/Magento/Rule/composer.json
@@ -7,11 +7,11 @@
     "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": "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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\Rule\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json
index 411ad3739d560..d15ecc4aa5a8c 100644
--- a/app/code/Magento/Sales/composer.json
+++ b/app/code/Magento/Sales/composer.json
@@ -6,34 +6,34 @@
     },
     "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": "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": [
@@ -47,5 +47,6 @@
         "psr-4": {
             "Magento\\Sales\\": ""
         }
-    }
+    },
+    "version": "103.0.0"
 }
diff --git a/app/code/Magento/SalesAnalytics/composer.json b/app/code/Magento/SalesAnalytics/composer.json
index ca7926f2d8b5a..d273a21bfb1f1 100644
--- a/app/code/Magento/SalesAnalytics/composer.json
+++ b/app/code/Magento/SalesAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-sales": "*",
-        "magento/module-analytics": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-sales": "103.0.*",
+        "magento/module-analytics": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\SalesAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SalesGraphQl/composer.json b/app/code/Magento/SalesGraphQl/composer.json
index 8e9d95836e189..c5d1c32861797 100644
--- a/app/code/Magento/SalesGraphQl/composer.json
+++ b/app/code/Magento/SalesGraphQl/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-sales": "*",
-        "magento/module-graph-ql": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-sales": "103.0.*",
+        "magento/module-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\SalesGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json
index 6a91b04a7c0d9..b3610ac242469 100644
--- a/app/code/Magento/SalesInventory/composer.json
+++ b/app/code/Magento/SalesInventory/composer.json
@@ -6,11 +6,11 @@
     },
     "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": "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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\SalesInventory\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json
index 572e191093275..40b42fcd1193b 100644
--- a/app/code/Magento/SalesRule/composer.json
+++ b/app/code/Magento/SalesRule/composer.json
@@ -6,29 +6,29 @@
     },
     "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": "103.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.*"
     },
     "suggest": {
-        "magento/module-sales-rule-sample-data": "*"
+        "magento/module-sales-rule-sample-data": "Sample Data version: 100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -42,5 +42,6 @@
         "psr-4": {
             "Magento\\SalesRule\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json
index a0f9cb45cafc8..666fb0b39a1e2 100644
--- a/app/code/Magento/SalesSequence/composer.json
+++ b/app/code/Magento/SalesSequence/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\SalesSequence\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json
index 30efc94bc9274..175b0e15d1f04 100644
--- a/app/code/Magento/SampleData/composer.json
+++ b/app/code/Magento/SampleData/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\SampleData\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json
index 3df1dc5935ad8..6ed6b07e49214 100644
--- a/app/code/Magento/Search/composer.json
+++ b/app/code/Magento/Search/composer.json
@@ -6,12 +6,12 @@
     },
     "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": "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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\Search\\": ""
         }
-    }
+    },
+    "version": "101.1.0"
 }
diff --git a/app/code/Magento/Security/composer.json b/app/code/Magento/Security/composer.json
index 4978f0c628f96..9e2388e26d72c 100644
--- a/app/code/Magento/Security/composer.json
+++ b/app/code/Magento/Security/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-backend": "*",
-        "magento/module-store": "*",
-        "magento/module-user": "*"
+        "magento/framework": "103.0.*",
+        "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\Security\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json
index 17c908ab33e3e..444401c5ef64a 100644
--- a/app/code/Magento/SendFriend/composer.json
+++ b/app/code/Magento/SendFriend/composer.json
@@ -6,13 +6,13 @@
     },
     "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": "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": [
@@ -26,5 +26,6 @@
         "psr-4": {
             "Magento\\SendFriend\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SendFriendGraphQl/composer.json b/app/code/Magento/SendFriendGraphQl/composer.json
index 456780c1c1841..582bea663947e 100644
--- a/app/code/Magento/SendFriendGraphQl/composer.json
+++ b/app/code/Magento/SendFriendGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-catalog": "*",
-        "magento/module-send-friend": "*",
-        "magento/module-graph-ql": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-catalog": "104.0.*",
+        "magento/module-send-friend": "100.4.*",
+        "magento/module-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\SendFriendGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json
index 5ea8430226ad8..08cbf729f8e22 100644
--- a/app/code/Magento/Shipping/composer.json
+++ b/app/code/Magento/Shipping/composer.json
@@ -7,25 +7,25 @@
     "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": "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": [
@@ -39,5 +39,6 @@
         "psr-4": {
             "Magento\\Shipping\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json
index 6a9f20ac8bddf..562016cd5f3a0 100644
--- a/app/code/Magento/Sitemap/composer.json
+++ b/app/code/Magento/Sitemap/composer.json
@@ -6,19 +6,19 @@
     },
     "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": "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": [
@@ -32,5 +32,6 @@
         "psr-4": {
             "Magento\\Sitemap\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json
index e6f7f0d5ac274..c45b1766a5873 100644
--- a/app/code/Magento/Store/composer.json
+++ b/app/code/Magento/Store/composer.json
@@ -6,18 +6,18 @@
     },
     "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": "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": [
@@ -31,5 +31,6 @@
         "psr-4": {
             "Magento\\Store\\": ""
         }
-    }
+    },
+    "version": "101.1.0"
 }
diff --git a/app/code/Magento/StoreGraphQl/composer.json b/app/code/Magento/StoreGraphQl/composer.json
index a7cab5851a9ee..5b9c0f2161ebb 100644
--- a/app/code/Magento/StoreGraphQl/composer.json
+++ b/app/code/Magento/StoreGraphQl/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-store": "*",
-        "magento/module-graph-ql": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-store": "101.1.*",
+        "magento/module-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\StoreGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json
index 759e72350b0a6..fdcab3fe66c2e 100644
--- a/app/code/Magento/Swagger/composer.json
+++ b/app/code/Magento/Swagger/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\Swagger\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SwaggerWebapi/composer.json b/app/code/Magento/SwaggerWebapi/composer.json
index 78021f7cb4ec5..63d369882ad87 100644
--- a/app/code/Magento/SwaggerWebapi/composer.json
+++ b/app/code/Magento/SwaggerWebapi/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-swagger": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-swagger": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\SwaggerWebapi\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SwaggerWebapiAsync/composer.json b/app/code/Magento/SwaggerWebapiAsync/composer.json
index 283b2fe1f1758..99e11cdaf87b3 100644
--- a/app/code/Magento/SwaggerWebapiAsync/composer.json
+++ b/app/code/Magento/SwaggerWebapiAsync/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\SwaggerWebapiAsync\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Swatches/composer.json b/app/code/Magento/Swatches/composer.json
index 2c9b7a03ba011..6c7c2f1a66ae9 100644
--- a/app/code/Magento/Swatches/composer.json
+++ b/app/code/Magento/Swatches/composer.json
@@ -6,21 +6,21 @@
     },
     "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": "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": [
@@ -34,5 +34,6 @@
         "psr-4": {
             "Magento\\Swatches\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SwatchesGraphQl/composer.json b/app/code/Magento/SwatchesGraphQl/composer.json
index 383575302e6ae..961852580f2c2 100644
--- a/app/code/Magento/SwatchesGraphQl/composer.json
+++ b/app/code/Magento/SwatchesGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-swatches": "*",
-        "magento/module-catalog": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-swatches": "100.4.*",
+        "magento/module-catalog": "104.0.*"
     },
     "suggest": {
-        "magento/module-catalog-graph-ql": "*"
+        "magento/module-catalog-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -22,5 +22,6 @@
         "psr-4": {
             "Magento\\SwatchesGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/SwatchesLayeredNavigation/composer.json b/app/code/Magento/SwatchesLayeredNavigation/composer.json
index 3b987f8096f18..e6646efd43268 100644
--- a/app/code/Magento/SwatchesLayeredNavigation/composer.json
+++ b/app/code/Magento/SwatchesLayeredNavigation/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
+        "magento/framework": "103.0.*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\SwatchesLayeredNavigation\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json
index 2fe0597c85a63..ea43903ed8df6 100644
--- a/app/code/Magento/Tax/composer.json
+++ b/app/code/Magento/Tax/composer.json
@@ -6,24 +6,24 @@
     },
     "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/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": [
@@ -37,5 +37,6 @@
         "psr-4": {
             "Magento\\Tax\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/TaxGraphQl/composer.json b/app/code/Magento/TaxGraphQl/composer.json
index b97e414cacb67..058bfce1d5850 100644
--- a/app/code/Magento/TaxGraphQl/composer.json
+++ b/app/code/Magento/TaxGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.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",
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\TaxGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json
index 01c069b4299c1..1905881740f8c 100644
--- a/app/code/Magento/TaxImportExport/composer.json
+++ b/app/code/Magento/TaxImportExport/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -25,5 +25,6 @@
         "psr-4": {
             "Magento\\TaxImportExport\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json
index 63779c6f9bf5d..19776eb59ecd8 100644
--- a/app/code/Magento/Theme/composer.json
+++ b/app/code/Magento/Theme/composer.json
@@ -6,22 +6,22 @@
     },
     "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": "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": [
@@ -35,5 +35,6 @@
         "psr-4": {
             "Magento\\Theme\\": ""
         }
-    }
+    },
+    "version": "101.1.0"
 }
diff --git a/app/code/Magento/ThemeGraphQl/composer.json b/app/code/Magento/ThemeGraphQl/composer.json
index cee740d449b37..e70b7bb533692 100644
--- a/app/code/Magento/ThemeGraphQl/composer.json
+++ b/app/code/Magento/ThemeGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "suggest": {
-        "magento/module-store-graph-ql": "*"
+        "magento/module-store-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\ThemeGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Tinymce3/composer.json b/app/code/Magento/Tinymce3/composer.json
index 0b8cf6824295e..c7c03f8e17ca7 100644
--- a/app/code/Magento/Tinymce3/composer.json
+++ b/app/code/Magento/Tinymce3/composer.json
@@ -3,14 +3,14 @@
     "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/framework": "103.0.*",
+        "magento/module-backend": "102.0.*",
+        "magento/module-ui": "101.2.*",
+        "magento/module-variable": "100.4.*",
+        "magento/module-widget": "101.2.*"
     },
     "suggest": {
-        "magento/module-cms": "*"
+        "magento/module-cms": "104.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Tinymce3\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json
index 7f67749fa88f4..ab1d258e36bec 100644
--- a/app/code/Magento/Translation/composer.json
+++ b/app/code/Magento/Translation/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\Translation\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json
index b4aeda0fc1e6a..b122892074037 100644
--- a/app/code/Magento/Ui/composer.json
+++ b/app/code/Magento/Ui/composer.json
@@ -6,15 +6,15 @@
     },
     "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/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": [
@@ -28,5 +28,6 @@
         "psr-4": {
             "Magento\\Ui\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json
index fa8962f0af592..e26eb018ea688 100644
--- a/app/code/Magento/Ups/composer.json
+++ b/app/code/Magento/Ups/composer.json
@@ -6,17 +6,17 @@
     },
     "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": "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": [
@@ -30,5 +30,6 @@
         "psr-4": {
             "Magento\\Ups\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json
index 44ca51e8bcbe2..96bdcfc7e9642 100644
--- a/app/code/Magento/UrlRewrite/composer.json
+++ b/app/code/Magento/UrlRewrite/composer.json
@@ -6,14 +6,14 @@
     },
     "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/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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\UrlRewrite\\": ""
         }
-    }
+    },
+    "version": "102.0.0"
 }
diff --git a/app/code/Magento/UrlRewriteGraphQl/composer.json b/app/code/Magento/UrlRewriteGraphQl/composer.json
index 766ad3ab46ebd..adacea949b340 100644
--- a/app/code/Magento/UrlRewriteGraphQl/composer.json
+++ b/app/code/Magento/UrlRewriteGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.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",
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\UrlRewriteGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json
index 6ba4be749cc7c..60119f505f6cc 100644
--- a/app/code/Magento/User/composer.json
+++ b/app/code/Magento/User/composer.json
@@ -6,14 +6,14 @@
     },
     "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/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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\User\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json
index 3d5c0669c679d..fcd3a0babe913 100644
--- a/app/code/Magento/Usps/composer.json
+++ b/app/code/Magento/Usps/composer.json
@@ -7,15 +7,15 @@
     "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": [
@@ -29,5 +29,6 @@
         "psr-4": {
             "Magento\\Usps\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Variable/composer.json b/app/code/Magento/Variable/composer.json
index e6eed40a814db..283db7ec3a7f2 100644
--- a/app/code/Magento/Variable/composer.json
+++ b/app/code/Magento/Variable/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -24,5 +24,6 @@
         "psr-4": {
             "Magento\\Variable\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Vault/composer.json b/app/code/Magento/Vault/composer.json
index 31d5ceb906246..fbc12bee2a7f3 100644
--- a/app/code/Magento/Vault/composer.json
+++ b/app/code/Magento/Vault/composer.json
@@ -6,14 +6,14 @@
     },
     "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": "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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\Vault\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/VaultGraphQl/composer.json b/app/code/Magento/VaultGraphQl/composer.json
index aff9a700fbcad..d7f056178cfaf 100644
--- a/app/code/Magento/VaultGraphQl/composer.json
+++ b/app/code/Magento/VaultGraphQl/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-vault": "*",
-        "magento/module-graph-ql": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-vault": "101.2.*",
+        "magento/module-graph-ql": "100.4.*"
     },
     "license": [
         "OSL-3.0",
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\VaultGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json
index d2b2127446c21..397ffc6ae0c7f 100644
--- a/app/code/Magento/Version/composer.json
+++ b/app/code/Magento/Version/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\Version\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json
index 11382cc318554..85418f5b1b28f 100644
--- a/app/code/Magento/Webapi/composer.json
+++ b/app/code/Magento/Webapi/composer.json
@@ -6,15 +6,15 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -28,5 +28,6 @@
         "psr-4": {
             "Magento\\Webapi\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/WebapiAsync/composer.json b/app/code/Magento/WebapiAsync/composer.json
index e0c6a96f1ffe6..4f7736cf9fb3b 100644
--- a/app/code/Magento/WebapiAsync/composer.json
+++ b/app/code/Magento/WebapiAsync/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -27,5 +27,6 @@
         "psr-4": {
             "Magento\\WebapiAsync\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/WebapiSecurity/composer.json b/app/code/Magento/WebapiSecurity/composer.json
index 5b48ed8644709..1b2d3c328e9d1 100644
--- a/app/code/Magento/WebapiSecurity/composer.json
+++ b/app/code/Magento/WebapiSecurity/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-webapi": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-webapi": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,5 +21,6 @@
         "psr-4": {
             "Magento\\WebapiSecurity\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json
index 7024de0f595c7..ff85c42ac6267 100644
--- a/app/code/Magento/Weee/composer.json
+++ b/app/code/Magento/Weee/composer.json
@@ -6,22 +6,22 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.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": [
@@ -35,5 +35,6 @@
         "psr-4": {
             "Magento\\Weee\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/WeeeGraphQl/composer.json b/app/code/Magento/WeeeGraphQl/composer.json
index be7e50ab2fca1..33d16fb64a2db 100644
--- a/app/code/Magento/WeeeGraphQl/composer.json
+++ b/app/code/Magento/WeeeGraphQl/composer.json
@@ -4,13 +4,13 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.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",
@@ -23,5 +23,6 @@
         "psr-4": {
             "Magento\\WeeeGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json
index 2cf8429095ce7..a85b8f46fca0e 100644
--- a/app/code/Magento/Widget/composer.json
+++ b/app/code/Magento/Widget/composer.json
@@ -6,17 +6,17 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-backend": "*",
-        "magento/module-catalog": "*",
-        "magento/module-cms": "*",
-        "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-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": [
@@ -30,5 +30,6 @@
         "psr-4": {
             "Magento\\Widget\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json
index b426ffe01cecc..0a347b9e5f027 100644
--- a/app/code/Magento/Wishlist/composer.json
+++ b/app/code/Magento/Wishlist/composer.json
@@ -6,26 +6,26 @@
     },
     "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-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": [
@@ -39,5 +39,6 @@
         "psr-4": {
             "Magento\\Wishlist\\": ""
         }
-    }
+    },
+    "version": "101.2.0"
 }
diff --git a/app/code/Magento/WishlistAnalytics/composer.json b/app/code/Magento/WishlistAnalytics/composer.json
index 309257f857ed2..9d072368bdd9d 100644
--- a/app/code/Magento/WishlistAnalytics/composer.json
+++ b/app/code/Magento/WishlistAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-wishlist": "*",
-        "magento/module-analytics": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-wishlist": "101.2.*",
+        "magento/module-analytics": "100.4.*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,5 +19,6 @@
         "psr-4": {
             "Magento\\WishlistAnalytics\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/code/Magento/WishlistGraphQl/composer.json b/app/code/Magento/WishlistGraphQl/composer.json
index 7a3fca599a4b3..e16f27d8cc788 100644
--- a/app/code/Magento/WishlistGraphQl/composer.json
+++ b/app/code/Magento/WishlistGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/module-catalog-graph-ql": "*",
-        "magento/module-wishlist": "*",
-        "magento/module-store": "*"
+        "magento/framework": "103.0.*",
+        "magento/module-catalog-graph-ql": "100.4.*",
+        "magento/module-wishlist": "101.2.*",
+        "magento/module-store": "101.1.*"
     },
     "license": [
         "OSL-3.0",
@@ -20,5 +20,6 @@
         "psr-4": {
             "Magento\\WishlistGraphQl\\": ""
         }
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json
index 249441be1753e..2e5c02976ab00 100644
--- a/app/design/adminhtml/Magento/backend/composer.json
+++ b/app/design/adminhtml/Magento/backend/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-theme",
     "license": [
@@ -17,5 +17,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json
index 066d0cd1cc9f2..d12350af15042 100644
--- a/app/design/frontend/Magento/blank/composer.json
+++ b/app/design/frontend/Magento/blank/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-theme",
     "license": [
@@ -17,5 +17,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/design/frontend/Magento/luma/composer.json b/app/design/frontend/Magento/luma/composer.json
index 16bed43fe8cbf..5083d423ab87b 100644
--- a/app/design/frontend/Magento/luma/composer.json
+++ b/app/design/frontend/Magento/luma/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "*",
-        "magento/theme-frontend-blank": "*"
+        "magento/framework": "103.0.*",
+        "magento/theme-frontend-blank": "100.4.*"
     },
     "type": "magento2-theme",
     "license": [
@@ -18,5 +18,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/de_DE/composer.json b/app/i18n/Magento/de_DE/composer.json
index 5a488a3e32c2b..2bfbcd3db948f 100644
--- a/app/i18n/Magento/de_DE/composer.json
+++ b/app/i18n/Magento/de_DE/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/en_US/composer.json b/app/i18n/Magento/en_US/composer.json
index 1108c70de28a6..a2d9d20863893 100644
--- a/app/i18n/Magento/en_US/composer.json
+++ b/app/i18n/Magento/en_US/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/es_ES/composer.json b/app/i18n/Magento/es_ES/composer.json
index 5bc3cb5730adf..30f86b04042fd 100644
--- a/app/i18n/Magento/es_ES/composer.json
+++ b/app/i18n/Magento/es_ES/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/fr_FR/composer.json b/app/i18n/Magento/fr_FR/composer.json
index 50c541308673b..4da78146736fc 100644
--- a/app/i18n/Magento/fr_FR/composer.json
+++ b/app/i18n/Magento/fr_FR/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/nl_NL/composer.json b/app/i18n/Magento/nl_NL/composer.json
index a182e179d4103..3641101e66b5a 100644
--- a/app/i18n/Magento/nl_NL/composer.json
+++ b/app/i18n/Magento/nl_NL/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/pt_BR/composer.json b/app/i18n/Magento/pt_BR/composer.json
index 46734cc09b363..0dc5c014eabd0 100644
--- a/app/i18n/Magento/pt_BR/composer.json
+++ b/app/i18n/Magento/pt_BR/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/app/i18n/Magento/zh_Hans_CN/composer.json b/app/i18n/Magento/zh_Hans_CN/composer.json
index ce214ce649f56..eff1bfd2c3033 100644
--- a/app/i18n/Magento/zh_Hans_CN/composer.json
+++ b/app/i18n/Magento/zh_Hans_CN/composer.json
@@ -9,12 +9,13 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "*"
+        "magento/framework": "103.0.*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/composer.json b/composer.json
index 816fad7068837..c2da7d52f1d19 100644
--- a/composer.json
+++ b/composer.json
@@ -101,205 +101,205 @@
         "ext-pcntl": "Need for run processes in parallel mode"
     },
     "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-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-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-frontend-ui": "*",
-        "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-catalog": "*",
-        "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-offline-payments": "*",
-        "magento/module-offline-shipping": "*",
-        "magento/module-page-cache": "*",
-        "magento/module-payment": "*",
-        "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-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-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.0",
+        "magento/module-admin-analytics": "100.4.0",
+        "magento/module-admin-notification": "100.4.0",
+        "magento/module-advanced-pricing-import-export": "100.4.0",
+        "magento/module-amqp": "100.4.0",
+        "magento/module-amqp-store": "100.4.0",
+        "magento/module-analytics": "100.4.0",
+        "magento/module-asynchronous-operations": "100.4.0",
+        "magento/module-authorization": "100.4.0",
+        "magento/module-advanced-search": "100.4.0",
+        "magento/module-backend": "102.0.0",
+        "magento/module-backup": "100.4.0",
+        "magento/module-bundle": "101.0.0",
+        "magento/module-bundle-graph-ql": "100.4.0",
+        "magento/module-bundle-import-export": "100.4.0",
+        "magento/module-cache-invalidate": "100.4.0",
+        "magento/module-captcha": "100.4.0",
+        "magento/module-cardinal-commerce": "100.4.0",
+        "magento/module-catalog": "104.0.0",
+        "magento/module-catalog-customer-graph-ql": "100.4.0",
+        "magento/module-catalog-analytics": "100.4.0",
+        "magento/module-catalog-import-export": "101.1.0",
+        "magento/module-catalog-inventory": "100.4.0",
+        "magento/module-catalog-inventory-graph-ql": "100.4.0",
+        "magento/module-catalog-rule": "101.2.0",
+        "magento/module-catalog-rule-graph-ql": "100.4.0",
+        "magento/module-catalog-rule-configurable": "100.4.0",
+        "magento/module-catalog-search": "102.0.0",
+        "magento/module-catalog-url-rewrite": "100.4.0",
+        "magento/module-catalog-widget": "100.4.0",
+        "magento/module-checkout": "100.4.0",
+        "magento/module-checkout-agreements": "100.4.0",
+        "magento/module-checkout-agreements-graph-ql": "100.4.0",
+        "magento/module-cms": "104.0.0",
+        "magento/module-cms-url-rewrite": "100.4.0",
+        "magento/module-config": "101.2.0",
+        "magento/module-configurable-import-export": "100.4.0",
+        "magento/module-configurable-product": "100.4.0",
+        "magento/module-configurable-product-sales": "100.4.0",
+        "magento/module-contact": "100.4.0",
+        "magento/module-cookie": "100.4.0",
+        "magento/module-cron": "100.4.0",
+        "magento/module-currency-symbol": "100.4.0",
+        "magento/module-customer": "103.0.0",
+        "magento/module-customer-analytics": "100.4.0",
+        "magento/module-customer-downloadable-graph-ql": "100.4.0",
+        "magento/module-customer-import-export": "100.4.0",
+        "magento/module-deploy": "100.4.0",
+        "magento/module-developer": "100.4.0",
+        "magento/module-dhl": "100.4.0",
+        "magento/module-directory": "100.4.0",
+        "magento/module-directory-graph-ql": "100.4.0",
+        "magento/module-downloadable": "100.4.0",
+        "magento/module-downloadable-graph-ql": "100.4.0",
+        "magento/module-downloadable-import-export": "100.4.0",
+        "magento/module-eav": "102.1.0",
+        "magento/module-elasticsearch": "101.0.0",
+        "magento/module-elasticsearch-6": "100.4.0",
+        "magento/module-elasticsearch-7": "100.4.0",
+        "magento/module-email": "101.1.0",
+        "magento/module-encryption-key": "100.4.0",
+        "magento/module-fedex": "100.4.0",
+        "magento/module-gift-message": "100.4.0",
+        "magento/module-google-adwords": "100.4.0",
+        "magento/module-google-analytics": "100.4.0",
+        "magento/module-google-optimizer": "100.4.0",
+        "magento/module-graph-ql": "100.4.0",
+        "magento/module-graph-ql-cache": "100.4.0",
+        "magento/module-catalog-graph-ql": "100.4.0",
+        "magento/module-catalog-cms-graph-ql": "100.4.0",
+        "magento/module-catalog-url-rewrite-graph-ql": "100.4.0",
+        "magento/module-configurable-product-graph-ql": "100.4.0",
+        "magento/module-customer-graph-ql": "100.4.0",
+        "magento/module-eav-graph-ql": "100.4.0",
+        "magento/module-swatches-graph-ql": "100.4.0",
+        "magento/module-tax-graph-ql": "100.4.0",
+        "magento/module-url-rewrite-graph-ql": "100.4.0",
+        "magento/module-cms-url-rewrite-graph-ql": "100.4.0",
+        "magento/module-weee-graph-ql": "100.4.0",
+        "magento/module-cms-graph-ql": "100.4.0",
+        "magento/module-grouped-import-export": "100.4.0",
+        "magento/module-grouped-product": "100.4.0",
+        "magento/module-grouped-catalog-inventory": "100.4.0",
+        "magento/module-grouped-product-graph-ql": "100.4.0",
+        "magento/module-import-export": "101.0.0",
+        "magento/module-indexer": "100.4.0",
+        "magento/module-instant-purchase": "100.4.0",
+        "magento/module-integration": "100.4.0",
+        "magento/module-layered-navigation": "100.4.0",
+        "magento/module-login-as-customer": "100.4.0",
+        "magento/module-login-as-customer-admin-ui": "100.4.0",
+        "magento/module-login-as-customer-api": "100.4.0",
+        "magento/module-login-as-customer-frontend-ui": "100.4.0",
+        "magento/module-login-as-customer-log": "100.4.0",
+        "magento/module-login-as-customer-quote": "100.4.0",
+        "magento/module-login-as-customer-page-cache": "100.4.0",
+        "magento/module-login-as-customer-sales": "100.4.0",
+        "magento/module-media-content": "100.4.0",
+        "magento/module-media-content-api": "100.4.0",
+        "magento/module-media-content-catalog": "100.4.0",
+        "magento/module-media-content-cms": "100.4.0",
+        "magento/module-media-gallery": "100.4.0",
+        "magento/module-media-gallery-api": "101.0.0",
+        "magento/module-media-gallery-catalog": "100.4.0",
+        "magento/module-media-storage": "100.4.0",
+        "magento/module-message-queue": "100.4.0",
+        "magento/module-msrp": "100.4.0",
+        "magento/module-msrp-configurable-product": "100.4.0",
+        "magento/module-msrp-grouped-product": "100.4.0",
+        "magento/module-multishipping": "100.4.0",
+        "magento/module-mysql-mq": "100.4.0",
+        "magento/module-new-relic-reporting": "100.4.0",
+        "magento/module-newsletter": "100.4.0",
+        "magento/module-offline-payments": "100.4.0",
+        "magento/module-offline-shipping": "100.4.0",
+        "magento/module-page-cache": "100.4.0",
+        "magento/module-payment": "100.4.0",
+        "magento/module-paypal": "101.0.0",
+        "magento/module-paypal-captcha": "100.4.0",
+        "magento/module-paypal-graph-ql": "100.4.0",
+        "magento/module-persistent": "100.4.0",
+        "magento/module-product-alert": "100.4.0",
+        "magento/module-product-video": "100.4.0",
+        "magento/module-quote": "101.2.0",
+        "magento/module-quote-analytics": "100.4.0",
+        "magento/module-quote-graph-ql": "100.4.0",
+        "magento/module-related-product-graph-ql": "100.4.0",
+        "magento/module-release-notification": "100.4.0",
+        "magento/module-reports": "100.4.0",
+        "magento/module-require-js": "100.4.0",
+        "magento/module-review": "100.4.0",
+        "magento/module-review-analytics": "100.4.0",
+        "magento/module-robots": "101.1.0",
+        "magento/module-rss": "100.4.0",
+        "magento/module-rule": "100.4.0",
+        "magento/module-sales": "103.0.0",
+        "magento/module-sales-analytics": "100.4.0",
+        "magento/module-sales-graph-ql": "100.4.0",
+        "magento/module-sales-inventory": "100.4.0",
+        "magento/module-sales-rule": "101.2.0",
+        "magento/module-sales-sequence": "100.4.0",
+        "magento/module-sample-data": "100.4.0",
+        "magento/module-search": "101.1.0",
+        "magento/module-security": "100.4.0",
+        "magento/module-send-friend": "100.4.0",
+        "magento/module-send-friend-graph-ql": "100.4.0",
+        "magento/module-shipping": "100.4.0",
+        "magento/module-sitemap": "100.4.0",
+        "magento/module-store": "101.1.0",
+        "magento/module-store-graph-ql": "100.4.0",
+        "magento/module-swagger": "100.4.0",
+        "magento/module-swagger-webapi": "100.4.0",
+        "magento/module-swagger-webapi-async": "100.4.0",
+        "magento/module-swatches": "100.4.0",
+        "magento/module-swatches-layered-navigation": "100.4.0",
+        "magento/module-tax": "100.4.0",
+        "magento/module-tax-import-export": "100.4.0",
+        "magento/module-theme": "101.1.0",
+        "magento/module-theme-graph-ql": "100.4.0",
+        "magento/module-translation": "100.4.0",
+        "magento/module-ui": "101.2.0",
+        "magento/module-ups": "100.4.0",
+        "magento/module-url-rewrite": "102.0.0",
+        "magento/module-user": "101.2.0",
+        "magento/module-usps": "100.4.0",
+        "magento/module-variable": "100.4.0",
+        "magento/module-vault": "101.2.0",
+        "magento/module-vault-graph-ql": "100.4.0",
+        "magento/module-version": "100.4.0",
+        "magento/module-webapi": "100.4.0",
+        "magento/module-webapi-async": "100.4.0",
+        "magento/module-webapi-security": "100.4.0",
+        "magento/module-weee": "100.4.0",
+        "magento/module-widget": "101.2.0",
+        "magento/module-wishlist": "101.2.0",
+        "magento/module-wishlist-graph-ql": "100.4.0",
+        "magento/module-wishlist-analytics": "100.4.0",
+        "magento/theme-adminhtml-backend": "100.4.0",
+        "magento/theme-frontend-blank": "100.4.0",
+        "magento/theme-frontend-luma": "100.4.0",
+        "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.0",
+        "magento/framework-amqp": "100.4.0",
+        "magento/framework-bulk": "101.0.0",
+        "magento/framework-message-queue": "100.4.0",
         "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-tinymce-3": "*",
-        "magento/module-csp": "*"
+        "magento/module-tinymce-3": "100.4.0",
+        "magento/module-csp": "100.4.0"
     },
     "conflict": {
         "gene/bluefoot": "*"
@@ -354,5 +354,6 @@
             "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/"
         }
     },
-    "prefer-stable": true
+    "version": "2.4.0",
+    "minimum-stability": "stable"
 }
diff --git a/composer.lock b/composer.lock
index 04ecd43514636..ea3afb13cde3e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "0ebe9109f59c372f9962e2a51c35c829",
+    "content-hash": "74f566339c6207342f65f3f000595f70",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -210,16 +210,16 @@
         },
         {
             "name": "composer/composer",
-            "version": "1.10.7",
+            "version": "1.10.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
+                "reference": "83c3250093d5491600a822e176b107a945baf95a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
-                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
+                "url": "https://api.github.com/repos/composer/composer/zipball/83c3250093d5491600a822e176b107a945baf95a",
+                "reference": "83c3250093d5491600a822e176b107a945baf95a",
                 "shasum": ""
             },
             "require": {
@@ -238,12 +238,11 @@
                 "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
             },
             "conflict": {
-                "symfony/console": "2.8.38",
-                "symfony/phpunit-bridge": "3.4.40"
+                "symfony/console": "2.8.38"
             },
             "require-dev": {
                 "phpspec/prophecy": "^1.10",
-                "symfony/phpunit-bridge": "^3.4"
+                "symfony/phpunit-bridge": "^4.2"
             },
             "suggest": {
                 "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -287,7 +286,7 @@
                 "dependency",
                 "package"
             ],
-            "time": "2020-06-03T08:03:56+00:00"
+            "time": "2020-07-16T10:57:00+00:00"
         },
         {
             "name": "composer/semver",
@@ -352,16 +351,16 @@
         },
         {
             "name": "composer/spdx-licenses",
-            "version": "1.5.3",
+            "version": "1.5.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/spdx-licenses.git",
-                "reference": "0c3e51e1880ca149682332770e25977c70cf9dae"
+                "reference": "6946f785871e2314c60b4524851f3702ea4f2223"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae",
-                "reference": "0c3e51e1880ca149682332770e25977c70cf9dae",
+                "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/6946f785871e2314c60b4524851f3702ea4f2223",
+                "reference": "6946f785871e2314c60b4524851f3702ea4f2223",
                 "shasum": ""
             },
             "require": {
@@ -408,7 +407,7 @@
                 "spdx",
                 "validator"
             ],
-            "time": "2020-02-14T07:44:31+00:00"
+            "time": "2020-07-15T15:35:07+00:00"
         },
         {
             "name": "composer/xdebug-handler",
@@ -652,16 +651,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.5.4",
+            "version": "6.5.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
+                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
-                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
+                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
                 "shasum": ""
             },
             "require": {
@@ -669,7 +668,7 @@
                 "guzzlehttp/promises": "^1.0",
                 "guzzlehttp/psr7": "^1.6.1",
                 "php": ">=5.5",
-                "symfony/polyfill-intl-idn": "1.17.0"
+                "symfony/polyfill-intl-idn": "^1.17.0"
             },
             "require-dev": {
                 "ext-curl": "*",
@@ -715,7 +714,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2020-05-25T19:35:05+00:00"
+            "time": "2020-06-16T21:01:06+00:00"
         },
         {
             "name": "guzzlehttp/promises",
@@ -1678,16 +1677,16 @@
         },
         {
             "name": "laminas/laminas-form",
-            "version": "2.14.5",
+            "version": "2.15.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-form.git",
-                "reference": "3e22e09751cf6ae031be87a44e092e7925ce5b7b"
+                "reference": "359cd372c565e18a17f32ccfeacdf21bba091ce2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-form/zipball/3e22e09751cf6ae031be87a44e092e7925ce5b7b",
-                "reference": "3e22e09751cf6ae031be87a44e092e7925ce5b7b",
+                "url": "https://api.github.com/repos/laminas/laminas-form/zipball/359cd372c565e18a17f32ccfeacdf21bba091ce2",
+                "reference": "359cd372c565e18a17f32ccfeacdf21bba091ce2",
                 "shasum": ""
             },
             "require": {
@@ -1730,8 +1729,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.14.x-dev",
-                    "dev-develop": "2.15.x-dev"
+                    "dev-master": "2.15.x-dev",
+                    "dev-develop": "2.16.x-dev"
                 },
                 "laminas": {
                     "component": "Laminas\\Form",
@@ -1756,20 +1755,20 @@
                 "form",
                 "laminas"
             ],
-            "time": "2020-03-29T12:46:16+00:00"
+            "time": "2020-07-14T13:53:27+00:00"
         },
         {
             "name": "laminas/laminas-http",
-            "version": "2.11.2",
+            "version": "2.12.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-http.git",
-                "reference": "8c66963b933c80da59433da56a44dfa979f3ec88"
+                "reference": "48bd06ffa3a6875e2b77d6852405eb7b1589d575"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-http/zipball/8c66963b933c80da59433da56a44dfa979f3ec88",
-                "reference": "8c66963b933c80da59433da56a44dfa979f3ec88",
+                "url": "https://api.github.com/repos/laminas/laminas-http/zipball/48bd06ffa3a6875e2b77d6852405eb7b1589d575",
+                "reference": "48bd06ffa3a6875e2b77d6852405eb7b1589d575",
                 "shasum": ""
             },
             "require": {
@@ -1781,7 +1780,7 @@
                 "php": "^5.6 || ^7.0"
             },
             "replace": {
-                "zendframework/zend-http": "self.version"
+                "zendframework/zend-http": "^2.11.2"
             },
             "require-dev": {
                 "laminas/laminas-coding-standard": "~1.0.0",
@@ -1794,8 +1793,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.11.x-dev",
-                    "dev-develop": "2.12.x-dev"
+                    "dev-master": "2.12.x-dev",
+                    "dev-develop": "2.13.x-dev"
                 }
             },
             "autoload": {
@@ -1814,7 +1813,7 @@
                 "http client",
                 "laminas"
             ],
-            "time": "2019-12-31T17:02:36+00:00"
+            "time": "2020-06-23T15:14:37+00:00"
         },
         {
             "name": "laminas/laminas-hydrator",
@@ -2200,16 +2199,16 @@
         },
         {
             "name": "laminas/laminas-mail",
-            "version": "2.10.1",
+            "version": "2.11.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-mail.git",
-                "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005"
+                "reference": "4c5545637eea3dc745668ddff1028692ed004c4b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/cfe0711446c8d9c392e9fc664c9ccc180fa89005",
-                "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005",
+                "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/4c5545637eea3dc745668ddff1028692ed004c4b",
+                "reference": "4c5545637eea3dc745668ddff1028692ed004c4b",
                 "shasum": ""
             },
             "require": {
@@ -2239,8 +2238,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.10.x-dev",
-                    "dev-develop": "2.11.x-dev"
+                    "dev-master": "2.11.x-dev",
+                    "dev-develop": "2.12.x-dev"
                 },
                 "laminas": {
                     "component": "Laminas\\Mail",
@@ -2262,7 +2261,7 @@
                 "laminas",
                 "mail"
             ],
-            "time": "2020-04-21T16:42:19+00:00"
+            "time": "2020-06-30T20:17:23+00:00"
         },
         {
             "name": "laminas/laminas-math",
@@ -3820,16 +3819,16 @@
         },
         {
             "name": "phpseclib/phpseclib",
-            "version": "2.0.27",
+            "version": "2.0.28",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
-                "reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
+                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
-                "reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
+                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
                 "shasum": ""
             },
             "require": {
@@ -3908,7 +3907,7 @@
                 "x.509",
                 "x509"
             ],
-            "time": "2020-04-04T23:17:33+00:00"
+            "time": "2020-07-08T09:08:33+00:00"
         },
         {
             "name": "psr/container",
@@ -4275,16 +4274,16 @@
         },
         {
             "name": "seld/phar-utils",
-            "version": "1.1.0",
+            "version": "1.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Seldaek/phar-utils.git",
-                "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0"
+                "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0",
-                "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0",
+                "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8674b1d84ffb47cc59a101f5d5a3b61e87d23796",
+                "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796",
                 "shasum": ""
             },
             "require": {
@@ -4315,11 +4314,11 @@
             "keywords": [
                 "phar"
             ],
-            "time": "2020-02-14T15:25:33+00:00"
+            "time": "2020-07-07T18:42:57+00:00"
         },
         {
             "name": "symfony/console",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
@@ -4396,7 +4395,7 @@
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
@@ -4449,7 +4448,7 @@
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
@@ -4519,20 +4518,20 @@
         },
         {
             "name": "symfony/event-dispatcher-contracts",
-            "version": "v1.1.7",
+            "version": "v1.1.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher-contracts.git",
-                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18"
+                "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
-                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7",
+                "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1.3"
+                "php": ">=7.1.3"
             },
             "suggest": {
                 "psr/event-dispatcher": "",
@@ -4542,6 +4541,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.1-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -4573,11 +4576,11 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2019-09-17T09:54:03+00:00"
+            "time": "2020-07-06T13:19:58+00:00"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
@@ -4627,7 +4630,7 @@
         },
         {
             "name": "symfony/finder",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
@@ -4676,16 +4679,16 @@
         },
         {
             "name": "symfony/polyfill-ctype",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
+                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
-                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
+                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
                 "shasum": ""
             },
             "require": {
@@ -4697,7 +4700,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4730,25 +4737,26 @@
                 "polyfill",
                 "portable"
             ],
-            "time": "2020-05-12T16:14:59+00:00"
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/polyfill-intl-idn",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-intl-idn.git",
-                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a"
+                "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a",
-                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
+                "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3",
-                "symfony/polyfill-mbstring": "^1.3",
+                "symfony/polyfill-intl-normalizer": "^1.10",
+                "symfony/polyfill-php70": "^1.10",
                 "symfony/polyfill-php72": "^1.10"
             },
             "suggest": {
@@ -4757,7 +4765,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4777,6 +4789,10 @@
                     "name": "Laurent Bassin",
                     "email": "laurent@bassin.info"
                 },
+                {
+                    "name": "Trevor Rowbotham",
+                    "email": "trevor.rowbotham@pm.me"
+                },
                 {
                     "name": "Symfony Community",
                     "homepage": "https://symfony.com/contributors"
@@ -4792,20 +4808,87 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-07-14T12:35:20+00:00"
+        },
+        {
+            "name": "symfony/polyfill-intl-normalizer",
+            "version": "v1.18.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+                "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
+                "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "suggest": {
+                "ext-intl": "For best performance"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill for intl's Normalizer class and related functions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "intl",
+                "normalizer",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
+                "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
-                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
+                "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
                 "shasum": ""
             },
             "require": {
@@ -4817,7 +4900,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4851,20 +4938,83 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-07-14T12:35:20+00:00"
+        },
+        {
+            "name": "symfony/polyfill-php70",
+            "version": "v1.18.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php70.git",
+                "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
+                "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
+                "shasum": ""
+            },
+            "require": {
+                "paragonie/random_compat": "~1.0|~2.0|~9.99",
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php70\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/polyfill-php72",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "f048e612a3905f34931127360bdd2def19a5e582"
+                "reference": "639447d008615574653fb3bc60d1986d7172eaae"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
-                "reference": "f048e612a3905f34931127360bdd2def19a5e582",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
+                "reference": "639447d008615574653fb3bc60d1986d7172eaae",
                 "shasum": ""
             },
             "require": {
@@ -4873,7 +5023,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4906,20 +5060,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/polyfill-php73",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
+                "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
-                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
+                "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
                 "shasum": ""
             },
             "require": {
@@ -4928,7 +5082,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4964,20 +5122,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/polyfill-php80",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
+                "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+                "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
                 "shasum": ""
             },
             "require": {
@@ -4986,7 +5144,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -5026,11 +5188,11 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/process",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
@@ -5079,16 +5241,16 @@
         },
         {
             "name": "symfony/service-contracts",
-            "version": "v2.1.2",
+            "version": "v2.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b"
+                "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b",
-                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442",
+                "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442",
                 "shasum": ""
             },
             "require": {
@@ -5102,6 +5264,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.1-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -5133,7 +5299,7 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2020-05-20T17:43:50+00:00"
+            "time": "2020-07-06T13:23:11+00:00"
         },
         {
             "name": "tedivm/jshrink",
@@ -5282,16 +5448,16 @@
         },
         {
             "name": "webonyx/graphql-php",
-            "version": "v0.13.8",
+            "version": "v0.13.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webonyx/graphql-php.git",
-                "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8"
+                "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6829ae58f4c59121df1f86915fb9917a2ec595e8",
-                "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8",
+                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3",
+                "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3",
                 "shasum": ""
             },
             "require": {
@@ -5330,7 +5496,7 @@
                 "api",
                 "graphql"
             ],
-            "time": "2019-08-25T10:32:47+00:00"
+            "time": "2020-07-02T05:49:25+00:00"
         },
         {
             "name": "wikimedia/less.php",
@@ -5551,16 +5717,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.141.0",
+            "version": "3.147.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3"
+                "reference": "e63974c002c0f6520da597d44a3f83ce46d7a612"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d57dbde176a7db7a6131bb5d325aff63515eabc3",
-                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e63974c002c0f6520da597d44a3f83ce46d7a612",
+                "reference": "e63974c002c0f6520da597d44a3f83ce46d7a612",
                 "shasum": ""
             },
             "require": {
@@ -5583,6 +5749,7 @@
                 "ext-pcntl": "*",
                 "ext-sockets": "*",
                 "nette/neon": "^2.3",
+                "paragonie/random_compat": ">= 2",
                 "phpunit/phpunit": "^4.8.35|^5.4.3",
                 "psr/cache": "^1.0",
                 "psr/simple-cache": "^1.0",
@@ -5631,7 +5798,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-06-10T18:11:38+00:00"
+            "time": "2020-07-17T18:14:13+00:00"
         },
         {
             "name": "beberlei/assert",
@@ -6173,16 +6340,16 @@
         },
         {
             "name": "codeception/stub",
-            "version": "3.6.1",
+            "version": "3.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/Stub.git",
-                "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880"
+                "reference": "468dd5fe659f131fc997f5196aad87512f9b1304"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/Stub/zipball/a3ba01414cbee76a1bced9f9b6b169cc8d203880",
-                "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880",
+                "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304",
+                "reference": "468dd5fe659f131fc997f5196aad87512f9b1304",
                 "shasum": ""
             },
             "require": {
@@ -6199,7 +6366,7 @@
                 "MIT"
             ],
             "description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
-            "time": "2020-02-07T18:42:28+00:00"
+            "time": "2020-07-03T15:54:43+00:00"
         },
         {
             "name": "csharpru/vault-php",
@@ -6424,16 +6591,16 @@
         },
         {
             "name": "doctrine/cache",
-            "version": "1.10.1",
+            "version": "1.10.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/cache.git",
-                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3"
+                "reference": "13e3381b25847283a91948d04640543941309727"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
-                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
+                "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727",
+                "reference": "13e3381b25847283a91948d04640543941309727",
                 "shasum": ""
             },
             "require": {
@@ -6502,7 +6669,7 @@
                 "redis",
                 "xcache"
             ],
-            "time": "2020-05-27T16:24:54+00:00"
+            "time": "2020-07-07T18:54:01+00:00"
         },
         {
             "name": "doctrine/inflector",
@@ -6691,16 +6858,16 @@
         },
         {
             "name": "friendsofphp/php-cs-fixer",
-            "version": "v2.16.3",
+            "version": "v2.16.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
-                "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0"
+                "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0",
-                "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0",
+                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/1023c3458137ab052f6ff1e09621a721bfdeca13",
+                "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13",
                 "shasum": ""
             },
             "require": {
@@ -6732,12 +6899,12 @@
                 "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
                 "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
                 "phpunitgoodpractices/traits": "^1.8",
-                "symfony/phpunit-bridge": "^4.3 || ^5.0",
+                "symfony/phpunit-bridge": "^5.1",
                 "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
             },
             "suggest": {
                 "ext-dom": "For handling output formats in XML",
-                "ext-mbstring": "For handling non-UTF8 characters in cache signature.",
+                "ext-mbstring": "For handling non-UTF8 characters.",
                 "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
                 "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
                 "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
@@ -6778,7 +6945,7 @@
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
-            "time": "2020-04-15T18:51:10+00:00"
+            "time": "2020-06-27T23:57:46+00:00"
         },
         {
             "name": "jms/metadata",
@@ -7385,20 +7552,20 @@
         },
         {
             "name": "myclabs/deep-copy",
-            "version": "1.9.5",
+            "version": "1.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
-                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "replace": {
                 "myclabs/deep-copy": "self.version"
@@ -7429,7 +7596,7 @@
                 "object",
                 "object graph"
             ],
-            "time": "2020-01-17T21:11:47+00:00"
+            "time": "2020-06-29T13:22:24+00:00"
         },
         {
             "name": "paragonie/constant_time_encoding",
@@ -7866,25 +8033,25 @@
         },
         {
             "name": "phpdocumentor/reflection-common",
-            "version": "2.1.0",
+            "version": "2.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
-                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
-                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.1"
+                "php": "^7.2 || ^8.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.x-dev"
+                    "dev-2.x": "2.x-dev"
                 }
             },
             "autoload": {
@@ -7911,7 +8078,7 @@
                 "reflection",
                 "static analysis"
             ],
-            "time": "2020-04-27T09:25:28+00:00"
+            "time": "2020-06-27T09:03:43+00:00"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
@@ -7968,30 +8135,29 @@
         },
         {
             "name": "phpdocumentor/type-resolver",
-            "version": "1.1.0",
+            "version": "1.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/TypeResolver.git",
-                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
+                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
-                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
+                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2",
+                "php": "^7.2 || ^8.0",
                 "phpdocumentor/reflection-common": "^2.0"
             },
             "require-dev": {
-                "ext-tokenizer": "^7.2",
-                "mockery/mockery": "~1"
+                "ext-tokenizer": "*"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.x-dev"
+                    "dev-1.x": "1.x-dev"
                 }
             },
             "autoload": {
@@ -8010,7 +8176,7 @@
                 }
             ],
             "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
-            "time": "2020-02-18T18:59:58+00:00"
+            "time": "2020-06-27T10:12:23+00:00"
         },
         {
             "name": "phpmd/phpmd",
@@ -8139,33 +8305,33 @@
         },
         {
             "name": "phpspec/prophecy",
-            "version": "v1.10.3",
+            "version": "1.11.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpspec/prophecy.git",
-                "reference": "451c3cd1418cf640de218914901e51b064abb093"
+                "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
-                "reference": "451c3cd1418cf640de218914901e51b064abb093",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160",
+                "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160",
                 "shasum": ""
             },
             "require": {
-                "doctrine/instantiator": "^1.0.2",
-                "php": "^5.3|^7.0",
-                "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
-                "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
-                "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
+                "doctrine/instantiator": "^1.2",
+                "php": "^7.2",
+                "phpdocumentor/reflection-docblock": "^5.0",
+                "sebastian/comparator": "^3.0 || ^4.0",
+                "sebastian/recursion-context": "^3.0 || ^4.0"
             },
             "require-dev": {
-                "phpspec/phpspec": "^2.5 || ^3.2",
-                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+                "phpspec/phpspec": "^6.0",
+                "phpunit/phpunit": "^8.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.10.x-dev"
+                    "dev-master": "1.11.x-dev"
                 }
             },
             "autoload": {
@@ -8198,7 +8364,7 @@
                 "spy",
                 "stub"
             ],
-            "time": "2020-03-05T15:02:03+00:00"
+            "time": "2020-07-08T12:44:21+00:00"
         },
         {
             "name": "phpstan/phpstan",
@@ -8308,20 +8474,20 @@
         },
         {
             "name": "phpunit/php-file-iterator",
-            "version": "3.0.1",
+            "version": "3.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
-                "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4"
+                "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
-                "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/25fefc5b19835ca653877fe081644a3f8c1d915e",
+                "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8354,24 +8520,24 @@
                 "filesystem",
                 "iterator"
             ],
-            "time": "2020-04-18T05:02:12+00:00"
+            "time": "2020-07-11T05:18:21+00:00"
         },
         {
             "name": "phpunit/php-invoker",
-            "version": "3.0.0",
+            "version": "3.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-invoker.git",
-                "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a"
+                "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a",
-                "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f6eedfed1085dd1f4c599629459a0277d25f9a66",
+                "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "ext-pcntl": "*",
@@ -8407,24 +8573,27 @@
             "keywords": [
                 "process"
             ],
-            "time": "2020-02-07T06:06:11+00:00"
+            "time": "2020-06-26T11:53:53+00:00"
         },
         {
             "name": "phpunit/php-text-template",
-            "version": "2.0.0",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-text-template.git",
-                "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346"
+                "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
-                "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/6ff9c8ea4d3212b88fcf74e25e516e2c51c99324",
+                "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.0"
             },
             "type": "library",
             "extra": {
@@ -8453,7 +8622,7 @@
             "keywords": [
                 "template"
             ],
-            "time": "2020-02-01T07:43:44+00:00"
+            "time": "2020-06-26T11:55:37+00:00"
         },
         {
             "name": "phpunit/php-timer",
@@ -8506,21 +8675,21 @@
         },
         {
             "name": "phpunit/php-token-stream",
-            "version": "4.0.1",
+            "version": "4.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
-                "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c"
+                "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
-                "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5672711b6b07b14d5ab694e700c62eeb82fcf374",
+                "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374",
                 "shasum": ""
             },
             "require": {
                 "ext-tokenizer": "*",
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8551,7 +8720,7 @@
             "keywords": [
                 "tokenizer"
             ],
-            "time": "2020-05-06T09:56:31+00:00"
+            "time": "2020-06-27T06:36:25+00:00"
         },
         {
             "name": "phpunit/phpunit",
@@ -8737,20 +8906,20 @@
         },
         {
             "name": "sebastian/code-unit",
-            "version": "1.0.2",
+            "version": "1.0.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit.git",
-                "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5"
+                "reference": "c1e2df332c905079980b119c4db103117e5e5c90"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
-                "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/c1e2df332c905079980b119c4db103117e5e5c90",
+                "reference": "c1e2df332c905079980b119c4db103117e5e5c90",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8779,24 +8948,24 @@
             ],
             "description": "Collection of value objects that represent the PHP code units",
             "homepage": "https://github.com/sebastianbergmann/code-unit",
-            "time": "2020-04-30T05:58:10+00:00"
+            "time": "2020-06-26T12:50:45+00:00"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
-            "version": "2.0.0",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
-                "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e"
+                "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e",
-                "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ee51f9bb0c6d8a43337055db3120829fa14da819",
+                "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8824,24 +8993,24 @@
             ],
             "description": "Looks up which function or method a line of code belongs to",
             "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
-            "time": "2020-02-07T06:20:13+00:00"
+            "time": "2020-06-26T12:04:00+00:00"
         },
         {
             "name": "sebastian/comparator",
-            "version": "4.0.0",
+            "version": "4.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8"
+                "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8",
-                "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f",
+                "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3",
+                "php": "^7.3 || ^8.0",
                 "sebastian/diff": "^4.0",
                 "sebastian/exporter": "^4.0"
             },
@@ -8888,24 +9057,24 @@
                 "compare",
                 "equality"
             ],
-            "time": "2020-02-07T06:08:51+00:00"
+            "time": "2020-06-26T12:05:46+00:00"
         },
         {
             "name": "sebastian/diff",
-            "version": "4.0.1",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/diff.git",
-                "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a"
+                "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a",
-                "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113",
+                "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0",
@@ -8944,24 +9113,24 @@
                 "unidiff",
                 "unified diff"
             ],
-            "time": "2020-05-08T05:01:12+00:00"
+            "time": "2020-06-30T04:46:02+00:00"
         },
         {
             "name": "sebastian/environment",
-            "version": "5.1.0",
+            "version": "5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c"
+                "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c",
-                "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2",
+                "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8997,29 +9166,29 @@
                 "environment",
                 "hhvm"
             ],
-            "time": "2020-04-14T13:36:52+00:00"
+            "time": "2020-06-26T12:07:24+00:00"
         },
         {
             "name": "sebastian/exporter",
-            "version": "4.0.0",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "80c26562e964016538f832f305b2286e1ec29566"
+                "reference": "571d721db4aec847a0e59690b954af33ebf9f023"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566",
-                "reference": "80c26562e964016538f832f305b2286e1ec29566",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/571d721db4aec847a0e59690b954af33ebf9f023",
+                "reference": "571d721db4aec847a0e59690b954af33ebf9f023",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3",
+                "php": "^7.3 || ^8.0",
                 "sebastian/recursion-context": "^4.0"
             },
             "require-dev": {
                 "ext-mbstring": "*",
-                "phpunit/phpunit": "^9.0"
+                "phpunit/phpunit": "^9.2"
             },
             "type": "library",
             "extra": {
@@ -9064,7 +9233,7 @@
                 "export",
                 "exporter"
             ],
-            "time": "2020-02-07T06:10:52+00:00"
+            "time": "2020-06-26T12:08:55+00:00"
         },
         {
             "name": "sebastian/finder-facade",
@@ -9168,20 +9337,20 @@
         },
         {
             "name": "sebastian/object-enumerator",
-            "version": "4.0.0",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/object-enumerator.git",
-                "reference": "e67516b175550abad905dc952f43285957ef4363"
+                "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363",
-                "reference": "e67516b175550abad905dc952f43285957ef4363",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/074fed2d0a6d08e1677dd8ce9d32aecb384917b8",
+                "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3",
+                "php": "^7.3 || ^8.0",
                 "sebastian/object-reflector": "^2.0",
                 "sebastian/recursion-context": "^4.0"
             },
@@ -9211,24 +9380,24 @@
             ],
             "description": "Traverses array structures and object graphs to enumerate all referenced objects",
             "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
-            "time": "2020-02-07T06:12:23+00:00"
+            "time": "2020-06-26T12:11:32+00:00"
         },
         {
             "name": "sebastian/object-reflector",
-            "version": "2.0.0",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/object-reflector.git",
-                "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7"
+                "reference": "127a46f6b057441b201253526f81d5406d6c7840"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
-                "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/127a46f6b057441b201253526f81d5406d6c7840",
+                "reference": "127a46f6b057441b201253526f81d5406d6c7840",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9256,7 +9425,7 @@
             ],
             "description": "Allows reflection of object attributes, including inherited and non-public ones",
             "homepage": "https://github.com/sebastianbergmann/object-reflector/",
-            "time": "2020-02-07T06:19:40+00:00"
+            "time": "2020-06-26T12:12:55+00:00"
         },
         {
             "name": "sebastian/phpcpd",
@@ -9311,20 +9480,20 @@
         },
         {
             "name": "sebastian/recursion-context",
-            "version": "4.0.0",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/recursion-context.git",
-                "reference": "cdd86616411fc3062368b720b0425de10bd3d579"
+                "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579",
-                "reference": "cdd86616411fc3062368b720b0425de10bd3d579",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/062231bf61d2b9448c4fa5a7643b5e1829c11d63",
+                "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9360,24 +9529,24 @@
             ],
             "description": "Provides functionality to recursively process PHP variables",
             "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
-            "time": "2020-02-07T06:18:20+00:00"
+            "time": "2020-06-26T12:14:17+00:00"
         },
         {
             "name": "sebastian/resource-operations",
-            "version": "3.0.0",
+            "version": "3.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/resource-operations.git",
-                "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98"
+                "reference": "0653718a5a629b065e91f774595267f8dc32e213"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
-                "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0653718a5a629b065e91f774595267f8dc32e213",
+                "reference": "0653718a5a629b065e91f774595267f8dc32e213",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9405,24 +9574,24 @@
             ],
             "description": "Provides a list of PHP built-in functions that operate on resources",
             "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
-            "time": "2020-02-07T06:13:02+00:00"
+            "time": "2020-06-26T12:16:22+00:00"
         },
         {
             "name": "sebastian/type",
-            "version": "2.1.0",
+            "version": "2.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/type.git",
-                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8"
+                "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
-                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/86991e2b33446cd96e648c18bcdb1e95afb2c05a",
+                "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.2"
@@ -9430,7 +9599,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.1-dev"
+                    "dev-master": "2.2-dev"
                 }
             },
             "autoload": {
@@ -9451,24 +9620,24 @@
             ],
             "description": "Collection of value objects that represent the types of the PHP type system",
             "homepage": "https://github.com/sebastianbergmann/type",
-            "time": "2020-06-01T12:21:09+00:00"
+            "time": "2020-07-05T08:31:53+00:00"
         },
         {
             "name": "sebastian/version",
-            "version": "3.0.0",
+            "version": "3.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/version.git",
-                "reference": "0411bde656dce64202b39c2f4473993a9081d39e"
+                "reference": "626586115d0ed31cb71483be55beb759b5af5a3c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e",
-                "reference": "0411bde656dce64202b39c2f4473993a9081d39e",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/626586115d0ed31cb71483be55beb759b5af5a3c",
+                "reference": "626586115d0ed31cb71483be55beb759b5af5a3c",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "type": "library",
             "extra": {
@@ -9494,7 +9663,7 @@
             ],
             "description": "Library that helps with managing the version number of Git-hosted PHP projects",
             "homepage": "https://github.com/sebastianbergmann/version",
-            "time": "2020-01-21T06:36:37+00:00"
+            "time": "2020-06-26T12:18:43+00:00"
         },
         {
             "name": "spomky-labs/otphp",
@@ -9620,7 +9789,7 @@
         },
         {
             "name": "symfony/config",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/config.git",
@@ -9686,16 +9855,16 @@
         },
         {
             "name": "symfony/dependency-injection",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621"
+                "reference": "6508423eded583fc07e88a0172803e1a62f0310c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6a6791e9584273b32eeb01790da4c7446d87a621",
-                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621",
+                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6508423eded583fc07e88a0172803e1a62f0310c",
+                "reference": "6508423eded583fc07e88a0172803e1a62f0310c",
                 "shasum": ""
             },
             "require": {
@@ -9757,20 +9926,20 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "time": "2020-05-30T20:35:19+00:00"
+            "time": "2020-06-12T08:11:32+00:00"
         },
         {
             "name": "symfony/deprecation-contracts",
-            "version": "v2.1.2",
+            "version": "v2.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/deprecation-contracts.git",
-                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
+                "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
-                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14",
+                "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14",
                 "shasum": ""
             },
             "require": {
@@ -9780,6 +9949,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.1-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -9803,20 +9976,20 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
-            "time": "2020-05-27T08:34:37+00:00"
+            "time": "2020-06-06T08:49:21+00:00"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa"
+                "reference": "f93055171b847915225bd5b0a5792888419d8d75"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
-                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75",
+                "reference": "f93055171b847915225bd5b0a5792888419d8d75",
                 "shasum": ""
             },
             "require": {
@@ -9864,20 +10037,20 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "time": "2020-05-24T12:18:07+00:00"
+            "time": "2020-06-15T06:52:54+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
+                "reference": "c0c418f05e727606e85b482a8591519c4712cf45"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
-                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45",
+                "reference": "c0c418f05e727606e85b482a8591519c4712cf45",
                 "shasum": ""
             },
             "require": {
@@ -9927,11 +10100,11 @@
                 "mime",
                 "mime-type"
             ],
-            "time": "2020-05-25T12:33:44+00:00"
+            "time": "2020-06-09T15:07:35+00:00"
         },
         {
             "name": "symfony/options-resolver",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/options-resolver.git",
@@ -9985,68 +10158,9 @@
             ],
             "time": "2020-05-23T13:08:13+00:00"
         },
-        {
-            "name": "symfony/polyfill-php70",
-            "version": "v1.17.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php70.git",
-                "reference": "82225c2d7d23d7e70515496d249c0152679b468e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/82225c2d7d23d7e70515496d249c0152679b468e",
-                "reference": "82225c2d7d23d7e70515496d249c0152679b468e",
-                "shasum": ""
-            },
-            "require": {
-                "paragonie/random_compat": "~1.0|~2.0|~9.99",
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.17-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php70\\": ""
-                },
-                "files": [
-                    "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "time": "2020-05-12T16:47:27+00:00"
-        },
         {
             "name": "symfony/stopwatch",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/stopwatch.git",
@@ -10096,7 +10210,7 @@
         },
         {
             "name": "symfony/yaml",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
@@ -10159,16 +10273,16 @@
         },
         {
             "name": "thecodingmachine/safe",
-            "version": "v1.1.1",
+            "version": "v1.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thecodingmachine/safe.git",
-                "reference": "04f9ffae372a9816d4472dfb7bcf6126b623a9df"
+                "reference": "9f277171e296a3c8629c04ac93ec95ff0f208ccb"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/04f9ffae372a9816d4472dfb7bcf6126b623a9df",
-                "reference": "04f9ffae372a9816d4472dfb7bcf6126b623a9df",
+                "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/9f277171e296a3c8629c04ac93ec95ff0f208ccb",
+                "reference": "9f277171e296a3c8629c04ac93ec95ff0f208ccb",
                 "shasum": ""
             },
             "require": {
@@ -10288,7 +10402,7 @@
                 "MIT"
             ],
             "description": "PHP core functions that throw exceptions instead of returning FALSE on error",
-            "time": "2020-05-04T15:25:36+00:00"
+            "time": "2020-07-10T09:34:29+00:00"
         },
         {
             "name": "theseer/fdomdocument",
@@ -10332,23 +10446,23 @@
         },
         {
             "name": "theseer/tokenizer",
-            "version": "1.1.3",
+            "version": "1.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/theseer/tokenizer.git",
-                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+                "reference": "75a63c33a8577608444246075ea0af0d052e452a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
-                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
+                "reference": "75a63c33a8577608444246075ea0af0d052e452a",
                 "shasum": ""
             },
             "require": {
                 "ext-dom": "*",
                 "ext-tokenizer": "*",
                 "ext-xmlwriter": "*",
-                "php": "^7.0"
+                "php": "^7.2 || ^8.0"
             },
             "type": "library",
             "autoload": {
@@ -10368,25 +10482,25 @@
                 }
             ],
             "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
-            "time": "2019-06-13T22:48:21+00:00"
+            "time": "2020-07-12T23:59:07+00:00"
         },
         {
             "name": "vlucas/phpdotenv",
-            "version": "v2.6.5",
+            "version": "v2.6.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/vlucas/phpdotenv.git",
-                "reference": "2e977311ffb17b2f82028a9c36824647789c6365"
+                "reference": "e1d57f62db3db00d9139078cbedf262280701479"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e977311ffb17b2f82028a9c36824647789c6365",
-                "reference": "2e977311ffb17b2f82028a9c36824647789c6365",
+                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/e1d57f62db3db00d9139078cbedf262280701479",
+                "reference": "e1d57f62db3db00d9139078cbedf262280701479",
                 "shasum": ""
             },
             "require": {
                 "php": "^5.3.9 || ^7.0 || ^8.0",
-                "symfony/polyfill-ctype": "^1.16"
+                "symfony/polyfill-ctype": "^1.17"
             },
             "require-dev": {
                 "ext-filter": "*",
@@ -10430,27 +10544,28 @@
                 "env",
                 "environment"
             ],
-            "time": "2020-06-02T14:06:52+00:00"
+            "time": "2020-07-14T17:54:18+00:00"
         },
         {
             "name": "webmozart/assert",
-            "version": "1.8.0",
+            "version": "1.9.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webmozart/assert.git",
-                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
-                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
+                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
                 "shasum": ""
             },
             "require": {
-                "php": "^5.3.3 || ^7.0",
+                "php": "^5.3.3 || ^7.0 || ^8.0",
                 "symfony/polyfill-ctype": "^1.8"
             },
             "conflict": {
+                "phpstan/phpstan": "<0.12.20",
                 "vimeo/psalm": "<3.9.1"
             },
             "require-dev": {
@@ -10478,7 +10593,7 @@
                 "check",
                 "validate"
             ],
-            "time": "2020-04-18T12:12:48+00:00"
+            "time": "2020-07-08T17:02:28+00:00"
         },
         {
             "name": "weew/helpers-array",
@@ -10521,7 +10636,7 @@
     "aliases": [],
     "minimum-stability": "stable",
     "stability-flags": [],
-    "prefer-stable": true,
+    "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
         "php": "~7.3.0||~7.4.0",
diff --git a/lib/internal/Magento/Framework/Amqp/composer.json b/lib/internal/Magento/Framework/Amqp/composer.json
index fc65e37d12ecf..44846c23a48e4 100644
--- a/lib/internal/Magento/Framework/Amqp/composer.json
+++ b/lib/internal/Magento/Framework/Amqp/composer.json
@@ -10,7 +10,7 @@
         "AFL-3.0"
     ],
     "require": {
-        "magento/framework": "*",
+        "magento/framework": "103.0.*",
         "php": "~7.3.0||~7.4.0",
         "php-amqplib/php-amqplib": "~2.7.0||~2.10.0"
     },
@@ -21,5 +21,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/lib/internal/Magento/Framework/Bulk/composer.json b/lib/internal/Magento/Framework/Bulk/composer.json
index b8e0992182169..cf6d64227ddf9 100644
--- a/lib/internal/Magento/Framework/Bulk/composer.json
+++ b/lib/internal/Magento/Framework/Bulk/composer.json
@@ -10,7 +10,7 @@
         "AFL-3.0"
     ],
     "require": {
-        "magento/framework": "*",
+        "magento/framework": "103.0.*",
         "php": "~7.3.0||~7.4.0"
     },
     "autoload": {
@@ -20,5 +20,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "101.0.0"
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/composer.json b/lib/internal/Magento/Framework/MessageQueue/composer.json
index 056f1d40c39cf..889a6c37d0911 100644
--- a/lib/internal/Magento/Framework/MessageQueue/composer.json
+++ b/lib/internal/Magento/Framework/MessageQueue/composer.json
@@ -10,7 +10,7 @@
         "AFL-3.0"
     ],
     "require": {
-        "magento/framework": "*",
+        "magento/framework": "103.0.*",
         "php": "~7.3.0||~7.4.0"
     },
     "autoload": {
@@ -20,5 +20,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "100.4.0"
 }
diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json
index dfc81189bf544..3bd1d83ff0338 100644
--- a/lib/internal/Magento/Framework/composer.json
+++ b/lib/internal/Magento/Framework/composer.json
@@ -59,5 +59,6 @@
         "files": [
             "registration.php"
         ]
-    }
+    },
+    "version": "103.0.0"
 }

From 6729b6e01368248abc33300208eb292c95050203 Mon Sep 17 00:00:00 2001
From: magento-team <mage2-team@magento.com>
Date: Mon, 20 Jul 2020 10:37:42 -0700
Subject: [PATCH 296/307] Updated deprecation doc annotations

---
 .../Block/System/Messages.php                 |  2 +-
 .../Adminhtml/System/Message/ListAction.php   |  2 +-
 .../Model/Export/AdvancedPricing.php          |  4 +-
 .../Model/Client/ClientResolver.php           |  6 +--
 .../Connector/Http/ConverterInterface.php     |  5 ++
 .../Magento/Analytics/ReportXml/Query.php     |  1 -
 .../Api/BulkStatusInterface.php               |  3 ++
 .../Api/Data/AsyncResponseInterface.php       |  9 ++++
 .../Data/BulkOperationsStatusInterface.php    |  3 ++
 .../Api/Data/BulkSummaryInterface.php         |  2 +
 .../DetailedBulkOperationsStatusInterface.php |  3 ++
 .../Api/Data/ItemStatusInterface.php          | 11 ++++
 .../Data/OperationSearchResultsInterface.php  |  3 ++
 .../Data/SummaryOperationStatusInterface.php  |  5 ++
 .../Api/OperationRepositoryInterface.php      |  2 +
 .../Api/SaveMultipleOperationsInterface.php   |  2 +
 .../Model/ConfigInterface.php                 |  3 ++
 .../Operation/OperationRepository.php         |  2 +-
 .../Magento/Backend/App/AbstractAction.php    |  2 +-
 app/code/Magento/Backend/Block/Dashboard.php  |  2 +-
 .../Magento/Backend/Block/Dashboard/Graph.php |  2 +-
 .../Magento/Backend/Block/Dashboard/Grids.php |  1 +
 .../Backend/Block/Dashboard/Orders/Grid.php   |  1 +
 .../Magento/Backend/Block/Dashboard/Sales.php |  1 +
 .../Backend/Block/Dashboard/Totals.php        |  1 +
 .../Magento/Backend/Block/Media/Uploader.php  |  4 +-
 .../Magento/Backend/Block/Page/Footer.php     |  1 +
 .../Block/Page/System/Config/Robots/Reset.php |  2 +-
 .../Widget/Form/Element/ElementCreator.php    |  2 +-
 .../Backend/Block/Widget/Grid/Massaction.php  |  1 +
 .../Controller/Adminhtml/System/Store.php     |  2 +-
 .../Magento/Backend/Helper/Dashboard/Data.php |  2 +-
 app/code/Magento/Backend/Model/Url.php        |  1 +
 .../Ui/Component/Control/DeleteButton.php     |  2 +
 .../Ui/Component/Control/SaveSplitButton.php  |  2 +
 .../Component/Listing/Column/EditAction.php   |  2 +
 .../Backup/Controller/Adminhtml/Index.php     |  1 +
 app/code/Magento/Backup/Helper/Data.php       |  1 +
 app/code/Magento/Backup/Model/Db.php          |  2 +-
 .../Magento/Backup/Model/ResourceModel/Db.php |  1 +
 .../Backup/Model/ResourceModel/Helper.php     |  1 +
 .../Fieldset/Options/Type/Checkbox.php        |  1 +
 .../Composite/Fieldset/Options/Type/Multi.php |  1 +
 .../Bundle/Pricing/Price/ConfiguredPrice.php  |  1 +
 .../Model/Import/Product/Type/Bundle.php      |  2 +-
 .../Catalog/Api/BasePriceStorageInterface.php |  6 +--
 .../Api/CategoryListDeleteBySkuInterface.php  |  3 +-
 .../Catalog/Api/CategoryListInterface.php     |  4 +-
 .../Catalog/Api/CostStorageInterface.php      |  8 +--
 .../Catalog/Api/Data/BasePriceInterface.php   | 18 +++----
 .../Api/Data/CategoryLinkInterface.php        | 14 +++---
 .../Data/CategorySearchResultsInterface.php   |  6 +--
 .../Catalog/Api/Data/CostInterface.php        | 18 +++----
 .../Api/Data/EavAttributeInterface.php        |  6 +--
 .../Api/Data/PriceUpdateResultInterface.php   | 14 +++---
 .../Api/Data/ProductAttributeInterface.php    |  1 +
 .../Data/ProductFrontendActionInterface.php   | 26 +++++-----
 .../Data/ProductRender/ButtonInterface.php    | 18 +++----
 .../FormattedPriceInfoInterface.php           | 34 ++++++-------
 .../Api/Data/ProductRender/ImageInterface.php | 34 ++++++-------
 .../Data/ProductRender/PriceInfoInterface.php | 38 +++++++-------
 .../Api/Data/ProductRenderInterface.php       | 50 +++++++++----------
 .../Api/Data/SpecialPriceInterface.php        | 26 +++++-----
 .../Catalog/Api/Data/TierPriceInterface.php   | 30 +++++------
 .../Api/ProductRenderListInterface.php        |  4 +-
 .../ProductTierPriceManagementInterface.php   |  2 +-
 ...pedProductTierPriceManagementInterface.php |  8 +--
 .../Catalog/Api/SpecialPriceInterface.php     |  7 +--
 .../Api/SpecialPriceStorageInterface.php      |  8 +--
 .../Catalog/Api/TierPriceStorageInterface.php | 10 ++--
 .../Catalog/Block/Adminhtml/Product/Edit.php  |  2 +-
 .../Product/Edit/Tab/Ajax/Serializer.php      |  4 +-
 .../Adminhtml/Product/Edit/Tab/Crosssell.php  |  2 +-
 .../Adminhtml/Product/Edit/Tab/Related.php    |  2 +-
 .../Adminhtml/Product/Edit/Tab/Upsell.php     |  2 +-
 .../Catalog/Block/FrontendStorageManager.php  |  4 +-
 .../Catalog/Block/Product/AbstractProduct.php |  4 +-
 .../Block/Product/Compare/ListCompare.php     |  1 +
 .../Magento/Catalog/Block/Product/Context.php |  2 +-
 .../Magento/Catalog/Block/Product/Image.php   |  6 +--
 .../Catalog/Block/Product/ImageBuilder.php    |  2 +-
 .../Block/Product/ProductList/Toolbar.php     |  8 +--
 .../Magento/Catalog/Block/Product/View.php    |  2 +-
 .../Block/Product/View/AbstractView.php       |  2 +-
 .../Catalog/Block/Product/View/Attributes.php |  1 +
 .../Catalog/Block/Product/View/Details.php    |  2 +
 .../Product/View/Options/AbstractOptions.php  |  3 +-
 .../Catalog/Block/Ui/ProductViewCounter.php   |  4 +-
 .../Product/Initialization/Helper.php         |  2 +-
 app/code/Magento/Catalog/Helper/Data.php      |  2 +-
 app/code/Magento/Catalog/Helper/Image.php     |  4 +-
 .../Magento/Catalog/Model/AbstractModel.php   |  2 +-
 .../Attribute/Backend/Customlayoutupdate.php  |  3 +-
 app/code/Magento/Catalog/Model/Category.php   |  8 +--
 .../Category/Attribute/Source/Layout.php      |  2 +-
 .../Catalog/Model/Category/DataProvider.php   |  4 +-
 .../Magento/Catalog/Model/CategoryList.php    |  2 +-
 .../FrontendStorageConfigurationInterface.php |  4 +-
 .../Category/Product/AbstractAction.php       |  6 ++-
 .../Indexer/Product/Flat/TableBuilder.php     |  2 +-
 .../Indexer/Product/Price/AbstractAction.php  |  4 +-
 .../Indexer/Product/Price/Action/Full.php     |  2 +-
 .../Product/Price/UpdateIndexInterface.php    |  4 +-
 app/code/Magento/Catalog/Model/Product.php    | 31 ++++++------
 .../Model/Product/Attribute/Backend/Stock.php |  2 +-
 .../Attribute/Source/Countryofmanufacture.php |  2 +-
 .../Model/Product/Attribute/Source/Layout.php |  2 +-
 .../Item/ItemResolverInterface.php            |  2 +
 .../Magento/Catalog/Model/Product/Image.php   |  6 +--
 .../Magento/Catalog/Model/Product/Link.php    |  2 +-
 .../Magento/Catalog/Model/Product/Option.php  |  4 +-
 .../Model/Product/Option/Type/DefaultType.php |  3 +-
 .../Model/Product/Option/Type/File.php        |  4 +-
 .../Model/Product/Price/Validation/Result.php |  8 +--
 .../Model/Product/Type/AbstractType.php       |  4 +-
 .../Model/Product/Type/FrontSpecialPrice.php  |  4 +-
 .../Catalog/Model/Product/Type/Price.php      |  6 ++-
 .../Model/ProductIdLocatorInterface.php       |  4 +-
 .../Catalog/Model/ProductLink/Repository.php  |  8 +--
 .../Catalog/Model/ProductRepository.php       | 12 ++---
 .../ResourceModel/Category/Collection.php     |  1 +
 .../Model/ResourceModel/Category/Flat.php     |  2 +-
 .../Model/ResourceModel/Eav/Attribute.php     |  7 +--
 .../ResourceModel/Layer/Filter/Price.php      |  1 +
 .../Catalog/Model/ResourceModel/Product.php   | 14 +++---
 .../ResourceModel/Product/Collection.php      |  5 +-
 ...ositeProductBatchSizeAdjusterInterface.php |  4 +-
 .../Product/Indexer/Price/DefaultPrice.php    |  4 +-
 .../Backend/Catalog/Url/Rewrite/Suffix.php    |  4 +-
 .../Catalog/Pricing/Price/ConfiguredPrice.php |  2 +-
 .../Catalog/Pricing/Price/TierPrice.php       |  2 +-
 .../Ui/Component/Listing/Columns/Websites.php |  1 +
 .../Product/Form/Modifier/Alerts.php          |  2 -
 .../Product/Form/Modifier/Categories.php      |  2 +-
 .../Product/Form/Modifier/LayoutUpdate.php    |  1 -
 .../Product/Form/Modifier/TierPrice.php       |  6 +--
 .../Product/Listing/Collector/Image.php       |  2 +-
 .../Product/ProductDataProvider.php           |  1 +
 .../ProductRenderCollectorInterface.php       |  4 +-
 .../Resolver/Product/MediaGalleryEntries.php  |  2 +-
 .../Model/Export/Product.php                  |  3 +-
 .../Model/Import/Product.php                  | 11 ++--
 .../Model/Import/Product/LinkProcessor.php    |  2 +-
 .../Import/Product/Type/AbstractType.php      |  1 +
 .../Model/StockItemImporterInterface.php      |  2 +
 .../Api/Data/StockCollectionInterface.php     |  2 +-
 .../Api/Data/StockInterface.php               |  2 +-
 .../Api/Data/StockItemCollectionInterface.php |  2 +-
 .../Api/Data/StockItemInterface.php           |  2 +-
 .../Data/StockStatusCollectionInterface.php   |  2 +-
 .../Api/Data/StockStatusInterface.php         |  2 +-
 .../Api/RegisterProductSaleInterface.php      |  4 +-
 .../Api/RevertProductSaleInterface.php        |  4 +-
 .../Api/StockConfigurationInterface.php       |  2 +-
 .../Api/StockCriteriaInterface.php            |  2 +-
 .../Api/StockIndexInterface.php               |  2 +-
 .../Api/StockItemCriteriaInterface.php        |  2 +-
 .../Api/StockItemRepositoryInterface.php      |  2 +-
 .../Api/StockManagementInterface.php          |  2 +-
 .../Api/StockRegistryInterface.php            |  2 +-
 .../Api/StockRepositoryInterface.php          |  2 +-
 .../Api/StockStateInterface.php               |  2 +-
 .../Api/StockStatusCriteriaInterface.php      |  2 +-
 .../Api/StockStatusRepositoryInterface.php    |  2 +-
 .../Block/Adminhtml/Form/Field/Minsaleqty.php |  2 +-
 .../Block/Adminhtml/Form/Field/Stock.php      |  2 +-
 .../CatalogInventory/Block/Qtyincrements.php  |  2 +-
 .../Block/Stockqty/DefaultStockqty.php        |  2 +-
 .../Magento/CatalogInventory/Helper/Stock.php |  3 +-
 .../Model/Adminhtml/Stock/Item.php            |  2 +-
 .../Model/Quote/Item/QuantityValidator.php    |  2 +-
 .../Indexer/Stock/DefaultStock.php            |  2 +-
 .../Indexer/Stock/QueryProcessorInterface.php |  2 +-
 .../Indexer/Stock/StockInterface.php          |  2 +-
 .../ResourceModel/Indexer/StockFactory.php    |  2 +-
 .../Model/ResourceModel/Stock.php             |  6 +--
 .../Model/ResourceModel/Stock/Status.php      |  4 +-
 .../Model/Source/Backorders.php               |  2 +-
 .../CatalogInventory/Model/Source/Stock.php   |  3 +-
 .../Spi/StockRegistryProviderInterface.php    |  2 +-
 .../Model/Spi/StockStateProviderInterface.php |  2 +-
 .../Model/Indexer/IndexBuilder.php            | 18 +++----
 .../Magento/CatalogSearch/Model/Advanced.php  |  2 +-
 .../CatalogSearch/Model/Indexer/Fulltext.php  |  1 +
 .../Model/Indexer/Fulltext/Action/Full.php    | 30 +++++------
 .../Indexer/Scope/UnknownStateException.php   |  2 +-
 .../ResourceModel/Advanced/Collection.php     |  6 +++
 .../Model/ResourceModel/EngineProvider.php    |  2 +-
 .../Model/ResourceModel/Fulltext.php          |  3 +-
 .../ResourceModel/Fulltext/Collection.php     |  5 ++
 .../DefaultFilterStrategyApplyChecker.php     |  2 +-
 ...ultFilterStrategyApplyCheckerInterface.php |  2 +-
 .../Model/Search/ReaderPlugin.php             |  2 +-
 .../RequestGenerator/GeneratorResolver.php    |  2 +-
 .../CurrentUrlRewritesRegenerator.php         |  4 +-
 .../Model/CategoryUrlRewriteGenerator.php     |  2 +-
 .../Product/CurrentUrlRewritesRegenerator.php |  6 +--
 .../Model/ProductUrlRewriteGenerator.php      | 16 +++---
 .../Api/AgreementsValidatorInterface.php      |  1 +
 .../Api/Data/PaymentDetailsInterface.php      |  1 +
 .../Api/Data/ShippingInformationInterface.php |  1 +
 .../Api/Data/TotalsInformationInterface.php   |  1 +
 ...tPaymentInformationManagementInterface.php |  1 +
 ...ShippingInformationManagementInterface.php |  1 +
 ...stTotalsInformationManagementInterface.php |  1 +
 .../PaymentInformationManagementInterface.php |  1 +
 ...ShippingInformationManagementInterface.php |  1 +
 .../TotalsInformationManagementInterface.php  |  1 +
 app/code/Magento/Checkout/Block/Cart.php      |  3 +-
 .../Checkout/Block/Cart/Additional/Info.php   |  1 +
 .../Magento/Checkout/Block/Cart/Coupon.php    |  2 +
 .../Magento/Checkout/Block/Cart/Crosssell.php |  1 +
 app/code/Magento/Checkout/Block/Cart/Grid.php | 11 ++--
 .../Checkout/Block/Cart/Item/Configure.php    |  1 +
 .../Checkout/Block/Cart/Item/Renderer.php     |  1 +
 .../Block/Cart/Item/Renderer/Actions.php      |  1 +
 .../Block/Cart/Item/Renderer/Actions/Edit.php |  1 +
 .../Cart/Item/Renderer/Actions/Remove.php     |  1 +
 .../Magento/Checkout/Block/Cart/Shipping.php  |  1 +
 .../Magento/Checkout/Block/Cart/Sidebar.php   |  1 +
 .../Magento/Checkout/Block/Cart/Totals.php    |  1 +
 .../Block/Cart/ValidationMessages.php         |  1 +
 .../Block/Checkout/AttributeMerger.php        |  2 +-
 .../Checkout/LayoutProcessorInterface.php     |  1 +
 .../Checkout/Block/Item/Price/Renderer.php    |  1 +
 app/code/Magento/Checkout/Block/Onepage.php   |  1 +
 .../Checkout/Block/Onepage/Failure.php        |  1 +
 .../Magento/Checkout/Block/Onepage/Link.php   |  1 +
 .../Checkout/Block/Onepage/Success.php        |  1 +
 .../Checkout/Block/QuoteShortcutButtons.php   |  1 +
 .../Magento/Checkout/Block/Registration.php   |  1 +
 .../Checkout/Controller/Account/Create.php    |  2 +-
 .../Checkout/CustomerData/AbstractItem.php    |  1 +
 .../Checkout/CustomerData/ItemInterface.php   |  1 +
 app/code/Magento/Checkout/Exception.php       |  1 +
 app/code/Magento/Checkout/Model/Cart.php      |  1 +
 .../Checkout/Model/Cart/CartInterface.php     |  1 +
 .../Checkout/Model/Cart/ImageProvider.php     |  8 ++-
 .../Model/Cart/RequestInfoFilterComposite.php |  1 -
 .../Model/CompositeConfigProvider.php         |  1 +
 .../Model/ConfigProviderInterface.php         |  1 +
 .../GuestPaymentInformationManagement.php     |  2 +-
 .../Model/Layout/AbstractTotalsProcessor.php  |  1 +
 .../Model/PaymentInformationManagement.php    |  4 +-
 app/code/Magento/Checkout/Model/Session.php   |  1 +
 .../Model/Session/SuccessValidator.php        |  1 +
 .../Api/CheckoutAgreementsListInterface.php   |  2 +
 .../CheckoutAgreementsRepositoryInterface.php |  2 +-
 .../Block/Adminhtml/Agreement/Grid.php        |  2 +-
 .../Magento/Cms/Api/Data/PageInterface.php    |  8 +--
 .../Cms/Api/GetBlockByIdentifierInterface.php |  2 +
 .../Cms/Api/GetPageByIdentifierInterface.php  |  2 +
 .../GetUtilityPageIdentifiersInterface.php    |  2 +
 .../Adminhtml/Page/PostDataProcessor.php      |  2 +-
 .../Magento/Cms/Model/BlockRepository.php     |  2 +-
 .../Cms/Model/Page/Source/PageLayout.php      |  2 +-
 app/code/Magento/Cms/Model/PageRepository.php |  2 +-
 app/code/Magento/Cms/Model/Wysiwyg/Config.php |  4 +-
 .../Config/Source/EnvironmentConfigSource.php |  4 +-
 .../Source/InitialSnapshotConfigSource.php    |  4 +-
 .../Config/Block/System/Config/Edit.php       |  1 +
 .../Config/Block/System/Config/Form.php       |  4 +-
 .../Field/FieldArray/AbstractFieldArray.php   |  2 +-
 .../Form/Fieldset/Modules/DisableOutput.php   | 20 ++++----
 .../ConfigSet/ConfigSetProcessorFactory.php   |  4 +-
 .../ConfigSet/ConfigSetProcessorInterface.php |  4 +-
 .../Command/ConfigSet/DefaultProcessor.php    |  4 +-
 .../Command/ConfigSet/ProcessorFacade.php     |  7 +--
 .../Console/Command/ConfigSetCommand.php      |  6 +--
 .../Command/ConfigShow/ValueProcessor.php     |  4 +-
 .../Console/Command/ConfigShowCommand.php     |  6 +--
 .../Adminhtml/System/AbstractConfig.php       |  2 +-
 .../Adminhtml/System/ConfigSectionChecker.php |  2 +-
 .../Model/Config/Backend/Admin/Robots.php     |  2 +-
 .../Config/Model/Config/Backend/Baseurl.php   |  2 +-
 .../Model/Config/Backend/Currency/Allow.php   |  2 +-
 .../Model/Config/Export/ExcludeList.php       |  6 +--
 .../Magento/Config/Model/Config/Importer.php  |  6 +--
 .../Config/Model/Config/Parser/Comment.php    |  4 +-
 .../Config/Model/Config/PathValidator.php     |  4 +-
 .../Reader/Source/Deployed/DocumentRoot.php   |  6 +--
 .../Magento/Config/Model/Config/Structure.php |  4 +-
 .../Config/Structure/AbstractElement.php      |  4 +-
 .../ConcealInProductionConfigList.php         |  9 ++--
 .../Config/Structure/ElementInterface.php     |  2 +-
 .../ElementVisibility/ConcealInProduction.php |  5 +-
 .../ConcealInProductionWithoutScdOnDemand.php |  3 ++
 .../Structure/ElementVisibilityComposite.php  |  6 +--
 .../Structure/ElementVisibilityInterface.php  |  6 +--
 .../Config/StructureElementInterface.php      |  2 +
 .../Magento/Config/Model/Config/TypePool.php  |  6 +--
 .../Config/Model/PreparedValueFactory.php     |  4 +-
 .../Block/Cart/Item/Renderer/Configurable.php |  1 +
 .../Block/Product/View/Type/Configurable.php  | 10 ++--
 .../AttributeOptionProviderInterface.php      |  4 +-
 .../Model/LinkManagement.php                  |  2 +-
 .../Model/Product/Type/Configurable.php       |  4 +-
 .../Configurable/Attribute/Collection.php     |  3 +-
 .../Type/Configurable/Product/Collection.php  |  1 +
 .../Price/ConfigurablePriceResolver.php       |  4 +-
 app/code/Magento/Cookie/Helper/Cookie.php     |  2 +-
 .../Api/CustomerGroupConfigInterface.php      |  4 +-
 .../Block/Account/AuthenticationPopup.php     |  2 +-
 .../Block/Account/AuthorizationLink.php       |  2 +-
 .../Customer/Block/Account/Dashboard.php      |  2 +-
 .../Customer/Block/Account/Delimiter.php      |  4 +-
 .../Magento/Customer/Block/Account/Link.php   |  2 +-
 .../Customer/Block/Account/Navigation.php     |  4 +-
 .../Block/Account/SortLinkInterface.php       |  4 +-
 .../Magento/Customer/Block/Address/Book.php   |  8 +--
 .../Magento/Customer/Block/Address/Grid.php   |  9 ++++
 .../Block/Adminhtml/Edit/Tab/Cart.php         |  1 +
 .../Magento/Customer/Block/CustomerData.php   |  4 +-
 .../Customer/Block/CustomerScopeData.php      |  5 +-
 .../Customer/Controller/AbstractAccount.php   |  2 +-
 .../Customer/Controller/Account/Confirm.php   |  4 +-
 .../Controller/Account/CreatePost.php         |  2 +-
 .../Customer/Controller/Adminhtml/Index.php   | 16 +++---
 .../Controller/Adminhtml/Index/Cart.php       |  2 +-
 .../Controller/Adminhtml/Index/Save.php       |  4 +-
 .../Customer/Controller/Section/Load.php      |  2 +-
 .../Customer/CustomerData/SectionPool.php     |  1 +
 app/code/Magento/Customer/Helper/Address.php  |  4 +-
 .../Customer/Model/Account/Redirect.php       |  2 +-
 .../Customer/Model/AccountManagement.php      |  4 +-
 app/code/Magento/Customer/Model/Address.php   |  2 +-
 .../Model/Address/AbstractAddress.php         |  8 +--
 .../Model/Address/ValidatorInterface.php      |  2 +
 .../Model/AuthenticationInterface.php         |  5 ++
 .../Model/Checkout/ConfigProvider.php         |  2 +-
 .../Customer/Model/Config/Source/Group.php    |  4 +-
 .../Model/Config/Source/Group/Multiselect.php |  4 +-
 app/code/Magento/Customer/Model/Customer.php  |  5 +-
 .../Customer/Attribute/Backend/Password.php   |  4 +-
 .../Customer/Model/Customer/DataProvider.php  |  4 +-
 .../Customer/Source/GroupSourceInterface.php  |  2 +-
 .../Model/Group/RetrieverInterface.php        |  4 +-
 .../Customer/Model/Metadata/Form/File.php     |  2 +-
 app/code/Magento/Customer/Model/Options.php   |  2 +-
 .../Customer/Model/ResourceModel/Address.php  |  4 +-
 .../Address/Attribute/Source/Country.php      |  2 +-
 .../Model/ResourceModel/Address/Relation.php  |  2 +-
 .../Model/ResourceModel/AddressRepository.php |  4 +-
 .../ResourceModel/CustomerRepository.php      |  2 +-
 .../Model/ResourceModel/GroupRepository.php   |  6 +--
 .../Model/Import/Address.php                  |  8 +--
 .../Model/Import/Customer.php                 |  2 +
 .../ResourceModel/Import/Customer/Storage.php |  2 +-
 app/code/Magento/Dhl/Model/Carrier.php        |  4 +-
 app/code/Magento/Directory/Block/Data.php     |  2 +-
 .../Model/ResourceModel/Currency.php          |  2 +-
 .../Composite/Fieldset/Downloadable.php       |  2 +-
 .../Catalog/Product/Edit/Tab/Downloadable.php |  2 +-
 .../Product/Edit/Tab/Downloadable/Links.php   |  2 +-
 .../Product/Edit/Tab/Downloadable/Samples.php |  2 +-
 .../Downloadable/Product/Edit/Form.php        |  2 +-
 .../Downloadable/Model/Sample/Builder.php     |  1 +
 .../Data/AttributeDefaultValueInterface.php   |  6 +--
 .../Eav/Api/Data/AttributeInterface.php       |  1 +
 .../Eav/Block/Adminhtml/Attribute/Edit/Js.php |  2 +-
 .../Edit/Options/AbstractOptions.php          |  2 +-
 .../Adminhtml/Attribute/Grid/AbstractGrid.php |  2 +-
 .../Eav/Model/Attribute/GroupRepository.php   |  4 +-
 .../Magento/Eav/Model/AttributeRepository.php |  2 +-
 .../Eav/Model/AttributeSetRepository.php      |  4 +-
 app/code/Magento/Eav/Model/Config.php         |  8 +--
 .../Eav/Model/Entity/AbstractEntity.php       |  4 +-
 .../Entity/Attribute/AbstractAttribute.php    |  8 +--
 .../AttributeGroupAlreadyExistsException.php  |  2 +-
 .../Entity/Attribute/Backend/JsonEncoded.php  |  6 +--
 .../Eav/Model/Entity/Attribute/Set.php        |  2 +-
 .../Entity/Collection/AbstractCollection.php  |  1 +
 .../Model/ResourceModel/Entity/Attribute.php  |  1 +
 .../Eav/Model/ResourceModel/ReadHandler.php   |  2 +-
 .../Model/TypeLocator/ServiceClassLocator.php |  2 +-
 app/code/Magento/Eav/Setup/EavSetup.php       |  2 +-
 .../EavGraphQl/Model/Resolver/Query/Type.php  |  2 +
 .../Config/Elasticsearch5/TestConnection.php  |  2 +-
 .../FieldMapper/ProductFieldMapperProxy.php   |  2 -
 .../Model/Client/Elasticsearch.php            |  2 +-
 .../Elasticsearch5/SearchAdapter/Mapper.php   | 16 +++---
 .../SearchAdapter/Query/Builder.php           | 14 +++---
 .../FieldType/ConverterInterface.php          |  2 +
 .../Elasticsearch/Model/Adapter/FieldType.php |  5 +-
 .../Model/DataProvider/Suggestions.php        |  2 +-
 .../DefaultFilterStrategyApplyChecker.php     |  2 +-
 .../Elasticsearch/SearchAdapter/Mapper.php    |  2 +-
 .../Email/Block/Adminhtml/Template/Edit.php   |  2 +-
 .../Controller/Adminhtml/Email/Template.php   |  2 +-
 .../Magento/Email/Model/Template/Filter.php   |  8 +--
 .../GiftMessage/Block/Message/Inline.php      |  2 +-
 .../Magento/GoogleAdwords/Helper/Data.php     |  2 +
 .../Magento/GraphQl/Controller/GraphQl.php    |  6 ++-
 .../GraphQl/Model/Query/Resolver/Context.php  |  2 +-
 .../Order/Email/Items/CreditMemo/Grouped.php  |  2 +
 .../Api/Data/ExportInfoInterface.php          | 11 ++++
 .../Api/ExportManagementInterface.php         |  2 +
 .../Magento/ImportExport/Helper/Report.php    |  1 +
 .../Magento/ImportExport/Model/Export.php     |  2 +-
 .../ImportExport/Model/Export/Adapter/Csv.php |  1 +
 .../Magento/ImportExport/Model/History.php    |  1 +
 .../Magento/ImportExport/Model/Import.php     |  1 +
 .../Magento/InstantPurchase/Block/Button.php  |  3 ++
 .../BillingAddressChooserInterface.php        |  2 +
 .../Model/InstantPurchaseInterface.php        |  2 +
 .../Model/InstantPurchaseOption.php           |  6 +++
 .../Model/InstantPurchaseOptionFactory.php    |  3 ++
 .../PaymentTokenChooserInterface.php          |  2 +
 .../InstantPurchase/Model/PlaceOrder.php      |  2 +
 .../QuoteManagement/PaymentConfiguration.php  |  2 +
 .../Model/QuoteManagement/Purchase.php        |  2 +
 .../Model/QuoteManagement/QuoteCreation.php   |  2 +
 .../Model/QuoteManagement/QuoteFilling.php    |  2 +
 .../QuoteManagement/ShippingConfiguration.php |  2 +
 .../ShippingAddressChooserInterface.php       |  2 +
 ...DeferredShippingMethodChooserInterface.php |  2 +
 .../DeferredShippingMethodChooserPool.php     |  2 +
 .../ShippingMethodChooserInterface.php        |  2 +
 .../Model/Ui/CustomerAddressesFormatter.php   |  2 +
 .../Model/Ui/PaymentTokenFormatter.php        |  2 +
 .../Model/Ui/ShippingMethodFormatter.php      |  2 +
 .../AvailabilityCheckerInterface.php          |  2 +
 ...AdditionalInformationProviderInterface.php |  2 +
 .../PaymentTokenFormatterInterface.php        |  2 +
 .../StaticAdditionalInformationProvider.php   |  2 +
 .../StaticAvailabilityChecker.php             |  2 +
 .../LayeredNavigation/Block/Navigation.php    |  1 +
 .../Block/Adminhtml/ConfirmationPopup.php     |  3 ++
 .../Api/ConfigInterface.php                   |  4 ++
 .../Api/Data/AuthenticationDataInterface.php  |  4 ++
 ...GetAuthenticationDataBySecretInterface.php |  2 +
 ...sLoginAsCustomerSessionActiveInterface.php |  2 +
 .../Api/SaveAuthenticationDataInterface.php   |  2 +
 .../Api/Data/LogInterface.php                 | 15 ++++++
 .../Api/Data/LogSearchResultsInterface.php    |  3 ++
 .../Api/GetLogsListInterface.php              |  2 +
 .../Api/SaveLogsInterface.php                 |  2 +
 .../Api/Data/ContentAssetLinkInterface.php    |  5 ++
 .../Api/Data/ContentIdentityInterface.php     |  6 +++
 ...teContentAssetLinksByAssetIdsInterface.php |  2 +
 .../Api/DeleteContentAssetLinksInterface.php  |  2 +
 .../Api/ExtractAssetsFromContentInterface.php |  2 +
 .../GetAssetIdsByContentIdentityInterface.php |  2 +
 .../Api/GetContentByAssetIdsInterface.php     |  2 +
 .../Api/SaveContentAssetLinksInterface.php    |  2 +
 .../Model/GetEntityContentsInterface.php      |  2 +
 .../Asset/Command/DeleteByDirectoryPath.php   |  2 +-
 .../Model/Asset/Command/DeleteByPath.php      |  2 +-
 .../Model/Asset/Command/GetById.php           |  2 +-
 .../Model/Asset/Command/GetByPath.php         |  2 +-
 .../MediaGallery/Model/Asset/Command/Save.php |  2 +-
 .../Keyword/Command/GetAssetKeywords.php      |  2 +-
 .../Keyword/Command/SaveAssetKeywords.php     |  2 +-
 .../Api/CreateDirectoriesByPathsInterface.php |  2 +
 .../Api/Data/AssetInterface.php               | 13 +++++
 .../Api/Data/AssetKeywordsInterface.php       |  5 ++
 .../Api/Data/KeywordInterface.php             |  5 ++
 .../Api/DeleteAssetsByPathsInterface.php      |  2 +
 .../Api/DeleteDirectoriesByPathsInterface.php |  2 +
 .../Api/GetAssetsByIdsInterface.php           |  2 +
 .../Api/GetAssetsByPathsInterface.php         |  2 +
 .../Api/GetAssetsKeywordsInterface.php        |  2 +
 .../Api/SaveAssetsInterface.php               |  2 +
 .../Api/SaveAssetsKeywordsInterface.php       |  2 +
 .../DeleteByDirectoryPathInterface.php        |  2 +-
 .../Asset/Command/DeleteByPathInterface.php   |  2 +-
 .../Model/Asset/Command/GetByIdInterface.php  |  2 +-
 .../Asset/Command/GetByPathInterface.php      |  2 +-
 .../Model/Asset/Command/SaveInterface.php     |  2 +-
 .../Command/GetAssetKeywordsInterface.php     |  2 +-
 .../Command/SaveAssetKeywordsInterface.php    |  2 +-
 .../MediaStorage/Model/File/Uploader.php      |  1 +
 .../Multishipping/Block/Checkout/Overview.php |  3 +-
 .../Multishipping/Block/Checkout/Results.php  | 10 ++++
 .../Multishipping/PlaceOrderInterface.php     |  2 +
 .../Model/Queue/TransportBuilder.php          |  2 +-
 .../Model/ResourceModel/Queue/Collection.php  |  1 +
 .../Model/ResourceModel/Subscriber.php        |  6 ++-
 .../Magento/Newsletter/Model/Subscriber.php   | 17 ++++---
 .../Magento/Newsletter/Model/Template.php     |  2 +-
 .../OfflinePayments/Model/Purchaseorder.php   |  1 +
 .../Carrier/Tablerate/LocationDirectory.php   |  2 +-
 .../PageCacheState.php                        |  2 +-
 .../Payment/Block/Transparent/Redirect.php    |  3 ++
 .../ErrorMapper/ErrorMessageMapper.php        |  2 +
 .../ErrorMessageMapperInterface.php           |  2 +
 .../Gateway/Validator/ResultInterface.php     |  1 +
 .../Gateway/Validator/ValidatorComposite.php  |  1 +
 .../Magento/Payment/Model/Method/Adapter.php  |  2 +
 .../Payment/Model/Method/ConfigInterface.php  |  2 +-
 app/code/Magento/Payment/Model/MethodList.php |  2 +-
 .../Payment/Model/SaleOperationInterface.php  |  3 ++
 .../Paypal/Block/Adminhtml/Order/View.php     |  3 ++
 .../System/Config/Field/Enable/BmlApi.php     |  2 +-
 .../Adminhtml/System/Config/Fieldset/Hint.php |  2 +-
 .../Express/InContext/Minicart/Button.php     |  2 +-
 .../Magento/Paypal/Model/AbstractConfig.php   |  2 +-
 app/code/Magento/Paypal/Model/Api/Nvp.php     |  2 +-
 .../Quote/Model/BillingAddressManagement.php  |  2 +-
 .../Model/MaskedQuoteIdToQuoteIdInterface.php |  2 +
 app/code/Magento/Quote/Model/Quote.php        |  2 +-
 .../Magento/Quote/Model/Quote/Address.php     |  2 +-
 .../Quote/Model/Quote/Address/Item.php        |  1 +
 app/code/Magento/Quote/Model/Quote/Item.php   |  2 +-
 .../MinimumOrderAmount/ValidationMessage.php  |  2 +-
 .../Quote/Model/QuoteAddressValidator.php     |  2 +-
 .../Model/QuoteIdToMaskedQuoteIdInterface.php |  2 +
 .../Magento/Quote/Model/QuoteRepository.php   |  6 +--
 .../Quote/Model/ResourceModel/Quote.php       |  2 +-
 .../Quote/Model/ShippingMethodManagement.php  |  4 +-
 .../Resolver/SetPaymentAndPlaceOrder.php      |  2 +-
 .../Reports/Block/Adminhtml/Wishlist.php      |  2 +-
 .../Block/Product/Widget/Viewed/Item.php      |  2 +-
 .../Model/ResourceModel/Order/Collection.php  |  2 +-
 .../Product/Downloads/Collection.php          |  1 +
 .../Model/ResourceModel/Quote/Collection.php  |  1 +
 .../Review/Customer/Collection.php            |  1 +
 .../Review/Product/Collection.php             |  1 +
 .../Block/Adminhtml/Edit/Tab/Reviews.php      |  3 ++
 .../Magento/Review/Block/Customer/View.php    |  2 +-
 app/code/Magento/Review/Block/View.php        |  2 +-
 .../Review/Controller/Adminhtml/Rating.php    |  2 +-
 .../Review/Product/Collection.php             |  1 +
 app/code/Magento/Review/Model/Review.php      |  6 +--
 app/code/Magento/Robots/Block/Data.php        |  6 +--
 .../Magento/Robots/Model/Config/Value.php     |  6 +--
 .../Sales/Api/Data/OrderPaymentInterface.php  |  1 +
 .../Adminhtml/Order/Create/Items/Grid.php     |  2 +-
 .../Adminhtml/Order/Create/Sidebar/Cart.php   |  2 +
 .../Order/Creditmemo/Create/Adjustments.php   |  1 +
 .../Sales/Block/Adminhtml/Order/Totalbar.php  |  2 +-
 .../Sales/Block/Adminhtml/Order/View/Info.php |  2 +-
 .../Block/Order/Email/Creditmemo/Items.php    |  2 +
 .../Sales/Block/Order/Email/Invoice/Items.php |  2 +
 .../Magento/Sales/Block/Order/Email/Items.php |  1 +
 .../Block/Order/Email/Shipment/Items.php      |  2 +
 .../Magento/Sales/Block/Order/History.php     |  3 +-
 .../Sales/Block/Order/PrintShipment.php       |  4 +-
 app/code/Magento/Sales/Block/Order/Recent.php |  2 +-
 app/code/Magento/Sales/Block/Order/View.php   |  2 +-
 .../Adminhtml/Order/AbstractMassAction.php    |  2 +-
 .../Download/DownloadCustomOption.php         |  2 +-
 .../Magento/Sales/Model/AdminOrder/Create.php |  4 +-
 app/code/Magento/Sales/Model/Increment.php    |  2 +-
 app/code/Magento/Sales/Model/Order.php        |  6 ++-
 .../Magento/Sales/Model/Order/Address.php     |  1 +
 .../Sales/Model/Order/AddressRepository.php   |  2 +-
 app/code/Magento/Sales/Model/Order/Config.php |  3 +-
 .../Sales/Model/Order/CreditmemoFactory.php   |  2 +-
 .../Model/Order/CreditmemoRepository.php      |  2 +-
 .../Sales/Model/Order/CustomerManagement.php  |  8 +--
 .../Order/Email/Sender/ShipmentSender.php     |  2 +-
 .../Sales/Model/Order/InvoiceRepository.php   |  2 +-
 app/code/Magento/Sales/Model/Order/Item.php   |  2 +-
 .../Magento/Sales/Model/Order/Payment.php     |  2 +-
 .../Sales/Model/Order/Payment/Repository.php  |  2 +-
 .../Order/Payment/State/AuthorizeCommand.php  |  2 +-
 .../Order/Payment/State/CaptureCommand.php    |  2 +-
 .../Order/Payment/State/OrderCommand.php      |  2 +-
 .../RegisterCaptureNotificationCommand.php    |  2 +-
 .../Order/Payment/Transaction/Repository.php  |  2 +-
 .../Sales/Model/Order/ProductOption.php       |  2 +
 .../OrderedProductAvailabilityChecker.php     |  4 +-
 ...redProductAvailabilityCheckerInterface.php |  4 +-
 .../Sales/Model/Order/ShipmentFactory.php     |  1 +
 .../Sales/Model/Order/ShipmentRepository.php  |  2 +-
 .../Magento/Sales/Model/OrderRepository.php   |  2 +-
 .../Model/ResourceModel/AbstractGrid.php      |  2 +-
 .../Model/Order/ReturnProcessor.php           |  2 +
 .../SalesRule/Api/Data/CouponInterface.php    |  4 +-
 app/code/Magento/SalesRule/Model/Coupon.php   |  4 +-
 .../SalesRule/Model/CouponRepository.php      |  4 +-
 .../Model/Rule/Action/Discount/CartFixed.php  |  4 +-
 .../Model/Rule/Condition/Product/Combine.php  |  1 +
 .../SalesRule/Model/RuleRepository.php        |  4 +-
 .../Model/Service/CouponManagementService.php |  6 +--
 .../Magento/Search/Model/AdapterFactory.php   |  6 +--
 .../Model/ResourceModel/Query/Collection.php  |  1 +
 .../Search/Model/Search/PageSizeProvider.php  |  2 +
 app/code/Magento/SendFriend/Block/Send.php    |  1 +
 .../Model/Carrier/AbstractCarrier.php         |  3 +-
 .../Model/Carrier/AbstractCarrierOnline.php   |  3 +-
 .../Model/ShipmentProviderInterface.php       |  2 +
 app/code/Magento/Sitemap/Block/Robots.php     |  8 +--
 app/code/Magento/Sitemap/Helper/Data.php      | 24 ++++-----
 .../ItemProvider/ConfigReaderInterface.php    |  3 ++
 .../ItemProvider/ItemProviderInterface.php    |  2 +
 .../Model/ResourceModel/Catalog/Product.php   |  1 +
 .../Sitemap/Model/ResourceModel/Cms/Page.php  |  1 -
 app/code/Magento/Sitemap/Model/Sitemap.php    | 16 +++---
 .../Model/SitemapConfigReaderInterface.php    |  6 +++
 .../Sitemap/Model/SitemapItemInterface.php    |  6 +++
 .../Magento/Store/Api/Data/StoreInterface.php |  2 +
 .../Store/Api/StoreResolverInterface.php      |  2 +-
 .../Store/Controller/Store/SwitchAction.php   |  4 +-
 .../Config/Importer/Processor/Create.php      |  2 +-
 .../Store/Model/Config/Placeholder.php        |  4 +-
 app/code/Magento/Store/Model/Group.php        |  1 +
 app/code/Magento/Store/Model/Store.php        |  8 ++-
 .../Magento/Store/Model/StoreResolver.php     |  6 +--
 app/code/Magento/Store/Model/System/Store.php |  1 +
 .../Schema/InitializeStoresAndWebsites.php    |  2 +-
 .../Swagger/Api/Data/SchemaTypeInterface.php  |  3 ++
 app/code/Magento/Swagger/Block/Index.php      |  2 +
 .../Block/Product/Renderer/Configurable.php   |  5 +-
 .../Product/Renderer/Listing/Configurable.php |  2 +
 .../Swatches/Model/ResourceModel/Swatch.php   |  1 +
 .../Block/Adminhtml/Items/Price/Renderer.php  |  2 +-
 .../Model/System/Message/Notifications.php    |  6 +--
 app/code/Magento/Theme/Block/Html/Footer.php  |  1 +
 .../Magento/Theme/Block/Html/Header/Logo.php  |  2 +-
 .../System/Design/Theme/UploadJs.php          |  2 +-
 .../ResourceModel/Theme/Grid/Collection.php   |  2 +-
 .../Config/SearchRobots/ResetButton.php       |  4 +-
 .../Tinymce3/Model/Config/Gallery/Config.php  |  2 +-
 .../Model/Config/Source/Wysiwyg/Editor.php    |  2 +-
 .../Tinymce3/Model/Config/Variable/Config.php |  2 +-
 .../Tinymce3/Model/Config/Widget/Config.php   |  2 +-
 .../Config/Widget/PlaceholderImagesPool.php   |  2 +-
 .../Tinymce3/Model/Config/Wysiwyg/Config.php  |  2 +-
 app/code/Magento/Translation/Block/Js.php     |  1 +
 .../Magento/Ui/Block/Wysiwyg/ActiveEditor.php |  2 +
 .../Ui/Component/Form/Element/ColorPicker.php |  3 ++
 .../Ui/Component/Listing/Columns/Date.php     |  1 +
 .../Magento/Ui/Component/Wrapper/Block.php    |  2 +-
 .../Ui/Controller/Adminhtml/Bookmark/Save.php |  2 +-
 .../Ui/DataProvider/AbstractDataProvider.php  |  2 +-
 .../Modifier/WysiwygModifierInterface.php     |  3 ++
 .../Ui/DataProvider/SearchResultFactory.php   |  2 +
 app/code/Magento/Ui/Model/Bookmark.php        |  2 +-
 app/code/Magento/Ui/Model/Manager.php         |  2 +-
 .../ResourceModel/BookmarkRepository.php      |  4 +-
 app/code/Magento/Ups/Model/Carrier.php        |  4 +-
 .../UrlRewrite/Block/GridContainer.php        |  2 +-
 .../Exception/UrlAlreadyExistsException.php   |  4 +-
 .../UrlRewrite/Model/Storage/DbStorage.php    |  2 +-
 app/code/Magento/User/Block/User/Edit.php     |  6 +--
 .../Model/ResourceModel/User/Collection.php   |  1 +
 app/code/Magento/User/Model/User.php          | 10 ++--
 app/code/Magento/Usps/Model/Carrier.php       |  6 +--
 .../Api/Data/PaymentTokenFactoryInterface.php |  4 +-
 .../Api/Data/PaymentTokenInterfaceFactory.php |  2 +-
 .../Model/AbstractPaymentTokenFactory.php     |  2 +-
 .../Model/AccountPaymentTokenFactory.php      |  2 +-
 .../Vault/Model/CreditCardTokenFactory.php    |  2 +-
 .../Vault/Model/PaymentTokenFactory.php       |  4 +-
 .../Vault/Model/PaymentTokenRepository.php    |  4 +-
 .../Controller/Soap/Request/Handler.php       |  2 +-
 .../Magento/Webapi/Model/ConfigInterface.php  |  2 +
 .../WebapiAsync/Model/BulkServiceConfig.php   |  2 +
 .../WebapiAsync/Model/ServiceConfig.php       |  2 +
 .../Adminhtml/Widget/LoadOptions.php          |  2 +-
 .../Widget/Model/ResourceModel/Widget.php     |  2 +-
 .../Widget/Instance/Options/ThemeId.php       |  2 +-
 app/code/Magento/Widget/Model/Widget.php      |  4 +-
 .../Magento/Widget/Model/Widget/Instance.php  |  2 +
 .../Magento/Wishlist/Block/AbstractBlock.php  |  2 +-
 .../Wishlist/Block/Customer/Wishlist.php      |  2 +
 .../Customer/Wishlist/Item/Column/Actions.php |  2 +-
 .../Customer/Wishlist/Item/Column/Comment.php |  2 +-
 .../Customer/Wishlist/Item/Column/Edit.php    |  2 +-
 .../Customer/Wishlist/Item/Column/Image.php   |  1 +
 .../Customer/Wishlist/Item/Column/Info.php    |  2 +-
 .../Customer/Wishlist/Item/Column/Remove.php  |  2 +-
 app/code/Magento/Wishlist/Block/Link.php      |  2 +-
 .../Wishlist/Block/Share/Email/Items.php      |  1 +
 .../Model/ResourceModel/Item/Collection.php   |  1 +
 .../Magento/Wishlist/Observer/AddToCart.php   |  2 +-
 lib/internal/Magento/Framework/Acl.php        |  1 +
 .../Magento/Framework/Acl/AclResource.php     |  1 +
 .../Acl/AclResource/ProviderInterface.php     |  1 +
 .../Magento/Framework/Acl/Builder.php         |  3 +-
 .../Framework/Acl/Data/CacheInterface.php     |  2 +-
 .../Magento/Framework/Acl/LoaderInterface.php |  1 +
 .../Magento/Framework/Acl/RootResource.php    |  1 +
 .../Magento/Framework/Amqp/Config.php         |  9 ++--
 .../Framework/Amqp/ConnectionTypeResolver.php |  5 +-
 .../Magento/Framework/Amqp/Exchange.php       |  5 +-
 .../Framework/Amqp/ExchangeFactory.php        |  5 +-
 lib/internal/Magento/Framework/Amqp/Queue.php | 13 +++--
 .../Magento/Framework/Amqp/QueueFactory.php   |  5 +-
 .../Amqp/Topology/ArgumentProcessor.php       |  2 +-
 .../Api/AbstractExtensibleObject.php          |  3 +-
 .../Api/AbstractSimpleObjectBuilder.php       |  2 +-
 .../Framework/Api/AttributeInterface.php      |  1 +
 .../Api/CustomAttributesDataInterface.php     |  1 +
 .../Api/Data/ImageContentInterface.php        |  1 +
 .../Api/Data/VideoContentInterface.php        |  1 +
 .../Framework/Api/ExtensibleDataInterface.php |  1 +
 .../ExtensionAttribute/JoinDataInterface.php  |  1 +
 .../JoinProcessorInterface.php                |  1 +
 .../Api/ExtensionAttributesInterface.php      |  1 +
 lib/internal/Magento/Framework/Api/Filter.php |  1 +
 .../Magento/Framework/Api/FilterBuilder.php   |  1 +
 .../Api/ImageContentValidatorInterface.php    |  1 +
 .../Framework/Api/ImageProcessorInterface.php |  1 +
 .../Framework/Api/MetadataObjectInterface.php |  1 +
 .../Api/MetadataServiceInterface.php          |  1 +
 .../Magento/Framework/Api/Search/Document.php |  1 +
 .../Framework/Api/Search/FilterGroup.php      |  1 +
 .../Api/Search/FilterGroupBuilder.php         |  1 +
 .../Framework/Api/Search/SearchCriteria.php   |  1 +
 .../Api/Search/SearchCriteriaBuilder.php      |  1 +
 .../Api/Search/SearchCriteriaInterface.php    |  1 +
 .../Framework/Api/Search/SearchInterface.php  |  1 +
 .../Api/Search/SearchResultInterface.php      |  1 +
 .../FilterProcessor/CustomFilterInterface.php |  4 +-
 .../JoinProcessor/CustomJoinInterface.php     |  4 +-
 .../CollectionProcessorInterface.php          |  4 +-
 .../Framework/Api/SearchCriteriaInterface.php |  1 +
 .../Framework/Api/SearchResultsInterface.php  |  1 +
 .../Magento/Framework/Api/SortOrder.php       |  1 +
 .../Framework/Api/SortOrderBuilder.php        |  1 +
 .../Framework/App/Action/AbstractAction.php   |  2 +-
 .../Magento/Framework/App/Action/Action.php   |  3 +-
 .../Magento/Framework/App/Action/Context.php  |  1 +
 .../App/Action/HttpHeadActionInterface.php    |  2 +-
 .../Magento/Framework/App/ActionFactory.php   |  1 +
 .../Magento/Framework/App/ActionFlag.php      |  1 +
 .../Magento/Framework/App/ActionInterface.php |  1 +
 .../App/Area/FrontNameResolverFactory.php     |  1 +
 .../App/Area/FrontNameResolverInterface.php   |  1 +
 .../Magento/Framework/App/Bootstrap.php       |  1 +
 .../Magento/Framework/App/Cache/Manager.php   |  1 +
 .../Framework/App/Cache/StateInterface.php    |  1 +
 .../Framework/App/Cache/Type/FrontendPool.php |  1 +
 .../Framework/App/Cache/TypeListInterface.php |  1 +
 .../Magento/Framework/App/CacheInterface.php  |  1 +
 .../App/Config/Data/ProcessorInterface.php    |  1 +
 .../Framework/App/Config/DataInterface.php    |  1 +
 .../Magento/Framework/App/Config/Element.php  |  1 +
 .../App/Config/InitialConfigSource.php        |  2 +-
 .../Config/MutableScopeConfigInterface.php    |  1 +
 .../App/Config/ReinitableConfigInterface.php  |  1 +
 .../Framework/App/Config/Scope/Validator.php  |  2 +-
 .../App/Config/ScopeConfigInterface.php       |  1 +
 .../App/Config/Storage/WriterInterface.php    |  1 +
 .../Magento/Framework/App/Config/Value.php    |  2 +
 .../Magento/Framework/App/DocRootLocator.php  |  2 +-
 .../App/FrontControllerInterface.php          |  1 +
 .../Framework/App/Language/Dictionary.php     |  1 +
 .../Magento/Framework/App/ObjectManager.php   |  1 +
 .../App/ObjectManager/ConfigCache.php         |  2 +-
 .../App/ObjectManager/ConfigLoader.php        |  2 +-
 .../Framework/App/ObjectManagerFactory.php    |  3 +-
 .../App/PlainTextRequestInterface.php         |  4 +-
 .../App/ProductMetadataInterface.php          |  1 +
 .../Framework/App/ReinitableConfig.php        |  2 +-
 .../Request/PathInfoProcessorInterface.php    |  1 +
 .../Framework/App/RequestContentInterface.php |  2 +-
 .../Framework/App/RequestInterface.php        |  1 +
 .../Framework/App/RequestSafetyInterface.php  |  1 +
 .../Framework/App/ResourceConnection.php      |  2 +
 .../SourceProviderInterface.php               |  1 +
 .../Framework/App/Response/HttpInterface.php  | 17 ++++---
 .../Framework/App/ResponseInterface.php       |  1 +
 .../Magento/Framework/App/Route/Config.php    |  2 +-
 .../Framework/App/Route/ConfigInterface.php   |  1 +
 .../App/Rss/DataProviderInterface.php         |  1 +
 .../Magento/Framework/App/ScopeInterface.php  |  1 +
 lib/internal/Magento/Framework/App/State.php  |  3 +-
 .../Magento/Framework/App/StaticResource.php  |  2 +-
 .../Framework/App/TemplateTypesInterface.php  |  2 +-
 .../Magento/Framework/App/Utility/Files.php   |  2 +-
 .../Framework/App/View/Asset/Publisher.php    |  1 +
 .../Framework/App/View/Deployment/Version.php |  2 +-
 .../Magento/Framework/App/ViewInterface.php   |  3 +-
 .../Magento/Framework/AppInterface.php        |  1 +
 .../Framework/Archive/ArchiveInterface.php    |  1 +
 .../Authorization/PolicyInterface.php         |  1 +
 .../Authorization/RoleLocatorInterface.php    |  1 +
 .../Framework/AuthorizationInterface.php      |  1 +
 .../Framework/Backup/AbstractBackup.php       |  3 ++
 .../Framework/Backup/BackupException.php      |  1 +
 .../Framework/Backup/BackupInterface.php      |  3 +-
 lib/internal/Magento/Framework/Backup/Db.php  |  1 +
 .../Framework/Backup/Db/BackupDbInterface.php |  3 +-
 .../Framework/Backup/Db/BackupFactory.php     |  1 +
 .../Framework/Backup/Db/BackupInterface.php   |  3 +-
 .../Backup/Exception/CantLoadSnapshot.php     |  1 +
 .../Backup/Exception/FtpConnectionFailed.php  |  1 +
 .../Backup/Exception/FtpValidationFailed.php  |  1 +
 .../Backup/Exception/NotEnoughFreeSpace.php   |  1 +
 .../Backup/Exception/NotEnoughPermissions.php |  1 +
 .../Magento/Framework/Backup/Factory.php      |  1 +
 .../Magento/Framework/Backup/Filesystem.php   |  4 +-
 .../Filesystem/Rollback/AbstractRollback.php  |  1 +
 .../Backup/Filesystem/Rollback/Fs.php         |  2 +-
 .../Bulk/BulkManagementInterface.php          |  6 +--
 .../Framework/Bulk/BulkStatusInterface.php    | 10 ++--
 .../Framework/Bulk/BulkSummaryInterface.php   | 22 ++++----
 .../Framework/Bulk/OperationInterface.php     | 34 ++++++-------
 .../Bulk/OperationManagementInterface.php     |  4 +-
 .../Cache/Frontend/Decorator/TagScope.php     |  1 +
 .../Framework/Cache/FrontendInterface.php     |  1 +
 .../Code/Generator/DefinedClasses.php         |  2 +-
 .../Magento/Framework/Code/NameBuilder.php    |  1 +
 .../Code/Reader/SourceArgumentsReader.php     |  6 +--
 .../Config/Reader/XmlReader/Converter.php     |  2 +-
 .../Component/ComponentRegistrar.php          |  1 +
 .../Magento/Framework/Config/AbstractXml.php  |  1 +
 .../Framework/Config/CacheInterface.php       |  1 +
 .../Framework/Config/Composer/Package.php     |  1 +
 .../Config/ConfigOptionsListConstants.php     |  1 +
 .../Framework/Config/Converter/Dom/Flat.php   |  1 +
 .../Framework/Config/ConverterInterface.php   |  1 +
 .../Magento/Framework/Config/Data.php         |  1 +
 .../Framework/Config/Data/ConfigData.php      |  1 +
 .../Magento/Framework/Config/Data/Scoped.php  |  1 +
 .../Framework/Config/DataInterface.php        |  1 +
 lib/internal/Magento/Framework/Config/Dom.php |  3 +-
 .../Framework/Config/Dom/UrnResolver.php      |  1 +
 .../Config/Dom/ValidationException.php        |  1 +
 .../Config/Dom/ValidationSchemaException.php  |  2 +-
 .../Magento/Framework/Config/DomFactory.php   |  1 +
 .../Framework/Config/File/ConfigFilePool.php  |  7 +--
 .../Magento/Framework/Config/FileIterator.php |  1 +
 .../Framework/Config/FileIteratorFactory.php  |  1 +
 .../Magento/Framework/Config/FileResolver.php |  2 +-
 .../Config/FileResolverInterface.php          |  1 +
 .../Framework/Config/Reader/Filesystem.php    |  1 +
 .../Framework/Config/ReaderInterface.php      |  1 +
 .../Config/SchemaLocatorInterface.php         |  1 +
 .../Framework/Config/ScopeInterface.php       |  1 +
 .../Framework/Config/ScopeListInterface.php   |  1 +
 .../Magento/Framework/Config/Theme.php        |  1 +
 .../Config/ValidationStateInterface.php       |  1 +
 .../Magento/Framework/Config/View.php         |  1 +
 .../Console/CommandListInterface.php          |  1 +
 .../Framework/Controller/Result/Json.php      |  1 +
 .../Framework/Controller/Result/Redirect.php  |  1 +
 .../Controller/Result/RedirectFactory.php     |  1 +
 .../Framework/Controller/ResultFactory.php    |  1 +
 .../Framework/Controller/ResultInterface.php  |  1 +
 .../Instruction/MagentoImport.php             |  2 +-
 .../Magento/Framework/CurrencyInterface.php   |  1 +
 .../Framework/DB/Adapter/AdapterInterface.php |  1 +
 .../Framework/DB/Adapter/Pdo/Mysql.php        |  4 +-
 .../Magento/Framework/DB/Ddl/Table.php        |  1 +
 .../Magento/Framework/DB/Ddl/Trigger.php      |  1 +
 .../Framework/DB/Query/BatchRangeIterator.php |  2 +-
 .../Magento/Framework/DB/Query/Generator.php  |  2 +-
 lib/internal/Magento/Framework/DB/Select.php  |  1 +
 .../Magento/Framework/DB/SelectFactory.php    |  1 -
 .../DB/Sql/ColumnValueExpression.php          |  2 +-
 .../Framework/DB/TemporaryTableService.php    |  7 ++-
 lib/internal/Magento/Framework/DB/Tree.php    | 40 +++++++--------
 .../Magento/Framework/DB/Tree/Node.php        | 22 ++++----
 .../Magento/Framework/DB/Tree/NodeSet.php     | 18 +++----
 .../Framework/Data/AbstractSearchResult.php   |  2 +-
 .../Data/Argument/InterpreterInterface.php    |  1 +
 .../Magento/Framework/Data/Collection.php     |  1 +
 .../Framework/Data/Collection/AbstractDb.php  |  1 +
 .../Framework/Data/Collection/Filesystem.php  |  1 +
 lib/internal/Magento/Framework/Data/Form.php  |  1 +
 .../Data/Form/Element/AbstractElement.php     |  1 +
 .../Framework/Data/Form/Element/Fieldset.php  |  1 +
 .../Element/Renderer/RendererInterface.php    |  1 +
 .../Framework/Data/Form/Element/Select.php    |  1 +
 .../Data/Form/Filter/FilterInterface.php      |  1 +
 .../Magento/Framework/Data/Form/FormKey.php   |  1 +
 .../Framework/Data/Form/FormKey/Validator.php |  1 +
 .../Framework/Data/OptionSourceInterface.php  |  1 +
 lib/internal/Magento/Framework/Data/Tree.php  |  1 +
 .../Magento/Framework/Data/Tree/Node.php      |  1 +
 .../Framework/Data/Tree/Node/Collection.php   |  1 +
 .../Data/Wysiwyg/ConfigProviderInterface.php  |  2 +
 lib/internal/Magento/Framework/DataObject.php |  1 +
 .../Magento/Framework/DataObject/Copy.php     |  4 +-
 .../Magento/Framework/Encryption/Crypt.php    |  3 +-
 .../Encryption/EncryptorInterface.php         |  1 +
 .../Framework/Encryption/Helper/Security.php  |  1 +
 .../Magento/Framework/Encryption/UrlCoder.php |  1 +
 .../Framework/EntityManager/MetadataPool.php  |  1 -
 .../EntityManager/Operation/Create.php        |  2 +-
 lib/internal/Magento/Framework/Escaper.php    | 19 +++----
 lib/internal/Magento/Framework/Event.php      |  1 +
 .../Magento/Framework/Event/Observer.php      |  1 +
 .../Framework/Event/Observer/Collection.php   |  1 +
 .../Framework/Event/ObserverInterface.php     |  1 +
 .../Exception/AbstractAggregateException.php  |  2 +
 .../Exception/AggregateExceptionInterface.php |  2 +
 .../Exception/AlreadyExistsException.php      |  2 +-
 .../Exception/AuthenticationException.php     |  1 +
 .../Exception/AuthorizationException.php      |  1 +
 .../Framework/Exception/BulkException.php     |  3 ++
 .../Exception/CouldNotDeleteException.php     |  1 +
 .../Exception/CouldNotSaveException.php       |  1 +
 .../Framework/Exception/CronException.php     |  1 +
 .../Exception/EmailNotConfirmedException.php  |  1 +
 .../Exception/FileSystemException.php         |  1 +
 .../Framework/Exception/InputException.php    |  1 +
 .../Exception/IntegrationException.php        |  1 +
 .../InvalidEmailOrPasswordException.php       |  1 +
 .../Exception/LocalizedException.php          |  1 +
 .../Framework/Exception/MailException.php     |  1 +
 .../Exception/NoSuchEntityException.php       |  1 +
 .../Framework/Exception/NotFoundException.php |  1 +
 .../Framework/Exception/PaymentException.php  |  1 +
 .../Plugin/AuthenticationException.php        |  1 +
 .../RemoteServiceUnavailableException.php     |  1 +
 .../Exception/SerializationException.php      |  1 +
 .../Framework/Exception/SessionException.php  |  1 +
 .../Exception/State/ExpiredException.php      |  1 +
 .../Exception/State/InitException.php         |  1 +
 .../State/InputMismatchException.php          |  1 +
 .../State/InvalidTransitionException.php      |  1 +
 .../Exception/State/UserLockedException.php   |  1 +
 .../Framework/Exception/StateException.php    |  1 +
 .../TemporaryState/CouldNotSaveException.php  |  3 +-
 .../Exception/ValidatorException.php          |  1 +
 lib/internal/Magento/Framework/File/Csv.php   |  2 +-
 lib/internal/Magento/Framework/File/Size.php  |  1 +
 .../Magento/Framework/File/Uploader.php       |  4 +-
 lib/internal/Magento/Framework/Filesystem.php |  2 +
 .../Framework/Filesystem/Directory/Read.php   |  2 +
 .../Filesystem/Directory/ReadInterface.php    |  1 +
 .../Filesystem/Directory/WriteInterface.php   |  1 +
 .../Framework/Filesystem/DriverInterface.php  |  1 +
 .../Framework/Filesystem/File/ReadFactory.php |  1 +
 .../Filesystem/File/WriteFactory.php          |  1 +
 .../Filesystem/File/WriteInterface.php        |  1 +
 .../Framework/Filesystem/Io/IoInterface.php   |  1 +
 .../Framework/Filter/FilterManager.php        |  1 +
 .../Magento/Framework/Filter/Template.php     | 20 +++++---
 .../Magento/Framework/Filter/Truncate.php     |  2 +-
 .../Framework/HTTP/ClientInterface.php        |  1 +
 .../Framework/Image/Adapter/Config.php        |  4 +-
 .../Magento/Framework/Indexer/Action/Base.php | 20 ++++----
 .../Framework/Indexer/ActionInterface.php     |  1 +
 .../Indexer/BatchProviderInterface.php        |  6 +--
 .../Indexer/BatchSizeManagementInterface.php  |  4 +-
 .../Framework/Indexer/Config/Converter.php    |  2 +-
 .../Framework/Indexer/ConfigInterface.php     |  1 +
 .../Magento/Framework/Indexer/Dimension.php   |  3 ++
 .../Framework/Indexer/DimensionFactory.php    |  2 +
 .../Indexer/DimensionProviderInterface.php    |  2 +
 .../Indexer/DimensionalIndexerInterface.php   |  2 +
 .../Framework/Indexer/FieldsetInterface.php   |  1 +
 .../Framework/Indexer/FieldsetPool.php        |  1 +
 .../Framework/Indexer/HandlerInterface.php    |  1 +
 .../Magento/Framework/Indexer/HandlerPool.php |  1 +
 .../Framework/Indexer/IndexStructure.php      |  2 +-
 .../Indexer/IndexStructureInterface.php       |  1 +
 .../IndexTableRowSizeEstimatorInterface.php   |  4 +-
 .../Framework/Indexer/IndexerInterface.php    |  9 ++--
 .../Framework/Indexer/IndexerRegistry.php     |  1 +
 .../Indexer/SaveHandler/IndexerInterface.php  |  1 +
 .../Framework/Indexer/SaveHandlerFactory.php  |  1 +
 .../Framework/Indexer/StateInterface.php      |  1 +
 .../Framework/Interception/Config/Config.php  |  2 +-
 .../Interception/PluginList/PluginList.php    |  2 +-
 .../Magento/Framework/Json/Decoder.php        |  2 +-
 .../Framework/Json/DecoderInterface.php       |  3 +-
 .../Magento/Framework/Json/Encoder.php        |  2 +-
 .../Framework/Json/EncoderInterface.php       |  3 +-
 .../Magento/Framework/Json/Helper/Data.php    |  2 +-
 .../Framework/Locale/ConfigInterface.php      |  1 +
 .../Framework/Locale/CurrencyInterface.php    |  1 +
 .../Framework/Locale/FormatInterface.php      |  1 +
 .../Framework/Locale/ListsInterface.php       |  1 +
 .../Framework/Locale/ResolverInterface.php    |  1 +
 .../Framework/Lock/LockManagerInterface.php   |  4 ++
 .../Framework/Mail/MailMessageInterface.php   |  6 ++-
 .../Magento/Framework/Mail/Message.php        |  8 +--
 .../Framework/Mail/MessageInterface.php       |  7 +--
 .../Mail/Template/ConfigInterface.php         |  1 +
 .../Mail/Template/FactoryInterface.php        |  1 +
 .../Mail/Template/SenderResolverInterface.php |  1 +
 .../Mail/Template/TransportBuilder.php        |  4 +-
 .../Mail/Template/TransportBuilderByStore.php |  2 +-
 .../Framework/Mail/TemplateInterface.php      |  1 +
 .../Framework/Mail/TransportInterface.php     |  3 +-
 .../Magento/Framework/Math/Calculator.php     |  1 +
 .../Magento/Framework/Math/Division.php       |  1 +
 .../Framework/Math/FloatComparator.php        |  4 ++
 .../Magento/Framework/Math/Random.php         |  1 +
 .../Framework/Message/AbstractMessage.php     |  1 +
 .../Magento/Framework/Message/Collection.php  |  1 +
 .../Framework/Message/ManagerInterface.php    |  1 +
 .../Framework/Message/MessageInterface.php    |  1 +
 .../Framework/Message/PhraseFactory.php       |  2 +-
 .../Framework/MessageQueue/BatchConsumer.php  |  4 +-
 .../MessageQueue/Bulk/ExchangeFactory.php     |  7 ++-
 .../Bulk/ExchangeFactoryInterface.php         |  4 +-
 .../MessageQueue/Bulk/ExchangeInterface.php   |  4 +-
 .../RemoteServiceReader/Communication.php     |  2 +-
 .../RemoteServiceReader/MessageQueue.php      |  2 +-
 .../Code/Generator/RemoteServiceGenerator.php |  2 +-
 .../Magento/Framework/MessageQueue/Config.php |  2 +-
 .../Config/Consumer/ConfigReaderPlugin.php    |  2 +-
 .../Config/Publisher/ConfigReaderPlugin.php   |  2 +-
 .../MessageQueue/Config/Reader/Xml.php        |  2 +-
 .../Config/Reader/Xml/CompositeConverter.php  |  2 +-
 .../Reader/Xml/Converter/TopicConfig.php      |  2 +-
 .../Config/Reader/Xml/SchemaLocator.php       |  2 +-
 .../Config/Topology/ConfigReaderPlugin.php    |  2 +-
 .../MessageQueue/ConfigInterface.php          |  2 +-
 .../Framework/MessageQueue/Consumer.php       | 12 ++---
 .../MessageQueue/Consumer/ConfigInterface.php |  6 +--
 .../MessageQueue/ConsumerConfiguration.php    |  4 +-
 .../ConsumerConfigurationInterface.php        |  2 +-
 .../MessageQueue/ConsumerFactory.php          |  4 +-
 .../MessageQueue/ConsumerInterface.php        |  3 ++
 .../MessageQueue/EnvelopeInterface.php        |  4 ++
 .../MessageQueue/ExchangeFactory.php          |  7 ++-
 .../MessageQueue/ExchangeFactoryInterface.php |  4 +-
 .../MessageQueue/ExchangeInterface.php        |  3 ++
 .../MessageQueue/ExchangeRepository.php       |  2 +-
 .../Framework/MessageQueue/MessageEncoder.php |  2 +-
 .../MessageIdGeneratorInterface.php           |  4 +-
 .../MessageQueue/MessageLockException.php     |  2 +-
 .../MessageQueue/MessageValidator.php         |  2 +-
 .../Framework/MessageQueue/Publisher.php      |  4 +-
 .../Publisher/ConfigInterface.php             |  6 +--
 .../MessageQueue/PublisherInterface.php       |  3 ++
 .../Framework/MessageQueue/PublisherPool.php  | 13 +++--
 .../Framework/MessageQueue/QueueFactory.php   |  7 ++-
 .../MessageQueue/QueueFactoryInterface.php    |  4 +-
 .../Framework/MessageQueue/QueueInterface.php |  8 ++-
 .../MessageQueue/QueueRepository.php          |  2 +-
 .../Framework/MessageQueue/Rpc/Consumer.php   |  2 +-
 .../Framework/MessageQueue/Rpc/Publisher.php  |  4 +-
 .../MessageQueue/Topology/ConfigInterface.php |  8 +--
 .../Model/AbstractExtensibleModel.php         |  3 ++
 .../Magento/Framework/Model/AbstractModel.php | 11 ++--
 .../Model/ActionValidator/RemoveAction.php    |  1 +
 .../Magento/Framework/Model/Context.php       |  1 +
 .../Model/ResourceModel/AbstractResource.php  | 10 ++--
 .../Model/ResourceModel/Db/AbstractDb.php     |  1 +
 .../Db/Collection/AbstractCollection.php      |  1 +
 .../Db/ObjectRelationProcessor.php            |  1 +
 .../Db/TransactionManagerInterface.php        |  1 +
 .../Magento/Framework/Module/Dir/Reader.php   |  1 +
 .../Magento/Framework/Module/Manager.php      |  8 +--
 .../Framework/Module/ModuleResource.php       |  4 +-
 .../Framework/Module/Output/Config.php        | 10 ++--
 .../Module/Output/ConfigInterface.php         |  6 +--
 .../Framework/Module/Setup/Migration.php      |  3 +-
 .../Notification/MessageInterface.php         |  1 +
 .../Framework/Notification/MessageList.php    |  1 +
 .../Notification/NotifierInterface.php        |  1 +
 .../Framework/Notification/NotifierList.php   |  1 +
 .../Framework/Oauth/ConsumerInterface.php     |  1 +
 .../Magento/Framework/Oauth/Exception.php     |  1 +
 .../Oauth/NonceGeneratorInterface.php         |  1 +
 .../Framework/Oauth/OauthInputException.php   |  1 +
 .../Framework/Oauth/OauthInterface.php        |  1 +
 .../Oauth/TokenProviderInterface.php          |  1 +
 .../Code/Generator/Repository.php             |  3 +-
 .../Framework/ObjectManager/Config/Config.php |  2 +-
 .../ObjectManager/ContextInterface.php        |  1 +
 .../Framework/ObjectManagerInterface.php      |  1 +
 .../Framework/Option/ArrayInterface.php       |  2 +-
 lib/internal/Magento/Framework/Phrase.php     |  1 +
 .../Framework/Phrase/RendererInterface.php    |  1 +
 .../Adjustment/AdjustmentInterface.php        |  1 +
 .../Adjustment/CalculatorInterface.php        |  1 +
 .../Pricing/Adjustment/Collection.php         |  1 +
 .../Framework/Pricing/Adjustment/Pool.php     |  1 +
 .../Pricing/Amount/AmountFactory.php          |  1 +
 .../Pricing/Amount/AmountInterface.php        |  1 +
 .../Magento/Framework/Pricing/Helper/Data.php |  1 +
 .../Framework/Pricing/Price/AbstractPrice.php |  1 +
 .../Price/BasePriceProviderInterface.php      |  1 +
 .../Framework/Pricing/Price/Collection.php    |  1 +
 .../Magento/Framework/Pricing/Price/Pool.php  |  1 +
 .../Pricing/Price/PriceInterface.php          |  1 +
 .../Pricing/PriceCurrencyInterface.php        |  3 +-
 .../Framework/Pricing/PriceInfo/Base.php      |  1 +
 .../Framework/Pricing/PriceInfo/Factory.php   |  1 +
 .../Framework/Pricing/PriceInfoInterface.php  |  1 +
 .../Magento/Framework/Pricing/Render.php      |  1 +
 .../Render/AdjustmentRenderInterface.php      |  1 +
 .../Pricing/Render/AmountRenderInterface.php  |  1 +
 .../Render/PriceBoxRenderInterface.php        |  1 +
 .../Framework/Pricing/Render/RendererPool.php |  1 +
 .../Framework/Pricing/SaleableInterface.php   |  1 +
 lib/internal/Magento/Framework/Profiler.php   |  1 +
 .../Framework/Profiler/DriverInterface.php    |  1 +
 .../Reflection/DataObjectProcessor.php        |  1 +
 .../Framework/Reflection/MethodsMap.php       |  2 +-
 lib/internal/Magento/Framework/Registry.php   |  9 ++--
 .../Search/Adapter/Mysql/ConditionManager.php |  3 +-
 .../Search/Adapter/Mysql/TemporaryStorage.php |  3 +-
 .../Adapter/Mysql/TemporaryStorageFactory.php |  3 +-
 .../Framework/Search/Dynamic/Algorithm.php    |  1 +
 .../Search/Dynamic/Algorithm/Repository.php   |  1 +
 .../Search/Dynamic/DataProviderFactory.php    |  1 +
 .../Search/Dynamic/DataProviderInterface.php  |  1 +
 .../Search/Dynamic/EntityStorage.php          |  1 +
 .../Search/Dynamic/EntityStorageFactory.php   |  1 +
 .../Search/Dynamic/IntervalFactory.php        |  1 +
 .../Search/Dynamic/IntervalInterface.php      |  1 +
 .../Search/EngineResolverInterface.php        |  2 +
 .../Framework/Search/EntityMetadata.php       |  1 +
 .../Magento/Framework/Search/Request.php      |  4 +-
 .../Request/Aggregation/DynamicBucket.php     |  1 +
 .../Framework/Search/Request/Binder.php       |  1 +
 .../Search/Request/BucketInterface.php        |  1 +
 .../Framework/Search/Request/Builder.php      |  2 +
 .../Framework/Search/Request/Cleaner.php      |  1 +
 .../Framework/Search/Request/Dimension.php    |  1 +
 .../Search/Request/Filter/BoolExpression.php  |  1 +
 .../Framework/Search/Request/Filter/Range.php |  1 +
 .../Framework/Search/Request/Filter/Term.php  |  1 +
 .../Search/Request/Filter/Wildcard.php        |  1 +
 .../Search/Request/FilterInterface.php        |  1 +
 .../Framework/Search/Request/Mapper.php       |  1 +
 .../Search/Request/Query/BoolExpression.php   |  1 +
 .../Framework/Search/Request/Query/Filter.php |  1 +
 .../Framework/Search/Request/Query/Match.php  |  1 +
 .../Search/Request/QueryInterface.php         |  1 +
 .../Framework/Search/RequestInterface.php     |  1 +
 .../Framework/Search/Response/Aggregation.php |  1 +
 .../Search/Response/QueryResponse.php         |  4 +-
 .../Framework/Serialize/Serializer/Json.php   |  6 +--
 .../Serialize/Serializer/JsonHexTag.php       |  4 +-
 .../Serialize/SerializerInterface.php         |  6 +--
 .../Magento/Framework/Session/Generic.php     |  1 +
 .../Session/SessionManagerInterface.php       |  1 +
 .../Magento/Framework/Session/SidResolver.php |  6 +--
 .../Setup/Declaration/Schema/Diff/Diff.php    |  6 +++
 .../Schema/Dto/ElementInterface.php           |  4 ++
 .../Framework/Setup/InstallDataInterface.php  |  1 +
 .../Setup/InstallSchemaInterface.php          |  1 +
 .../Framework/Setup/LoggerInterface.php       |  1 +
 .../Setup/ModuleContextInterface.php          |  1 +
 .../Setup/ModuleDataSetupInterface.php        |  1 +
 .../Framework/Setup/SchemaSetupInterface.php  |  1 +
 .../Framework/Setup/SetupInterface.php        |  1 +
 .../Framework/Setup/UninstallInterface.php    |  1 +
 .../Framework/Setup/UpgradeDataInterface.php  |  1 +
 .../Setup/UpgradeSchemaInterface.php          |  1 +
 .../Shell/CommandRendererInterface.php        |  1 +
 .../Magento/Framework/ShellInterface.php      |  1 +
 .../Magento/Framework/Simplexml/Config.php    |  1 +
 .../Magento/Framework/Simplexml/Element.php   |  1 +
 .../Magento/Framework/Stdlib/ArrayUtils.php   |  5 +-
 .../Magento/Framework/Stdlib/BooleanUtils.php |  3 +-
 .../Stdlib/Cookie/CookieMetadata.php          |  1 +
 .../Stdlib/Cookie/CookieMetadataFactory.php   |  1 +
 .../Stdlib/Cookie/CookieReaderInterface.php   |  1 +
 .../Stdlib/Cookie/CookieScopeInterface.php    |  1 +
 .../CookieSizeLimitReachedException.php       |  1 +
 .../Stdlib/Cookie/FailureToSendException.php  |  1 +
 .../Stdlib/Cookie/PublicCookieMetadata.php    |  1 +
 .../Stdlib/Cookie/SensitiveCookieMetadata.php |  1 +
 .../Stdlib/CookieManagerInterface.php         |  1 +
 .../Magento/Framework/Stdlib/DateTime.php     |  5 +-
 .../Framework/Stdlib/DateTime/DateTime.php    |  1 +
 .../DateTime/DateTimeFormatterInterface.php   |  1 +
 .../Framework/Stdlib/DateTime/Filter/Date.php |  1 +
 .../Stdlib/DateTime/Filter/DateTime.php       |  1 +
 .../Stdlib/DateTime/Timezone/Validator.php    |  1 +
 .../Stdlib/DateTime/TimezoneInterface.php     |  1 +
 .../Magento/Framework/Stdlib/StringUtils.php  |  1 +
 lib/internal/Magento/Framework/Translate.php  |  4 +-
 .../Framework/Translate/AdapterInterface.php  |  1 +
 .../Translate/Inline/ConfigInterface.php      |  1 +
 .../Translate/Inline/ParserInterface.php      |  1 +
 .../Translate/Inline/StateInterface.php       |  1 +
 .../Framework/Translate/InlineInterface.php   |  1 +
 .../Framework/Translate/ResourceInterface.php |  1 +
 .../Framework/Unserialize/Unserialize.php     |  2 +-
 lib/internal/Magento/Framework/Url.php        |  6 +--
 .../Framework/Url/DecoderInterface.php        |  1 +
 .../Framework/Url/EncoderInterface.php        |  1 +
 .../Url/QueryParamsResolverInterface.php      |  1 +
 .../Framework/Url/RouteParamsResolver.php     |  2 +-
 .../Url/RouteParamsResolverInterface.php      |  1 +
 .../Magento/Framework/Url/ScopeInterface.php  |  1 +
 .../Framework/Url/ScopeResolverInterface.php  |  1 +
 .../Framework/Url/SecurityInfoInterface.php   |  1 +
 .../Magento/Framework/UrlInterface.php        |  1 +
 .../Validation/ValidationException.php        |  2 +
 .../Framework/Validation/ValidationResult.php |  3 ++
 lib/internal/Magento/Framework/Validator.php  |  1 +
 .../Framework/Validator/AbstractValidator.php |  1 +
 .../Framework/Validator/Constraint.php        |  1 +
 .../Framework/Validator/DataObject.php        |  1 +
 .../Magento/Framework/Validator/Exception.php |  1 +
 .../Validator/ValidatorInterface.php          |  1 +
 .../Framework/View/Asset/AssetInterface.php   |  3 +-
 .../Magento/Framework/View/Asset/Bundle.php   |  2 +-
 .../Framework/View/Asset/Bundle/Config.php    |  2 +-
 .../View/Asset/Bundle/ConfigInterface.php     |  2 +-
 .../Framework/View/Asset/Bundle/Manager.php   |  2 +-
 .../Framework/View/Asset/ConfigInterface.php  |  1 +
 .../View/Asset/ContentProcessorException.php  |  1 +
 .../Magento/Framework/View/Asset/File.php     |  3 +-
 .../View/Asset/File/FallbackContext.php       |  1 +
 .../View/Asset/File/NotFoundException.php     |  1 +
 .../View/Asset/GroupedCollection.php          |  1 +
 .../Framework/View/Asset/LocalInterface.php   |  1 +
 .../View/Asset/MergeStrategy/Checksum.php     |  2 +-
 .../Framework/View/Asset/Minification.php     |  1 +
 .../AlternativeSourceInterface.php            |  1 +
 .../View/Asset/PreProcessor/Chain.php         |  1 +
 .../View/Asset/PreProcessor/ChainFactory.php  |  1 +
 .../PreProcessor/ChainFactoryInterface.php    |  1 +
 .../View/Asset/PreProcessorInterface.php      |  1 +
 .../Framework/View/Asset/Repository.php       |  3 +-
 .../Magento/Framework/View/Asset/Source.php   |  2 +-
 .../Framework/View/ConfigInterface.php        |  1 +
 .../Magento/Framework/View/Context.php        |  1 +
 .../View/Design/Fallback/Rule/Theme.php       |  2 +-
 .../Design/Theme/FileProviderInterface.php    |  1 +
 .../View/Design/Theme/Label/ListInterface.php |  1 +
 .../View/Design/Theme/ListInterface.php       |  1 +
 .../Framework/View/Design/ThemeInterface.php  |  1 +
 .../Framework/View/Element/AbstractBlock.php  | 27 +++++-----
 .../View/Element/Block/ArgumentInterface.php  |  1 +
 .../Framework/View/Element/BlockFactory.php   |  1 +
 .../Framework/View/Element/BlockInterface.php |  1 +
 .../Framework/View/Element/Context.php        |  2 +
 .../Framework/View/Element/FormKey.php        |  1 +
 .../Framework/View/Element/Html/Calendar.php  |  1 +
 .../Framework/View/Element/Html/Link.php      |  1 +
 .../View/Element/Html/Link/Current.php        |  1 +
 .../Framework/View/Element/Html/Links.php     |  1 +
 .../Framework/View/Element/Js/Components.php  |  1 +
 .../Framework/View/Element/Js/Cookie.php      |  1 +
 .../Framework/View/Element/Messages.php       |  1 +
 .../View/Element/RendererInterface.php        |  1 +
 .../Framework/View/Element/RendererList.php   |  1 +
 .../Framework/View/Element/Template.php       |  1 +
 .../View/Element/Template/Context.php         |  1 +
 .../Magento/Framework/View/Element/Text.php   |  1 +
 .../Framework/View/Element/Text/ListText.php  |  1 +
 .../UiComponent/Config/ManagerInterface.php   |  2 +-
 .../Config/Provider/Component/Definition.php  |  2 +-
 .../UiComponent/Config/Provider/Template.php  |  2 +-
 .../DataProvider/DataProviderInterface.php    |  1 +
 .../UiComponent/DataProvider/FilterPool.php   |  1 +
 .../UiComponent/DataProvider/SearchResult.php |  2 +-
 .../View/Element/UiComponentFactory.php       |  3 +-
 .../View/Element/UiComponentInterface.php     |  1 +
 .../View/File/CollectorInterface.php          |  1 +
 .../Magento/Framework/View/FileSystem.php     |  1 +
 .../View/Layout/BuilderInterface.php          |  1 +
 .../Framework/View/Layout/Data/Structure.php  |  1 +
 .../Magento/Framework/View/Layout/Element.php |  1 +
 .../View/Layout/Generator/Context.php         |  1 +
 .../Framework/View/Layout/GeneratorPool.php   |  3 +-
 .../Framework/View/Layout/Reader/Block.php    |  2 +-
 .../Framework/View/Layout/Reader/Context.php  |  1 +
 .../View/Layout/ScheduledStructure.php        |  5 +-
 .../Framework/View/LayoutInterface.php        |  1 +
 .../Magento/Framework/View/Page/Config.php    |  3 ++
 .../Framework/View/Page/Config/Structure.php  |  5 +-
 .../Framework/View/Page/FaviconInterface.php  |  1 +
 .../Magento/Framework/View/Page/Title.php     |  1 +
 .../Framework/View/Render/RenderFactory.php   |  1 +
 .../Framework/View/RenderInterface.php        |  1 +
 .../Magento/Framework/View/Result/Layout.php  |  1 +
 .../Framework/View/Result/LayoutFactory.php   |  1 +
 .../Magento/Framework/View/Result/Page.php    |  1 +
 .../Framework/View/Result/PageFactory.php     |  1 +
 .../View/Template/Html/MinifierInterface.php  |  1 +
 .../Xhtml/CompilerInterface.php               |  1 +
 .../Framework/View/TemplateEnginePool.php     |  1 +
 .../Framework/View/Url/ConfigInterface.php    |  1 +
 .../Framework/View/Url/CssResolver.php        |  1 +
 .../Framework/Webapi/Authorization.php        |  1 -
 .../CustomAttributeTypeLocatorInterface.php   |  2 +-
 .../Framework/Webapi/ErrorProcessor.php       |  1 +
 .../Webapi/Rest/Request/Deserializer/Json.php |  2 +-
 .../Rest/Request/ParamOverriderInterface.php  |  1 +
 .../Rest/Response/RendererInterface.php       |  1 +
 .../Webapi/ServiceInputProcessor.php          |  1 +
 .../Webapi/ServiceOutputProcessor.php         |  1 +
 .../ServicePayloadConverterInterface.php      |  1 +
 1273 files changed, 2390 insertions(+), 1334 deletions(-)

diff --git a/app/code/Magento/AdminNotification/Block/System/Messages.php b/app/code/Magento/AdminNotification/Block/System/Messages.php
index c9b3a0b8844cc..c99a71a51e6ea 100644
--- a/app/code/Magento/AdminNotification/Block/System/Messages.php
+++ b/app/code/Magento/AdminNotification/Block/System/Messages.php
@@ -26,7 +26,7 @@ class Messages extends Template
 
     /**
      * @var JsonDataHelper
-     * @deprecated
+     * @deprecated 100.3.0
      */
     protected $jsonHelper;
 
diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php
index d58a7ec31f77d..f3d3cd64ddc64 100644
--- a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php
+++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php
@@ -17,7 +17,7 @@ class ListAction extends \Magento\Backend\App\AbstractAction
 
     /**
      * @var \Magento\Framework\Json\Helper\Data
-     * @deprecated
+     * @deprecated 100.3.0
      */
     protected $jsonHelper;
 
diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php b/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php
index 39009e5c7b4e3..27e2713995653 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php
@@ -381,7 +381,7 @@ private function prepareExportData(
      * @param array $exportData
      * @return array
      * @SuppressWarnings(PHPMD.UnusedLocalVariable)
-     * @deprecated
+     * @deprecated 100.3.0
      * @see prepareExportData
      */
     protected function correctExportData($exportData)
@@ -510,7 +510,7 @@ private function fetchTierPrices(array $productIds): array
      * @return array|bool
      * @SuppressWarnings(PHPMD.NPathComplexity)
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
-     * @deprecated
+     * @deprecated 100.3.0
      * @see fetchTierPrices
      */
     protected function getTierPrices(array $listSku, $table)
diff --git a/app/code/Magento/AdvancedSearch/Model/Client/ClientResolver.php b/app/code/Magento/AdvancedSearch/Model/Client/ClientResolver.php
index 84933c8584bb3..33e99a0a0d0ee 100644
--- a/app/code/Magento/AdvancedSearch/Model/Client/ClientResolver.php
+++ b/app/code/Magento/AdvancedSearch/Model/Client/ClientResolver.php
@@ -20,7 +20,7 @@ class ClientResolver
      *
      * @var ScopeConfigInterface
      * @since 100.1.0
-     * @deprecated since it is not used anymore
+     * @deprecated 100.3.0 since it is not used anymore
      */
     protected $scopeConfig;
 
@@ -56,14 +56,14 @@ class ClientResolver
      *
      * @var string
      * @since 100.1.0
-     * @deprecated since it is not used anymore
+     * @deprecated 100.3.0 since it is not used anymore
      */
     protected $path;
 
     /**
      * Config Scope
      * @since 100.1.0
-     * @deprecated since it is not used anymore
+     * @deprecated 100.3.0 since it is not used anymore
      */
     protected $scope;
 
diff --git a/app/code/Magento/Analytics/Model/Connector/Http/ConverterInterface.php b/app/code/Magento/Analytics/Model/Connector/Http/ConverterInterface.php
index ddd9fcba21109..f6abb0f1ab2d1 100644
--- a/app/code/Magento/Analytics/Model/Connector/Http/ConverterInterface.php
+++ b/app/code/Magento/Analytics/Model/Connector/Http/ConverterInterface.php
@@ -9,6 +9,7 @@
  * Represents converter interface for http request and response body.
  *
  * @api
+ * @since 100.2.0
  */
 interface ConverterInterface
 {
@@ -16,6 +17,7 @@ interface ConverterInterface
      * @param string $body
      *
      * @return array
+     * @since 100.2.0
      */
     public function fromBody($body);
 
@@ -23,16 +25,19 @@ public function fromBody($body);
      * @param array $data
      *
      * @return string
+     * @since 100.2.0
      */
     public function toBody(array $data);
 
     /**
      * @return string
+     * @since 100.2.0
      */
     public function getContentTypeHeader();
 
     /**
      * @return string
+     * @since 100.3.0
      */
     public function getContentMediaType(): string;
 }
diff --git a/app/code/Magento/Analytics/ReportXml/Query.php b/app/code/Magento/Analytics/ReportXml/Query.php
index edf5ed08ee55f..b7c31d4334e20 100644
--- a/app/code/Magento/Analytics/ReportXml/Query.php
+++ b/app/code/Magento/Analytics/ReportXml/Query.php
@@ -81,7 +81,6 @@ public function getConfig()
      * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
      * @return mixed data which can be serialized by <b>json_encode</b>,
      * which is a value of any type other than a resource.
-     * @since 5.4.0
      */
     public function jsonSerialize()
     {
diff --git a/app/code/Magento/AsynchronousOperations/Api/BulkStatusInterface.php b/app/code/Magento/AsynchronousOperations/Api/BulkStatusInterface.php
index 76410794900e2..b40fdf19d466f 100644
--- a/app/code/Magento/AsynchronousOperations/Api/BulkStatusInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/BulkStatusInterface.php
@@ -14,6 +14,7 @@
  * Bulk summary data with list of operations items short data.
  *
  * @api
+ * @since 100.2.3
  */
 interface BulkStatusInterface extends \Magento\Framework\Bulk\BulkStatusInterface
 {
@@ -23,6 +24,7 @@ interface BulkStatusInterface extends \Magento\Framework\Bulk\BulkStatusInterfac
      * @param string $bulkUuid
      * @return \Magento\AsynchronousOperations\Api\Data\DetailedBulkOperationsStatusInterface
      * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @since 100.2.3
      */
     public function getBulkDetailedStatus($bulkUuid);
 
@@ -32,6 +34,7 @@ public function getBulkDetailedStatus($bulkUuid);
      * @param string $bulkUuid
      * @return \Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface
      * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @since 100.2.3
      */
     public function getBulkShortStatus($bulkUuid);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/AsyncResponseInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/AsyncResponseInterface.php
index c7edd5c8ff9cd..c0390e40899e8 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/AsyncResponseInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/AsyncResponseInterface.php
@@ -13,6 +13,7 @@
  * Temporary data object to give response from webapi async router
  *
  * @api
+ * @since 100.2.3
  */
 interface AsyncResponseInterface
 {
@@ -24,6 +25,7 @@ interface AsyncResponseInterface
      * Gets the bulk uuid.
      *
      * @return string Bulk Uuid.
+     * @since 100.2.3
      */
     public function getBulkUuid();
 
@@ -32,6 +34,7 @@ public function getBulkUuid();
      *
      * @param string $bulkUuid
      * @return $this
+     * @since 100.2.3
      */
     public function setBulkUuid($bulkUuid);
 
@@ -39,6 +42,7 @@ public function setBulkUuid($bulkUuid);
      * Gets the list of request items with status data.
      *
      * @return \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[]
+     * @since 100.2.3
      */
     public function getRequestItems();
 
@@ -47,12 +51,14 @@ public function getRequestItems();
      *
      * @param \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[] $requestItems
      * @return $this
+     * @since 100.2.3
      */
     public function setRequestItems($requestItems);
 
     /**
      * @param bool $isErrors
      * @return $this
+     * @since 100.2.3
      */
     public function setErrors($isErrors = false);
 
@@ -60,6 +66,7 @@ public function setErrors($isErrors = false);
      * Is there errors during processing bulk
      *
      * @return boolean
+     * @since 100.2.3
      */
     public function isErrors();
 
@@ -67,6 +74,7 @@ public function isErrors();
      * Retrieve existing extension attributes object.
      *
      * @return \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface|null
+     * @since 100.2.3
      */
     public function getExtensionAttributes();
 
@@ -75,6 +83,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
      * @return $this
+     * @since 100.2.3
      */
     public function setExtensionAttributes(
         \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/BulkOperationsStatusInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/BulkOperationsStatusInterface.php
index f8b7e389d387d..5fedf675e5579 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/BulkOperationsStatusInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/BulkOperationsStatusInterface.php
@@ -14,6 +14,7 @@
  * Bulk summary data with list of operations items summary data.
  *
  * @api
+ * @since 100.2.3
  */
 interface BulkOperationsStatusInterface extends BulkSummaryInterface
 {
@@ -24,6 +25,7 @@ interface BulkOperationsStatusInterface extends BulkSummaryInterface
      * Retrieve list of operation with statuses (short data).
      *
      * @return \Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface[]
+     * @since 100.2.3
      */
     public function getOperationsList();
 
@@ -32,6 +34,7 @@ public function getOperationsList();
      *
      * @param \Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface[] $operationStatusList
      * @return $this
+     * @since 100.2.3
      */
     public function setOperationsList($operationStatusList);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/BulkSummaryInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/BulkSummaryInterface.php
index a433ec0953a83..5e2cff0b6da3d 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/BulkSummaryInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/BulkSummaryInterface.php
@@ -38,6 +38,7 @@ public function setExtensionAttributes(
      * Get user type
      *
      * @return int
+     * @since 100.3.0
      */
     public function getUserType();
 
@@ -46,6 +47,7 @@ public function getUserType();
      *
      * @param int $userType
      * @return $this
+     * @since 100.3.0
      */
     public function setUserType($userType);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/DetailedBulkOperationsStatusInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/DetailedBulkOperationsStatusInterface.php
index 6e39177630857..62bead9f9956e 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/DetailedBulkOperationsStatusInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/DetailedBulkOperationsStatusInterface.php
@@ -14,6 +14,7 @@
  * Bulk summary data with list of operations items full data.
  *
  * @api
+ * @since 100.2.3
  */
 interface DetailedBulkOperationsStatusInterface extends BulkSummaryInterface
 {
@@ -24,6 +25,7 @@ interface DetailedBulkOperationsStatusInterface extends BulkSummaryInterface
      * Retrieve operations list.
      *
      * @return \Magento\AsynchronousOperations\Api\Data\OperationInterface[]
+     * @since 100.2.3
      */
     public function getOperationsList();
 
@@ -32,6 +34,7 @@ public function getOperationsList();
      *
      * @param \Magento\AsynchronousOperations\Api\Data\OperationInterface[] $operationStatusList
      * @return $this
+     * @since 100.2.3
      */
     public function setOperationsList($operationStatusList);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/ItemStatusInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/ItemStatusInterface.php
index 3294078c2c1ea..8919e87c55bec 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/ItemStatusInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/ItemStatusInterface.php
@@ -14,6 +14,7 @@
  * Indicate if entity param was Accepted|Rejected to bulk schedule
  *
  * @api
+ * @since 100.2.3
  */
 interface ItemStatusInterface
 {
@@ -30,6 +31,7 @@ interface ItemStatusInterface
      * Get entity Id.
      *
      * @return int
+     * @since 100.2.3
      */
     public function getId();
 
@@ -38,6 +40,7 @@ public function getId();
      *
      * @param int $entityId
      * @return $this
+     * @since 100.2.3
      */
     public function setId($entityId);
 
@@ -45,6 +48,7 @@ public function setId($entityId);
      * Get hash of entity data.
      *
      * @return string md5 hash of entity params array.
+     * @since 100.2.3
      */
     public function getDataHash();
 
@@ -53,6 +57,7 @@ public function getDataHash();
      *
      * @param string $hash md5 hash of entity params array.
      * @return $this
+     * @since 100.2.3
      */
     public function setDataHash($hash);
 
@@ -60,6 +65,7 @@ public function setDataHash($hash);
      * Get status.
      *
      * @return string accepted|rejected
+     * @since 100.2.3
      */
     public function getStatus();
 
@@ -68,6 +74,7 @@ public function getStatus();
      *
      * @param string $status accepted|rejected
      * @return $this
+     * @since 100.2.3
      */
     public function setStatus($status = self::STATUS_ACCEPTED);
 
@@ -75,6 +82,7 @@ public function setStatus($status = self::STATUS_ACCEPTED);
      * Get error information.
      *
      * @return string|null
+     * @since 100.2.3
      */
     public function getErrorMessage();
 
@@ -83,6 +91,7 @@ public function getErrorMessage();
      *
      * @param string|null|\Exception $error
      * @return $this
+     * @since 100.2.3
      */
     public function setErrorMessage($error = null);
 
@@ -90,6 +99,7 @@ public function setErrorMessage($error = null);
      * Get error code.
      *
      * @return int|null
+     * @since 100.2.3
      */
     public function getErrorCode();
 
@@ -98,6 +108,7 @@ public function getErrorCode();
      *
      * @param int|null|\Exception $errorCode Default: null
      * @return $this
+     * @since 100.2.3
      */
     public function setErrorCode($errorCode = null);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/OperationSearchResultsInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/OperationSearchResultsInterface.php
index c3d221b7ef4f8..f8e1457366777 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/OperationSearchResultsInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/OperationSearchResultsInterface.php
@@ -13,6 +13,7 @@
  *
  * An bulk is a group of queue messages. An bulk operation item is a queue message.
  * @api
+ * @since 100.3.0
  */
 interface OperationSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
 {
@@ -20,6 +21,7 @@ interface OperationSearchResultsInterface extends \Magento\Framework\Api\SearchR
      * Get list of operations.
      *
      * @return \Magento\AsynchronousOperations\Api\Data\OperationInterface[]
+     * @since 100.3.0
      */
     public function getItems();
 
@@ -28,6 +30,7 @@ public function getItems();
      *
      * @param \Magento\AsynchronousOperations\Api\Data\OperationInterface[] $items
      * @return $this
+     * @since 100.3.0
      */
     public function setItems(array $items);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/Data/SummaryOperationStatusInterface.php b/app/code/Magento/AsynchronousOperations/Api/Data/SummaryOperationStatusInterface.php
index 3b9f53b34162a..051dbd955c4a9 100644
--- a/app/code/Magento/AsynchronousOperations/Api/Data/SummaryOperationStatusInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/Data/SummaryOperationStatusInterface.php
@@ -15,6 +15,7 @@
  * without serialized_data and result_serialized_data
  *
  * @api
+ * @since 100.2.3
  */
 interface SummaryOperationStatusInterface
 {
@@ -22,6 +23,7 @@ interface SummaryOperationStatusInterface
      * Operation id
      *
      * @return int
+     * @since 100.2.3
      */
     public function getId();
 
@@ -31,6 +33,7 @@ public function getId();
      * OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED
      *
      * @return int
+     * @since 100.2.3
      */
     public function getStatus();
 
@@ -38,6 +41,7 @@ public function getStatus();
      * Get result message
      *
      * @return string
+     * @since 100.2.3
      */
     public function getResultMessage();
 
@@ -45,6 +49,7 @@ public function getResultMessage();
      * Get error code
      *
      * @return int
+     * @since 100.2.3
      */
     public function getErrorCode();
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/OperationRepositoryInterface.php b/app/code/Magento/AsynchronousOperations/Api/OperationRepositoryInterface.php
index 17547321b827f..6cb6a93143918 100644
--- a/app/code/Magento/AsynchronousOperations/Api/OperationRepositoryInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/OperationRepositoryInterface.php
@@ -13,6 +13,7 @@
  *
  * An bulk is a group of queue messages. An bulk operation item is a queue message.
  * @api
+ * @since 100.3.0
  */
 interface OperationRepositoryInterface
 {
@@ -21,6 +22,7 @@ interface OperationRepositoryInterface
      *
      * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
      * @return \Magento\AsynchronousOperations\Api\Data\OperationSearchResultsInterface
+     * @since 100.3.0
      */
     public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php b/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php
index 8563ab6541a0c..12abdc04bb165 100644
--- a/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Api/SaveMultipleOperationsInterface.php
@@ -14,6 +14,7 @@
  * Interface for saving multiple operations
  *
  * @api
+ * @since 100.4.0
  */
 interface SaveMultipleOperationsInterface
 {
@@ -22,6 +23,7 @@ interface SaveMultipleOperationsInterface
      *
      * @param OperationInterface[] $operations
      * @return void
+     * @since 100.4.0
      */
     public function execute(array $operations): void;
 }
diff --git a/app/code/Magento/AsynchronousOperations/Model/ConfigInterface.php b/app/code/Magento/AsynchronousOperations/Model/ConfigInterface.php
index de0f89a71650a..593ab52bbdf29 100644
--- a/app/code/Magento/AsynchronousOperations/Model/ConfigInterface.php
+++ b/app/code/Magento/AsynchronousOperations/Model/ConfigInterface.php
@@ -15,6 +15,7 @@
  * Class for accessing to Webapi_Async configuration.
  *
  * @api
+ * @since 100.2.3
  */
 interface ConfigInterface
 {
@@ -45,6 +46,7 @@ interface ConfigInterface
      * Get array of generated topics name and related to this topic service class and methods
      *
      * @return array
+     * @since 100.2.3
      */
     public function getServices();
 
@@ -55,6 +57,7 @@ public function getServices();
      * @param string $httpMethod GET|POST|PUT|DELETE
      * @return string
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @since 100.2.3
      */
     public function getTopicName($routeUrl, $httpMethod);
 }
diff --git a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
index bbf8bde36e11d..6757b0c8f0a5c 100644
--- a/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
+++ b/app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/OperationRepository.php
@@ -76,7 +76,7 @@ public function __construct(
      * @param string $operationId
      * @return OperationInterface
      * @throws LocalizedException
-     * @deprecated No longer used.
+     * @deprecated 100.4.0 No longer used.
      * @see create()
      */
     public function createByTopic($topicName, $entityParams, $groupId, $operationId)
diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php
index c6d6c9fc5f8a8..0e0b34f168c05 100644
--- a/app/code/Magento/Backend/App/AbstractAction.php
+++ b/app/code/Magento/Backend/App/AbstractAction.php
@@ -21,7 +21,7 @@
 /**
  * Generic backend controller
  *
- * @deprecated Use \Magento\Framework\App\ActionInterface
+ * @deprecated 102.0.0 Use \Magento\Framework\App\ActionInterface
  *
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php
index 28d3eeae9a1c6..511e393610b1e 100644
--- a/app/code/Magento/Backend/Block/Dashboard.php
+++ b/app/code/Magento/Backend/Block/Dashboard.php
@@ -9,7 +9,7 @@
 
 /**
  * Class used to initialize layout for MBO Dashboard
- * @deprecated dashboard graphs were migrated to dynamic chart.js solution
+ * @deprecated 102.0.0 dashboard graphs were migrated to dynamic chart.js solution
  * @see dashboard in adminhtml_dashboard_index.xml
  *
  * @api
diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php
index db95a64636c3a..7811ee948f763 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Graph.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php
@@ -77,7 +77,7 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard
     /**
      * Google chart api data encoding
      *
-     * @deprecated since the Google Image Charts API not accessible from March 14, 2019
+     * @deprecated 101.0.2 since the Google Image Charts API not accessible from March 14, 2019
      * @var string
      */
     protected $_encoding = 'e';
diff --git a/app/code/Magento/Backend/Block/Dashboard/Grids.php b/app/code/Magento/Backend/Block/Dashboard/Grids.php
index f40aaaf33fed7..9820d8b868d86 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Grids.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Grids.php
@@ -15,6 +15,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Grids extends Tabs
 {
diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
index 8b3574e223236..dd21a215ea6fe 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
@@ -16,6 +16,7 @@
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
+ * @since 100.0.2
  */
 class Grid extends \Magento\Backend\Block\Dashboard\Grid
 {
diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php
index ebe0932c3fa3b..098580b1369e9 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Sales.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php
@@ -16,6 +16,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Sales extends Bar
 {
diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php
index 7da109c2fb602..73e6bc1ab9e8a 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Totals.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php
@@ -17,6 +17,7 @@
 /**
  * Adminhtml dashboard totals bar
  * @api
+ * @since 100.0.2
  */
 class Totals extends Bar
 {
diff --git a/app/code/Magento/Backend/Block/Media/Uploader.php b/app/code/Magento/Backend/Block/Media/Uploader.php
index e95b6397cd244..40cc68e04bf51 100644
--- a/app/code/Magento/Backend/Block/Media/Uploader.php
+++ b/app/code/Magento/Backend/Block/Media/Uploader.php
@@ -46,7 +46,7 @@ class Uploader extends \Magento\Backend\Block\Widget
 
     /**
      * @var UploadConfigInterface
-     * @deprecated
+     * @deprecated 101.0.1
      * @see \Magento\Backend\Model\Image\UploadResizeConfigInterface
      */
     private $imageConfig;
@@ -120,6 +120,7 @@ public function getFileSizeService()
      * Get Image Upload Maximum Width Config.
      *
      * @return int
+     * @since 100.2.7
      */
     public function getImageUploadMaxWidth()
     {
@@ -130,6 +131,7 @@ public function getImageUploadMaxWidth()
      * Get Image Upload Maximum Height Config.
      *
      * @return int
+     * @since 100.2.7
      */
     public function getImageUploadMaxHeight()
     {
diff --git a/app/code/Magento/Backend/Block/Page/Footer.php b/app/code/Magento/Backend/Block/Page/Footer.php
index e0c173a4cbfec..610d28b0f53e3 100644
--- a/app/code/Magento/Backend/Block/Page/Footer.php
+++ b/app/code/Magento/Backend/Block/Page/Footer.php
@@ -60,6 +60,7 @@ public function getMagentoVersion()
 
     /**
      * @inheritdoc
+     * @since 101.0.0
      */
     protected function getCacheLifetime()
     {
diff --git a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php
index 2abb987db0723..d290b89b2a6bc 100644
--- a/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php
+++ b/app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php
@@ -11,7 +11,7 @@
 /**
  * "Reset to Defaults" button renderer
  *
- * @deprecated 100.2.0
+ * @deprecated 100.1.6
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 class Reset extends \Magento\Config\Block\System\Config\Form\Field
diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/ElementCreator.php b/app/code/Magento/Backend/Block/Widget/Form/Element/ElementCreator.php
index b9cdd259796d0..1b89746b3a98a 100644
--- a/app/code/Magento/Backend/Block/Widget/Form/Element/ElementCreator.php
+++ b/app/code/Magento/Backend/Block/Widget/Form/Element/ElementCreator.php
@@ -14,7 +14,7 @@
 /**
  * Class ElementCreator
  *
- * @deprecated 100.3.0 in favour of UI component implementation
+ * @deprecated 101.0.1 in favour of UI component implementation
  * @package Magento\Backend\Block\Widget\Form\Element
  */
 class ElementCreator
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction.php
index 662cbedaed8db..53e52fc7252b3 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction.php
@@ -64,6 +64,7 @@ public function __construct(
      * @param array|DataObject $item
      *
      * @return $this
+     * @since 100.2.3
      */
     public function addItem($itemId, $item)
     {
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
index a9be14b77b29c..7bef74862f029 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
@@ -88,7 +88,7 @@ protected function createPage()
      *
      * @return bool
      *
-     * @deprecated Backup module is to be removed.
+     * @deprecated 100.2.7 Backup module is to be removed.
      */
     protected function _backupDatabase()
     {
diff --git a/app/code/Magento/Backend/Helper/Dashboard/Data.php b/app/code/Magento/Backend/Helper/Dashboard/Data.php
index f691d2b7cd4b9..39ea634320b41 100644
--- a/app/code/Magento/Backend/Helper/Dashboard/Data.php
+++ b/app/code/Magento/Backend/Helper/Dashboard/Data.php
@@ -88,7 +88,7 @@ public function countStores()
     /**
      * Prepare array with periods for dashboard graphs
      *
-     * @deprecated periods were moved to it's own class
+     * @deprecated 102.0.0 periods were moved to it's own class
      * @see Period::getDatePeriods()
      *
      * @return array
diff --git a/app/code/Magento/Backend/Model/Url.php b/app/code/Magento/Backend/Model/Url.php
index 97f82647d9445..8948961be8875 100644
--- a/app/code/Magento/Backend/Model/Url.php
+++ b/app/code/Magento/Backend/Model/Url.php
@@ -372,6 +372,7 @@ protected function _getMenu()
      *
      * @param mixed $scopeId
      * @return \Magento\Framework\UrlInterface
+     * @since 101.0.3
      */
     public function setScope($scopeId)
     {
diff --git a/app/code/Magento/Backend/Ui/Component/Control/DeleteButton.php b/app/code/Magento/Backend/Ui/Component/Control/DeleteButton.php
index 3f4f3669ab75b..d3c177fa907ab 100644
--- a/app/code/Magento/Backend/Ui/Component/Control/DeleteButton.php
+++ b/app/code/Magento/Backend/Ui/Component/Control/DeleteButton.php
@@ -17,6 +17,7 @@
  * Provide an ability to show confirmation message on click on the "Delete" button
  *
  * @api
+ * @since 101.0.0
  */
 class DeleteButton implements ButtonProviderInterface
 {
@@ -84,6 +85,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
+     * @since 101.0.0
      */
     public function getButtonData()
     {
diff --git a/app/code/Magento/Backend/Ui/Component/Control/SaveSplitButton.php b/app/code/Magento/Backend/Ui/Component/Control/SaveSplitButton.php
index 75d6bad06e239..f85264e532057 100644
--- a/app/code/Magento/Backend/Ui/Component/Control/SaveSplitButton.php
+++ b/app/code/Magento/Backend/Ui/Component/Control/SaveSplitButton.php
@@ -13,6 +13,7 @@
  * Provide an ability to show drop-down list with options clicking on the "Save" button
  *
  * @api
+ * @since 101.0.0
  */
 class SaveSplitButton implements ButtonProviderInterface
 {
@@ -31,6 +32,7 @@ public function __construct(string $targetName)
 
     /**
      * {@inheritdoc}
+     * @since 101.0.0
      */
     public function getButtonData()
     {
diff --git a/app/code/Magento/Backend/Ui/Component/Listing/Column/EditAction.php b/app/code/Magento/Backend/Ui/Component/Listing/Column/EditAction.php
index fb0aa6987f4d9..1769bd7b3bb64 100644
--- a/app/code/Magento/Backend/Ui/Component/Listing/Column/EditAction.php
+++ b/app/code/Magento/Backend/Ui/Component/Listing/Column/EditAction.php
@@ -14,6 +14,7 @@
  * Represents Edit link in grid for entity by its identifier field
  *
  * @api
+ * @since 101.0.0
  */
 class EditAction extends Column
 {
@@ -43,6 +44,7 @@ public function __construct(
     /**
      * @param array $dataSource
      * @return array
+     * @since 101.0.0
      */
     public function prepareDataSource(array $dataSource)
     {
diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index.php b/app/code/Magento/Backup/Controller/Adminhtml/Index.php
index b62963947d7bf..64052254f5233 100644
--- a/app/code/Magento/Backup/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Backup/Controller/Adminhtml/Index.php
@@ -87,6 +87,7 @@ public function __construct(
 
     /**
      * @inheritDoc
+     * @since 100.2.6
      */
     public function dispatch(\Magento\Framework\App\RequestInterface $request)
     {
diff --git a/app/code/Magento/Backup/Helper/Data.php b/app/code/Magento/Backup/Helper/Data.php
index c6df6a7366852..a29aa01e64d46 100644
--- a/app/code/Magento/Backup/Helper/Data.php
+++ b/app/code/Magento/Backup/Helper/Data.php
@@ -293,6 +293,7 @@ public function extractDataFromFilename($filename)
      * Is backup functionality enabled.
      *
      * @return bool
+     * @since 100.2.6
      */
     public function isEnabled(): bool
     {
diff --git a/app/code/Magento/Backup/Model/Db.php b/app/code/Magento/Backup/Model/Db.php
index 084b35448a823..0d117a7dff818 100644
--- a/app/code/Magento/Backup/Model/Db.php
+++ b/app/code/Magento/Backup/Model/Db.php
@@ -16,7 +16,7 @@
  *
  * @api
  * @since 100.0.2
- * @deprecated Backup module is to be removed.
+ * @deprecated 100.2.6 Backup module is to be removed.
  */
 class Db implements \Magento\Framework\Backup\Db\BackupDbInterface
 {
diff --git a/app/code/Magento/Backup/Model/ResourceModel/Db.php b/app/code/Magento/Backup/Model/ResourceModel/Db.php
index 6e7d6f9863f33..c38a7b3005e21 100644
--- a/app/code/Magento/Backup/Model/ResourceModel/Db.php
+++ b/app/code/Magento/Backup/Model/ResourceModel/Db.php
@@ -120,6 +120,7 @@ public function getTableForeignKeysSql($tableName = null)
      * @param string|null $tableName
      * @param bool $addDropIfExists
      * @return string
+     * @since 100.2.3
      */
     public function getTableTriggersSql($tableName = null, $addDropIfExists = true)
     {
diff --git a/app/code/Magento/Backup/Model/ResourceModel/Helper.php b/app/code/Magento/Backup/Model/ResourceModel/Helper.php
index dace56fd60688..b5a5faae1fde4 100644
--- a/app/code/Magento/Backup/Model/ResourceModel/Helper.php
+++ b/app/code/Magento/Backup/Model/ResourceModel/Helper.php
@@ -345,6 +345,7 @@ public function restoreTransactionIsolationLevel()
      * @param boolean $addDropIfExists
      * @param boolean $stripDefiner
      * @return string
+     * @since 100.2.3
      */
     public function getTableTriggersSql($tableName, $addDropIfExists = false, $stripDefiner = true)
     {
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php
index 85ddc9c207e8d..05a2a51c51213 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php
@@ -86,6 +86,7 @@ public function setValidationContainer($elementId, $containerId)
 
     /**
      * @inheritdoc
+     * @since 100.3.1
      */
     public function getSelectionPrice($selection)
     {
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php
index 0b33ad546c5d0..af3642995a6c4 100644
--- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php
+++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php
@@ -86,6 +86,7 @@ public function setValidationContainer($elementId, $containerId)
 
     /**
      * @inheritdoc
+     * @since 100.3.1
      */
     public function getSelectionPrice($selection)
     {
diff --git a/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php b/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php
index 11f7e2f3d1f15..4b5ec32bf61aa 100644
--- a/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php
+++ b/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php
@@ -18,6 +18,7 @@
 /**
  * Configured price model
  * @api
+ * @since 100.0.2
  */
 class ConfiguredPrice extends CatalogPrice\FinalPrice implements ConfiguredPriceInterface
 {
diff --git a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php
index e6522054d9f94..49881f67f5c9a 100644
--- a/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php
+++ b/app/code/Magento/BundleImportExport/Model/Import/Product/Type/Bundle.php
@@ -339,7 +339,7 @@ protected function populateSelectionTemplate($selection, $optionId, $parentId, $
     /**
      * Deprecated method for retrieving mapping between skus and products.
      *
-     * @deprecated Misspelled method
+     * @deprecated 100.3.0 Misspelled method
      * @see retrieveProductsByCachedSkus
      */
     protected function retrieveProducsByCachedSkus()
diff --git a/app/code/Magento/Catalog/Api/BasePriceStorageInterface.php b/app/code/Magento/Catalog/Api/BasePriceStorageInterface.php
index 05e5106b287a0..2afa14d874e4b 100644
--- a/app/code/Magento/Catalog/Api/BasePriceStorageInterface.php
+++ b/app/code/Magento/Catalog/Api/BasePriceStorageInterface.php
@@ -9,7 +9,7 @@
 /**
  * Base prices storage.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface BasePriceStorageInterface
 {
@@ -18,7 +18,7 @@ interface BasePriceStorageInterface
      *
      * @param string[] $skus
      * @return \Magento\Catalog\Api\Data\BasePriceInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function get(array $skus);
 
@@ -33,7 +33,7 @@ public function get(array $skus);
      * @param \Magento\Catalog\Api\Data\BasePriceInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
      * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function update(array $prices);
 }
diff --git a/app/code/Magento/Catalog/Api/CategoryListDeleteBySkuInterface.php b/app/code/Magento/Catalog/Api/CategoryListDeleteBySkuInterface.php
index 62eba5987c35d..08265d6583090 100644
--- a/app/code/Magento/Catalog/Api/CategoryListDeleteBySkuInterface.php
+++ b/app/code/Magento/Catalog/Api/CategoryListDeleteBySkuInterface.php
@@ -8,7 +8,7 @@
 
 /**
  * @api
- * @since 100.0.2
+ * @since 104.0.0
  */
 interface CategoryListDeleteBySkuInterface
 {
@@ -22,6 +22,7 @@ interface CategoryListDeleteBySkuInterface
      * @throws \Magento\Framework\Exception\CouldNotSaveException
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @throws \Magento\Framework\Exception\InputException
+     * @since 104.0.0
      */
     public function deleteBySkus(int $categoryId, array $productSkuList): bool;
 }
diff --git a/app/code/Magento/Catalog/Api/CategoryListInterface.php b/app/code/Magento/Catalog/Api/CategoryListInterface.php
index 22a9da00eaffc..2f6cd1f38730a 100644
--- a/app/code/Magento/Catalog/Api/CategoryListInterface.php
+++ b/app/code/Magento/Catalog/Api/CategoryListInterface.php
@@ -7,7 +7,7 @@
 
 /**
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface CategoryListInterface
 {
@@ -16,7 +16,7 @@ interface CategoryListInterface
      *
      * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
      * @return \Magento\Catalog\Api\Data\CategorySearchResultsInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
 }
diff --git a/app/code/Magento/Catalog/Api/CostStorageInterface.php b/app/code/Magento/Catalog/Api/CostStorageInterface.php
index a52d290bd46d8..debb791a7b756 100644
--- a/app/code/Magento/Catalog/Api/CostStorageInterface.php
+++ b/app/code/Magento/Catalog/Api/CostStorageInterface.php
@@ -9,7 +9,7 @@
 /**
  * Product cost storage.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface CostStorageInterface
 {
@@ -19,7 +19,7 @@ interface CostStorageInterface
      * @param string[] $skus
      * @return \Magento\Catalog\Api\Data\CostInterface[]
      * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function get(array $skus);
 
@@ -33,7 +33,7 @@ public function get(array $skus);
      *
      * @param \Magento\Catalog\Api\Data\CostInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function update(array $prices);
 
@@ -45,7 +45,7 @@ public function update(array $prices);
      * @return bool Will return True if deleted.
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @throws \Magento\Framework\Exception\CouldNotDeleteException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function delete(array $skus);
 }
diff --git a/app/code/Magento/Catalog/Api/Data/BasePriceInterface.php b/app/code/Magento/Catalog/Api/Data/BasePriceInterface.php
index a527bbfe947ab..1bce067650313 100644
--- a/app/code/Magento/Catalog/Api/Data/BasePriceInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/BasePriceInterface.php
@@ -9,7 +9,7 @@
 /**
  * Price interface.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface BasePriceInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -26,7 +26,7 @@ interface BasePriceInterface extends \Magento\Framework\Api\ExtensibleDataInterf
      *
      * @param float $price
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPrice($price);
 
@@ -34,7 +34,7 @@ public function setPrice($price);
      * Get price.
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPrice();
 
@@ -43,7 +43,7 @@ public function getPrice();
      *
      * @param int $storeId
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setStoreId($storeId);
 
@@ -51,7 +51,7 @@ public function setStoreId($storeId);
      * Get store id.
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getStoreId();
 
@@ -60,7 +60,7 @@ public function getStoreId();
      *
      * @param string $sku
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setSku($sku);
 
@@ -68,7 +68,7 @@ public function setSku($sku);
      * Get SKU.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getSku();
 
@@ -76,7 +76,7 @@ public function getSku();
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\BasePriceExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -85,7 +85,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\BasePriceExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\BasePriceExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/CategoryLinkInterface.php b/app/code/Magento/Catalog/Api/Data/CategoryLinkInterface.php
index e9c0e04c4f746..c9ca57dc1eff1 100644
--- a/app/code/Magento/Catalog/Api/Data/CategoryLinkInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/CategoryLinkInterface.php
@@ -10,20 +10,20 @@
 
 /**
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface CategoryLinkInterface extends ExtensibleDataInterface
 {
     /**
      * @return int|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPosition();
 
     /**
      * @param int $position
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPosition($position);
 
@@ -31,7 +31,7 @@ public function setPosition($position);
      * Get category id
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getCategoryId();
 
@@ -40,7 +40,7 @@ public function getCategoryId();
      *
      * @param string $categoryId
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setCategoryId($categoryId);
 
@@ -48,7 +48,7 @@ public function setCategoryId($categoryId);
      * Retrieve existing extension attributes object.
      *
      * @return \Magento\Catalog\Api\Data\CategoryLinkExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -57,7 +57,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\CategoryLinkExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\CategoryLinkExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/CategorySearchResultsInterface.php b/app/code/Magento/Catalog/Api/Data/CategorySearchResultsInterface.php
index 38f3f89d6a0c5..0ed03c2d56519 100644
--- a/app/code/Magento/Catalog/Api/Data/CategorySearchResultsInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/CategorySearchResultsInterface.php
@@ -9,7 +9,7 @@
 
 /**
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface CategorySearchResultsInterface extends SearchResultsInterface
 {
@@ -17,7 +17,7 @@ interface CategorySearchResultsInterface extends SearchResultsInterface
      * Get categories
      *
      * @return \Magento\Catalog\Api\Data\CategoryInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getItems();
 
@@ -26,7 +26,7 @@ public function getItems();
      *
      * @param \Magento\Catalog\Api\Data\CategoryInterface[] $items
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setItems(array $items);
 }
diff --git a/app/code/Magento/Catalog/Api/Data/CostInterface.php b/app/code/Magento/Catalog/Api/Data/CostInterface.php
index a9966f56bafa3..ed5e8cd8a2bb2 100644
--- a/app/code/Magento/Catalog/Api/Data/CostInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/CostInterface.php
@@ -9,7 +9,7 @@
 /**
  * Cost interface.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface CostInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -26,7 +26,7 @@ interface CostInterface extends \Magento\Framework\Api\ExtensibleDataInterface
      *
      * @param float $cost
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setCost($cost);
 
@@ -34,7 +34,7 @@ public function setCost($cost);
      * Get cost value.
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getCost();
 
@@ -43,7 +43,7 @@ public function getCost();
      *
      * @param int $storeId
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setStoreId($storeId);
 
@@ -51,7 +51,7 @@ public function setStoreId($storeId);
      * Get store id.
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getStoreId();
 
@@ -60,7 +60,7 @@ public function getStoreId();
      *
      * @param string $sku
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setSku($sku);
 
@@ -68,7 +68,7 @@ public function setSku($sku);
      * Get SKU.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getSku();
 
@@ -76,7 +76,7 @@ public function getSku();
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\CostExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -85,7 +85,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\CostExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\CostExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/EavAttributeInterface.php b/app/code/Magento/Catalog/Api/Data/EavAttributeInterface.php
index dabd3234c6dab..08696156fa11a 100644
--- a/app/code/Magento/Catalog/Api/Data/EavAttributeInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/EavAttributeInterface.php
@@ -145,7 +145,7 @@ public function getIsFilterableInGrid();
      *
      * @param bool|null $isUsedInGrid
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsUsedInGrid($isUsedInGrid);
 
@@ -154,7 +154,7 @@ public function setIsUsedInGrid($isUsedInGrid);
      *
      * @param bool|null $isVisibleInGrid
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsVisibleInGrid($isVisibleInGrid);
 
@@ -163,7 +163,7 @@ public function setIsVisibleInGrid($isVisibleInGrid);
      *
      * @param bool|null $isFilterableInGrid
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsFilterableInGrid($isFilterableInGrid);
 
diff --git a/app/code/Magento/Catalog/Api/Data/PriceUpdateResultInterface.php b/app/code/Magento/Catalog/Api/Data/PriceUpdateResultInterface.php
index 426c5becc7a24..25bd9eeb438c9 100644
--- a/app/code/Magento/Catalog/Api/Data/PriceUpdateResultInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/PriceUpdateResultInterface.php
@@ -9,7 +9,7 @@
 /**
  * Interface returned in case of incorrect price passed to efficient price API.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface PriceUpdateResultInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -24,7 +24,7 @@ interface PriceUpdateResultInterface extends \Magento\Framework\Api\ExtensibleDa
      * Get error message, that contains description of error occurred during price update.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMessage();
 
@@ -33,7 +33,7 @@ public function getMessage();
      *
      * @param string $message
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMessage($message);
 
@@ -41,7 +41,7 @@ public function setMessage($message);
      * Get parameters, that could be displayed in error message placeholders.
      *
      * @return string[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getParameters();
 
@@ -50,7 +50,7 @@ public function getParameters();
      *
      * @param string[] $parameters
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setParameters(array $parameters);
 
@@ -59,7 +59,7 @@ public function setParameters(array $parameters);
      * If extension attributes do not exist return null.
      *
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -68,7 +68,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\PriceUpdateResultExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\PriceUpdateResultExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
index 590c23a0aa0b1..15fd17f41e158 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
@@ -35,6 +35,7 @@ interface ProductAttributeInterface extends \Magento\Catalog\Api\Data\EavAttribu
 
     /**
      * @return \Magento\Eav\Api\Data\AttributeExtensionInterface|null
+     * @since 103.0.0
      */
     public function getExtensionAttributes();
 }
diff --git a/app/code/Magento/Catalog/Api/Data/ProductFrontendActionInterface.php b/app/code/Magento/Catalog/Api/Data/ProductFrontendActionInterface.php
index 9a6cfebc71fa0..610c457215853 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductFrontendActionInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductFrontendActionInterface.php
@@ -9,7 +9,7 @@
  * Represents Data Object for a Product Frontend Action like Product View or Comparison
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ProductFrontendActionInterface
 {
@@ -17,7 +17,7 @@ interface ProductFrontendActionInterface
      * Gets Identifier of a Product Frontend Action
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getActionId();
 
@@ -26,7 +26,7 @@ public function getActionId();
      *
      * @param int $actionId
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setActionId($actionId);
 
@@ -34,7 +34,7 @@ public function setActionId($actionId);
      * Gets Identifier of Visitor who performs a Product Frontend Action
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getVisitorId();
 
@@ -43,7 +43,7 @@ public function getVisitorId();
      *
      * @param int $visitorId
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setVisitorId($visitorId);
 
@@ -51,7 +51,7 @@ public function setVisitorId($visitorId);
      * Gets Identifier of Customer who performs a Product Frontend Action
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getCustomerId();
 
@@ -60,7 +60,7 @@ public function getCustomerId();
      *
      * @param int $customerId
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setCustomerId($customerId);
 
@@ -68,7 +68,7 @@ public function setCustomerId($customerId);
      * Gets Identifier of Product a Product Frontend Action is performed on
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getProductId();
 
@@ -77,7 +77,7 @@ public function getProductId();
      *
      * @param int $productId
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setProductId($productId);
 
@@ -85,7 +85,7 @@ public function setProductId($productId);
      * Gets Identifier of Type of a Product Frontend Action
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getTypeId();
 
@@ -94,7 +94,7 @@ public function getTypeId();
      *
      * @param string $typeId
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setTypeId($typeId);
 
@@ -102,7 +102,7 @@ public function setTypeId($typeId);
      * Gets JS timestamp of a Product Frontend Action (in microseconds)
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getAddedAt();
 
@@ -111,7 +111,7 @@ public function getAddedAt();
      *
      * @param int $addedAt
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setAddedAt($addedAt);
 }
diff --git a/app/code/Magento/Catalog/Api/Data/ProductRender/ButtonInterface.php b/app/code/Magento/Catalog/Api/Data/ProductRender/ButtonInterface.php
index e2f4dfa201593..592b47d216ae9 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductRender/ButtonInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductRender/ButtonInterface.php
@@ -14,7 +14,7 @@
  * This interface represents all manner of product buttons: add to cart, add to compare, etc...
  * The buttons describes by this interface should have interaction with backend
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ButtonInterface extends ExtensibleDataInterface
 {
@@ -22,7 +22,7 @@ interface ButtonInterface extends ExtensibleDataInterface
      * @param string $postData Post data should be serialized (JSON/serialized) string
      * Post data can be empty
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPostData($postData);
 
@@ -33,7 +33,7 @@ public function setPostData($postData);
      * to handle product action
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPostData();
 
@@ -44,7 +44,7 @@ public function getPostData();
      *
      * @param string $url
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setUrl($url);
 
@@ -52,7 +52,7 @@ public function setUrl($url);
      * Retrieve url, needed to add product to cart
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getUrl();
 
@@ -62,7 +62,7 @@ public function getUrl();
      *
      * @param bool $requiredOptions
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setRequiredOptions($requiredOptions);
 
@@ -70,7 +70,7 @@ public function setRequiredOptions($requiredOptions);
      * Retrieve flag whether a product has options or not
      *
      * @return bool
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function hasRequiredOptions();
 
@@ -78,7 +78,7 @@ public function hasRequiredOptions();
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\ButtonExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -87,7 +87,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\ProductRender\ButtonExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\ProductRender\ButtonExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/ProductRender/FormattedPriceInfoInterface.php b/app/code/Magento/Catalog/Api/Data/ProductRender/FormattedPriceInfoInterface.php
index d111de1b04b94..6022c5198769a 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductRender/FormattedPriceInfoInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductRender/FormattedPriceInfoInterface.php
@@ -15,7 +15,7 @@
  * Consider currency, rounding and html
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface FormattedPriceInfoInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -23,7 +23,7 @@ interface FormattedPriceInfoInterface extends \Magento\Framework\Api\ExtensibleD
      * Retrieve html with final price
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getFinalPrice();
 
@@ -34,7 +34,7 @@ public function getFinalPrice();
      *
      * @param string $finalPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setFinalPrice($finalPrice);
 
@@ -44,7 +44,7 @@ public function setFinalPrice($finalPrice);
      * E.g. for product with custom options is price with the most expensive custom option
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMaxPrice();
 
@@ -53,7 +53,7 @@ public function getMaxPrice();
      *
      * @param string $maxPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMaxPrice($maxPrice);
 
@@ -63,7 +63,7 @@ public function setMaxPrice($maxPrice);
      * The minimal price is for example, the lowest price of all variations for complex product
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMinimalPrice();
 
@@ -74,7 +74,7 @@ public function getMinimalPrice();
      *
      * @param string $maxRegularPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMaxRegularPrice($maxRegularPrice);
 
@@ -82,7 +82,7 @@ public function setMaxRegularPrice($maxRegularPrice);
      * Retrieve max regular price
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMaxRegularPrice();
 
@@ -91,7 +91,7 @@ public function getMaxRegularPrice();
      *
      * @param string $minRegularPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMinimalRegularPrice($minRegularPrice);
 
@@ -99,7 +99,7 @@ public function setMinimalRegularPrice($minRegularPrice);
      * Retrieve minimal regular price
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMinimalRegularPrice();
 
@@ -110,7 +110,7 @@ public function getMinimalRegularPrice();
      *
      * @param string $specialPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setSpecialPrice($specialPrice);
 
@@ -118,7 +118,7 @@ public function setSpecialPrice($specialPrice);
      * Retrieve special price
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getSpecialPrice();
 
@@ -127,7 +127,7 @@ public function getSpecialPrice();
      *
      * @param string $minimalPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMinimalPrice($minimalPrice);
 
@@ -137,7 +137,7 @@ public function setMinimalPrice($minimalPrice);
      * Usually this price is corresponding to price in admin panel of product
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getRegularPrice();
 
@@ -146,7 +146,7 @@ public function getRegularPrice();
      *
      * @param string $regularPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setRegularPrice($regularPrice);
 
@@ -154,7 +154,7 @@ public function setRegularPrice($regularPrice);
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\FormattedPriceInfoExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -163,7 +163,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\ProductRender\FormattedPriceInfoExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\ProductRender\FormattedPriceInfoExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/ProductRender/ImageInterface.php b/app/code/Magento/Catalog/Api/Data/ProductRender/ImageInterface.php
index 45b070d2706dc..49789e5ce9ed7 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductRender/ImageInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductRender/ImageInterface.php
@@ -14,7 +14,7 @@
  * Represents physical characteristics of image, that can be used in product listing or product view
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ImageInterface extends ExtensibleDataInterface
 {
@@ -24,7 +24,7 @@ interface ImageInterface extends ExtensibleDataInterface
      *
      * @param string $url
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setUrl($url);
 
@@ -32,7 +32,7 @@ public function setUrl($url);
      * Retrieve image url
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getUrl();
 
@@ -43,7 +43,7 @@ public function getUrl();
      * What size should this image have, etc...
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getCode();
 
@@ -52,7 +52,7 @@ public function getCode();
      *
      * @param string $code
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setCode($code);
 
@@ -61,7 +61,7 @@ public function setCode($code);
      *
      * @param string $height
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setHeight($height);
 
@@ -69,7 +69,7 @@ public function setHeight($height);
      * Retrieve image height
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getHeight();
 
@@ -77,7 +77,7 @@ public function getHeight();
      * Set image width in px
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getWidth();
 
@@ -86,7 +86,7 @@ public function getWidth();
      *
      * @param string $width
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setWidth($width);
 
@@ -96,7 +96,7 @@ public function setWidth($width);
      * Image label is short description of this image
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getLabel();
 
@@ -105,7 +105,7 @@ public function getLabel();
      *
      * @param string $label
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setLabel($label);
 
@@ -115,7 +115,7 @@ public function setLabel($label);
      * This width is image dimension, which represents the width, that can be used for performance improvements
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getResizedWidth();
 
@@ -124,7 +124,7 @@ public function getResizedWidth();
      *
      * @param string $width
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setResizedWidth($width);
 
@@ -133,7 +133,7 @@ public function setResizedWidth($width);
      *
      * @param string $height
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setResizedHeight($height);
 
@@ -141,7 +141,7 @@ public function setResizedHeight($height);
      * Retrieve resize height
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getResizedHeight();
 
@@ -149,7 +149,7 @@ public function getResizedHeight();
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\ImageExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -158,7 +158,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\ProductRender\ImageExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\ProductRender\ImageExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/ProductRender/PriceInfoInterface.php b/app/code/Magento/Catalog/Api/Data/ProductRender/PriceInfoInterface.php
index 9768b3c08c8ab..0e9b1c53fcd14 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductRender/PriceInfoInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductRender/PriceInfoInterface.php
@@ -10,7 +10,7 @@
  * Price interface.
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface PriceInfoInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -18,7 +18,7 @@ interface PriceInfoInterface extends \Magento\Framework\Api\ExtensibleDataInterf
      * Retrieve final price
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getFinalPrice();
 
@@ -29,7 +29,7 @@ public function getFinalPrice();
      *
      * @param float $finalPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setFinalPrice($finalPrice);
 
@@ -39,7 +39,7 @@ public function setFinalPrice($finalPrice);
      * E.g. for product with custom options is price with the most expensive custom option
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMaxPrice();
 
@@ -48,7 +48,7 @@ public function getMaxPrice();
      *
      * @param float $maxPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMaxPrice($maxPrice);
 
@@ -60,7 +60,7 @@ public function setMaxPrice($maxPrice);
      *
      * @param float $maxRegularPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMaxRegularPrice($maxRegularPrice);
 
@@ -68,7 +68,7 @@ public function setMaxRegularPrice($maxRegularPrice);
      * Retrieve max regular price
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMaxRegularPrice();
 
@@ -77,7 +77,7 @@ public function getMaxRegularPrice();
      *
      * @param float $minRegularPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMinimalRegularPrice($minRegularPrice);
 
@@ -85,7 +85,7 @@ public function setMinimalRegularPrice($minRegularPrice);
      * Retrieve minimal regular price
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMinimalRegularPrice();
 
@@ -96,7 +96,7 @@ public function getMinimalRegularPrice();
      *
      * @param float $specialPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setSpecialPrice($specialPrice);
 
@@ -104,7 +104,7 @@ public function setSpecialPrice($specialPrice);
      * Retrieve special price
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getSpecialPrice();
 
@@ -112,7 +112,7 @@ public function getSpecialPrice();
      * Retrieve minimal price
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMinimalPrice();
 
@@ -121,7 +121,7 @@ public function getMinimalPrice();
      *
      * @param float $minimalPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setMinimalPrice($minimalPrice);
 
@@ -129,7 +129,7 @@ public function setMinimalPrice($minimalPrice);
      * Retrieve regular price
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getRegularPrice();
 
@@ -140,7 +140,7 @@ public function getRegularPrice();
      *
      * @param float $regularPrice
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setRegularPrice($regularPrice);
 
@@ -148,7 +148,7 @@ public function setRegularPrice($regularPrice);
      * Retrieve dto with formatted prices
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\FormattedPriceInfoInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getFormattedPrices();
 
@@ -157,7 +157,7 @@ public function getFormattedPrices();
      *
      * @param FormattedPriceInfoInterface $formattedPriceInfo
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setFormattedPrices(FormattedPriceInfoInterface $formattedPriceInfo);
 
@@ -165,7 +165,7 @@ public function setFormattedPrices(FormattedPriceInfoInterface $formattedPriceIn
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\PriceInfoExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -174,7 +174,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\ProductRender\PriceInfoExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\ProductRender\PriceInfoExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/ProductRenderInterface.php b/app/code/Magento/Catalog/Api/Data/ProductRenderInterface.php
index 166a1aba76b61..e1bd1a7899b67 100644
--- a/app/code/Magento/Catalog/Api/Data/ProductRenderInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/ProductRenderInterface.php
@@ -15,7 +15,7 @@
  * This information is put into part as Add To Cart or Add to Compare Data or Price Data
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ProductRenderInterface extends ExtensibleDataInterface
 {
@@ -23,7 +23,7 @@ interface ProductRenderInterface extends ExtensibleDataInterface
      * Provide information needed for render "Add To Cart" button on front
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\ButtonInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getAddToCartButton();
 
@@ -32,7 +32,7 @@ public function getAddToCartButton();
      *
      * @param ButtonInterface $cartAddToCartButton
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setAddToCartButton(ButtonInterface $cartAddToCartButton);
 
@@ -40,7 +40,7 @@ public function setAddToCartButton(ButtonInterface $cartAddToCartButton);
      * Provide information needed for render "Add To Compare" button on front
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\ButtonInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getAddToCompareButton();
 
@@ -49,7 +49,7 @@ public function getAddToCompareButton();
      *
      * @param ButtonInterface $compareButton
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setAddToCompareButton(ButtonInterface $compareButton);
 
@@ -59,7 +59,7 @@ public function setAddToCompareButton(ButtonInterface $compareButton);
      * Prices are represented in raw format and in current currency
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\PriceInfoInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPriceInfo();
 
@@ -68,7 +68,7 @@ public function getPriceInfo();
      *
      * @param \Magento\Catalog\Api\Data\ProductRender\PriceInfoInterface $priceInfo
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPriceInfo(PriceInfoInterface $priceInfo);
 
@@ -78,7 +78,7 @@ public function setPriceInfo(PriceInfoInterface $priceInfo);
      * Images can be separated by image codes
      *
      * @return \Magento\Catalog\Api\Data\ProductRender\ImageInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getImages();
 
@@ -87,7 +87,7 @@ public function getImages();
      *
      * @param \Magento\Catalog\Api\Data\ProductRender\ImageInterface[] $images
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setImages(array $images);
 
@@ -95,7 +95,7 @@ public function setImages(array $images);
      * Provide product url
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getUrl();
 
@@ -104,7 +104,7 @@ public function getUrl();
      *
      * @param string $url
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setUrl($url);
 
@@ -112,7 +112,7 @@ public function setUrl($url);
      * Provide product identifier
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getId();
 
@@ -121,7 +121,7 @@ public function getId();
      *
      * @param int $id
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setId($id);
 
@@ -129,7 +129,7 @@ public function setId($id);
      * Provide product name
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getName();
 
@@ -138,7 +138,7 @@ public function getName();
      *
      * @param string $name
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setName($name);
 
@@ -146,7 +146,7 @@ public function setName($name);
      * Provide product type. Such as bundle, grouped, simple, etc...
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getType();
 
@@ -155,7 +155,7 @@ public function getType();
      *
      * @param string $productType
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setType($productType);
 
@@ -163,7 +163,7 @@ public function setType($productType);
      * Provide information about product saleability (In Stock)
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getIsSalable();
 
@@ -175,7 +175,7 @@ public function getIsSalable();
      *
      * @param string $isSalable
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsSalable($isSalable);
 
@@ -186,7 +186,7 @@ public function setIsSalable($isSalable);
      * This setting affect store scope attributes
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getStoreId();
 
@@ -195,7 +195,7 @@ public function getStoreId();
      *
      * @param int $storeId
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setStoreId($storeId);
 
@@ -205,7 +205,7 @@ public function setStoreId($storeId);
      * This setting affect formatted prices*
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getCurrencyCode();
 
@@ -214,7 +214,7 @@ public function getCurrencyCode();
      *
      * @param string $currencyCode
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setCurrencyCode($currencyCode);
 
@@ -222,7 +222,7 @@ public function setCurrencyCode($currencyCode);
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\ProductRenderExtensionInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -231,7 +231,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\ProductRenderExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\ProductRenderExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/SpecialPriceInterface.php b/app/code/Magento/Catalog/Api/Data/SpecialPriceInterface.php
index 62028ed788dd5..ec4feb5076238 100644
--- a/app/code/Magento/Catalog/Api/Data/SpecialPriceInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/SpecialPriceInterface.php
@@ -9,7 +9,7 @@
 /**
  * Product Special Price Interface is used to encapsulate data that can be processed by efficient price API.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface SpecialPriceInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -28,7 +28,7 @@ interface SpecialPriceInterface extends \Magento\Framework\Api\ExtensibleDataInt
      *
      * @param float $price
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPrice($price);
 
@@ -36,7 +36,7 @@ public function setPrice($price);
      * Get product special price value.
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPrice();
 
@@ -45,7 +45,7 @@ public function getPrice();
      *
      * @param int $storeId
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setStoreId($storeId);
 
@@ -53,7 +53,7 @@ public function setStoreId($storeId);
      * Get ID of store, that contains special price value.
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getStoreId();
 
@@ -62,7 +62,7 @@ public function getStoreId();
      *
      * @param string $sku
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setSku($sku);
 
@@ -70,7 +70,7 @@ public function setSku($sku);
      * Get SKU of product, that contains special price value.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getSku();
 
@@ -79,7 +79,7 @@ public function getSku();
      *
      * @param string $datetime
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPriceFrom($datetime);
 
@@ -87,7 +87,7 @@ public function setPriceFrom($datetime);
      * Get start date for special price in Y-m-d H:i:s format.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPriceFrom();
 
@@ -96,7 +96,7 @@ public function getPriceFrom();
      *
      * @param string $datetime
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPriceTo($datetime);
 
@@ -104,7 +104,7 @@ public function setPriceTo($datetime);
      * Get end date for special price in Y-m-d H:i:s format.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPriceTo();
 
@@ -113,7 +113,7 @@ public function getPriceTo();
      * If extension attributes do not exist return null.
      *
      * @return \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -122,7 +122,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\SpecialPriceExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/Data/TierPriceInterface.php b/app/code/Magento/Catalog/Api/Data/TierPriceInterface.php
index eaa1d22726d7c..dae43722bf42c 100644
--- a/app/code/Magento/Catalog/Api/Data/TierPriceInterface.php
+++ b/app/code/Magento/Catalog/Api/Data/TierPriceInterface.php
@@ -9,7 +9,7 @@
 /**
  * Tier price interface.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface TierPriceInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -31,7 +31,7 @@ interface TierPriceInterface extends \Magento\Framework\Api\ExtensibleDataInterf
      *
      * @param float $price
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPrice($price);
 
@@ -39,7 +39,7 @@ public function setPrice($price);
      * Get tier price.
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPrice();
 
@@ -48,7 +48,7 @@ public function getPrice();
      *
      * @param string $type
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setPriceType($type);
 
@@ -56,7 +56,7 @@ public function setPriceType($type);
      * Get tier price type.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getPriceType();
 
@@ -65,7 +65,7 @@ public function getPriceType();
      *
      * @param int $websiteId
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setWebsiteId($websiteId);
 
@@ -73,7 +73,7 @@ public function setWebsiteId($websiteId);
      * Get website id.
      *
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getWebsiteId();
 
@@ -82,7 +82,7 @@ public function getWebsiteId();
      *
      * @param string $sku
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setSku($sku);
 
@@ -90,7 +90,7 @@ public function setSku($sku);
      * Get SKU.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getSku();
 
@@ -99,7 +99,7 @@ public function getSku();
      *
      * @param string $group
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setCustomerGroup($group);
 
@@ -107,7 +107,7 @@ public function setCustomerGroup($group);
      * Get customer group.
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getCustomerGroup();
 
@@ -116,7 +116,7 @@ public function getCustomerGroup();
      *
      * @param float $quantity
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setQuantity($quantity);
 
@@ -124,7 +124,7 @@ public function setQuantity($quantity);
      * Get quantity.
      *
      * @return float
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getQuantity();
 
@@ -132,7 +132,7 @@ public function getQuantity();
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\Catalog\Api\Data\TierPriceExtensionInterface|null
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getExtensionAttributes();
 
@@ -141,7 +141,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Catalog\Api\Data\TierPriceExtensionInterface $extensionAttributes
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Catalog\Api\Data\TierPriceExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Catalog/Api/ProductRenderListInterface.php b/app/code/Magento/Catalog/Api/ProductRenderListInterface.php
index 954acd35a07db..ddd0f1406f68e 100644
--- a/app/code/Magento/Catalog/Api/ProductRenderListInterface.php
+++ b/app/code/Magento/Catalog/Api/ProductRenderListInterface.php
@@ -11,7 +11,7 @@
  * Interface which provides product renders information for products.
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ProductRenderListInterface
 {
@@ -26,7 +26,7 @@ interface ProductRenderListInterface
      * @param int $storeId
      * @param string $currencyCode
      * @return \Magento\Catalog\Api\Data\ProductRenderSearchResultsInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria, $storeId, $currencyCode);
 }
diff --git a/app/code/Magento/Catalog/Api/ProductTierPriceManagementInterface.php b/app/code/Magento/Catalog/Api/ProductTierPriceManagementInterface.php
index a6c3e975bfd79..dcb17a6f467f8 100644
--- a/app/code/Magento/Catalog/Api/ProductTierPriceManagementInterface.php
+++ b/app/code/Magento/Catalog/Api/ProductTierPriceManagementInterface.php
@@ -8,7 +8,7 @@
 
 /**
  * @api
- * @deprecated 101.1.0 use ScopedProductTierPriceManagementInterface instead
+ * @deprecated 102.0.0 use ScopedProductTierPriceManagementInterface instead
  * @since 100.0.2
  */
 interface ProductTierPriceManagementInterface
diff --git a/app/code/Magento/Catalog/Api/ScopedProductTierPriceManagementInterface.php b/app/code/Magento/Catalog/Api/ScopedProductTierPriceManagementInterface.php
index 1a3d05de5bcd1..2b005bc685b23 100644
--- a/app/code/Magento/Catalog/Api/ScopedProductTierPriceManagementInterface.php
+++ b/app/code/Magento/Catalog/Api/ScopedProductTierPriceManagementInterface.php
@@ -8,7 +8,7 @@
 
 /**
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ScopedProductTierPriceManagementInterface
 {
@@ -20,7 +20,7 @@ interface ScopedProductTierPriceManagementInterface
      * @return boolean
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function add($sku, \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice);
 
@@ -32,7 +32,7 @@ public function add($sku, \Magento\Catalog\Api\Data\ProductTierPriceInterface $t
      * @return boolean
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function remove($sku, \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice);
 
@@ -43,7 +43,7 @@ public function remove($sku, \Magento\Catalog\Api\Data\ProductTierPriceInterface
      * @param string $customerGroupId 'all' can be used to specify 'ALL GROUPS'
      * @return \Magento\Catalog\Api\Data\ProductTierPriceInterface[]
      * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getList($sku, $customerGroupId);
 }
diff --git a/app/code/Magento/Catalog/Api/SpecialPriceInterface.php b/app/code/Magento/Catalog/Api/SpecialPriceInterface.php
index 86dca59004132..543eab2263cbe 100644
--- a/app/code/Magento/Catalog/Api/SpecialPriceInterface.php
+++ b/app/code/Magento/Catalog/Api/SpecialPriceInterface.php
@@ -9,7 +9,7 @@
 /**
  * Special prices resource model.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface SpecialPriceInterface
 {
@@ -30,6 +30,7 @@ interface SpecialPriceInterface
      *      'price_to' => (string) Special price to date value in UTC.
      * ]
      * @since 101.1.0
+     * @since 102.0.0
      */
     public function get(array $skus);
 
@@ -47,7 +48,7 @@ public function get(array $skus);
      *      ];
      * @return bool
      * @throws \Magento\Framework\Exception\CouldNotSaveException Thrown if error occurred during price save.
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function update(array $prices);
 
@@ -65,7 +66,7 @@ public function update(array $prices);
      *      ];
      * @return bool
      * @throws \Magento\Framework\Exception\CouldNotDeleteException Thrown if error occurred during price delete.
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function delete(array $prices);
 }
diff --git a/app/code/Magento/Catalog/Api/SpecialPriceStorageInterface.php b/app/code/Magento/Catalog/Api/SpecialPriceStorageInterface.php
index 2442af103a4e9..6c2d89b51278c 100644
--- a/app/code/Magento/Catalog/Api/SpecialPriceStorageInterface.php
+++ b/app/code/Magento/Catalog/Api/SpecialPriceStorageInterface.php
@@ -9,7 +9,7 @@
 /**
  * Special price storage presents efficient price API and is used to retrieve, update or delete special prices.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface SpecialPriceStorageInterface
 {
@@ -19,7 +19,7 @@ interface SpecialPriceStorageInterface
      * @param string[] $skus
      * @return \Magento\Catalog\Api\Data\SpecialPriceInterface[]
      * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function get(array $skus);
 
@@ -33,7 +33,7 @@ public function get(array $skus);
      * @param \Magento\Catalog\Api\Data\SpecialPriceInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
      * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function update(array $prices);
 
@@ -47,7 +47,7 @@ public function update(array $prices);
      * @param \Magento\Catalog\Api\Data\SpecialPriceInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
      * @throws \Magento\Framework\Exception\CouldNotDeleteException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function delete(array $prices);
 }
diff --git a/app/code/Magento/Catalog/Api/TierPriceStorageInterface.php b/app/code/Magento/Catalog/Api/TierPriceStorageInterface.php
index 584daa9864588..b9102fcfc075c 100644
--- a/app/code/Magento/Catalog/Api/TierPriceStorageInterface.php
+++ b/app/code/Magento/Catalog/Api/TierPriceStorageInterface.php
@@ -9,7 +9,7 @@
 /**
  * Tier prices storage.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface TierPriceStorageInterface
 {
@@ -19,7 +19,7 @@ interface TierPriceStorageInterface
      * @param string[] $skus
      * @return \Magento\Catalog\Api\Data\TierPriceInterface[]
      * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function get(array $skus);
 
@@ -33,7 +33,7 @@ public function get(array $skus);
      *
      * @param \Magento\Catalog\Api\Data\TierPriceInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function update(array $prices);
 
@@ -47,7 +47,7 @@ public function update(array $prices);
      *
      * @param \Magento\Catalog\Api\Data\TierPriceInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function replace(array $prices);
 
@@ -61,7 +61,7 @@ public function replace(array $prices);
      *
      * @param \Magento\Catalog\Api\Data\TierPriceInterface[] $prices
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function delete(array $prices);
 }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
index f4080104b40cd..822580801c4e4 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
@@ -293,7 +293,7 @@ public function getDuplicateUrl()
     /**
      * Retrieve product header
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return string
      */
     public function getHeader()
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php
index 3d131a6e08810..2962e63313cdc 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Ajax/Serializer.php
@@ -10,7 +10,7 @@
 /**
  * Class Serializer
  * @package Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Ajax
- * @deprecated 101.1.0
+ * @deprecated 102.0.0
  */
 class Serializer extends \Magento\Framework\View\Element\Template
 {
@@ -47,7 +47,7 @@ public function _construct()
 
     /**
      * @return string
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     public function getProductsJSON()
     {
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php
index e5ce59c550af1..40e7136da5bf6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Crosssell.php
@@ -15,7 +15,7 @@
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @since 100.0.2
- * @deprecated Not used since cross-sell products grid moved to UI components.
+ * @deprecated 103.0.1 Not used since cross-sell products grid moved to UI components.
  * @see \Magento\Catalog\Ui\DataProvider\Product\Related\CrossSellDataProvider
  */
 class Crosssell extends Extended
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php
index 23b927598e8e7..c73ffe5764dfb 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Related.php
@@ -13,7 +13,7 @@
  *
  * @api
  * @since 100.0.2
- * @deprecated Not used since related products grid moved to UI components.
+ * @deprecated 103.0.1 Not used since related products grid moved to UI components.
  * @see \Magento\Catalog\Ui\DataProvider\Product\Related\RelatedDataProvider
  */
 class Related extends Extended
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php
index 41ad72ca39e53..d196f82f8b48d 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Upsell.php
@@ -10,7 +10,7 @@
  *
  * @api
  * @since 100.0.2
- * @deprecated Not used since upsell products grid moved to UI components.
+ * @deprecated 103.0.1 Not used since upsell products grid moved to UI components.
  * @see \Magento\Catalog\Ui\DataProvider\Product\Related\CrossSellDataProvider
  */
 class Upsell extends \Magento\Backend\Block\Widget\Grid\Extended
diff --git a/app/code/Magento/Catalog/Block/FrontendStorageManager.php b/app/code/Magento/Catalog/Block/FrontendStorageManager.php
index 0c826b95cbb49..112058baf4e05 100644
--- a/app/code/Magento/Catalog/Block/FrontendStorageManager.php
+++ b/app/code/Magento/Catalog/Block/FrontendStorageManager.php
@@ -15,7 +15,7 @@
  * Provide information to frontend storage manager
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 class FrontendStorageManager extends \Magento\Framework\View\Element\Template
 {
@@ -51,7 +51,7 @@ public function __construct(
      * in json format
      *
      * @return string
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getConfigurationJson()
     {
diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php
index c8da0f70f73b6..26af19fb85bcb 100644
--- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php
@@ -8,7 +8,7 @@
 /**
  * Class AbstractProduct
  * @api
- * @deprecated 101.1.0
+ * @deprecated 102.0.0
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @since 100.0.2
@@ -99,7 +99,7 @@ class AbstractProduct extends \Magento\Framework\View\Element\Template
 
     /**
      * @var ImageBuilder
-     * @since 101.1.0
+     * @since 102.0.0
      */
     protected $imageBuilder;
 
diff --git a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php
index 76f5dbd1bea88..772bc92e378f4 100644
--- a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php
+++ b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php
@@ -213,6 +213,7 @@ public function getProductAttributeValue($product, $attribute)
      *
      * @param \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute
      * @return bool
+     * @since 102.0.6
      */
     public function hasAttributeValueForProducts($attribute)
     {
diff --git a/app/code/Magento/Catalog/Block/Product/Context.php b/app/code/Magento/Catalog/Block/Product/Context.php
index db18eb2bc8a7d..36a3214cab079 100644
--- a/app/code/Magento/Catalog/Block/Product/Context.php
+++ b/app/code/Magento/Catalog/Block/Product/Context.php
@@ -18,7 +18,7 @@
  * As Magento moves from inheritance-based APIs all such classes will be deprecated together with
  * the classes they were introduced for.
  *
- * @deprecated 101.1.0
+ * @deprecated 102.0.0
  * @SuppressWarnings(PHPMD)
  */
 class Context extends \Magento\Framework\View\Element\Template\Context
diff --git a/app/code/Magento/Catalog/Block/Product/Image.php b/app/code/Magento/Catalog/Block/Product/Image.php
index ccc37029bedf7..8fc7ba483d980 100644
--- a/app/code/Magento/Catalog/Block/Product/Image.php
+++ b/app/code/Magento/Catalog/Block/Product/Image.php
@@ -21,19 +21,19 @@
 class Image extends \Magento\Framework\View\Element\Template
 {
     /**
-     * @deprecated Property isn't used
+     * @deprecated 102.0.5 Property isn't used
      * @var \Magento\Catalog\Helper\Image
      */
     protected $imageHelper;
 
     /**
-     * @deprecated Property isn't used
+     * @deprecated 102.0.5 Property isn't used
      * @var \Magento\Catalog\Model\Product
      */
     protected $product;
 
     /**
-     * @deprecated Property isn't used
+     * @deprecated 102.0.5 Property isn't used
      * @var array
      */
     protected $attributes = [];
diff --git a/app/code/Magento/Catalog/Block/Product/ImageBuilder.php b/app/code/Magento/Catalog/Block/Product/ImageBuilder.php
index 06d4fb39109d8..702410a530ea4 100644
--- a/app/code/Magento/Catalog/Block/Product/ImageBuilder.php
+++ b/app/code/Magento/Catalog/Block/Product/ImageBuilder.php
@@ -11,7 +11,7 @@
 use Magento\Catalog\Model\Product;
 
 /**
- * @deprecated
+ * @deprecated 103.0.0
  * @see ImageFactory
  */
 class ImageBuilder
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
index 48725331b27da..5b5a7cd2d342a 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
@@ -79,7 +79,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template
 
     /**
      * @var bool $_paramsMemorizeAllowed
-     * @deprecated
+     * @deprecated 103.0.1
      */
     protected $_paramsMemorizeAllowed = true;
 
@@ -99,7 +99,7 @@ class Toolbar extends \Magento\Framework\View\Element\Template
      * Catalog session
      *
      * @var \Magento\Catalog\Model\Session
-     * @deprecated
+     * @deprecated 103.0.1
      */
     protected $_catalogSession;
 
@@ -188,7 +188,7 @@ public function __construct(
      * Disable list state params memorizing
      *
      * @return $this
-     * @deprecated
+     * @deprecated 103.0.1
      */
     public function disableParamsMemorizing()
     {
@@ -202,7 +202,7 @@ public function disableParamsMemorizing()
      * @param string $param parameter name
      * @param mixed $value parameter value
      * @return $this
-     * @deprecated
+     * @deprecated 103.0.1
      */
     protected function _memorizeParam($param, $value)
     {
diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php
index 437171bcb4bc6..a25501d9ef150 100644
--- a/app/code/Magento/Catalog/Block/Product/View.php
+++ b/app/code/Magento/Catalog/Block/Product/View.php
@@ -30,7 +30,7 @@ class View extends AbstractProduct implements \Magento\Framework\DataObject\Iden
 
     /**
      * @var \Magento\Framework\Pricing\PriceCurrencyInterface
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     protected $priceCurrency;
 
diff --git a/app/code/Magento/Catalog/Block/Product/View/AbstractView.php b/app/code/Magento/Catalog/Block/Product/View/AbstractView.php
index ec16bc1d2334f..9c569725d98de 100644
--- a/app/code/Magento/Catalog/Block/Product/View/AbstractView.php
+++ b/app/code/Magento/Catalog/Block/Product/View/AbstractView.php
@@ -9,7 +9,7 @@
  * Product view abstract block
  *
  * @api
- * @deprecated 101.1.0
+ * @deprecated 102.0.0
  * @since 100.0.2
  */
 abstract class AbstractView extends \Magento\Catalog\Block\Product\AbstractProduct
diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php
index 5b9777cbfd1e7..9fd840b264085 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php
@@ -110,6 +110,7 @@ public function getAdditionalData(array $excludeAttr = [])
      * @param \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute
      * @param array $excludeAttr
      * @return bool
+     * @since 103.0.0
      */
     protected function isVisibleOnFrontend(
         \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute,
diff --git a/app/code/Magento/Catalog/Block/Product/View/Details.php b/app/code/Magento/Catalog/Block/Product/View/Details.php
index 38925e9ae3cd7..67303d177e71e 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Details.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Details.php
@@ -14,6 +14,7 @@
  * Holds a group of blocks to show as tabs.
  *
  * @api
+ * @since 103.0.1
  */
 class Details extends \Magento\Framework\View\Element\Template
 {
@@ -25,6 +26,7 @@ class Details extends \Magento\Framework\View\Element\Template
      * @throws \Magento\Framework\Exception\LocalizedException
      *
      * @return array
+     * @since 103.0.1
      */
     public function getGroupSortedChildNames(string $groupName, string $callback): array
     {
diff --git a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
index 030b6e1d2204c..1dcbf60db15c3 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php
@@ -112,6 +112,7 @@ public function getOption()
      * Retrieve formatted price
      *
      * @return string
+     * @since 102.0.6
      */
     public function getFormattedPrice()
     {
@@ -131,7 +132,7 @@ public function getFormattedPrice()
      *
      * @return string
      *
-     * @deprecated
+     * @deprecated 102.0.6
      * @see getFormattedPrice()
      */
     public function getFormatedPrice()
diff --git a/app/code/Magento/Catalog/Block/Ui/ProductViewCounter.php b/app/code/Magento/Catalog/Block/Ui/ProductViewCounter.php
index 6d96ba8e1880e..c5c08a0552f42 100644
--- a/app/code/Magento/Catalog/Block/Ui/ProductViewCounter.php
+++ b/app/code/Magento/Catalog/Block/Ui/ProductViewCounter.php
@@ -26,7 +26,7 @@
  * by customer on frontend and data to synchronize this tracks with backend
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class ProductViewCounter extends Template
@@ -122,7 +122,7 @@ public function __construct(
      * requests and will be flushed with full page cache
      *
      * @return string {JSON encoded data}
-     * @since 101.1.0
+     * @since 102.0.0
      * @throws \Magento\Framework\Exception\LocalizedException
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      */
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
index 2ae97223d6359..d948daed1c7d9 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
@@ -400,7 +400,7 @@ private function overwriteValue($optionId, $option, $overwriteOptions)
      * Get link resolver instance
      *
      * @return LinkResolver
-     * @deprecated 101.0.0
+     * @deprecated 102.0.0
      */
     private function getLinkResolver()
     {
diff --git a/app/code/Magento/Catalog/Helper/Data.php b/app/code/Magento/Catalog/Helper/Data.php
index 3e96763632830..3a55164aa33ef 100644
--- a/app/code/Magento/Catalog/Helper/Data.php
+++ b/app/code/Magento/Catalog/Helper/Data.php
@@ -451,7 +451,7 @@ public function isUsingStaticUrlsAllowed()
      * Check if the parsing of URL directives is allowed for the catalog
      *
      * @return bool
-     * @deprecated
+     * @deprecated 103.0.0
      * @see \Magento\Catalog\Helper\Output::isDirectivesExists
      */
     public function isUrlDirectivesParsingAllowed()
diff --git a/app/code/Magento/Catalog/Helper/Image.php b/app/code/Magento/Catalog/Helper/Image.php
index 110b798df9df9..a06266037d05c 100644
--- a/app/code/Magento/Catalog/Helper/Image.php
+++ b/app/code/Magento/Catalog/Helper/Image.php
@@ -297,7 +297,7 @@ public function resize($width, $height = null)
      *
      * @param int $quality
      * @return $this
-     * @deprecated
+     * @deprecated 103.0.1
      */
     public function setQuality($quality)
     {
@@ -446,7 +446,7 @@ public function placeholder($fileName)
      * @param null|string $placeholder
      * @return string
      *
-     * @deprecated 101.1.0 Returns only default placeholder.
+     * @deprecated 102.0.0 Returns only default placeholder.
      * Does not take into account custom placeholders set in Configuration.
      */
     public function getPlaceholder($placeholder = null)
diff --git a/app/code/Magento/Catalog/Model/AbstractModel.php b/app/code/Magento/Catalog/Model/AbstractModel.php
index 78a49cd1e8b14..851055c1bf810 100644
--- a/app/code/Magento/Catalog/Model/AbstractModel.php
+++ b/app/code/Magento/Catalog/Model/AbstractModel.php
@@ -223,7 +223,7 @@ public function unsetData($key = null)
      * Get collection instance
      *
      * @return \Magento\Catalog\Model\ResourceModel\Collection\AbstractCollection
-     * @deprecated 101.1.0 because collections should be used directly via factory
+     * @deprecated 102.0.0 because collections should be used directly via factory
      */
     public function getResourceCollection()
     {
diff --git a/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php b/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php
index b5aa5e2035100..c3c331ccf7ef6 100644
--- a/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php
+++ b/app/code/Magento/Catalog/Model/Attribute/Backend/Customlayoutupdate.php
@@ -22,7 +22,7 @@ class Customlayoutupdate extends AbstractBackend
 {
     /**
      * @var ValidatorFactory
-     * @deprecated Is not used anymore.
+     * @deprecated 103.0.4 Is not used anymore.
      */
     protected $_layoutUpdateValidatorFactory;
 
@@ -117,6 +117,7 @@ private function putValue(AbstractModel $object, ?string $value): void
      *
      * @param AbstractModel $object
      * @throws LocalizedException
+     * @since 103.0.4
      */
     public function beforeSave($object)
     {
diff --git a/app/code/Magento/Catalog/Model/Category.php b/app/code/Magento/Catalog/Model/Category.php
index 330debdc32469..12724b65a6ebf 100644
--- a/app/code/Magento/Catalog/Model/Category.php
+++ b/app/code/Magento/Catalog/Model/Category.php
@@ -98,6 +98,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
 
     /**
      * @var ResourceModel\Category
+     * @since 102.0.6
      */
     protected $_resource;
 
@@ -105,7 +106,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
      * URL rewrite model
      *
      * @var \Magento\UrlRewrite\Model\UrlRewrite
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     protected $_urlRewrite;
 
@@ -135,7 +136,7 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
     /**
      * Attributes are that part of interface
      *
-     * @deprecated
+     * @deprecated 103.0.0
      * @see CategoryInterface::ATTRIBUTES
      * @var array
      */
@@ -319,8 +320,9 @@ protected function getCustomAttributesCodes()
      *
      * @throws \Magento\Framework\Exception\LocalizedException
      * @return \Magento\Catalog\Model\ResourceModel\Category
-     * @deprecated because resource models should be used directly
+     * @deprecated 102.0.6 because resource models should be used directly
      * phpcs:disable Generic.CodeAnalysis.UselessOverridingMethod
+     * @since 102.0.6
      */
     protected function _getResource()
     {
diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Source/Layout.php b/app/code/Magento/Catalog/Model/Category/Attribute/Source/Layout.php
index 20ea899a3d0d7..486263f3de5a6 100644
--- a/app/code/Magento/Catalog/Model/Category/Attribute/Source/Layout.php
+++ b/app/code/Magento/Catalog/Model/Category/Attribute/Source/Layout.php
@@ -19,7 +19,7 @@ class Layout extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
 
     /**
      * @inheritdoc
-     * @deprecated since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
+     * @deprecated 103.0.1 since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
      */
     protected $_options = null;
 
diff --git a/app/code/Magento/Catalog/Model/Category/DataProvider.php b/app/code/Magento/Catalog/Model/Category/DataProvider.php
index d8c79c485e3e5..0a562a9a80c89 100644
--- a/app/code/Magento/Catalog/Model/Category/DataProvider.php
+++ b/app/code/Magento/Catalog/Model/Category/DataProvider.php
@@ -246,7 +246,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getMeta()
     {
@@ -495,7 +495,7 @@ protected function addUseConfigSettings($categoryData)
      * @param Category $category
      * @param array $categoryData
      * @return array
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @since 101.0.0
      */
     protected function addUseDefaultSettings($category, $categoryData)
diff --git a/app/code/Magento/Catalog/Model/CategoryList.php b/app/code/Magento/Catalog/Model/CategoryList.php
index cc8920203526f..e7c755b379b91 100644
--- a/app/code/Magento/Catalog/Model/CategoryList.php
+++ b/app/code/Magento/Catalog/Model/CategoryList.php
@@ -97,7 +97,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Catalog/Model/FrontendStorageConfigurationInterface.php b/app/code/Magento/Catalog/Model/FrontendStorageConfigurationInterface.php
index dac9e03e0b753..c61511d1ed49f 100644
--- a/app/code/Magento/Catalog/Model/FrontendStorageConfigurationInterface.php
+++ b/app/code/Magento/Catalog/Model/FrontendStorageConfigurationInterface.php
@@ -9,7 +9,7 @@
 /**
  * @api
  * Storage, which provide information for frontend storages, as product-storage, ids-storage
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface FrontendStorageConfigurationInterface
 {
@@ -23,7 +23,7 @@ interface FrontendStorageConfigurationInterface
      * Prepare dynamic data which will be used in Storage Configuration (e.g. data from App/Config)
      *
      * @return array
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function get();
 }
diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php
index 178f4172ce6fa..6b6ad2bfc726a 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php
@@ -109,6 +109,7 @@ abstract class AbstractAction
 
     /**
      * @var TableMaintainer
+     * @since 102.0.5
      */
     protected $tableMaintainer;
 
@@ -195,7 +196,7 @@ protected function getTable($table)
      * The name is switched between 'catalog_category_product_index' and 'catalog_category_product_index_replica'
      *
      * @return string
-     * @deprecated
+     * @deprecated 102.0.5
      */
     protected function getMainTable()
     {
@@ -206,7 +207,7 @@ protected function getMainTable()
      * Return temporary index table name
      *
      * @return string
-     * @deprecated
+     * @deprecated 102.0.5
      */
     protected function getMainTmpTable()
     {
@@ -220,6 +221,7 @@ protected function getMainTmpTable()
      *
      * @param int $storeId
      * @return string
+     * @since 102.0.5
      */
     protected function getIndexTable($storeId)
     {
diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php
index c0722901e3b1c..0897ae0d74c0b 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php
@@ -368,7 +368,7 @@ protected function _fillTemporaryTable(
      * Get Metadata Pool
      *
      * @return \Magento\Framework\EntityManager\MetadataPool
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     private function getMetadataPool()
     {
diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php
index e9a907f0b5097..4846d32826cb9 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/AbstractAction.php
@@ -154,7 +154,7 @@ abstract public function execute($ids);
      * @param array $processIds
      * @return \Magento\Catalog\Model\Indexer\Product\Price\AbstractAction
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @deprecated Used only for backward compatibility for indexer, which not support indexation by dimensions
+     * @deprecated 102.0.6 Used only for backward compatibility for indexer, which not support indexation by dimensions
      */
     protected function _syncData(array $processIds = [])
     {
@@ -422,7 +422,7 @@ private function deleteIndexData(array $entityIds)
      * @param null|array $parentIds
      * @param array $excludeIds
      * @return \Magento\Catalog\Model\Indexer\Product\Price\AbstractAction
-     * @deprecated Used only for backward compatibility for do not broke custom indexer implementation
+     * @deprecated 102.0.6 Used only for backward compatibility for do not broke custom indexer implementation
      * which do not work by dimensions.
      * For indexers, which support dimensions all composite products read data directly from main price indexer table
      * or replica table for partial or full reindex correspondingly.
diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/Action/Full.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/Action/Full.php
index b30c85cfc52f0..754022b573d62 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/Action/Full.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/Action/Full.php
@@ -488,7 +488,7 @@ private function moveDataFromReplicaTableToReplicaTables(array $dimensions): voi
     /**
      * Retrieves the index table that should be used
      *
-     * @deprecated
+     * @deprecated 102.0.6
      */
     protected function getIndexTargetTable(): string
     {
diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Price/UpdateIndexInterface.php b/app/code/Magento/Catalog/Model/Indexer/Product/Price/UpdateIndexInterface.php
index 3d1809997bd61..091131508ef66 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Product/Price/UpdateIndexInterface.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Product/Price/UpdateIndexInterface.php
@@ -11,7 +11,7 @@
  * Defines strategy for updating price index
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface UpdateIndexInterface
 {
@@ -21,7 +21,7 @@ interface UpdateIndexInterface
      * @param GroupInterface $group
      * @param bool $isGroupNew
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function update(GroupInterface $group, $isGroupNew);
 }
diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php
index bc8d274fb6e63..39a9ce37faef8 100644
--- a/app/code/Magento/Catalog/Model/Product.php
+++ b/app/code/Magento/Catalog/Model/Product.php
@@ -122,6 +122,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
 
     /**
      * @var ResourceModel\Product
+     * @since 102.0.6
      */
     protected $_resource;
 
@@ -278,7 +279,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
 
     /**
      * @var \Magento\Catalog\Api\ProductAttributeRepositoryInterface
-     * @deprecated Not used anymore due to performance issue (loaded all product attributes)
+     * @deprecated 102.0.6 Not used anymore due to performance issue (loaded all product attributes)
      */
     protected $metadataService;
 
@@ -315,7 +316,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
     /**
      * List of attributes in ProductInterface
      *
-     * @deprecated
+     * @deprecated 103.0.0
      * @see ProductInterface::ATTRIBUTES
      * @var array
      */
@@ -493,7 +494,8 @@ protected function _construct()
      *
      * @throws \Magento\Framework\Exception\LocalizedException
      * @return \Magento\Catalog\Model\ResourceModel\Product
-     * @deprecated because resource models should be used directly
+     * @deprecated 102.0.6 because resource models should be used directly
+     * @since 102.0.6
      */
     protected function _getResource()
     {
@@ -640,7 +642,7 @@ public function getUpdatedAt()
      *
      * @param bool $calculate
      * @return void
-     * @deprecated
+     * @deprecated 102.0.4
      */
     public function setPriceCalculation($calculate = true)
     {
@@ -1168,6 +1170,7 @@ public function getTierPrice($qty = null)
      * Get formatted by currency product price
      *
      * @return  array|double
+     * @since 102.0.6
      */
     public function getFormattedPrice()
     {
@@ -1179,7 +1182,7 @@ public function getFormattedPrice()
      *
      * @return array|double
      *
-     * @deprecated
+     * @deprecated 102.0.6
      * @see getFormattedPrice()
      */
     public function getFormatedPrice()
@@ -2152,7 +2155,7 @@ public function reset()
     /**
      * Get cache tags associated with object id
      *
-     * @deprecated
+     * @deprecated 102.0.5
      * @see \Magento\Catalog\Model\Product::getIdentities
      * @return string[]
      */
@@ -2726,11 +2729,11 @@ public function setAssociatedProductIds(array $productIds)
      *
      * @return array|null
      *
-     * @deprecated 101.1.0 as Product model shouldn't be responsible for stock status
+     * @deprecated 102.0.0 as Product model shouldn't be responsible for stock status
      * @see StockItemInterface when you want to change the stock data
      * @see StockStatusInterface when you want to read the stock data for representation layer (storefront)
      * @see StockItemRepositoryInterface::save as extension point for customization of saving process
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getQuantityAndStockStatus()
     {
@@ -2743,11 +2746,11 @@ public function getQuantityAndStockStatus()
      * @param array $quantityAndStockStatusData
      * @return $this
      *
-     * @deprecated 101.1.0 as Product model shouldn't be responsible for stock status
+     * @deprecated 102.0.0 as Product model shouldn't be responsible for stock status
      * @see StockItemInterface when you want to change the stock data
      * @see StockStatusInterface when you want to read the stock data for representation layer (storefront)
      * @see StockItemRepositoryInterface::save as extension point for customization of saving process
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setQuantityAndStockStatus($quantityAndStockStatusData)
     {
@@ -2760,11 +2763,11 @@ public function setQuantityAndStockStatus($quantityAndStockStatusData)
      *
      * @return array|null
      *
-     * @deprecated 101.1.0 as Product model shouldn't be responsible for stock status
+     * @deprecated 102.0.0 as Product model shouldn't be responsible for stock status
      * @see StockItemInterface when you want to change the stock data
      * @see StockStatusInterface when you want to read the stock data for representation layer (storefront)
      * @see StockItemRepositoryInterface::save as extension point for customization of saving process
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getStockData()
     {
@@ -2777,11 +2780,11 @@ public function getStockData()
      * @param array $stockData
      * @return $this
      *
-     * @deprecated 101.1.0 as Product model shouldn't be responsible for stock status
+     * @deprecated 102.0.0 as Product model shouldn't be responsible for stock status
      * @see StockItemInterface when you want to change the stock data
      * @see StockStatusInterface when you want to read the stock data for representation layer (storefront)
      * @see StockItemRepositoryInterface::save as extension point for customization of saving process
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setStockData($stockData)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php
index 994ff98dee217..713a0a35abec7 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Stock.php
@@ -10,7 +10,7 @@
 /**
  * Quantity and Stock Status attribute processing
  *
- * @deprecated 101.1.0 as this attribute should be removed
+ * @deprecated 102.0.0 as this attribute should be removed
  * @see StockItemInterface when you want to change the stock data
  * @see StockStatusInterface when you want to read the stock data for representation layer (storefront)
  * @see StockItemRepositoryInterface::save as extension point for customization of saving process
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php
index bc362430089c4..c0a13aa8b934a 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php
@@ -82,7 +82,7 @@ public function getAllOptions()
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     private function getSerializer()
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Layout.php b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Layout.php
index dbc7535dccfa9..333e8021d30b5 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Source/Layout.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Source/Layout.php
@@ -19,7 +19,7 @@ class Layout extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
 
     /**
      * @inheritdoc
-     * @deprecated since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
+     * @deprecated 103.0.1 since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
      */
     protected $_options = null;
 
diff --git a/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemResolverInterface.php b/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemResolverInterface.php
index 35c0a7835cb6c..b340e5dea5eb8 100644
--- a/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemResolverInterface.php
+++ b/app/code/Magento/Catalog/Model/Product/Configuration/Item/ItemResolverInterface.php
@@ -13,6 +13,7 @@
  * Resolves the product from a configured item.
  *
  * @api
+ * @since 102.0.7
  */
 interface ItemResolverInterface
 {
@@ -21,6 +22,7 @@ interface ItemResolverInterface
      *
      * @param ItemInterface $item
      * @return ProductInterface
+     * @since 102.0.7
      */
     public function getFinalProduct(ItemInterface $item) : ProductInterface;
 }
diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php
index a0be36c5a327c..3c60d81e9a4d8 100644
--- a/app/code/Magento/Catalog/Model/Product/Image.php
+++ b/app/code/Magento/Catalog/Model/Product/Image.php
@@ -45,7 +45,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
      * Default quality value (for JPEG images only).
      *
      * @var int
-     * @deprecated use config setting with path self::XML_PATH_JPEG_QUALITY
+     * @deprecated 103.0.1 use config setting with path self::XML_PATH_JPEG_QUALITY
      */
     protected $_quality = null;
 
@@ -305,7 +305,7 @@ public function getHeight()
      *
      * @param int $quality
      * @return $this
-     * @deprecated use config setting with path self::XML_PATH_JPEG_QUALITY
+     * @deprecated 103.0.1 use config setting with path self::XML_PATH_JPEG_QUALITY
      */
     public function setQuality($quality)
     {
@@ -454,7 +454,7 @@ public function getBaseFile()
     /**
      * Get new file
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return bool|string
      */
     public function getNewFile()
diff --git a/app/code/Magento/Catalog/Model/Product/Link.php b/app/code/Magento/Catalog/Model/Product/Link.php
index 5c07d3d32b257..f2b07bad8891c 100644
--- a/app/code/Magento/Catalog/Model/Product/Link.php
+++ b/app/code/Magento/Catalog/Model/Product/Link.php
@@ -58,7 +58,7 @@ class Link extends \Magento\Framework\Model\AbstractModel
 
     /**
      * @var \Magento\CatalogInventory\Helper\Stock
-     * @deprecated 101.0.1
+     * @deprecated 101.0.0
      */
     protected $stockHelper;
 
diff --git a/app/code/Magento/Catalog/Model/Product/Option.php b/app/code/Magento/Catalog/Model/Product/Option.php
index 3a0920fb1c530..e83982b8ce672 100644
--- a/app/code/Magento/Catalog/Model/Product/Option.php
+++ b/app/code/Magento/Catalog/Model/Product/Option.php
@@ -196,7 +196,7 @@ public function __construct(
      * Get resource instance
      *
      * @return \Magento\Framework\Model\ResourceModel\Db\AbstractDb
-     * @deprecated 101.1.0 because resource models should be used directly
+     * @deprecated 102.0.0 because resource models should be used directly
      */
     protected function _getResource()
     {
@@ -246,7 +246,7 @@ public function getValueById($valueId)
      *
      * @param string $type
      * @return bool
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function hasValues($type = null)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
index 7f9181e9181b6..16fdd4cdeeb1c 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php
@@ -401,7 +401,7 @@ public function getProductOptions()
      * @param boolean $isPercent Price type - percent or fixed
      * @param float $basePrice For percent price type
      * @return float
-     * @deprecated 102.0.4 typo in method name
+     * @deprecated 102.0.6 typo in method name
      * @see _getChargeableOptionPrice
      */
     protected function _getChargableOptionPrice($price, $isPercent, $basePrice)
@@ -416,6 +416,7 @@ protected function _getChargableOptionPrice($price, $isPercent, $basePrice)
      * @param boolean $isPercent Price type - percent or fixed
      * @param float $basePrice For percent price type
      * @return float
+     * @since 102.0.6
      */
     protected function _getChargeableOptionPrice($price, $isPercent, $basePrice)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
index 9f1eae207e116..f02c607c6296c 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
@@ -411,7 +411,7 @@ public function getPrintableOptionValue($optionValue)
      * @param string $optionValue Prepared for cart option value
      * @return string
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     public function getEditableOptionValue($optionValue)
     {
@@ -435,7 +435,7 @@ public function getEditableOptionValue($optionValue)
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     public function parseOptionValue($optionValue, $productOptionValues)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php b/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php
index 3d4d9f607da48..6c5451e3ecfe0 100644
--- a/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php
+++ b/app/code/Magento/Catalog/Model/Product/Price/Validation/Result.php
@@ -10,7 +10,7 @@
  * Validation Result is used to aggregate errors that occurred during price update.
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 class Result
 {
@@ -43,7 +43,7 @@ public function __construct(
      * @param array $parameters (optional). Placeholder values in ['placeholder key' => 'placeholder value'] format
      * for failure reason message.
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function addFailedItem($id, $message, array $parameters = [])
     {
@@ -57,7 +57,7 @@ public function addFailedItem($id, $message, array $parameters = [])
      * Get ids of rows, that contained errors during price update.
      *
      * @return int[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getFailedRowIds()
     {
@@ -68,7 +68,7 @@ public function getFailedRowIds()
      * Get price update errors, that occurred during price update.
      *
      * @return \Magento\Catalog\Api\Data\PriceUpdateResultInterface[]
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getFailedItems()
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
index e6804d9246faa..2ceb6df9779b2 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
@@ -167,7 +167,7 @@ abstract public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $
      * Serializer interface instance.
      *
      * @var \Magento\Framework\Serialize\Serializer\Json
-     * @since 101.1.0
+     * @since 102.0.0
      */
     protected $serializer;
 
@@ -1106,7 +1106,7 @@ public function getAssociatedProducts($product)
      *
      * @param \Magento\Catalog\Model\Product $product
      * @return bool
-     * @since 101.1.0
+     * @since 101.0.11
      */
     public function isPossibleBuyFromList($product)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Type/FrontSpecialPrice.php b/app/code/Magento/Catalog/Model/Product/Type/FrontSpecialPrice.php
index dabfdb74f0118..a692ec5d463d0 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/FrontSpecialPrice.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/FrontSpecialPrice.php
@@ -18,7 +18,7 @@
  * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  *
- * @deprecated
+ * @deprecated 103.0.2
  * @see \Magento\Catalog\Model\Product\Type\Price
  */
 class FrontSpecialPrice extends Price
@@ -70,7 +70,7 @@ public function __construct(
     /**
      * @inheritdoc
      *
-     * @deprecated
+     * @deprecated 103.0.2
      */
     protected function _applySpecialPrice($product, $finalPrice)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Price.php b/app/code/Magento/Catalog/Model/Product/Type/Price.php
index e702965270639..74a6c7f634f81 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Price.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/Price.php
@@ -484,6 +484,7 @@ public function getTierPriceCount($product)
      * @param   Product $product
      *
      * @return  array|float
+     * @since 102.0.6
      */
     public function getFormattedTierPrice($qty, $product)
     {
@@ -509,7 +510,7 @@ public function getFormattedTierPrice($qty, $product)
      *
      * @return array|float
      *
-     * @deprecated
+     * @deprecated 102.0.6
      * @see getFormattedTierPrice()
      */
     public function getFormatedTierPrice($qty, $product)
@@ -522,6 +523,7 @@ public function getFormatedTierPrice($qty, $product)
      *
      * @param   Product $product
      * @return  array|float
+     * @since 102.0.6
      */
     public function getFormattedPrice($product)
     {
@@ -534,7 +536,7 @@ public function getFormattedPrice($product)
      * @param Product $product
      * @return array || float
      *
-     * @deprecated
+     * @deprecated 102.0.6
      * @see getFormattedPrice()
      */
     public function getFormatedPrice($product)
diff --git a/app/code/Magento/Catalog/Model/ProductIdLocatorInterface.php b/app/code/Magento/Catalog/Model/ProductIdLocatorInterface.php
index 91570b58b7328..521d53629d99c 100644
--- a/app/code/Magento/Catalog/Model/ProductIdLocatorInterface.php
+++ b/app/code/Magento/Catalog/Model/ProductIdLocatorInterface.php
@@ -8,7 +8,7 @@
 /**
  * Product ID locator provides all product IDs by SKU.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ProductIdLocatorInterface
 {
@@ -17,7 +17,7 @@ interface ProductIdLocatorInterface
      *
      * @param array $skus
      * @return array
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function retrieveProductIdsBySkus(array $skus);
 }
diff --git a/app/code/Magento/Catalog/Model/ProductLink/Repository.php b/app/code/Magento/Catalog/Model/ProductLink/Repository.php
index 960044efbc2ec..7a0b224a6153a 100644
--- a/app/code/Magento/Catalog/Model/ProductLink/Repository.php
+++ b/app/code/Magento/Catalog/Model/ProductLink/Repository.php
@@ -54,14 +54,14 @@ class Repository implements \Magento\Catalog\Api\ProductLinkRepositoryInterface
 
     /**
      * @var CollectionProvider
-     * @deprecated Not used anymore.
+     * @deprecated 103.0.4 Not used anymore.
      * @see query
      */
     protected $entityCollectionProvider;
 
     /**
      * @var LinksInitializer
-     * @deprecated Not used.
+     * @deprecated 103.0.4 Not used.
      */
     protected $linkInitializer;
 
@@ -77,14 +77,14 @@ class Repository implements \Magento\Catalog\Api\ProductLinkRepositoryInterface
 
     /**
      * @var ProductLinkInterfaceFactory
-     * @deprecated Not used anymore, search delegated.
+     * @deprecated 103.0.4 Not used anymore, search delegated.
      * @see getList()
      */
     protected $productLinkFactory;
 
     /**
      * @var ProductLinkExtensionFactory
-     * @deprecated Not used anymore, search delegated.
+     * @deprecated 103.0.4 Not used anymore, search delegated.
      * @see getList()
      */
     protected $productLinkExtensionFactory;
diff --git a/app/code/Magento/Catalog/Model/ProductRepository.php b/app/code/Magento/Catalog/Model/ProductRepository.php
index d656a0a9ac5b4..59a92656abf84 100644
--- a/app/code/Magento/Catalog/Model/ProductRepository.php
+++ b/app/code/Magento/Catalog/Model/ProductRepository.php
@@ -122,14 +122,14 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
     protected $fileSystem;
 
     /**
-     * @deprecated
+     * @deprecated 103.0.2
      *
      * @var ImageContentInterfaceFactory
      */
     protected $contentFactory;
 
     /**
-     * @deprecated
+     * @deprecated 103.0.2
      *
      * @var ImageProcessorInterface
      */
@@ -141,7 +141,7 @@ class ProductRepository implements \Magento\Catalog\Api\ProductRepositoryInterfa
     protected $extensionAttributesJoinProcessor;
 
     /**
-     * @deprecated
+     * @deprecated 103.0.2
      *
      * @var \Magento\Catalog\Model\Product\Gallery\Processor
      */
@@ -404,7 +404,7 @@ private function assignProductToWebsites(\Magento\Catalog\Model\Product $product
     /**
      * Process new gallery media entry.
      *
-     * @deprecated
+     * @deprecated 103.0.2
      * @see MediaGalleryProcessor::processNewMediaGalleryEntry()
      *
      * @param ProductInterface $product
@@ -669,7 +669,7 @@ private function addExtensionAttributes(Collection $collection) : Collection
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
@@ -728,7 +728,7 @@ private function getMediaGalleryProcessor()
     /**
      * Retrieve collection processor
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
index 4711828d8f78d..351e3314c9fb4 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
@@ -456,6 +456,7 @@ public function addRootLevelFilter()
      * Add navigation max depth filter
      *
      * @return $this
+     * @since 103.0.0
      */
     public function addNavigationMaxDepthFilter()
     {
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php
index 05950531e2178..cd1b8c8924552 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Flat.php
@@ -69,7 +69,7 @@ class Flat extends \Magento\Indexer\Model\ResourceModel\AbstractResource
      * Category collection factory
      *
      * @var \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory
-     * @deprecated 100.0.12
+     * @deprecated 100.0.2
      */
     protected $_categoryCollectionFactory;
 
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php b/app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php
index e1c90017327cd..d1769ded93d29 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php
@@ -258,6 +258,7 @@ public function afterSave()
      * Is attribute enabled for flat indexing
      *
      * @return bool
+     * @since 103.0.0
      */
     public function isEnabledInFlat()
     {
@@ -874,7 +875,7 @@ public function __wakeup()
 
     /**
      * @inheritdoc
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsUsedInGrid($isUsedInGrid)
     {
@@ -884,7 +885,7 @@ public function setIsUsedInGrid($isUsedInGrid)
 
     /**
      * @inheritdoc
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsVisibleInGrid($isVisibleInGrid)
     {
@@ -894,7 +895,7 @@ public function setIsVisibleInGrid($isVisibleInGrid)
 
     /**
      * @inheritdoc
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function setIsFilterableInGrid($isFilterableInGrid)
     {
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php
index 585da2af529a4..ab9f0e76854a6 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Layer/Filter/Price.php
@@ -410,6 +410,7 @@ protected function _construct()
     /**
      * {@inheritdoc}
      * @return string
+     * @since 102.0.6
      */
     public function getMainTable()
     {
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product.php b/app/code/Magento/Catalog/Model/ResourceModel/Product.php
index c5587d3b25665..c3f1ee28b19fe 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product.php
@@ -180,7 +180,7 @@ public function getProductWebsiteTable()
     /**
      * Product Category table name getter
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return string
      */
     public function getProductCategoryTable()
@@ -204,7 +204,7 @@ protected function _getDefaultAttributes()
     /**
      * Retrieve product website identifiers
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @param \Magento\Catalog\Model\Product|int $product
      * @return array
      */
@@ -379,7 +379,7 @@ public function delete($object)
     /**
      * Save product website relations
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @param \Magento\Catalog\Model\Product $product
      * @return $this
      */
@@ -408,7 +408,7 @@ protected function _saveWebsiteIds($product)
      * @param DataObject $object
      * @return $this
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     protected function _saveCategories(DataObject $object)
     {
@@ -776,7 +776,7 @@ private function getEntityManager()
     /**
      * Retrieve ProductWebsiteLink instance.
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return ProductWebsiteLink
      */
     private function getProductWebsiteLink()
@@ -787,7 +787,7 @@ private function getProductWebsiteLink()
     /**
      * Retrieve CategoryLink instance.
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return Product\CategoryLink
      */
     private function getProductCategoryLink()
@@ -805,7 +805,7 @@ private function getProductCategoryLink()
      * Store id is required to correctly identify attribute value we are working with.
      *
      * @inheritdoc
-     * @since 101.1.0
+     * @since 102.0.0
      */
     protected function getAttributeRow($entity, $object, $attribute)
     {
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
index 6e1efbc9db003..0cc3090100e8b 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php
@@ -731,6 +731,7 @@ protected function _afterLoad()
      * Add Store ID to products from collection.
      *
      * @return $this
+     * @since 102.0.8
      */
     protected function prepareStoreId()
     {
@@ -2220,7 +2221,7 @@ public function addTierPriceData()
      *
      * @param int $customerGroupId
      * @return $this
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function addTierPriceDataByGroupId($customerGroupId)
     {
@@ -2400,7 +2401,7 @@ function ($item) use ($linkField) {
      * Get product entity metadata
      *
      * @return \Magento\Framework\EntityManager\EntityMetadataInterface
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function getProductEntityMetadata()
     {
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/CompositeProductBatchSizeAdjusterInterface.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/CompositeProductBatchSizeAdjusterInterface.php
index c0e8858b4cfa8..2d282c5bf9741 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/CompositeProductBatchSizeAdjusterInterface.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/CompositeProductBatchSizeAdjusterInterface.php
@@ -9,7 +9,7 @@
 /**
  * Correct batch size according to number of composite related items.
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface CompositeProductBatchSizeAdjusterInterface
 {
@@ -18,7 +18,7 @@ interface CompositeProductBatchSizeAdjusterInterface
      *
      * @param int $batchSize
      * @return int
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function adjust($batchSize);
 }
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php
index b64cca4ff1b26..747b06266cce0 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/DefaultPrice.php
@@ -18,7 +18,7 @@
  * @author      Magento Core Team <core@magentocommerce.com>
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @since 100.0.2
- * @deprecated Not used anymore for price indexation. Class left for backward compatibility
+ * @deprecated 102.0.6 Not used anymore for price indexation. Class left for backward compatibility
  * @see DimensionalIndexerInterface
  */
 class DefaultPrice extends AbstractIndexer implements PriceInterface
@@ -240,7 +240,7 @@ protected function _getDefaultFinalPriceTable()
      * Prepare final price temporary index table
      *
      * @return $this
-     * @deprecated
+     * @deprecated 102.0.5
      * @see prepareFinalPriceTable()
      */
     protected function _prepareDefaultFinalPriceTable()
diff --git a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php
index 0b49ef8796ce6..d398c9c14787f 100644
--- a/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php
+++ b/app/code/Magento/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php
@@ -98,7 +98,7 @@ public function __construct(
      * Get instance of ScopePool
      *
      * @return \Magento\Framework\App\Config
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     private function getAppConfig()
     {
@@ -140,7 +140,7 @@ public function afterSave()
 
     /**
      * {@inheritdoc}
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function afterDeleteCommit()
     {
diff --git a/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php b/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php
index 6ec282e45a1a0..c1af0b41741df 100644
--- a/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php
+++ b/app/code/Magento/Catalog/Pricing/Price/ConfiguredPrice.php
@@ -65,7 +65,7 @@ public function setItem(ItemInterface $item)
     /**
      * Get value of configured options.
      *
-     * @deprecated ConfiguredOptions::getItemOptionsValue is used instead
+     * @deprecated 102.0.4 ConfiguredOptions::getItemOptionsValue is used instead
      * @return float
      */
     protected function getOptionsValue(): float
diff --git a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php
index f250927889c29..1aa43a39af442 100644
--- a/app/code/Magento/Catalog/Pricing/Price/TierPrice.php
+++ b/app/code/Magento/Catalog/Pricing/Price/TierPrice.php
@@ -29,7 +29,7 @@ class TierPrice extends AbstractPrice implements TierPriceInterface, BasePricePr
 
     /**
      * @var Session
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      */
     protected $customerSession;
 
diff --git a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php
index c80b2663d1f69..6b85ade0995a0 100644
--- a/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php
+++ b/app/code/Magento/Catalog/Ui/Component/Listing/Columns/Websites.php
@@ -109,6 +109,7 @@ public function prepare()
      * Apply sorting.
      *
      * @return void
+     * @since 103.0.2
      */
     protected function applySorting()
     {
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Alerts.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Alerts.php
index 1f154d3204454..9b328e9bcc199 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Alerts.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Alerts.php
@@ -54,7 +54,6 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 101.0.0
      */
     public function modifyData(array $data)
     {
@@ -63,7 +62,6 @@ public function modifyData(array $data)
 
     /**
      * {@inheritdoc}
-     * @since 101.0.0
      */
     public function modifyMeta(array $meta)
     {
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php
index 7608173c8edfc..d58c4bacecf65 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Categories.php
@@ -48,7 +48,7 @@ class Categories extends AbstractModifier
 
     /**
      * @var array
-     * @deprecated 101.0.3
+     * @deprecated 101.0.0
      * @since 101.0.0
      */
     protected $categoriesTrees = [];
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdate.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdate.php
index 453be0c1a1582..a0935de84627a 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdate.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/LayoutUpdate.php
@@ -50,7 +50,6 @@ private function extractLayoutUpdate(ProductInterface $product)
 
     /**
      * @inheritdoc
-     * @since 101.1.0
      */
     public function modifyData(array $data)
     {
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php
index c64d3e2e4effb..e9e8229e581ba 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/TierPrice.php
@@ -18,7 +18,7 @@
  * Tier prices modifier adds price type option to tier prices.
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 class TierPrice extends AbstractModifier
 {
@@ -46,7 +46,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function modifyData(array $data)
     {
@@ -56,7 +56,7 @@ public function modifyData(array $data)
     /**
      * Add tier price info to meta array.
      *
-     * @since 101.1.0
+     * @since 102.0.0
      * @param array $meta
      * @return array
      */
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector/Image.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector/Image.php
index d8f76c40e8fad..2324ca27ffaaf 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector/Image.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/Listing/Collector/Image.php
@@ -54,7 +54,7 @@ class Image implements ProductRenderCollectorInterface
 
     /**
      * @var DesignInterface
-     * @deprecated 2.3.0 DesignLoader is used for design theme loading
+     * @deprecated 103.0.1 DesignLoader is used for design theme loading
      */
     private $design;
 
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php
index a518afc576d61..b5d2bad1d348e 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php
@@ -130,6 +130,7 @@ public function addFilter(\Magento\Framework\Api\Filter $filter)
 
     /**
      * @inheritdoc
+     * @since 103.0.0
      */
     public function getMeta()
     {
diff --git a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductRenderCollectorInterface.php b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductRenderCollectorInterface.php
index 3f16e0a6617da..3ea21223816c1 100644
--- a/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductRenderCollectorInterface.php
+++ b/app/code/Magento/Catalog/Ui/DataProvider/Product/ProductRenderCollectorInterface.php
@@ -12,7 +12,7 @@
  * Allows to collect absolutely different product render information from different modules
  *
  * @api
- * @since 101.1.0
+ * @since 102.0.0
  */
 interface ProductRenderCollectorInterface
 {
@@ -22,7 +22,7 @@ interface ProductRenderCollectorInterface
      * @param ProductInterface $product
      * @param ProductRenderInterface $productRender
      * @return void
-     * @since 101.1.0
+     * @since 102.0.0
      */
     public function collect(ProductInterface $product, ProductRenderInterface $productRender);
 }
diff --git a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/MediaGalleryEntries.php b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/MediaGalleryEntries.php
index e1338930afe5d..8843ad02320c6 100644
--- a/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/MediaGalleryEntries.php
+++ b/app/code/Magento/CatalogGraphQl/Model/Resolver/Product/MediaGalleryEntries.php
@@ -18,7 +18,7 @@
  * @inheritdoc
  *
  * Format a product's media gallery information to conform to GraphQL schema representation
- * @deprecated
+ * @deprecated 100.3.3
  */
 class MediaGalleryEntries implements ResolverInterface
 {
diff --git a/app/code/Magento/CatalogImportExport/Model/Export/Product.php b/app/code/Magento/CatalogImportExport/Model/Export/Product.php
index 530bf6b1a0057..bcd103c6d62ba 100644
--- a/app/code/Magento/CatalogImportExport/Model/Export/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Export/Product.php
@@ -979,6 +979,7 @@ protected function getExportData()
      *
      * @return array Keys are product IDs, values arrays with keys as store IDs
      *               and values as store-specific versions of Product entity.
+     * @since 100.2.1
      */
     protected function loadCollection(): array
     {
@@ -1168,7 +1169,7 @@ protected function collectMultirawData()
      * @param \Magento\Catalog\Model\Product $item
      * @param int $storeId
      * @return bool
-     * @deprecated
+     * @deprecated 100.2.3
      */
     protected function hasMultiselectData($item, $storeId)
     {
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
index c5fcac99767bd..25bbecdce6d0f 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
@@ -225,7 +225,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
     /**
      * Links attribute name-to-link type ID.
      *
-     * @deprecated use DI for LinkProcessor class if you want to add additional types
+     * @deprecated 101.1.0 use DI for LinkProcessor class if you want to add additional types
      *
      * @var array
      */
@@ -554,7 +554,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
 
     /**
      * @var \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory
-     * @deprecated this variable isn't used anymore.
+     * @deprecated 101.0.0 this variable isn't used anymore.
      */
     protected $_stockResItemFac;
 
@@ -618,7 +618,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
 
     /**
      * @var array
-     * @deprecated 100.1.5
+     * @deprecated 100.0.3
      * @since 100.0.3
      */
     protected $productUrlKeys = [];
@@ -969,6 +969,7 @@ public function getMultipleValueSeparator()
      * Return empty attribute value constant
      *
      * @return string
+     * @since 101.0.0
      */
     public function getEmptyAttributeValueConstant()
     {
@@ -1289,7 +1290,7 @@ protected function _prepareRowForDb(array $rowData)
      *
      * Must be called after ALL products saving done.
      *
-     * @deprecated use linkProcessor Directly
+     * @deprecated 101.1.0 use linkProcessor Directly
      *
      * @return $this
      */
@@ -1473,7 +1474,7 @@ private function getNewSkuFieldsForSelect()
      *
      * @return void
      * @since 100.0.4
-     * @deprecated
+     * @deprecated 100.2.3
      */
     protected function initMediaGalleryResources()
     {
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
index a45338c391a58..65064e867801d 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/LinkProcessor.php
@@ -110,7 +110,7 @@ public function saveLinks(
     /**
      * Add link types (exists for backwards compatibility)
      *
-     * @deprecated Use DI to inject to the constructor
+     * @deprecated 101.1.0 Use DI to inject to the constructor
      * @param array $nameToIds
      */
     public function addNameToIds(array $nameToIds): void
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php
index d87c3d8477556..6571b16c87565 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product/Type/AbstractType.php
@@ -33,6 +33,7 @@ abstract class AbstractType
      * Maintain a list of invisible attributes
      *
      * @var array
+     * @since 100.2.5
      */
     public static $invAttributesCache = [];
 
diff --git a/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php b/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php
index bc314d825ba3e..6ee0e536c0ae8 100644
--- a/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php
+++ b/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php
@@ -11,6 +11,7 @@
  * Interface StockItemImporterInterface
  *
  * @api
+ * @since 101.0.0
  */
 interface StockItemImporterInterface
 {
@@ -22,6 +23,7 @@ interface StockItemImporterInterface
      * @throws \Magento\Framework\Exception\CouldNotSaveException
      * @throws \Magento\Framework\Exception\InputException
      * @throws \Magento\Framework\Validation\ValidationException
+     * @since 101.0.0
      */
     public function import(array $stockData);
 }
diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php
index 9ae22e5e1a364..07b8429ddf188 100644
--- a/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/Data/StockCollectionInterface.php
@@ -16,7 +16,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php
index 087fae6e6568a..581081f2924ea 100644
--- a/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/Data/StockInterface.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php
index 59a1f58b74c2c..2d5f980a57039 100644
--- a/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemCollectionInterface.php
@@ -16,7 +16,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php
index e2e8a744c4bcd..759cc9883be9f 100644
--- a/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php
index 1cc045745a0c1..a7d70a943d405 100644
--- a/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/Data/StockStatusCollectionInterface.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php b/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php
index 66b639fb088d1..35e56b0e3e7bb 100644
--- a/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/Data/StockStatusInterface.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php b/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php
index 6fd1e7466970d..ddb3fce22a853 100644
--- a/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/RegisterProductSaleInterface.php
@@ -13,9 +13,10 @@
 /**
  * @api
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
+ * @since 100.3.0
  */
 interface RegisterProductSaleInterface
 {
@@ -29,6 +30,7 @@ interface RegisterProductSaleInterface
      * @param int $websiteId
      * @return StockItemInterface[]
      * @throws LocalizedException
+     * @since 100.3.0
      */
     public function registerProductsSale($items, $websiteId = null);
 }
diff --git a/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php b/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php
index 552e30da89235..83f7d73deaed9 100644
--- a/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/RevertProductSaleInterface.php
@@ -10,9 +10,10 @@
 /**
  * @api
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
+ * @since 100.3.0
  */
 interface RevertProductSaleInterface
 {
@@ -24,6 +25,7 @@ interface RevertProductSaleInterface
      * @param string[] $items
      * @param int $websiteId
      * @return bool
+     * @since 100.3.0
      */
     public function revertProductsSale($items, $websiteId = null);
 }
diff --git a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php
index 5019e86b7af40..ab52580988c5e 100644
--- a/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockConfigurationInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php
index eb6fb2e812f2e..92f2290ec08ad 100644
--- a/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockCriteriaInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php b/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php
index 18bab6571c209..24dbaf5bb6d5f 100644
--- a/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockIndexInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php
index 1d2cabbb48a11..b72289ee09278 100644
--- a/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockItemCriteriaInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php
index eecf6cbe07632..4269569f9da1a 100644
--- a/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockItemRepositoryInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php b/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php
index 8796953e32fd0..3c1c7ea137c89 100644
--- a/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockManagementInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php b/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php
index 5478f90fb7d9f..bab5f9b457c45 100644
--- a/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockRegistryInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php
index 3cfdf45506340..a7d64ec9eedb3 100644
--- a/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockRepositoryInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockStateInterface.php b/app/code/Magento/CatalogInventory/Api/StockStateInterface.php
index 8be7f5be79f27..d404e885d78df 100644
--- a/app/code/Magento/CatalogInventory/Api/StockStateInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockStateInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php b/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php
index 99ad7005d9da4..be1c9642826a7 100644
--- a/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockStatusCriteriaInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php b/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php
index d29171f557f05..91efd55761335 100644
--- a/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php
+++ b/app/code/Magento/CatalogInventory/Api/StockStatusRepositoryInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php
index ffcb758dcbd66..bc63114d99801 100644
--- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php
+++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php
@@ -13,7 +13,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
index 5378801b6c24b..3c1a6e7982708 100644
--- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
+++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
@@ -15,7 +15,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php
index a12b72cd0a971..dd8c987fe5da4 100644
--- a/app/code/Magento/CatalogInventory/Block/Qtyincrements.php
+++ b/app/code/Magento/CatalogInventory/Block/Qtyincrements.php
@@ -15,7 +15,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php b/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php
index 5a3a3ca6ee983..c19dc5fb34bf6 100644
--- a/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php
+++ b/app/code/Magento/CatalogInventory/Block/Stockqty/DefaultStockqty.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Helper/Stock.php b/app/code/Magento/CatalogInventory/Helper/Stock.php
index 798ac4074c188..87a0e3c32ad09 100644
--- a/app/code/Magento/CatalogInventory/Helper/Stock.php
+++ b/app/code/Magento/CatalogInventory/Helper/Stock.php
@@ -19,9 +19,10 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
+ * @since 100.0.2
  */
 class Stock
 {
diff --git a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php
index 145b0d1454ae2..04e54acad5c0e 100644
--- a/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php
+++ b/app/code/Magento/CatalogInventory/Model/Adminhtml/Stock/Item.php
@@ -21,7 +21,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php
index e67568b80898e..2ccb726f2c625 100644
--- a/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php
+++ b/app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator.php
@@ -26,7 +26,7 @@
  * @since 100.0.2
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php
index c5644060c689f..c151e5897abd5 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php
@@ -19,7 +19,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php
index 115002b237645..665ebf2db2f30 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/QueryProcessorInterface.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.1.0
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php
index 24ed496372817..9a1945d5aefac 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/StockInterface.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php
index 0ee162e429f40..49e4889c8edee 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/StockFactory.php
@@ -13,7 +13,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php
index 31b2ada809823..1f6f3a16ac617 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php
@@ -223,7 +223,7 @@ protected function _initConfig()
     /**
      * Set items out of stock basing on their quantities and config settings
      *
-     * @deprecated
+     * @deprecated 100.2.5
      * @see \Magento\CatalogInventory\Model\ResourceModel\Stock\Item::updateSetOutOfStock
      * @param string|int $website
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -260,7 +260,7 @@ public function updateSetOutOfStock($website = null)
     /**
      * Set items in stock basing on their quantities and config settings
      *
-     * @deprecated
+     * @deprecated 100.2.5
      * @see \Magento\CatalogInventory\Model\ResourceModel\Stock\Item::updateSetInStock
      * @param int|string $website
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -295,7 +295,7 @@ public function updateSetInStock($website)
     /**
      * Update items low stock date basing on their quantities and config settings
      *
-     * @deprecated
+     * @deprecated 100.2.5
      * @see \Magento\CatalogInventory\Model\ResourceModel\Stock\Item::updateLowStockDate
      * @param int|string $website
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php
index 402ce5f2f611e..25bc0a0ce899e 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock/Status.php
@@ -14,9 +14,10 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
+ * @since 100.0.2
  */
 class Status extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
 {
@@ -227,6 +228,7 @@ public function addStockStatusToSelect(\Magento\Framework\DB\Select $select, \Ma
      * @param \Magento\Catalog\Model\ResourceModel\Product\Collection $collection
      * @param bool $isFilterInStock
      * @return \Magento\Catalog\Model\ResourceModel\Product\Collection $collection
+     * @since 100.0.6
      */
     public function addStockDataToCollection($collection, $isFilterInStock)
     {
diff --git a/app/code/Magento/CatalogInventory/Model/Source/Backorders.php b/app/code/Magento/CatalogInventory/Model/Source/Backorders.php
index 0bffb9a9888cd..d28da4e5b3497 100644
--- a/app/code/Magento/CatalogInventory/Model/Source/Backorders.php
+++ b/app/code/Magento/CatalogInventory/Model/Source/Backorders.php
@@ -10,7 +10,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/Source/Stock.php b/app/code/Magento/CatalogInventory/Model/Source/Stock.php
index 9661fc83ce275..69e80658ecd74 100644
--- a/app/code/Magento/CatalogInventory/Model/Source/Stock.php
+++ b/app/code/Magento/CatalogInventory/Model/Source/Stock.php
@@ -12,7 +12,7 @@
  * @api
  * @since 100.0.2
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.0 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
@@ -38,6 +38,7 @@ public function getAllOptions()
      * @param string $dir
      *
      * @return $this
+     * @since 100.2.4
      */
     public function addValueSortToCollection($collection, $dir = \Magento\Framework\Data\Collection::SORT_ORDER_DESC)
     {
diff --git a/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php b/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php
index 0fa4b919c40fa..b2dfe532ffbe0 100644
--- a/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php
+++ b/app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface StockRegistryProviderInterface
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.2 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php b/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php
index 30f703b5b928f..5bb78e1489b39 100644
--- a/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php
+++ b/app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php
@@ -10,7 +10,7 @@
 /**
  * Interface StockStateProviderInterface
  *
- * @deprecated 2.3.0 Replaced with Multi Source Inventory
+ * @deprecated 100.3.2 Replaced with Multi Source Inventory
  * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  */
diff --git a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php
index 1fc53c78985fb..df167d171e001 100644
--- a/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php
+++ b/app/code/Magento/CatalogRule/Model/Indexer/IndexBuilder.php
@@ -30,7 +30,7 @@ class IndexBuilder
 
     /**
      * @var \Magento\Framework\EntityManager\MetadataPool
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @since 100.1.0
      */
     protected $metadataPool;
@@ -41,7 +41,7 @@ class IndexBuilder
      * This array contain list of CatalogRuleGroupWebsite table columns
      *
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_catalogRuleGroupWebsiteColumnsList = ['rule_id', 'customer_group_id', 'website_id'];
 
@@ -446,7 +446,7 @@ private function assignProductToRule(Rule $rule, int $productEntityId, array $we
      * @param Product $product
      * @return $this
      * @throws \Exception
-     * @deprecated
+     * @deprecated 101.1.5
      * @see ReindexRuleProduct::execute
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
@@ -500,7 +500,7 @@ protected function getTable($tableName)
      *
      * @param Rule $rule
      * @return $this
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see ReindexRuleProduct::execute
      */
     protected function updateRuleProductData(Rule $rule)
@@ -528,7 +528,7 @@ protected function updateRuleProductData(Rule $rule)
      * @param Product|null $product
      * @throws \Exception
      * @return $this
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see ReindexRuleProductPrice::execute
      * @see ReindexRuleGroupWebsite::execute
      */
@@ -543,7 +543,7 @@ protected function applyAllRules(Product $product = null)
      * Update CatalogRuleGroupWebsite data
      *
      * @return $this
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see ReindexRuleGroupWebsite::execute
      */
     protected function updateCatalogRuleGroupWebsiteData()
@@ -569,7 +569,7 @@ protected function deleteOldData()
      * @param array $ruleData
      * @param array $productData
      * @return float
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see ProductPriceCalculator::calculate
      */
     protected function calcRuleProductPrice($ruleData, $productData = null)
@@ -584,7 +584,7 @@ protected function calcRuleProductPrice($ruleData, $productData = null)
      * @param Product|null $product
      * @return \Zend_Db_Statement_Interface
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see RuleProductsSelectBuilder::build
      */
     protected function getRuleProductsStmt($websiteId, Product $product = null)
@@ -598,7 +598,7 @@ protected function getRuleProductsStmt($websiteId, Product $product = null)
      * @param array $arrData
      * @return $this
      * @throws \Exception
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see RuleProductPricesPersistor::execute
      */
     protected function saveRuleProductPrices($arrData)
diff --git a/app/code/Magento/CatalogSearch/Model/Advanced.php b/app/code/Magento/CatalogSearch/Model/Advanced.php
index 8ce2e0140f528..5143762a07e08 100644
--- a/app/code/Magento/CatalogSearch/Model/Advanced.php
+++ b/app/code/Magento/CatalogSearch/Model/Advanced.php
@@ -67,7 +67,7 @@ class Advanced extends \Magento\Framework\Model\AbstractModel
     /**
      * Initialize dependencies
      *
-     * @deprecated
+     * @deprecated 101.0.2
      * @var Config
      */
     protected $_catalogConfig;
diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php
index ca6ff0720023f..e226bdc6900e6 100644
--- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext.php
@@ -126,6 +126,7 @@ public function execute($entityIds)
      * @inheritdoc
      *
      * @throws \InvalidArgumentException
+     * @since 101.0.0
      */
     public function executeByDimensions(array $dimensions, \Traversable $entityIds = null)
     {
diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php
index bd63e1e79989c..fa4d9fee415cf 100644
--- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php
+++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php
@@ -41,7 +41,7 @@ class Full
      * Index values separator
      *
      * @var string
-     * @deprecated 100.1.6 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
+     * @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
      * @see \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider::$separator
      */
     protected $separator = ' | ';
@@ -50,7 +50,7 @@ class Full
      * Array of \DateTime objects per store
      *
      * @var \DateTime[]
-     * @deprecated 100.1.6 Not used anymore
+     * @deprecated 100.1.0 Not used anymore
      */
     protected $dates = [];
 
@@ -58,7 +58,7 @@ class Full
      * Product Type Instances cache
      *
      * @var array
-     * @deprecated 100.1.6 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
+     * @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
      * @see \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider::$productTypes
      */
     protected $productTypes = [];
@@ -67,7 +67,7 @@ class Full
      * Product Emulators cache
      *
      * @var array
-     * @deprecated 100.1.6 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
+     * @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
      * @see \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider::$productEmulators
      */
     protected $productEmulators = [];
@@ -95,7 +95,7 @@ class Full
      * Catalog product type
      *
      * @var \Magento\Catalog\Model\Product\Type
-     * @deprecated 100.1.6 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
+     * @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
      * @see \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider::$catalogProductType
      */
     protected $catalogProductType;
@@ -111,7 +111,7 @@ class Full
      * Core store config
      *
      * @var \Magento\Framework\App\Config\ScopeConfigInterface
-     * @deprecated 100.1.6 Not used anymore
+     * @deprecated 100.1.0 Not used anymore
      */
     protected $scopeConfig;
 
@@ -119,7 +119,7 @@ class Full
      * Store manager
      *
      * @var \Magento\Store\Model\StoreManagerInterface
-     * @deprecated 100.1.6 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
+     * @deprecated 100.1.0 Moved to \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider
      * @see \Magento\CatalogSearch\Model\Indexer\Fulltext\Action\DataProvider::$storeManager
      */
     protected $storeManager;
@@ -131,25 +131,25 @@ class Full
 
     /**
      * @var \Magento\Framework\Indexer\SaveHandler\IndexerInterface
-     * @deprecated 100.1.6 As part of self::cleanIndex()
+     * @deprecated 100.1.0 As part of self::cleanIndex()
      */
     protected $indexHandler;
 
     /**
      * @var \Magento\Framework\Stdlib\DateTime
-     * @deprecated 100.1.6 Not used anymore
+     * @deprecated 100.1.0 Not used anymore
      */
     protected $dateTime;
 
     /**
      * @var \Magento\Framework\Locale\ResolverInterface
-     * @deprecated 100.1.6 Not used anymore
+     * @deprecated 100.1.0 Not used anymore
      */
     protected $localeResolver;
 
     /**
      * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface
-     * @deprecated 100.1.6 Not used anymore
+     * @deprecated 100.1.0 Not used anymore
      */
     protected $localeDate;
 
@@ -160,19 +160,19 @@ class Full
 
     /**
      * @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext
-     * @deprecated 100.1.6 Not used anymore
+     * @deprecated 100.1.0 Not used anymore
      */
     protected $fulltextResource;
 
     /**
      * @var \Magento\Framework\Search\Request\Config
-     * @deprecated 100.1.6 As part of self::reindexAll()
+     * @deprecated 100.1.0 As part of self::reindexAll()
      */
     protected $searchRequestConfig;
 
     /**
      * @var \Magento\Framework\Search\Request\DimensionFactory
-     * @deprecated 100.1.6 As part of self::cleanIndex()
+     * @deprecated 100.1.0 As part of self::cleanIndex()
      */
     private $dimensionFactory;
 
@@ -301,7 +301,7 @@ protected function getTable($table)
     /**
      * Get parents IDs of product IDs to be re-indexed
      *
-     * @deprecated as it not used in the class anymore and duplicates another API method
+     * @deprecated 100.2.3 as it not used in the class anymore and duplicates another API method
      * @see \Magento\CatalogSearch\Model\ResourceModel\Fulltext::getRelationsByChild()
      *
      * @param int[] $entityIds
diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php b/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php
index 8722cd52b618a..c79d876c1127d 100644
--- a/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php
+++ b/app/code/Magento/CatalogSearch/Model/Indexer/Scope/UnknownStateException.php
@@ -13,7 +13,7 @@
  *
  * @api
  * @since 100.2.0
- * @deprecated
+ * @deprecated 101.0.0
  * @see \Magento\ElasticSearch
  */
 class UnknownStateException extends LocalizedException
diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php
index 291fad1e16ebf..47160bff1d571 100644
--- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Advanced/Collection.php
@@ -236,6 +236,7 @@ public function addFieldsToFilter($fields)
 
     /**
      * @inheritdoc
+     * @since 101.0.2
      */
     public function setOrder($attribute, $dir = Select::SQL_DESC)
     {
@@ -253,6 +254,7 @@ public function setOrder($attribute, $dir = Select::SQL_DESC)
 
     /**
      * @inheritdoc
+     * @since 101.0.2
      */
     public function addCategoryFilter(\Magento\Catalog\Model\Category $category)
     {
@@ -272,6 +274,7 @@ public function addCategoryFilter(\Magento\Catalog\Model\Category $category)
 
     /**
      * @inheritdoc
+     * @since 101.0.2
      */
     public function setVisibility($visibility)
     {
@@ -338,6 +341,7 @@ protected function _renderFiltersBefore()
 
     /**
      * @inheritDoc
+     * @since 101.0.4
      */
     public function clear()
     {
@@ -347,6 +351,7 @@ public function clear()
 
     /**
      * @inheritDoc
+     * @since 101.0.4
      */
     protected function _reset()
     {
@@ -356,6 +361,7 @@ protected function _reset()
 
     /**
      * @inheritdoc
+     * @since 101.0.4
      */
     public function _loadEntities($printQuery = false, $logQuery = false)
     {
diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/EngineProvider.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/EngineProvider.php
index d1259159606d3..d0456ff011027 100644
--- a/app/code/Magento/CatalogSearch/Model/ResourceModel/EngineProvider.php
+++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/EngineProvider.php
@@ -29,7 +29,7 @@ class EngineProvider
 
     /**
      * @var \Magento\Framework\App\Config\ScopeConfigInterface
-     * @deprecated since it is not used anymore
+     * @deprecated 101.0.0 since it is not used anymore
      */
     protected $scopeConfig;
 
diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext.php
index 0835fb66f876a..3614cd9dbf3a9 100644
--- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext.php
@@ -62,7 +62,7 @@ protected function _construct()
      * Reset search results
      *
      * @return $this
-     * @deprecated Not used anymore
+     * @deprecated 101.0.0 Not used anymore
      * @see Fulltext::resetSearchResultsByStore
      */
     public function resetSearchResults()
@@ -78,6 +78,7 @@ public function resetSearchResults()
      *
      * @param int $storeId
      * @return $this
+     * @since 101.0.0
      */
     public function resetSearchResultsByStore($storeId)
     {
diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php
index e63ed1bd3d72f..06dcc69ef60f5 100644
--- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection.php
@@ -337,6 +337,7 @@ public function addFieldToFilter($field, $condition = null)
 
     /**
      * @inheritDoc
+     * @since 101.0.4
      */
     public function clear()
     {
@@ -348,6 +349,7 @@ public function clear()
 
     /**
      * @inheritDoc
+     * @since 101.0.4
      */
     protected function _reset()
     {
@@ -359,6 +361,7 @@ protected function _reset()
 
     /**
      * @inheritdoc
+     * @since 101.0.4
      */
     public function _loadEntities($printQuery = false, $logQuery = false)
     {
@@ -429,6 +432,7 @@ public function setOrder($attribute, $dir = Select::SQL_DESC)
      * @param string $attribute
      * @param string $dir
      * @return $this
+     * @since 101.0.2
      */
     public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC)
     {
@@ -555,6 +559,7 @@ private function getSearchResultApplier(SearchResultInterface $searchResult): Se
 
     /**
      * @inheritdoc
+     * @since 100.2.3
      */
     protected function _beforeLoad()
     {
diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php
index b396437fc66c7..a7e9c237f58c3 100644
--- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php
+++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php
@@ -8,7 +8,7 @@
 
 /**
  * This class add in backward compatibility purposes to check if need to apply old strategy for filter prepare process.
- * @deprecated
+ * @deprecated 101.0.2
  */
 class DefaultFilterStrategyApplyChecker implements DefaultFilterStrategyApplyCheckerInterface
 {
diff --git a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyCheckerInterface.php b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyCheckerInterface.php
index a067767775393..d9e41af658089 100644
--- a/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyCheckerInterface.php
+++ b/app/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyCheckerInterface.php
@@ -8,7 +8,7 @@
 
 /**
  * Added in backward compatibility purposes to check if need to apply old strategy for filter prepare process.
- * @deprecated
+ * @deprecated 101.0.2
  */
 interface DefaultFilterStrategyApplyCheckerInterface
 {
diff --git a/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php b/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php
index 916e03f471493..2f6a402b20406 100644
--- a/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php
+++ b/app/code/Magento/CatalogSearch/Model/Search/ReaderPlugin.php
@@ -6,7 +6,7 @@
 namespace Magento\CatalogSearch\Model\Search;
 
 /**
- * @deprecated
+ * @deprecated 101.0.0
  * @see \Magento\ElasticSearch
  */
 class ReaderPlugin
diff --git a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator/GeneratorResolver.php b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator/GeneratorResolver.php
index 68ca546b81919..aa3bd1f149c16 100644
--- a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator/GeneratorResolver.php
+++ b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator/GeneratorResolver.php
@@ -9,7 +9,7 @@
 /**
  * @api
  * @since 100.1.6
- * @deprecated
+ * @deprecated 101.0.0
  * @see \Magento\ElasticSearch
  */
 class GeneratorResolver
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Category/CurrentUrlRewritesRegenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/Category/CurrentUrlRewritesRegenerator.php
index f8d9ddf0c4ad9..5a339670bbb81 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/Category/CurrentUrlRewritesRegenerator.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/Category/CurrentUrlRewritesRegenerator.php
@@ -27,13 +27,13 @@ class CurrentUrlRewritesRegenerator
 
     /**
      * @var \Magento\Catalog\Model\Category
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $category;
 
     /**
      * @var \Magento\UrlRewrite\Model\UrlFinderInterface
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $urlFinder;
 
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGenerator.php
index a86604672e2b4..d48bcd446fcfd 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGenerator.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/CategoryUrlRewriteGenerator.php
@@ -30,7 +30,7 @@ class CategoryUrlRewriteGenerator
 
     /**
      * @var \Magento\Catalog\Model\Category
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $category;
 
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/Product/CurrentUrlRewritesRegenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/Product/CurrentUrlRewritesRegenerator.php
index 42d3fd9cb40e1..628615803f6e8 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/Product/CurrentUrlRewritesRegenerator.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/Product/CurrentUrlRewritesRegenerator.php
@@ -26,19 +26,19 @@ class CurrentUrlRewritesRegenerator
 {
     /**
      * @var Product
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $product;
 
     /**
      * @var ObjectRegistry
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $productCategories;
 
     /**
      * @var UrlFinderInterface
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $urlFinder;
 
diff --git a/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlRewriteGenerator.php b/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlRewriteGenerator.php
index 868c417b5ff52..f5e6ae9a6d615 100644
--- a/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlRewriteGenerator.php
+++ b/app/code/Magento/CatalogUrlRewrite/Model/ProductUrlRewriteGenerator.php
@@ -26,49 +26,49 @@ class ProductUrlRewriteGenerator
     const ENTITY_TYPE = 'product';
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\CatalogUrlRewrite\Service\V1\StoreViewService
      */
     protected $storeViewService;
 
     /**
      * @var \Magento\Catalog\Model\Product
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      */
     protected $product;
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\CatalogUrlRewrite\Model\Product\CurrentUrlRewritesRegenerator
      */
     protected $currentUrlRewritesRegenerator;
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\CatalogUrlRewrite\Model\Product\CategoriesUrlRewriteGenerator
      */
     protected $categoriesUrlRewriteGenerator;
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\CatalogUrlRewrite\Model\Product\CanonicalUrlRewriteGenerator
      */
     protected $canonicalUrlRewriteGenerator;
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\CatalogUrlRewrite\Model\ObjectRegistryFactory
      */
     protected $objectRegistryFactory;
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\CatalogUrlRewrite\Model\ObjectRegistry
      */
     protected $productCategories;
 
     /**
-     * @deprecated 100.1.4
+     * @deprecated 100.1.0
      * @var \Magento\Store\Model\StoreManagerInterface
      */
     protected $storeManager;
diff --git a/app/code/Magento/Checkout/Api/AgreementsValidatorInterface.php b/app/code/Magento/Checkout/Api/AgreementsValidatorInterface.php
index d97492f31a79d..22d4fdf502f7c 100644
--- a/app/code/Magento/Checkout/Api/AgreementsValidatorInterface.php
+++ b/app/code/Magento/Checkout/Api/AgreementsValidatorInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface AgreementsValidatorInterface
  * @api
+ * @since 100.0.2
  */
 interface AgreementsValidatorInterface
 {
diff --git a/app/code/Magento/Checkout/Api/Data/PaymentDetailsInterface.php b/app/code/Magento/Checkout/Api/Data/PaymentDetailsInterface.php
index cad1c100c7e5b..361c50cdcfe86 100644
--- a/app/code/Magento/Checkout/Api/Data/PaymentDetailsInterface.php
+++ b/app/code/Magento/Checkout/Api/Data/PaymentDetailsInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface PaymentDetailsInterface
  * @api
+ * @since 100.0.2
  */
 interface PaymentDetailsInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
diff --git a/app/code/Magento/Checkout/Api/Data/ShippingInformationInterface.php b/app/code/Magento/Checkout/Api/Data/ShippingInformationInterface.php
index e4032066a6f10..188d2987e5daf 100644
--- a/app/code/Magento/Checkout/Api/Data/ShippingInformationInterface.php
+++ b/app/code/Magento/Checkout/Api/Data/ShippingInformationInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface ShippingInformationInterface
  * @api
+ * @since 100.0.2
  */
 interface ShippingInformationInterface extends \Magento\Framework\Api\CustomAttributesDataInterface
 {
diff --git a/app/code/Magento/Checkout/Api/Data/TotalsInformationInterface.php b/app/code/Magento/Checkout/Api/Data/TotalsInformationInterface.php
index a9dd05856b72f..c8234bb560cba 100644
--- a/app/code/Magento/Checkout/Api/Data/TotalsInformationInterface.php
+++ b/app/code/Magento/Checkout/Api/Data/TotalsInformationInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface TotalsInformationInterface
  * @api
+ * @since 100.0.2
  */
 interface TotalsInformationInterface extends \Magento\Framework\Api\CustomAttributesDataInterface
 {
diff --git a/app/code/Magento/Checkout/Api/GuestPaymentInformationManagementInterface.php b/app/code/Magento/Checkout/Api/GuestPaymentInformationManagementInterface.php
index 63296081ab97c..80c2bb7752b73 100644
--- a/app/code/Magento/Checkout/Api/GuestPaymentInformationManagementInterface.php
+++ b/app/code/Magento/Checkout/Api/GuestPaymentInformationManagementInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface for managing guest payment information
  * @api
+ * @since 100.0.2
  */
 interface GuestPaymentInformationManagementInterface
 {
diff --git a/app/code/Magento/Checkout/Api/GuestShippingInformationManagementInterface.php b/app/code/Magento/Checkout/Api/GuestShippingInformationManagementInterface.php
index def7442ad4672..6ac5ec9442b6f 100644
--- a/app/code/Magento/Checkout/Api/GuestShippingInformationManagementInterface.php
+++ b/app/code/Magento/Checkout/Api/GuestShippingInformationManagementInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface for managing guest shipping address information
  * @api
+ * @since 100.0.2
  */
 interface GuestShippingInformationManagementInterface
 {
diff --git a/app/code/Magento/Checkout/Api/GuestTotalsInformationManagementInterface.php b/app/code/Magento/Checkout/Api/GuestTotalsInformationManagementInterface.php
index d2d7dfad609cb..c98d193534d36 100644
--- a/app/code/Magento/Checkout/Api/GuestTotalsInformationManagementInterface.php
+++ b/app/code/Magento/Checkout/Api/GuestTotalsInformationManagementInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface for guest quote totals calculation
  * @api
+ * @since 100.0.2
  */
 interface GuestTotalsInformationManagementInterface
 {
diff --git a/app/code/Magento/Checkout/Api/PaymentInformationManagementInterface.php b/app/code/Magento/Checkout/Api/PaymentInformationManagementInterface.php
index f80deca1acc5a..b025dc4c7c4a4 100644
--- a/app/code/Magento/Checkout/Api/PaymentInformationManagementInterface.php
+++ b/app/code/Magento/Checkout/Api/PaymentInformationManagementInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface for managing quote payment information
  * @api
+ * @since 100.0.2
  */
 interface PaymentInformationManagementInterface
 {
diff --git a/app/code/Magento/Checkout/Api/ShippingInformationManagementInterface.php b/app/code/Magento/Checkout/Api/ShippingInformationManagementInterface.php
index 0d22e1485c099..ee8fb42a581c0 100644
--- a/app/code/Magento/Checkout/Api/ShippingInformationManagementInterface.php
+++ b/app/code/Magento/Checkout/Api/ShippingInformationManagementInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface for managing customer shipping address information
  * @api
+ * @since 100.0.2
  */
 interface ShippingInformationManagementInterface
 {
diff --git a/app/code/Magento/Checkout/Api/TotalsInformationManagementInterface.php b/app/code/Magento/Checkout/Api/TotalsInformationManagementInterface.php
index 60fd254eb199e..f3ecf957f3e06 100644
--- a/app/code/Magento/Checkout/Api/TotalsInformationManagementInterface.php
+++ b/app/code/Magento/Checkout/Api/TotalsInformationManagementInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface for quote totals calculation
  * @api
+ * @since 100.0.2
  */
 interface TotalsInformationManagementInterface
 {
diff --git a/app/code/Magento/Checkout/Block/Cart.php b/app/code/Magento/Checkout/Block/Cart.php
index 7940c37917624..76bf917f02d8b 100644
--- a/app/code/Magento/Checkout/Block/Cart.php
+++ b/app/code/Magento/Checkout/Block/Cart.php
@@ -11,6 +11,7 @@
  * Shopping cart block
  *
  * @api
+ * @since 100.0.2
  */
 class Cart extends \Magento\Checkout\Block\Cart\AbstractCart
 {
@@ -239,7 +240,7 @@ public function getItemsCount()
      * Render pagination HTML
      *
      * @return string
-     * @since 100.2.0
+     * @since 100.1.7
      */
     public function getPagerHtml()
     {
diff --git a/app/code/Magento/Checkout/Block/Cart/Additional/Info.php b/app/code/Magento/Checkout/Block/Cart/Additional/Info.php
index 196992cbaf9c8..9bf8c8c8e9b51 100644
--- a/app/code/Magento/Checkout/Block/Cart/Additional/Info.php
+++ b/app/code/Magento/Checkout/Block/Cart/Additional/Info.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Info extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Coupon.php b/app/code/Magento/Checkout/Block/Cart/Coupon.php
index acf3c0922f3c9..98707e7e7c694 100644
--- a/app/code/Magento/Checkout/Block/Cart/Coupon.php
+++ b/app/code/Magento/Checkout/Block/Cart/Coupon.php
@@ -11,6 +11,7 @@
  * Block with apply-coupon form.
  *
  * @api
+ * @since 100.0.2
  */
 class Coupon extends \Magento\Checkout\Block\Cart\AbstractCart
 {
@@ -44,6 +45,7 @@ public function getCouponCode()
 
     /**
      * @inheritDoc
+     * @since 100.3.2
      */
     protected function _prepareLayout()
     {
diff --git a/app/code/Magento/Checkout/Block/Cart/Crosssell.php b/app/code/Magento/Checkout/Block/Cart/Crosssell.php
index 06be50d05aefc..5e129a958b535 100644
--- a/app/code/Magento/Checkout/Block/Cart/Crosssell.php
+++ b/app/code/Magento/Checkout/Block/Cart/Crosssell.php
@@ -12,6 +12,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Grid.php b/app/code/Magento/Checkout/Block/Cart/Grid.php
index bfe4b6ceed9d0..db5d90ecddc16 100644
--- a/app/code/Magento/Checkout/Block/Cart/Grid.php
+++ b/app/code/Magento/Checkout/Block/Cart/Grid.php
@@ -13,7 +13,7 @@
  * custom_items weren't set to cart block
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.7
  */
 class Grid extends \Magento\Checkout\Block\Cart
 {
@@ -56,7 +56,6 @@ class Grid extends \Magento\Checkout\Block\Cart
      * @param \Magento\Quote\Model\ResourceModel\Quote\Item\CollectionFactory $itemCollectionFactory
      * @param \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor
      * @param array $data
-     * @since 100.2.0
      */
     public function __construct(
         \Magento\Framework\View\Element\Template\Context $context,
@@ -89,7 +88,7 @@ public function __construct(
      * Configuration path is Store->Configuration->Sales->Checkout->Shopping Cart->Number of items to display pager
      *
      * @return void
-     * @since 100.2.0
+     * @since 100.1.7
      */
     protected function _construct()
     {
@@ -103,7 +102,7 @@ protected function _construct()
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 100.1.7
      */
     protected function _prepareLayout()
     {
@@ -128,7 +127,7 @@ protected function _prepareLayout()
      * Prepare quote items collection for pager
      *
      * @return \Magento\Quote\Model\ResourceModel\Quote\Item\Collection
-     * @since 100.2.0
+     * @since 100.1.7
      */
     public function getItemsForGrid()
     {
@@ -147,7 +146,7 @@ public function getItemsForGrid()
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 100.1.7
      */
     public function getItems()
     {
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Configure.php b/app/code/Magento/Checkout/Block/Cart/Item/Configure.php
index 086518a312f71..c5c3af1d3c8c9 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Configure.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Configure.php
@@ -11,6 +11,7 @@
  *
  * @api
  * @module     Checkout
+ * @since 100.0.2
  */
 class Configure extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php
index c99c9041941b1..830191bd13c40 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php
@@ -24,6 +24,7 @@
  * @method \Magento\Checkout\Block\Cart\Item\Renderer setDeleteUrl(string)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
+ * @since 100.0.2
  */
 class Renderer extends \Magento\Framework\View\Element\Template implements
     \Magento\Framework\DataObject\IdentityInterface
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php
index 3be4f76d8d67e..b2d4ef28347a5 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Actions extends Text
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Edit.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Edit.php
index 4542f19c4670a..fd34cdc4314f5 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Edit.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Edit.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Edit extends Generic
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php
index d50eeb1b0a263..b52c7dc4c2131 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Actions/Remove.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Remove extends Generic
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Checkout/Block/Cart/Shipping.php
index 712ee84afd232..749f64ed83a65 100644
--- a/app/code/Magento/Checkout/Block/Cart/Shipping.php
+++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php
@@ -20,6 +20,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar.php b/app/code/Magento/Checkout/Block/Cart/Sidebar.php
index 147782e501ae4..51f25a41971b1 100644
--- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php
+++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php
@@ -11,6 +11,7 @@
  * Cart sidebar block
  *
  * @api
+ * @since 100.0.2
  */
 class Sidebar extends AbstractCart
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/Totals.php b/app/code/Magento/Checkout/Block/Cart/Totals.php
index 131e5b157c77a..a0ca67f52d73f 100644
--- a/app/code/Magento/Checkout/Block/Cart/Totals.php
+++ b/app/code/Magento/Checkout/Block/Cart/Totals.php
@@ -14,6 +14,7 @@
  * Totals cart block.
  *
  * @api
+ * @since 100.0.2
  */
 class Totals extends \Magento\Checkout\Block\Cart\AbstractCart
 {
diff --git a/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php b/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php
index 0ec2982b83c01..1429eeb04995d 100644
--- a/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php
+++ b/app/code/Magento/Checkout/Block/Cart/ValidationMessages.php
@@ -12,6 +12,7 @@
  * Shopping cart validation messages block
  *
  * @api
+ * @since 100.0.2
  */
 class ValidationMessages extends \Magento\Framework\View\Element\Messages
 {
diff --git a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
index 1dd1131cde1f1..43a8208a216a6 100644
--- a/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
+++ b/app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php
@@ -397,7 +397,7 @@ protected function getFieldOptions($attributeCode, array $attributeConfig)
      *
      * @param array $countryOptions
      * @return array
-     * @deprecated 100.2.0
+     * @deprecated 100.1.7
      */
     protected function orderCountryOptions(array $countryOptions)
     {
diff --git a/app/code/Magento/Checkout/Block/Checkout/LayoutProcessorInterface.php b/app/code/Magento/Checkout/Block/Checkout/LayoutProcessorInterface.php
index ad14f2a45426d..31a744c7d4d48 100644
--- a/app/code/Magento/Checkout/Block/Checkout/LayoutProcessorInterface.php
+++ b/app/code/Magento/Checkout/Block/Checkout/LayoutProcessorInterface.php
@@ -13,6 +13,7 @@
  * @see \Magento\Checkout\Block\Onepage
  *
  * @api
+ * @since 100.0.2
  */
 interface LayoutProcessorInterface
 {
diff --git a/app/code/Magento/Checkout/Block/Item/Price/Renderer.php b/app/code/Magento/Checkout/Block/Item/Price/Renderer.php
index 2210b1cd9243e..b0f5a6b51a158 100644
--- a/app/code/Magento/Checkout/Block/Item/Price/Renderer.php
+++ b/app/code/Magento/Checkout/Block/Item/Price/Renderer.php
@@ -12,6 +12,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Renderer extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/Onepage.php b/app/code/Magento/Checkout/Block/Onepage.php
index e01d5835b4cf0..c335b3909d5fd 100644
--- a/app/code/Magento/Checkout/Block/Onepage.php
+++ b/app/code/Magento/Checkout/Block/Onepage.php
@@ -9,6 +9,7 @@
  * Onepage checkout block
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Onepage extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/Onepage/Failure.php b/app/code/Magento/Checkout/Block/Onepage/Failure.php
index 46e56d24a7fa0..70f445173567a 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Failure.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Failure.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Failure extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/Onepage/Link.php b/app/code/Magento/Checkout/Block/Onepage/Link.php
index b8f3926baa58a..de26fe68287de 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Link.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Link.php
@@ -10,6 +10,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Link extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/Onepage/Success.php b/app/code/Magento/Checkout/Block/Onepage/Success.php
index e7cfaf68cc789..f8e286ca14bc8 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Success.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Success.php
@@ -12,6 +12,7 @@
  * One page checkout success page
  *
  * @api
+ * @since 100.0.2
  */
 class Success extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php b/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php
index 3b2f1604fae44..27910277617dd 100644
--- a/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php
+++ b/app/code/Magento/Checkout/Block/QuoteShortcutButtons.php
@@ -11,6 +11,7 @@
  * Displays buttons on shopping cart page
  *
  * @api
+ * @since 100.0.2
  */
 class QuoteShortcutButtons extends \Magento\Catalog\Block\ShortcutButtons
 {
diff --git a/app/code/Magento/Checkout/Block/Registration.php b/app/code/Magento/Checkout/Block/Registration.php
index e880230f50a74..75bc3fa467ad6 100644
--- a/app/code/Magento/Checkout/Block/Registration.php
+++ b/app/code/Magento/Checkout/Block/Registration.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Registration extends \Magento\Framework\View\Element\Template
 {
diff --git a/app/code/Magento/Checkout/Controller/Account/Create.php b/app/code/Magento/Checkout/Controller/Account/Create.php
index dae0bb98be453..21706186d803d 100644
--- a/app/code/Magento/Checkout/Controller/Account/Create.php
+++ b/app/code/Magento/Checkout/Controller/Account/Create.php
@@ -10,7 +10,7 @@
 use Magento\Framework\Exception\NoSuchEntityException;
 
 /**
- * @deprecated
+ * @deprecated 100.2.5
  * @see DelegateCreate
  */
 class Create extends \Magento\Framework\App\Action\Action
diff --git a/app/code/Magento/Checkout/CustomerData/AbstractItem.php b/app/code/Magento/Checkout/CustomerData/AbstractItem.php
index 9c2e3a32ef901..e5ed511924a7b 100644
--- a/app/code/Magento/Checkout/CustomerData/AbstractItem.php
+++ b/app/code/Magento/Checkout/CustomerData/AbstractItem.php
@@ -12,6 +12,7 @@
  * Abstract item
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractItem implements ItemInterface
 {
diff --git a/app/code/Magento/Checkout/CustomerData/ItemInterface.php b/app/code/Magento/Checkout/CustomerData/ItemInterface.php
index fb8bd831f1ccd..fc8d954387b89 100644
--- a/app/code/Magento/Checkout/CustomerData/ItemInterface.php
+++ b/app/code/Magento/Checkout/CustomerData/ItemInterface.php
@@ -12,6 +12,7 @@
  * Item interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ItemInterface
 {
diff --git a/app/code/Magento/Checkout/Exception.php b/app/code/Magento/Checkout/Exception.php
index 4957e6be9b5da..6297041e065aa 100644
--- a/app/code/Magento/Checkout/Exception.php
+++ b/app/code/Magento/Checkout/Exception.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Exception extends \Magento\Framework\Exception\LocalizedException
 {
diff --git a/app/code/Magento/Checkout/Model/Cart.php b/app/code/Magento/Checkout/Model/Cart.php
index cec99909dc999..b8bfb47f2c97a 100644
--- a/app/code/Magento/Checkout/Model/Cart.php
+++ b/app/code/Magento/Checkout/Model/Cart.php
@@ -20,6 +20,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @deprecated 100.1.0 Use \Magento\Quote\Model\Quote instead
  * @see \Magento\Quote\Api\Data\CartInterface
+ * @since 100.0.2
  */
 class Cart extends DataObject implements CartInterface
 {
diff --git a/app/code/Magento/Checkout/Model/Cart/CartInterface.php b/app/code/Magento/Checkout/Model/Cart/CartInterface.php
index 40aff1980e787..d8264e5535497 100644
--- a/app/code/Magento/Checkout/Model/Cart/CartInterface.php
+++ b/app/code/Magento/Checkout/Model/Cart/CartInterface.php
@@ -14,6 +14,7 @@
  * @author      Magento Core Team <core@magentocommerce.com>
  * @deprecated 100.1.0 Use \Magento\Quote\Api\Data\CartInterface instead
  * @see \Magento\Quote\Api\Data\CartInterface
+ * @since 100.0.2
  */
 interface CartInterface
 {
diff --git a/app/code/Magento/Checkout/Model/Cart/ImageProvider.php b/app/code/Magento/Checkout/Model/Cart/ImageProvider.php
index cdadf3573c8ec..bc409357bf409 100644
--- a/app/code/Magento/Checkout/Model/Cart/ImageProvider.php
+++ b/app/code/Magento/Checkout/Model/Cart/ImageProvider.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ImageProvider
 {
@@ -20,12 +21,15 @@ class ImageProvider
 
     /**
      * @var \Magento\Checkout\CustomerData\ItemPoolInterface
-     * @deprecated No need for the pool as images are resolved in the default item implementation
+     * @deprecated 100.2.7 No need for the pool as images are resolved in the default item implementation
      * @see \Magento\Checkout\CustomerData\DefaultItem::getProductForThumbnail
      */
     protected $itemPool;
 
-    /** @var \Magento\Checkout\CustomerData\DefaultItem */
+    /**
+     * @var \Magento\Checkout\CustomerData\DefaultItem
+     * @since 100.2.7
+     */
     protected $customerDataItem;
 
     /**
diff --git a/app/code/Magento/Checkout/Model/Cart/RequestInfoFilterComposite.php b/app/code/Magento/Checkout/Model/Cart/RequestInfoFilterComposite.php
index f38e15dd628fd..ee68ef9d275b1 100644
--- a/app/code/Magento/Checkout/Model/Cart/RequestInfoFilterComposite.php
+++ b/app/code/Magento/Checkout/Model/Cart/RequestInfoFilterComposite.php
@@ -20,7 +20,6 @@ class RequestInfoFilterComposite implements RequestInfoFilterInterface
 
     /**
      * @param RequestInfoFilter[] $filters
-     * @since 100.1.2
      */
     public function __construct(
         $filters = []
diff --git a/app/code/Magento/Checkout/Model/CompositeConfigProvider.php b/app/code/Magento/Checkout/Model/CompositeConfigProvider.php
index 3577b1a145403..7c6d04f2947a0 100644
--- a/app/code/Magento/Checkout/Model/CompositeConfigProvider.php
+++ b/app/code/Magento/Checkout/Model/CompositeConfigProvider.php
@@ -10,6 +10,7 @@
  *
  * @see \Magento\Checkout\Model\ConfigProviderInterface
  * @api
+ * @since 100.0.2
  */
 class CompositeConfigProvider implements ConfigProviderInterface
 {
diff --git a/app/code/Magento/Checkout/Model/ConfigProviderInterface.php b/app/code/Magento/Checkout/Model/ConfigProviderInterface.php
index 9e15027e26927..58bbc02485642 100644
--- a/app/code/Magento/Checkout/Model/ConfigProviderInterface.php
+++ b/app/code/Magento/Checkout/Model/ConfigProviderInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface ConfigProviderInterface
  * @api
+ * @since 100.0.2
  */
 interface ConfigProviderInterface
 {
diff --git a/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php b/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php
index 1d15a5dd7f176..8b8d2602fbfc7 100644
--- a/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php
+++ b/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php
@@ -152,7 +152,7 @@ public function getPaymentInformation($cartId)
      * Get logger instance
      *
      * @return \Psr\Log\LoggerInterface
-     * @deprecated 100.2.0
+     * @deprecated 100.1.8
      */
     private function getLogger()
     {
diff --git a/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php b/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php
index ca577ed714a6e..a670482cb98d6 100644
--- a/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php
+++ b/app/code/Magento/Checkout/Model/Layout/AbstractTotalsProcessor.php
@@ -17,6 +17,7 @@
  *
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractTotalsProcessor
 {
diff --git a/app/code/Magento/Checkout/Model/PaymentInformationManagement.php b/app/code/Magento/Checkout/Model/PaymentInformationManagement.php
index 1f7931d7d3e6a..2f68aba5ec6ae 100644
--- a/app/code/Magento/Checkout/Model/PaymentInformationManagement.php
+++ b/app/code/Magento/Checkout/Model/PaymentInformationManagement.php
@@ -17,7 +17,7 @@ class PaymentInformationManagement implements \Magento\Checkout\Api\PaymentInfor
 {
     /**
      * @var \Magento\Quote\Api\BillingAddressManagementInterface
-     * @deprecated 100.2.0 This call was substituted to eliminate extra quote::save call
+     * @deprecated 100.1.0 This call was substituted to eliminate extra quote::save call
      */
     protected $billingAddressManagement;
 
@@ -152,7 +152,7 @@ public function getPaymentInformation($cartId)
      * Get logger instance
      *
      * @return \Psr\Log\LoggerInterface
-     * @deprecated 100.2.0
+     * @deprecated 100.1.8
      */
     private function getLogger()
     {
diff --git a/app/code/Magento/Checkout/Model/Session.php b/app/code/Magento/Checkout/Model/Session.php
index 7af00f1df8e95..618f745e77105 100644
--- a/app/code/Magento/Checkout/Model/Session.php
+++ b/app/code/Magento/Checkout/Model/Session.php
@@ -20,6 +20,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
  * @SuppressWarnings(PHPMD.TooManyFields)
+ * @since 100.0.2
  */
 class Session extends \Magento\Framework\Session\SessionManager
 {
diff --git a/app/code/Magento/Checkout/Model/Session/SuccessValidator.php b/app/code/Magento/Checkout/Model/Session/SuccessValidator.php
index 5858dcba8b902..6bfab606445fb 100644
--- a/app/code/Magento/Checkout/Model/Session/SuccessValidator.php
+++ b/app/code/Magento/Checkout/Model/Session/SuccessValidator.php
@@ -9,6 +9,7 @@
  * Test if checkout session valid for success action
  *
  * @api
+ * @since 100.0.2
  */
 class SuccessValidator
 {
diff --git a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsListInterface.php b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsListInterface.php
index b91701acef04d..a15191244a030 100644
--- a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsListInterface.php
+++ b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsListInterface.php
@@ -13,6 +13,7 @@
  * search filters without predefined limitations.
  *
  * @api
+ * @since 100.3.0
  */
 interface CheckoutAgreementsListInterface
 {
@@ -21,6 +22,7 @@ interface CheckoutAgreementsListInterface
      *
      * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
      * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[]
+     * @since 100.3.0
      */
     public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria) : array;
 }
diff --git a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php
index 5822b8f082fef..7dc757395a478 100644
--- a/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php
+++ b/app/code/Magento/CheckoutAgreements/Api/CheckoutAgreementsRepositoryInterface.php
@@ -25,7 +25,7 @@ public function get($id, $storeId = null);
      * Lists active checkout agreements.
      *
      * @return \Magento\CheckoutAgreements\Api\Data\AgreementInterface[]
-     * @deprecated
+     * @deprecated 100.3.0
      * @see \Magento\CheckoutAgreements\Api\CheckoutAgreementsListInterface::getList
      */
     public function getList();
diff --git a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php
index 4a35a58a41ff9..21b318cd00f09 100644
--- a/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php
+++ b/app/code/Magento/CheckoutAgreements/Block/Adminhtml/Agreement/Grid.php
@@ -12,7 +12,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
 {
     /**
      * @var \Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory
-     * @deprecated
+     * @deprecated 100.2.2
      */
     protected $_collectionFactory;
 
diff --git a/app/code/Magento/Cms/Api/Data/PageInterface.php b/app/code/Magento/Cms/Api/Data/PageInterface.php
index 7a31ab1b9a94f..402c2ccd289e0 100644
--- a/app/code/Magento/Cms/Api/Data/PageInterface.php
+++ b/app/code/Magento/Cms/Api/Data/PageInterface.php
@@ -125,7 +125,7 @@ public function getSortOrder();
      * Get layout update xml
      *
      * @return string|null
-     * @deprecated Existing updates are applied, new are not accepted.
+     * @deprecated 103.0.4 Existing updates are applied, new are not accepted.
      */
     public function getLayoutUpdateXml();
 
@@ -146,7 +146,7 @@ public function getCustomRootTemplate();
     /**
      * Get custom layout update xml
      *
-     * @deprecated Existing updates are applied, new are not accepted.
+     * @deprecated 103.0.4 Existing updates are applied, new are not accepted.
      * @see \Magento\Cms\Model\Page\CustomLayout\Data\CustomLayoutSelectedInterface
      * @return string|null
      */
@@ -275,7 +275,7 @@ public function setSortOrder($sortOrder);
      *
      * @param string $layoutUpdateXml
      * @return \Magento\Cms\Api\Data\PageInterface
-     * @deprecated Existing updates are applied, new are not accepted.
+     * @deprecated 103.0.4 Existing updates are applied, new are not accepted.
      */
     public function setLayoutUpdateXml($layoutUpdateXml);
 
@@ -300,7 +300,7 @@ public function setCustomRootTemplate($customRootTemplate);
      *
      * @param string $customLayoutUpdateXml
      * @return \Magento\Cms\Api\Data\PageInterface
-     * @deprecated Existing updates are applied, new are not accepted.
+     * @deprecated 103.0.4 Existing updates are applied, new are not accepted.
      * @see \Magento\Cms\Model\Page\CustomLayout\Data\CustomLayoutSelectedInterface
      */
     public function setCustomLayoutUpdateXml($customLayoutUpdateXml);
diff --git a/app/code/Magento/Cms/Api/GetBlockByIdentifierInterface.php b/app/code/Magento/Cms/Api/GetBlockByIdentifierInterface.php
index 7e8bbdc3e8d2f..70fadae42f327 100644
--- a/app/code/Magento/Cms/Api/GetBlockByIdentifierInterface.php
+++ b/app/code/Magento/Cms/Api/GetBlockByIdentifierInterface.php
@@ -8,6 +8,7 @@
 /**
  * Command to load the block data by specified identifier
  * @api
+ * @since 103.0.0
  */
 interface GetBlockByIdentifierInterface
 {
@@ -18,6 +19,7 @@ interface GetBlockByIdentifierInterface
      * @param int $storeId
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @return \Magento\Cms\Api\Data\BlockInterface
+     * @since 103.0.0
      */
     public function execute(string $identifier, int $storeId) : \Magento\Cms\Api\Data\BlockInterface;
 }
diff --git a/app/code/Magento/Cms/Api/GetPageByIdentifierInterface.php b/app/code/Magento/Cms/Api/GetPageByIdentifierInterface.php
index f432f678d3a12..8f47de5266321 100644
--- a/app/code/Magento/Cms/Api/GetPageByIdentifierInterface.php
+++ b/app/code/Magento/Cms/Api/GetPageByIdentifierInterface.php
@@ -8,6 +8,7 @@
 /**
  * Command to load the page data by specified identifier
  * @api
+ * @since 103.0.0
  */
 interface GetPageByIdentifierInterface
 {
@@ -18,6 +19,7 @@ interface GetPageByIdentifierInterface
      * @param int $storeId
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @return \Magento\Cms\Api\Data\PageInterface
+     * @since 103.0.0
      */
     public function execute(string $identifier, int $storeId) : \Magento\Cms\Api\Data\PageInterface;
 }
diff --git a/app/code/Magento/Cms/Api/GetUtilityPageIdentifiersInterface.php b/app/code/Magento/Cms/Api/GetUtilityPageIdentifiersInterface.php
index c6bf4c8404701..07c5f5c8a9e07 100644
--- a/app/code/Magento/Cms/Api/GetUtilityPageIdentifiersInterface.php
+++ b/app/code/Magento/Cms/Api/GetUtilityPageIdentifiersInterface.php
@@ -9,12 +9,14 @@
  * Utility Cms Pages
  *
  * @api
+ * @since 102.0.4
  */
 interface GetUtilityPageIdentifiersInterface
 {
     /**
      * Get List Page Identifiers
      * @return array
+     * @since 102.0.4
      */
     public function execute();
 }
diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Page/PostDataProcessor.php b/app/code/Magento/Cms/Controller/Adminhtml/Page/PostDataProcessor.php
index f1862026f0e35..71b620a1632ca 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Page/PostDataProcessor.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Page/PostDataProcessor.php
@@ -79,7 +79,7 @@ public function filter($data)
      *
      * @param array $data
      * @return bool     Return FALSE if some item is invalid
-     * @deprecated
+     * @deprecated 103.0.2
      */
     public function validate($data)
     {
diff --git a/app/code/Magento/Cms/Model/BlockRepository.php b/app/code/Magento/Cms/Model/BlockRepository.php
index fa29cc9ff7631..d0df0d2b31caa 100644
--- a/app/code/Magento/Cms/Model/BlockRepository.php
+++ b/app/code/Magento/Cms/Model/BlockRepository.php
@@ -196,7 +196,7 @@ public function deleteById($blockId)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Cms/Model/Page/Source/PageLayout.php b/app/code/Magento/Cms/Model/Page/Source/PageLayout.php
index 23a452c0fe58c..3413aa7b0dd6c 100644
--- a/app/code/Magento/Cms/Model/Page/Source/PageLayout.php
+++ b/app/code/Magento/Cms/Model/Page/Source/PageLayout.php
@@ -20,7 +20,7 @@ class PageLayout implements OptionSourceInterface
 
     /**
      * @var array
-     * @deprecated since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
+     * @deprecated 103.0.1 since the cache is now handled by \Magento\Theme\Model\PageLayout\Config\Builder::$configFiles
      */
     protected $options;
 
diff --git a/app/code/Magento/Cms/Model/PageRepository.php b/app/code/Magento/Cms/Model/PageRepository.php
index 2de44b6691274..0439fbcd2f799 100644
--- a/app/code/Magento/Cms/Model/PageRepository.php
+++ b/app/code/Magento/Cms/Model/PageRepository.php
@@ -256,7 +256,7 @@ public function deleteById($pageId)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 101.1.0
+     * @deprecated 102.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Config.php b/app/code/Magento/Cms/Model/Wysiwyg/Config.php
index 1da7b99c6d886..95f5971251f1c 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Config.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Config.php
@@ -61,14 +61,14 @@ class Config extends \Magento\Framework\DataObject implements ConfigInterface
 
     /**
      * @var \Magento\Variable\Model\Variable\Config
-     * @deprecated
+     * @deprecated 103.0.0
      * @see \Magento\Cms\Model\ConfigProvider::processVariableConfig
      */
     protected $_variableConfig;
 
     /**
      * @var \Magento\Widget\Model\Widget\Config
-     * @deprecated
+     * @deprecated 103.0.0
      * @see \Magento\Cms\Model\ConfigProvider::processWidgetConfig
      */
     protected $_widgetConfig;
diff --git a/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php b/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php
index d2b87b1ae2841..10f9af9268ae6 100644
--- a/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php
+++ b/app/code/Magento/Config/App/Config/Source/EnvironmentConfigSource.php
@@ -15,7 +15,7 @@
  * Class for retrieving configurations from environment variables.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class EnvironmentConfigSource implements ConfigSourceInterface
 {
@@ -47,7 +47,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function get($path = '')
     {
diff --git a/app/code/Magento/Config/App/Config/Source/InitialSnapshotConfigSource.php b/app/code/Magento/Config/App/Config/Source/InitialSnapshotConfigSource.php
index 40978320797d4..a22639ec51641 100644
--- a/app/code/Magento/Config/App/Config/Source/InitialSnapshotConfigSource.php
+++ b/app/code/Magento/Config/App/Config/Source/InitialSnapshotConfigSource.php
@@ -12,7 +12,7 @@
 /**
  * The source with previously imported configuration.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class InitialSnapshotConfigSource implements ConfigSourceInterface
 {
@@ -45,7 +45,7 @@ public function __construct(FlagManager $flagManager, DataObjectFactory $dataObj
      * Snapshots are stored in flags.
      *
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function get($path = '')
     {
diff --git a/app/code/Magento/Config/Block/System/Config/Edit.php b/app/code/Magento/Config/Block/System/Config/Edit.php
index ba27cb33b20f0..7955f28f59f4e 100644
--- a/app/code/Magento/Config/Block/System/Config/Edit.php
+++ b/app/code/Magento/Config/Block/System/Config/Edit.php
@@ -121,6 +121,7 @@ public function getSaveUrl()
 
     /**
      * @return string
+     * @since 101.1.0
      */
     public function getConfigSearchParamsJson()
     {
diff --git a/app/code/Magento/Config/Block/System/Config/Form.php b/app/code/Magento/Config/Block/System/Config/Form.php
index 8378c058c1955..8e07ef8b45203 100644
--- a/app/code/Magento/Config/Block/System/Config/Form.php
+++ b/app/code/Magento/Config/Block/System/Config/Form.php
@@ -838,10 +838,10 @@ private function getAppConfigDataValue($path)
      * Gets instance of ElementVisibilityInterface.
      *
      * @return ElementVisibilityInterface
-     * @deprecated 100.2.0 Added to not break backward compatibility of the constructor signature
+     * @deprecated 101.0.0 Added to not break backward compatibility of the constructor signature
      *             by injecting the new dependency directly.
      *             The method can be removed in a future major release, when constructor signature can be changed.
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getElementVisibility()
     {
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php b/app/code/Magento/Config/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php
index 3bb4632ee4517..cc6b7e4b441dc 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Field/FieldArray/AbstractFieldArray.php
@@ -282,7 +282,7 @@ public function getColumns()
 
     /**
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getAddButtonLabel()
     {
diff --git a/app/code/Magento/Config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php b/app/code/Magento/Config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php
index 99fa7b5addee8..4c2e6873d9593 100644
--- a/app/code/Magento/Config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php
+++ b/app/code/Magento/Config/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php
@@ -10,7 +10,7 @@
  * on the store settings page.
  *
  * @method \Magento\Config\Block\System\Config\Form getForm()
- * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+ * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
  * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
  * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
  * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
@@ -22,25 +22,25 @@ class DisableOutput extends \Magento\Config\Block\System\Config\Form\Fieldset
 {
     /**
      * @var \Magento\Framework\DataObject
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_dummyElement;
 
     /**
      * @var \Magento\Config\Block\System\Config\Form\Field
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_fieldRenderer;
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_values;
 
     /**
      * @var \Magento\Framework\Module\ModuleListInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_moduleList;
 
@@ -64,7 +64,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+     * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
      * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
      * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
      * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
@@ -97,7 +97,7 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
     }
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return \Magento\Framework\DataObject
      */
     protected function _getDummyElement()
@@ -109,7 +109,7 @@ protected function _getDummyElement()
     }
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return \Magento\Config\Block\System\Config\Form\Field
      */
     protected function _getFieldRenderer()
@@ -123,7 +123,7 @@ protected function _getFieldRenderer()
     }
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return array
      */
     protected function _getValues()
@@ -140,7 +140,7 @@ protected function _getValues()
     /**
      * @param \Magento\Framework\Data\Form\Element\Fieldset $fieldset
      * @param string $moduleName
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return mixed
      */
     protected function _getFieldHtml($fieldset, $moduleName)
diff --git a/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorFactory.php b/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorFactory.php
index 1b287573a9285..e95797658bb33 100644
--- a/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorFactory.php
+++ b/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorFactory.php
@@ -17,7 +17,7 @@
  * @see ConfigSetCommand
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ConfigSetProcessorFactory
 {
@@ -68,7 +68,7 @@ public function __construct(
      * @return ConfigSetProcessorInterface New processor instance
      * @throws ConfigurationMismatchException If processor type is not exists in processors array
      * or declared class has wrong implementation
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function create($processorName)
     {
diff --git a/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorInterface.php b/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorInterface.php
index 01aa03b188e62..0abebb604d36f 100644
--- a/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorInterface.php
+++ b/app/code/Magento/Config/Console/Command/ConfigSet/ConfigSetProcessorInterface.php
@@ -14,7 +14,7 @@
  * @see ConfigSetCommand
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface ConfigSetProcessorInterface
 {
@@ -27,7 +27,7 @@ interface ConfigSetProcessorInterface
      * @param string $scopeCode The scope code
      * @return void
      * @throws CouldNotSaveException An exception on processing error
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function process($path, $value, $scope, $scopeCode);
 }
diff --git a/app/code/Magento/Config/Console/Command/ConfigSet/DefaultProcessor.php b/app/code/Magento/Config/Console/Command/ConfigSet/DefaultProcessor.php
index c622a48b7f2c8..d49d65774d0d2 100644
--- a/app/code/Magento/Config/Console/Command/ConfigSet/DefaultProcessor.php
+++ b/app/code/Magento/Config/Console/Command/ConfigSet/DefaultProcessor.php
@@ -21,7 +21,7 @@
  *
  * @inheritdoc
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class DefaultProcessor implements ConfigSetProcessorInterface
 {
@@ -76,7 +76,7 @@ public function __construct(
      * Requires installed application.
      *
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function process($path, $value, $scope, $scopeCode)
     {
diff --git a/app/code/Magento/Config/Console/Command/ConfigSet/ProcessorFacade.php b/app/code/Magento/Config/Console/Command/ConfigSet/ProcessorFacade.php
index fcd7c0d5335b1..aa33c96c7e0e2 100644
--- a/app/code/Magento/Config/Console/Command/ConfigSet/ProcessorFacade.php
+++ b/app/code/Magento/Config/Console/Command/ConfigSet/ProcessorFacade.php
@@ -24,7 +24,7 @@
  * @see ConfigSetCommand
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ProcessorFacade
 {
@@ -99,8 +99,8 @@ public function __construct(
      * @param boolean $lock The lock flag
      * @return string Processor response message
      * @throws ValidatorException If some validation is wrong
-     * @since 100.2.0
-     * @deprecated
+     * @since 101.0.0
+     * @deprecated 101.0.4
      * @see processWithLockTarget()
      */
     public function process($path, $value, $scope, $scopeCode, $lock)
@@ -119,6 +119,7 @@ public function process($path, $value, $scope, $scopeCode, $lock)
      * @param string $lockTarget
      * @return string Processor response message
      * @throws ValidatorException If some validation is wrong
+     * @since 101.0.4
      */
     public function processWithLockTarget(
         $path,
diff --git a/app/code/Magento/Config/Console/Command/ConfigSetCommand.php b/app/code/Magento/Config/Console/Command/ConfigSetCommand.php
index 999d8e41af5bc..f278a07cc6806 100644
--- a/app/code/Magento/Config/Console/Command/ConfigSetCommand.php
+++ b/app/code/Magento/Config/Console/Command/ConfigSetCommand.php
@@ -24,7 +24,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ConfigSetCommand extends Command
 {
@@ -86,7 +86,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function configure()
     {
@@ -141,7 +141,7 @@ protected function configure()
      *
      * @param InputInterface $input
      * @param OutputInterface $output
-     * @since 100.2.0
+     * @since 101.0.0
      * @return int|null
      */
     protected function execute(InputInterface $input, OutputInterface $output)
diff --git a/app/code/Magento/Config/Console/Command/ConfigShow/ValueProcessor.php b/app/code/Magento/Config/Console/Command/ConfigShow/ValueProcessor.php
index aeb57010e4969..2465eecec71dc 100644
--- a/app/code/Magento/Config/Console/Command/ConfigShow/ValueProcessor.php
+++ b/app/code/Magento/Config/Console/Command/ConfigShow/ValueProcessor.php
@@ -19,7 +19,7 @@
  * Class processes values using backend model which declared in system.xml.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ValueProcessor
 {
@@ -83,7 +83,7 @@ public function __construct(
      * @param string $value The value to process
      * @param string $path The configuration path for getting backend model. E.g. scope_id/group_id/field_id
      * @return string processed value result
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function process($scope, $scopeCode, $value, $path)
     {
diff --git a/app/code/Magento/Config/Console/Command/ConfigShowCommand.php b/app/code/Magento/Config/Console/Command/ConfigShowCommand.php
index 2d3dabdb24e67..50214d38d2d35 100644
--- a/app/code/Magento/Config/Console/Command/ConfigShowCommand.php
+++ b/app/code/Magento/Config/Console/Command/ConfigShowCommand.php
@@ -21,7 +21,7 @@
  * Command provides possibility to show saved system configuration.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ConfigShowCommand extends Command
 {
@@ -100,7 +100,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function configure()
     {
@@ -137,7 +137,7 @@ protected function configure()
      * or scope/scope-code doesn't pass validation.
      *
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function execute(InputInterface $input, OutputInterface $output)
     {
diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php
index 274ee3b8d2a6e..c644ec8eb15cc 100644
--- a/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php
+++ b/app/code/Magento/Config/Controller/Adminhtml/System/AbstractConfig.php
@@ -31,7 +31,7 @@ abstract class AbstractConfig extends \Magento\Backend\App\AbstractAction
     protected $_configStructure;
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_sectionChecker;
 
diff --git a/app/code/Magento/Config/Controller/Adminhtml/System/ConfigSectionChecker.php b/app/code/Magento/Config/Controller/Adminhtml/System/ConfigSectionChecker.php
index 0af19b83a5a3f..b656498e97dba 100644
--- a/app/code/Magento/Config/Controller/Adminhtml/System/ConfigSectionChecker.php
+++ b/app/code/Magento/Config/Controller/Adminhtml/System/ConfigSectionChecker.php
@@ -9,7 +9,7 @@
 use Magento\Framework\Exception\NotFoundException;
 
 /**
- * @deprecated 100.2.0 - unused class.
+ * @deprecated 101.0.0 - unused class.
  * @see \Magento\Config\Model\Config\Structure\Element\Section::isAllowed()
  */
 class ConfigSectionChecker
diff --git a/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php b/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php
index 7bbbafe826422..e6acd431be3d5 100644
--- a/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php
+++ b/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php
@@ -13,7 +13,7 @@
 use Magento\Framework\App\ObjectManager;
 
 /**
- * @deprecated 100.2.0 robots.txt file is no longer stored in filesystem. It generates as response on request.
+ * @deprecated 100.1.7 robots.txt file is no longer stored in filesystem. It generates as response on request.
  */
 class Robots extends \Magento\Framework\App\Config\Value
 {
diff --git a/app/code/Magento/Config/Model/Config/Backend/Baseurl.php b/app/code/Magento/Config/Model/Config/Backend/Baseurl.php
index a218d2b0d07e6..5e43e53f1b64f 100644
--- a/app/code/Magento/Config/Model/Config/Backend/Baseurl.php
+++ b/app/code/Magento/Config/Model/Config/Backend/Baseurl.php
@@ -231,7 +231,7 @@ public function afterSave()
     /**
      * Get URL Validator
      *
-     * @deprecated 100.2.0
+     * @deprecated 100.1.12
      * @return UrlValidator
      */
     private function getUrlValidator()
diff --git a/app/code/Magento/Config/Model/Config/Backend/Currency/Allow.php b/app/code/Magento/Config/Model/Config/Backend/Currency/Allow.php
index 7ff1d367c5e58..b0db20e2fb25a 100644
--- a/app/code/Magento/Config/Model/Config/Backend/Currency/Allow.php
+++ b/app/code/Magento/Config/Model/Config/Backend/Currency/Allow.php
@@ -81,7 +81,7 @@ public function afterSave()
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function _getAllowedCurrencies()
     {
diff --git a/app/code/Magento/Config/Model/Config/Export/ExcludeList.php b/app/code/Magento/Config/Model/Config/Export/ExcludeList.php
index e556c42f66a99..e7efb5ac50b79 100644
--- a/app/code/Magento/Config/Model/Config/Export/ExcludeList.php
+++ b/app/code/Magento/Config/Model/Config/Export/ExcludeList.php
@@ -8,7 +8,7 @@
 /**
  * Class ExcludeList contains list of config fields which should be excluded from config export file.
  *
- * @deprecated 100.2.0 because in Magento since version 2.2.0 there are several
+ * @deprecated 101.0.0 because in Magento since version 2.2.0 there are several
  * types for configuration fields that require special processing.
  * @see \Magento\Config\Model\Config\TypePool
  */
@@ -32,7 +32,7 @@ public function __construct(array $configs = [])
      *
      * @param string $path
      * @return bool
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function isPresent($path)
     {
@@ -43,7 +43,7 @@ public function isPresent($path)
      * Retrieves all excluded field paths for export
      *
      * @return array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function get()
     {
diff --git a/app/code/Magento/Config/Model/Config/Importer.php b/app/code/Magento/Config/Model/Config/Importer.php
index a54af2ead5048..a870b5f2403c3 100644
--- a/app/code/Magento/Config/Model/Config/Importer.php
+++ b/app/code/Magento/Config/Model/Config/Importer.php
@@ -23,7 +23,7 @@
  * {@inheritdoc}
  * @see \Magento\Deploy\Console\Command\App\ConfigImport\Importer
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class Importer implements ImporterInterface
 {
@@ -103,7 +103,7 @@ public function __construct(
      * or current value is different from previously imported.
      *
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function import(array $data)
     {
@@ -145,7 +145,7 @@ public function import(array $data)
     /**
      * @inheritdoc
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getWarningMessages(array $data)
     {
diff --git a/app/code/Magento/Config/Model/Config/Parser/Comment.php b/app/code/Magento/Config/Model/Config/Parser/Comment.php
index b46b2308f8df5..4a749ba030d80 100644
--- a/app/code/Magento/Config/Model/Config/Parser/Comment.php
+++ b/app/code/Magento/Config/Model/Config/Parser/Comment.php
@@ -19,7 +19,7 @@
  * It is used to parse config paths from
  * comment section in provided configuration file.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class Comment implements CommentParserInterface
 {
@@ -84,7 +84,7 @@ public function __construct(
      * @param string $fileName the basename of file
      * @return array
      * @throws FileSystemException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function execute($fileName)
     {
diff --git a/app/code/Magento/Config/Model/Config/PathValidator.php b/app/code/Magento/Config/Model/Config/PathValidator.php
index 68363bef69d91..bc4f863b7b05f 100644
--- a/app/code/Magento/Config/Model/Config/PathValidator.php
+++ b/app/code/Magento/Config/Model/Config/PathValidator.php
@@ -11,7 +11,7 @@
 /**
  * Validates the config path by config structure schema.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class PathValidator
 {
@@ -36,7 +36,7 @@ public function __construct(Structure $structure)
      * @param string $path The config path
      * @return true The result of validation
      * @throws ValidatorException If provided path is not valid
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function validate($path)
     {
diff --git a/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/DocumentRoot.php b/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/DocumentRoot.php
index 5f8dc3f7ab4a7..bf59c729790a7 100644
--- a/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/DocumentRoot.php
+++ b/app/code/Magento/Config/Model/Config/Reader/Source/Deployed/DocumentRoot.php
@@ -14,7 +14,7 @@
  * Class DocumentRoot
  * @package Magento\Config\Model\Config\Reader\Source\Deployed
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class DocumentRoot
 {
@@ -37,7 +37,7 @@ public function __construct(DeploymentConfig $config)
      * deployment configuration.
      *
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getPath()
     {
@@ -50,7 +50,7 @@ public function getPath()
      * likely be extended to control other areas).
      *
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isPub()
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure.php b/app/code/Magento/Config/Model/Config/Structure.php
index a16920f0dc527..437aca04ec577 100644
--- a/app/code/Magento/Config/Model/Config/Structure.php
+++ b/app/code/Magento/Config/Model/Config/Structure.php
@@ -185,7 +185,7 @@ public function getElement($path)
      *
      * @param string $path The configuration path
      * @return \Magento\Config\Model\Config\Structure\ElementInterface|null
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getElementByConfigPath($path)
     {
@@ -369,7 +369,7 @@ protected function _getGroupFieldPathsByAttribute(array $fields, $parentPath, $a
      * ```
      *
      * @return array An array of config path to config structure path map
-     * @since 100.2.0
+     * @since 100.1.12
      */
     public function getFieldPaths()
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure/AbstractElement.php b/app/code/Magento/Config/Model/Config/Structure/AbstractElement.php
index c4a0cb5e886d9..8ce5c7f5f13d2 100644
--- a/app/code/Magento/Config/Model/Config/Structure/AbstractElement.php
+++ b/app/code/Magento/Config/Model/Config/Structure/AbstractElement.php
@@ -225,10 +225,10 @@ public function getPath($fieldPrefix = '')
      * Get instance of ElementVisibilityInterface.
      *
      * @return ElementVisibilityInterface
-     * @deprecated 100.2.0 Added to not break backward compatibility of the constructor signature
+     * @deprecated 101.0.0 Added to not break backward compatibility of the constructor signature
      *             by injecting the new dependency directly.
      *             The method can be removed in a future major release, when constructor signature can be changed.
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getElementVisibility()
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure/ConcealInProductionConfigList.php b/app/code/Magento/Config/Model/Config/Structure/ConcealInProductionConfigList.php
index 252042a41cc1d..568adceda9430 100644
--- a/app/code/Magento/Config/Model/Config/Structure/ConcealInProductionConfigList.php
+++ b/app/code/Magento/Config/Model/Config/Structure/ConcealInProductionConfigList.php
@@ -11,8 +11,9 @@
  * Defines status of visibility of form elements on Stores > Settings > Configuration page
  * in Admin Panel in Production mode.
  * @api
- * @deprecated class location was changed
+ * @deprecated 101.0.6 class location was changed
  * @see \Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProduction
+ * @since 101.0.0
  */
 class ConcealInProductionConfigList implements ElementVisibilityInterface
 {
@@ -55,7 +56,8 @@ public function __construct(State $state, array $configs = [])
 
     /**
      * @inheritdoc
-     * @deprecated
+     * @deprecated 101.0.6
+     * @since 101.0.0
      */
     public function isHidden($path)
     {
@@ -68,7 +70,8 @@ public function isHidden($path)
 
     /**
      * @inheritdoc
-     * @deprecated
+     * @deprecated 101.0.6
+     * @since 101.0.0
      */
     public function isDisabled($path)
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure/ElementInterface.php b/app/code/Magento/Config/Model/Config/Structure/ElementInterface.php
index 5ba6221601725..b29887219a258 100644
--- a/app/code/Magento/Config/Model/Config/Structure/ElementInterface.php
+++ b/app/code/Magento/Config/Model/Config/Structure/ElementInterface.php
@@ -10,7 +10,7 @@
 /**
  * @api
  * @since 100.0.2
- * @deprecated
+ * @deprecated 101.1.0
  * @see StructureElementInterface
  */
 interface ElementInterface
diff --git a/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProduction.php b/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProduction.php
index ec57d629e61da..c5a0b6127f122 100644
--- a/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProduction.php
+++ b/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProduction.php
@@ -16,6 +16,7 @@
  * Defines status of visibility of form elements on Stores > Settings > Configuration page
  * in Admin Panel in Production mode.
  * @api
+ * @since 101.0.6
  */
 class ConcealInProduction implements ElementVisibilityInterface
 {
@@ -80,7 +81,7 @@ public function __construct(State $state, array $configs = [], array $exemptions
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.6
      */
     public function isHidden($path)
     {
@@ -105,7 +106,7 @@ public function isHidden($path)
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.6
      */
     public function isDisabled($path)
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProductionWithoutScdOnDemand.php b/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProductionWithoutScdOnDemand.php
index 29148a244dcc6..ee6be789232e8 100644
--- a/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProductionWithoutScdOnDemand.php
+++ b/app/code/Magento/Config/Model/Config/Structure/ElementVisibility/ConcealInProductionWithoutScdOnDemand.php
@@ -18,6 +18,7 @@
  * @see \Magento\Config\Model\Config\Structure\ElementVisibility\ConcealInProduction
  *
  * @api
+ * @since 101.0.6
  */
 class ConcealInProductionWithoutScdOnDemand implements ElementVisibilityInterface
 {
@@ -50,6 +51,7 @@ public function __construct(
 
     /**
      * @inheritdoc
+     * @since 101.0.6
      */
     public function isHidden($path): bool
     {
@@ -61,6 +63,7 @@ public function isHidden($path): bool
 
     /**
      * @inheritdoc
+     * @since 101.0.6
      */
     public function isDisabled($path): bool
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityComposite.php b/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityComposite.php
index 23074297e6323..e5b60c596d713 100644
--- a/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityComposite.php
+++ b/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityComposite.php
@@ -11,7 +11,7 @@
  * Contains list of classes which implement ElementVisibilityInterface for
  * checking of visibility of form elements on Stores > Settings > Configuration page in Admin Panel.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ElementVisibilityComposite implements ElementVisibilityInterface
 {
@@ -49,7 +49,7 @@ public function __construct(array $visibility = [])
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isHidden($path)
     {
@@ -64,7 +64,7 @@ public function isHidden($path)
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isDisabled($path)
     {
diff --git a/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityInterface.php b/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityInterface.php
index 21dff52843765..a11a549eebc35 100644
--- a/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityInterface.php
+++ b/app/code/Magento/Config/Model/Config/Structure/ElementVisibilityInterface.php
@@ -9,7 +9,7 @@
  * Checks visibility status of form elements on Stores > Settings > Configuration page in Admin Panel
  * by their paths in the system.xml structure.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface ElementVisibilityInterface
 {
@@ -25,7 +25,7 @@ interface ElementVisibilityInterface
      *
      * @param string $path The path of form element in the system.xml structure
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isDisabled($path);
 
@@ -34,7 +34,7 @@ public function isDisabled($path);
      *
      * @param string $path The path of form element in the system.xml structure
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isHidden($path);
 }
diff --git a/app/code/Magento/Config/Model/Config/StructureElementInterface.php b/app/code/Magento/Config/Model/Config/StructureElementInterface.php
index 946d6e3c766a4..e1e855d37325b 100644
--- a/app/code/Magento/Config/Model/Config/StructureElementInterface.php
+++ b/app/code/Magento/Config/Model/Config/StructureElementInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 101.1.0
  */
 interface StructureElementInterface extends Structure\ElementInterface
 {
@@ -15,6 +16,7 @@ interface StructureElementInterface extends Structure\ElementInterface
      *
      * @param string $fieldPrefix
      * @return string
+     * @since 101.1.0
      */
     public function getPath($fieldPrefix = '');
 }
diff --git a/app/code/Magento/Config/Model/Config/TypePool.php b/app/code/Magento/Config/Model/Config/TypePool.php
index e41ff8e88a595..9080db81d1f55 100644
--- a/app/code/Magento/Config/Model/Config/TypePool.php
+++ b/app/code/Magento/Config/Model/Config/TypePool.php
@@ -13,7 +13,7 @@
  * Used when you need to know if the configuration path belongs to a certain type.
  * Participates in the mechanism for creating the configuration dump file.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class TypePool
 {
@@ -52,7 +52,7 @@ class TypePool
      * Checks if the configuration path is contained in exclude list.
      *
      * @var ExcludeList
-     * @deprecated 100.2.0 We use it only to support backward compatibility. If some configurations
+     * @deprecated 101.0.0 We use it only to support backward compatibility. If some configurations
      *             were set to this list before, we need to read them.
      *             It will be supported for next 2 minor releases or until a major release.
      *             TypePool should be used to mark configurations with types.
@@ -83,7 +83,7 @@ public function __construct(array $sensitive = [], array $environment = [], Excl
      * @param string $path Configuration field path. For example, 'contact/email/recipient_email'
      * @param string $type Type of configuration fields
      * @return bool True when the path belongs to requested type, false otherwise
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isPresent($path, $type)
     {
diff --git a/app/code/Magento/Config/Model/PreparedValueFactory.php b/app/code/Magento/Config/Model/PreparedValueFactory.php
index 19d607ad3dc1a..c86c0a820e86c 100644
--- a/app/code/Magento/Config/Model/PreparedValueFactory.php
+++ b/app/code/Magento/Config/Model/PreparedValueFactory.php
@@ -21,7 +21,7 @@
  *
  * @see ValueInterface
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class PreparedValueFactory
 {
@@ -92,7 +92,7 @@ public function __construct(
      * @return ValueInterface
      * @throws RuntimeException If Value can not be created
      * @see ValueInterface
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function create($path, $value, $scope, $scopeCode = null)
     {
diff --git a/app/code/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/Configurable.php
index 77110975401ff..a73e7e7277d34 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Cart/Item/Renderer/Configurable.php
@@ -75,6 +75,7 @@ public function getIdentities()
      * Get price for exact simple product added to cart
      *
      * @inheritdoc
+     * @since 100.3.1
      */
     public function getProductPriceHtml(\Magento\Catalog\Model\Product $product)
     {
diff --git a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
index 55c0c8f6ca4ce..636ff85d12e24 100644
--- a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php
@@ -35,7 +35,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
     /**
      * Current customer
      *
-     * @deprecated 100.2.0, as unused property
+     * @deprecated 100.2.0 as unused property
      * @var CurrentCustomer
      */
     protected $currentCustomer;
@@ -134,7 +134,7 @@ public function __construct(
      * Get cache key informative items.
      *
      * @return array
-     * @since 100.2.0
+     * @since 100.1.10
      */
     public function getCacheKeyInfo()
     {
@@ -253,7 +253,7 @@ public function getJsonConfig()
      * Get product images for configurable variations
      *
      * @return array
-     * @since 100.2.0
+     * @since 100.1.10
      */
     protected function getOptionImages()
     {
@@ -332,7 +332,7 @@ protected function getOptionPrices()
     /**
      * Replace ',' on '.' for js
      *
-     * @deprecated 100.2.0 Will be removed in major release
+     * @deprecated 100.1.10 Will be removed in major release
      * @param float $price
      * @return string
      */
@@ -345,7 +345,7 @@ protected function _registerJsPrice($price)
      * Should we generate "As low as" block or not
      *
      * @return bool
-     * @since 100.2.0
+     * @since 100.1.10
      */
     public function showMinimalPrice()
     {
diff --git a/app/code/Magento/ConfigurableProduct/Model/AttributeOptionProviderInterface.php b/app/code/Magento/ConfigurableProduct/Model/AttributeOptionProviderInterface.php
index ca289122a2126..e9e91485ea7a5 100644
--- a/app/code/Magento/ConfigurableProduct/Model/AttributeOptionProviderInterface.php
+++ b/app/code/Magento/ConfigurableProduct/Model/AttributeOptionProviderInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface to retrieve options for attribute
  * @api
- * @since 100.2.0
+ * @since 100.1.11
  */
 interface AttributeOptionProviderInterface
 {
@@ -18,7 +18,7 @@ interface AttributeOptionProviderInterface
      * @param \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute
      * @param int $productId
      * @return array
-     * @since 100.2.0
+     * @since 100.1.11
      */
     public function getAttributeOptions(\Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute, $productId);
 }
diff --git a/app/code/Magento/ConfigurableProduct/Model/LinkManagement.php b/app/code/Magento/ConfigurableProduct/Model/LinkManagement.php
index 890564fdb303c..c7217dc9df80a 100644
--- a/app/code/Magento/ConfigurableProduct/Model/LinkManagement.php
+++ b/app/code/Magento/ConfigurableProduct/Model/LinkManagement.php
@@ -199,7 +199,7 @@ public function removeChild($sku, $childSku)
      *
      * @return \Magento\ConfigurableProduct\Helper\Product\Options\Factory
      *
-     * @deprecated 100.1.2
+     * @deprecated 100.2.0
      */
     private function getOptionsFactory()
     {
diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php
index 1b3ecfb1d222a..c2ae381b345c6 100644
--- a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php
@@ -106,6 +106,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
      * Local cache
      *
      * @var array
+     * @since 100.4.0
      */
     protected $isSaleableBySku = [];
 
@@ -591,6 +592,7 @@ protected function getGalleryReadHandler()
      *
      * @param  \Magento\Catalog\Model\Product $product
      * @return \Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\Collection
+     * @since 100.4.0
      */
     protected function getLinkedProductCollection($product)
     {
@@ -1266,7 +1268,7 @@ private function getCatalogConfig()
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 100.1.11
      */
     public function isPossibleBuyFromList($product)
     {
diff --git a/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php b/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php
index 57f701721a6f3..0ced38c4a6923 100644
--- a/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php
+++ b/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Attribute/Collection.php
@@ -41,7 +41,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
      * Product instance
      *
      * @var \Magento\Catalog\Model\Product
-     * @deprecated Now collection supports fetching options for multiple products. This field will be set to first
+     * @deprecated 100.3.0 Now collection supports fetching options for multiple products. This field will be set to first
      * element of products array.
      */
     protected $_product;
@@ -174,6 +174,7 @@ public function getStoreId()
      *
      * @return $this
      * @throws \Exception
+     * @since 100.3.0
      */
     protected function _beforeLoad()
     {
diff --git a/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Product/Collection.php b/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Product/Collection.php
index b76954075bcde..ae591474cd13e 100644
--- a/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Product/Collection.php
+++ b/app/code/Magento/ConfigurableProduct/Model/ResourceModel/Product/Type/Configurable/Product/Collection.php
@@ -74,6 +74,7 @@ public function setProductFilter($product)
      * Add parent ids to `in` filter before load.
      *
      * @return $this
+     * @since 100.3.0
      */
     protected function _renderFilters()
     {
diff --git a/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php b/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php
index 5581fcc07b861..af9e6e7bdebcd 100644
--- a/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php
+++ b/app/code/Magento/ConfigurableProduct/Pricing/Price/ConfigurablePriceResolver.php
@@ -19,13 +19,13 @@ class ConfigurablePriceResolver implements PriceResolverInterface
 
     /**
      * @var PriceCurrencyInterface
-     * @deprecated 100.1.1
+     * @deprecated 100.0.2
      */
     protected $priceCurrency;
 
     /**
      * @var Configurable
-     * @deprecated 100.1.1
+     * @deprecated 100.0.2
      */
     protected $configurable;
 
diff --git a/app/code/Magento/Cookie/Helper/Cookie.php b/app/code/Magento/Cookie/Helper/Cookie.php
index 8bab596ab4c13..0e04e7ace2cea 100644
--- a/app/code/Magento/Cookie/Helper/Cookie.php
+++ b/app/code/Magento/Cookie/Helper/Cookie.php
@@ -80,7 +80,7 @@ public function isUserNotAllowSaveCookie()
      * Check if cookie restriction mode is enabled for this store
      *
      * @return bool
-     * @since 100.2.0
+     * @since 100.1.3
      */
     public function isCookieRestrictionModeEnabled()
     {
diff --git a/app/code/Magento/Customer/Api/CustomerGroupConfigInterface.php b/app/code/Magento/Customer/Api/CustomerGroupConfigInterface.php
index 6e118b2b40e76..ccbf06206aed7 100644
--- a/app/code/Magento/Customer/Api/CustomerGroupConfigInterface.php
+++ b/app/code/Magento/Customer/Api/CustomerGroupConfigInterface.php
@@ -9,7 +9,7 @@
  * Interface for system configuration operations for customer groups.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface CustomerGroupConfigInterface
 {
@@ -22,7 +22,7 @@ interface CustomerGroupConfigInterface
      * @throws \Exception
      * @throws \Magento\Framework\Exception\NoSuchEntityException
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function setDefaultCustomerGroup($id);
 }
diff --git a/app/code/Magento/Customer/Block/Account/AuthenticationPopup.php b/app/code/Magento/Customer/Block/Account/AuthenticationPopup.php
index 07e0704ee6e43..6695d7fd6d3e8 100644
--- a/app/code/Magento/Customer/Block/Account/AuthenticationPopup.php
+++ b/app/code/Magento/Customer/Block/Account/AuthenticationPopup.php
@@ -70,7 +70,7 @@ public function getConfig()
      * Added in scope of https://github.com/magento/magento2/pull/8617
      *
      * @return bool|string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSerializedConfig()
     {
diff --git a/app/code/Magento/Customer/Block/Account/AuthorizationLink.php b/app/code/Magento/Customer/Block/Account/AuthorizationLink.php
index ff9d56c8fc4cb..16ab9d26450b1 100644
--- a/app/code/Magento/Customer/Block/Account/AuthorizationLink.php
+++ b/app/code/Magento/Customer/Block/Account/AuthorizationLink.php
@@ -94,7 +94,7 @@ public function isLoggedIn()
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSortOrder()
     {
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard.php b/app/code/Magento/Customer/Block/Account/Dashboard.php
index 92537009175fd..7281c9fc7b78d 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard.php
@@ -120,7 +120,7 @@ public function getAddressEditUrl($address)
      * Retrieve the Url for customer orders.
      *
      * @return string
-     * @deprecated Action does not exist
+     * @deprecated 102.0.3 Action does not exist
      */
     public function getOrdersUrl()
     {
diff --git a/app/code/Magento/Customer/Block/Account/Delimiter.php b/app/code/Magento/Customer/Block/Account/Delimiter.php
index 056a53e259c49..2bd93668cc438 100644
--- a/app/code/Magento/Customer/Block/Account/Delimiter.php
+++ b/app/code/Magento/Customer/Block/Account/Delimiter.php
@@ -10,13 +10,13 @@
  * Class for delimiter.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class Delimiter extends \Magento\Framework\View\Element\Template implements SortLinkInterface
 {
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSortOrder()
     {
diff --git a/app/code/Magento/Customer/Block/Account/Link.php b/app/code/Magento/Customer/Block/Account/Link.php
index ed29a10abc8b7..60ade7fe9207c 100644
--- a/app/code/Magento/Customer/Block/Account/Link.php
+++ b/app/code/Magento/Customer/Block/Account/Link.php
@@ -45,7 +45,7 @@ public function getHref()
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSortOrder()
     {
diff --git a/app/code/Magento/Customer/Block/Account/Navigation.php b/app/code/Magento/Customer/Block/Account/Navigation.php
index 705acbcda4c6a..1d29932e79151 100644
--- a/app/code/Magento/Customer/Block/Account/Navigation.php
+++ b/app/code/Magento/Customer/Block/Account/Navigation.php
@@ -14,13 +14,13 @@
  * Class for sorting links in navigation panels.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class Navigation extends Links
 {
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getLinks()
     {
diff --git a/app/code/Magento/Customer/Block/Account/SortLinkInterface.php b/app/code/Magento/Customer/Block/Account/SortLinkInterface.php
index 114bb02e1444c..5dc59aaf95854 100644
--- a/app/code/Magento/Customer/Block/Account/SortLinkInterface.php
+++ b/app/code/Magento/Customer/Block/Account/SortLinkInterface.php
@@ -9,7 +9,7 @@
 /**
  * Interface for sortable links.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface SortLinkInterface
 {
@@ -23,7 +23,7 @@ interface SortLinkInterface
      * Get sort order for block.
      *
      * @return int
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSortOrder();
 }
diff --git a/app/code/Magento/Customer/Block/Address/Book.php b/app/code/Magento/Customer/Block/Address/Book.php
index 04669446ffee9..f37ae21a9b83c 100644
--- a/app/code/Magento/Customer/Block/Address/Book.php
+++ b/app/code/Magento/Customer/Block/Address/Book.php
@@ -93,7 +93,7 @@ protected function _prepareLayout()
      * Generate and return "New Address" URL
      *
      * @return string
-     * @deprecated not used in this block
+     * @deprecated 102.0.1 not used in this block
      * @see \Magento\Customer\Block\Address\Grid::getAddAddressUrl
      */
     public function getAddAddressUrl()
@@ -118,7 +118,7 @@ public function getBackUrl()
      * Generate and return "Delete" URL
      *
      * @return string
-     * @deprecated not used in this block
+     * @deprecated 102.0.1 not used in this block
      * @see \Magento\Customer\Block\Address\Grid::getDeleteUrl
      */
     public function getDeleteUrl()
@@ -133,7 +133,7 @@ public function getDeleteUrl()
      *
      * @param int $addressId
      * @return string
-     * @deprecated not used in this block
+     * @deprecated 102.0.1 not used in this block
      * @see \Magento\Customer\Block\Address\Grid::getAddressEditUrl
      */
     public function getAddressEditUrl($addressId)
@@ -159,7 +159,7 @@ public function hasPrimaryAddress()
      *
      * @return \Magento\Customer\Api\Data\AddressInterface[]|bool
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @deprecated not used in this block
+     * @deprecated 102.0.1 not used in this block
      * @see \Magento\Customer\Block\Address\Grid::getAdditionalAddresses
      */
     public function getAdditionalAddresses()
diff --git a/app/code/Magento/Customer/Block/Address/Grid.php b/app/code/Magento/Customer/Block/Address/Grid.php
index 963efc648d94b..9053fd57154bb 100644
--- a/app/code/Magento/Customer/Block/Address/Grid.php
+++ b/app/code/Magento/Customer/Block/Address/Grid.php
@@ -15,6 +15,7 @@
  * Customer address grid
  *
  * @api
+ * @since 102.0.1
  */
 class Grid extends \Magento\Framework\View\Element\Template
 {
@@ -64,6 +65,7 @@ public function __construct(
      *
      * @return void
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @since 102.0.1
      */
     protected function _prepareLayout(): void
     {
@@ -75,6 +77,7 @@ protected function _prepareLayout(): void
      * Generate and return "New Address" URL
      *
      * @return string
+     * @since 102.0.1
      */
     public function getAddAddressUrl(): string
     {
@@ -85,6 +88,7 @@ public function getAddAddressUrl(): string
      * Generate and return "Delete" URL
      *
      * @return string
+     * @since 102.0.1
      */
     public function getDeleteUrl(): string
     {
@@ -98,6 +102,7 @@ public function getDeleteUrl(): string
      *
      * @param int $addressId
      * @return string
+     * @since 102.0.1
      */
     public function getAddressEditUrl($addressId): string
     {
@@ -112,6 +117,7 @@ public function getAddressEditUrl($addressId): string
      * @return \Magento\Customer\Api\Data\AddressInterface[]
      * @throws \Magento\Framework\Exception\LocalizedException
      * @throws NoSuchEntityException
+     * @since 102.0.1
      */
     public function getAdditionalAddresses(): array
     {
@@ -132,6 +138,7 @@ public function getAdditionalAddresses(): array
      * Return stored customer or get it from session
      *
      * @return \Magento\Customer\Api\Data\CustomerInterface
+     * @since 102.0.1
      */
     public function getCustomer(): \Magento\Customer\Api\Data\CustomerInterface
     {
@@ -148,6 +155,7 @@ public function getCustomer(): \Magento\Customer\Api\Data\CustomerInterface
      *
      * @param \Magento\Customer\Api\Data\AddressInterface $address
      * @return string
+     * @since 102.0.1
      */
     public function getStreetAddress(\Magento\Customer\Api\Data\AddressInterface $address): string
     {
@@ -165,6 +173,7 @@ public function getStreetAddress(\Magento\Customer\Api\Data\AddressInterface $ad
      *
      * @param string $countryCode
      * @return string
+     * @since 102.0.1
      */
     public function getCountryByCode(string $countryCode): string
     {
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
index 656a78d1165e3..799d6e3bc1263 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Cart.php
@@ -316,6 +316,7 @@ private function prepareWebsiteFilter(): void
 
     /**
      * @inheritDoc
+     * @since 103.0.0
      */
     public function getMainButtonsHtml()
     {
diff --git a/app/code/Magento/Customer/Block/CustomerData.php b/app/code/Magento/Customer/Block/CustomerData.php
index 98eb2d9f9ea40..bbc54cfa71c09 100644
--- a/app/code/Magento/Customer/Block/CustomerData.php
+++ b/app/code/Magento/Customer/Block/CustomerData.php
@@ -59,7 +59,7 @@ public function getCustomerDataUrl($route)
      * Once this period has expired the corresponding section must be invalidated and reloaded.
      *
      * @return int section lifetime in minutes
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getExpirableSectionLifetime()
     {
@@ -70,7 +70,7 @@ public function getExpirableSectionLifetime()
      * Retrieve the list of sections that can expire.
      *
      * @return array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getExpirableSectionNames()
     {
diff --git a/app/code/Magento/Customer/Block/CustomerScopeData.php b/app/code/Magento/Customer/Block/CustomerScopeData.php
index f875386695b4b..63ff863f89ce3 100644
--- a/app/code/Magento/Customer/Block/CustomerScopeData.php
+++ b/app/code/Magento/Customer/Block/CustomerScopeData.php
@@ -15,7 +15,7 @@
  * with appropriate value in store front private cache.
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.9
  */
 class CustomerScopeData extends \Magento\Framework\View\Element\Template
 {
@@ -54,7 +54,7 @@ public function __construct(
      * Can be used when necessary to obtain website id of the current customer.
      *
      * @return integer
-     * @since 100.2.0
+     * @since 100.1.9
      */
     public function getWebsiteId()
     {
@@ -67,6 +67,7 @@ public function getWebsiteId()
      * @param array $configuration
      * @return bool|string
      * @throws \InvalidArgumentException
+     * @since 102.0.0
      */
     public function encodeConfiguration(array $configuration)
     {
diff --git a/app/code/Magento/Customer/Controller/AbstractAccount.php b/app/code/Magento/Customer/Controller/AbstractAccount.php
index 4f2c80711d292..21357f0505f7d 100644
--- a/app/code/Magento/Customer/Controller/AbstractAccount.php
+++ b/app/code/Magento/Customer/Controller/AbstractAccount.php
@@ -12,7 +12,7 @@
  * AbstractAccount class is deprecated, in favour of Composition approach to build Controllers
  *
  * @SuppressWarnings(PHPMD.NumberOfChildren)
- * @deprecated
+ * @deprecated 103.0.0
  * @see \Magento\Customer\Controller\AccountInterface
  */
 abstract class AbstractAccount extends Action implements AccountInterface
diff --git a/app/code/Magento/Customer/Controller/Account/Confirm.php b/app/code/Magento/Customer/Controller/Account/Confirm.php
index a1ec3164a3c31..2fc6ed4d422fb 100644
--- a/app/code/Magento/Customer/Controller/Account/Confirm.php
+++ b/app/code/Magento/Customer/Controller/Account/Confirm.php
@@ -108,7 +108,7 @@ public function __construct(
     /**
      * Retrieve cookie manager
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return \Magento\Framework\Stdlib\Cookie\PhpCookieManager
      */
     private function getCookieManager()
@@ -124,7 +124,7 @@ private function getCookieManager()
     /**
      * Retrieve cookie metadata factory
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory
      */
     private function getCookieMetadataFactory()
diff --git a/app/code/Magento/Customer/Controller/Account/CreatePost.php b/app/code/Magento/Customer/Controller/Account/CreatePost.php
index 4c1cfa94c5565..14c2ed43171f6 100644
--- a/app/code/Magento/Customer/Controller/Account/CreatePost.php
+++ b/app/code/Magento/Customer/Controller/Account/CreatePost.php
@@ -452,7 +452,7 @@ protected function checkPasswordConfirmation($password, $confirmation)
     /**
      * Retrieve success message
      *
-     * @deprecated
+     * @deprecated 102.0.4
      * @see getMessageManagerSuccessMessage()
      * @return string
      */
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index.php b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
index ffae1e9f8bf1e..51dc39a2fc658 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
@@ -35,7 +35,7 @@ abstract class Index extends \Magento\Backend\App\Action
 
     /**
      * @var \Magento\Framework\Validator
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_validator;
 
@@ -53,13 +53,13 @@ abstract class Index extends \Magento\Backend\App\Action
 
     /**
      * @var \Magento\Customer\Model\CustomerFactory
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_customerFactory = null;
 
     /**
      * @var \Magento\Customer\Model\AddressFactory
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_addressFactory = null;
 
@@ -85,7 +85,7 @@ abstract class Index extends \Magento\Backend\App\Action
 
     /**
      * @var \Magento\Framework\Math\Random
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_random;
 
@@ -96,7 +96,7 @@ abstract class Index extends \Magento\Backend\App\Action
 
     /**
      * @var \Magento\Framework\Api\ExtensibleDataObjectConverter
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_extensibleDataObjectConverter;
 
@@ -132,7 +132,7 @@ abstract class Index extends \Magento\Backend\App\Action
 
     /**
      * @var \Magento\Framework\Reflection\DataObjectProcessor
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $dataObjectProcessor;
 
@@ -143,7 +143,7 @@ abstract class Index extends \Magento\Backend\App\Action
 
     /**
      * @var \Magento\Framework\View\LayoutFactory
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $layoutFactory;
 
@@ -306,7 +306,7 @@ protected function _addSessionErrorMessages($messages)
      * @param callable $singleAction A single action callable that takes a customer ID as input
      * @param int[] $customerIds Array of customer Ids to perform the action upon
      * @return int Number of customers successfully acted upon
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function actUponMultipleCustomers(callable $singleAction, $customerIds)
     {
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php
index 6528ac4c1f211..910f4e94b90b7 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Cart.php
@@ -42,7 +42,7 @@
  * Admin customer shopping cart controller
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 class Cart extends BaseAction implements HttpGetActionInterface, HttpPostActionInterface
 {
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php
index a65bfa5d77f9e..2d4820f3c17c4 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Save.php
@@ -243,7 +243,7 @@ protected function _extractData(
     /**
      * Saves default_billing and default_shipping flags for customer address
      *
-     * @deprecated must be removed because addresses are save separately for now
+     * @deprecated 102.0.1 must be removed because addresses are save separately for now
      * @param array $addressIdList
      * @param array $extractedCustomerData
      * @return array
@@ -286,7 +286,7 @@ protected function saveDefaultFlags(array $addressIdList, array & $extractedCust
     /**
      * Reformat customer addresses data to be compatible with customer service interface
      *
-     * @deprecated addresses are saved separately for now
+     * @deprecated 102.0.1 addresses are saved separately for now
      * @param array $extractedCustomerData
      * @return array
      */
diff --git a/app/code/Magento/Customer/Controller/Section/Load.php b/app/code/Magento/Customer/Controller/Section/Load.php
index 6c3aa06b9f022..e735366d0b8b8 100644
--- a/app/code/Magento/Customer/Controller/Section/Load.php
+++ b/app/code/Magento/Customer/Controller/Section/Load.php
@@ -23,7 +23,7 @@ class Load extends \Magento\Framework\App\Action\Action implements HttpGetAction
 
     /**
      * @var Identifier
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $sectionIdentifier;
 
diff --git a/app/code/Magento/Customer/CustomerData/SectionPool.php b/app/code/Magento/Customer/CustomerData/SectionPool.php
index eef2854cf363e..28d79bf42ecd7 100644
--- a/app/code/Magento/Customer/CustomerData/SectionPool.php
+++ b/app/code/Magento/Customer/CustomerData/SectionPool.php
@@ -66,6 +66,7 @@ public function getSectionsData(array $sectionNames = null, $forceNewTimestamp =
      * Return array of section names.
      *
      * @return array
+     * @since 102.0.4
      */
     public function getSectionNames()
     {
diff --git a/app/code/Magento/Customer/Helper/Address.php b/app/code/Magento/Customer/Helper/Address.php
index 765c13b287704..74eee759b4abd 100644
--- a/app/code/Magento/Customer/Helper/Address.php
+++ b/app/code/Magento/Customer/Helper/Address.php
@@ -81,7 +81,7 @@ class Address extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * @var CustomerMetadataInterface
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_customerMetadataService;
 
@@ -407,7 +407,7 @@ public function isVatAttributeVisible()
      * @return bool
      * @throws NoSuchEntityException
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isAttributeVisible($code)
     {
diff --git a/app/code/Magento/Customer/Model/Account/Redirect.php b/app/code/Magento/Customer/Model/Account/Redirect.php
index 0389a380b36dc..9824be73f36b5 100644
--- a/app/code/Magento/Customer/Model/Account/Redirect.php
+++ b/app/code/Magento/Customer/Model/Account/Redirect.php
@@ -58,7 +58,7 @@ class Redirect
     protected $customerUrl;
 
     /**
-     * @deprecated 100.1.8
+     * @deprecated 100.0.2
      * @var UrlInterface
      */
     protected $url;
diff --git a/app/code/Magento/Customer/Model/AccountManagement.php b/app/code/Magento/Customer/Model/AccountManagement.php
index 106b7e6a582ba..d22a10145c7be 100644
--- a/app/code/Magento/Customer/Model/AccountManagement.php
+++ b/app/code/Magento/Customer/Model/AccountManagement.php
@@ -1375,7 +1375,7 @@ protected function sendEmailTemplate(
      *
      * @param CustomerInterface $customer
      * @return bool
-     * @deprecated
+     * @deprecated 101.0.4
      * @see AccountConfirmation::isConfirmationRequired
      */
     protected function isConfirmationRequired($customer)
@@ -1392,7 +1392,7 @@ protected function isConfirmationRequired($customer)
      *
      * @param CustomerInterface $customer
      * @return bool
-     * @deprecated
+     * @deprecated 101.0.4
      * @see AccountConfirmation::isConfirmationRequired
      */
     protected function canSkipConfirmation($customer)
diff --git a/app/code/Magento/Customer/Model/Address.php b/app/code/Magento/Customer/Model/Address.php
index ea9b103f42273..241abbb06f8a1 100644
--- a/app/code/Magento/Customer/Model/Address.php
+++ b/app/code/Magento/Customer/Model/Address.php
@@ -395,7 +395,7 @@ private function getAttributeList()
      * Retrieve attribute set id for customer address.
      *
      * @return int
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getAttributeSetId()
     {
diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php
index fb067decd0b37..8421fc92f8c4a 100644
--- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php
+++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php
@@ -632,7 +632,7 @@ protected function _createCountryInstance()
      * Unset Region from address
      *
      * @return $this
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function unsRegion()
     {
@@ -644,7 +644,7 @@ public function unsRegion()
      *
      * @return bool
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function isCompanyRequired()
     {
@@ -656,7 +656,7 @@ protected function isCompanyRequired()
      *
      * @return bool
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function isTelephoneRequired()
     {
@@ -668,7 +668,7 @@ protected function isTelephoneRequired()
      *
      * @return bool
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function isFaxRequired()
     {
diff --git a/app/code/Magento/Customer/Model/Address/ValidatorInterface.php b/app/code/Magento/Customer/Model/Address/ValidatorInterface.php
index 8468f28e70e70..1bdfd77a19311 100644
--- a/app/code/Magento/Customer/Model/Address/ValidatorInterface.php
+++ b/app/code/Magento/Customer/Model/Address/ValidatorInterface.php
@@ -10,6 +10,7 @@
  * Interface for address validator.
  *
  * @api
+ * @since 102.0.0
  */
 interface ValidatorInterface
 {
@@ -19,6 +20,7 @@ interface ValidatorInterface
      *
      * @param AbstractAddress $address
      * @return array
+     * @since 102.0.0
      */
     public function validate(AbstractAddress $address);
 }
diff --git a/app/code/Magento/Customer/Model/AuthenticationInterface.php b/app/code/Magento/Customer/Model/AuthenticationInterface.php
index f2d213be2ccfe..3c4cae3089218 100644
--- a/app/code/Magento/Customer/Model/AuthenticationInterface.php
+++ b/app/code/Magento/Customer/Model/AuthenticationInterface.php
@@ -11,6 +11,7 @@
 /**
  * Interface \Magento\Customer\Model\AuthenticationInterface
  * @api
+ * @since 100.1.0
  */
 interface AuthenticationInterface
 {
@@ -19,6 +20,7 @@ interface AuthenticationInterface
      *
      * @param int $customerId
      * @return void
+     * @since 100.1.0
      */
     public function processAuthenticationFailure($customerId);
 
@@ -27,6 +29,7 @@ public function processAuthenticationFailure($customerId);
      *
      * @param int $customerId
      * @return void
+     * @since 100.1.0
      */
     public function unlock($customerId);
 
@@ -35,6 +38,7 @@ public function unlock($customerId);
      *
      * @param int $customerId
      * @return boolean
+     * @since 100.1.0
      */
     public function isLocked($customerId);
 
@@ -46,6 +50,7 @@ public function isLocked($customerId);
      * @return boolean
      * @throws InvalidEmailOrPasswordException
      * @throws UserLockedException
+     * @since 100.1.0
      */
     public function authenticate($customerId, $password);
 }
diff --git a/app/code/Magento/Customer/Model/Checkout/ConfigProvider.php b/app/code/Magento/Customer/Model/Checkout/ConfigProvider.php
index ef0b8b7163ad8..53c1b470a5175 100644
--- a/app/code/Magento/Customer/Model/Checkout/ConfigProvider.php
+++ b/app/code/Magento/Customer/Model/Checkout/ConfigProvider.php
@@ -26,7 +26,7 @@ class ConfigProvider implements ConfigProviderInterface
 
     /**
      * @var UrlInterface
-     * @deprecated
+     * @deprecated 101.0.4
      */
     protected $urlBuilder;
 
diff --git a/app/code/Magento/Customer/Model/Config/Source/Group.php b/app/code/Magento/Customer/Model/Config/Source/Group.php
index 7132b8ad4cedf..65b2e14019c40 100644
--- a/app/code/Magento/Customer/Model/Config/Source/Group.php
+++ b/app/code/Magento/Customer/Model/Config/Source/Group.php
@@ -17,13 +17,13 @@ class Group implements \Magento\Framework\Option\ArrayInterface
     protected $_options;
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @var GroupManagementInterface
      */
     protected $_groupManagement;
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @var \Magento\Framework\Convert\DataObject
      */
     protected $_converter;
diff --git a/app/code/Magento/Customer/Model/Config/Source/Group/Multiselect.php b/app/code/Magento/Customer/Model/Config/Source/Group/Multiselect.php
index bf1fae8d34bed..38f717b82ea35 100644
--- a/app/code/Magento/Customer/Model/Config/Source/Group/Multiselect.php
+++ b/app/code/Magento/Customer/Model/Config/Source/Group/Multiselect.php
@@ -19,13 +19,13 @@ class Multiselect implements \Magento\Framework\Option\ArrayInterface
     protected $_options;
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @var GroupManagementInterface
      */
     protected $_groupManagement;
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @var \Magento\Framework\Convert\DataObject
      */
     protected $_converter;
diff --git a/app/code/Magento/Customer/Model/Customer.php b/app/code/Magento/Customer/Model/Customer.php
index ea52994735c63..f90b67216254d 100644
--- a/app/code/Magento/Customer/Model/Customer.php
+++ b/app/code/Magento/Customer/Model/Customer.php
@@ -820,7 +820,7 @@ public function sendNewAccountEmail($type = 'registered', $backUrl = '', $storeI
      * Check if accounts confirmation is required in config
      *
      * @return bool
-     * @deprecated
+     * @deprecated 101.0.4
      * @see AccountConfirmation::isConfirmationRequired
      */
     public function isConfirmationRequired()
@@ -1000,6 +1000,7 @@ public function getSharedWebsiteIds()
      * Retrieve attribute set id for customer.
      *
      * @return int
+     * @since 102.0.1
      */
     public function getAttributeSetId()
     {
@@ -1197,7 +1198,7 @@ public function setIsReadonly($value)
      * Check whether confirmation may be skipped when registering using certain email address
      *
      * @return bool
-     * @deprecated
+     * @deprecated 101.0.4
      * @see AccountConfirmation::isConfirmationRequired
      */
     protected function canSkipConfirmation()
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
index a74838a1a7812..184a9ea8ed7bc 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
@@ -9,7 +9,7 @@
 use Magento\Framework\Exception\LocalizedException;
 
 /**
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * Customer password attribute backend
  */
 class Password extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
@@ -69,7 +69,7 @@ public function beforeSave($object)
     }
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @param \Magento\Framework\DataObject $object
      * @return bool
      */
diff --git a/app/code/Magento/Customer/Model/Customer/DataProvider.php b/app/code/Magento/Customer/Model/Customer/DataProvider.php
index 38e597e4e0fe7..ef32ad57886fe 100644
--- a/app/code/Magento/Customer/Model/Customer/DataProvider.php
+++ b/app/code/Magento/Customer/Model/Customer/DataProvider.php
@@ -33,7 +33,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.TooManyFields)
  *
- * @deprecated \Magento\Customer\Model\Customer\DataProviderWithDefaultAddresses is used instead
+ * @deprecated 102.0.1 \Magento\Customer\Model\Customer\DataProviderWithDefaultAddresses is used instead
  * @api
  * @since 100.0.2
  */
@@ -324,7 +324,7 @@ private function canShowAttribute(AbstractAttribute $customerAttribute): bool
      * Retrieve Country With Websites Source
      *
      * @return CountryWithWebsites
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getCountryWithWebsiteSource()
     {
diff --git a/app/code/Magento/Customer/Model/Customer/Source/GroupSourceInterface.php b/app/code/Magento/Customer/Model/Customer/Source/GroupSourceInterface.php
index 26be387a02f9c..e7addc942811d 100644
--- a/app/code/Magento/Customer/Model/Customer/Source/GroupSourceInterface.php
+++ b/app/code/Magento/Customer/Model/Customer/Source/GroupSourceInterface.php
@@ -9,7 +9,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface GroupSourceInterface extends OptionSourceInterface
 {
diff --git a/app/code/Magento/Customer/Model/Group/RetrieverInterface.php b/app/code/Magento/Customer/Model/Group/RetrieverInterface.php
index 7d2d47cae2f09..1b1e4efdb7c50 100644
--- a/app/code/Magento/Customer/Model/Group/RetrieverInterface.php
+++ b/app/code/Magento/Customer/Model/Group/RetrieverInterface.php
@@ -9,7 +9,7 @@
  * Interface for getting current customer group from session.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface RetrieverInterface
 {
@@ -17,7 +17,7 @@ interface RetrieverInterface
      * Retrieve customer group id.
      *
      * @return int
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getCustomerGroupId();
 }
diff --git a/app/code/Magento/Customer/Model/Metadata/Form/File.php b/app/code/Magento/Customer/Model/Metadata/Form/File.php
index 227e85ed98f91..1a1c48075fce5 100644
--- a/app/code/Magento/Customer/Model/Metadata/Form/File.php
+++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php
@@ -57,7 +57,7 @@ class File extends AbstractData
 
     /**
      * @var FileProcessorFactory
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $fileProcessorFactory;
 
diff --git a/app/code/Magento/Customer/Model/Options.php b/app/code/Magento/Customer/Model/Options.php
index 71e70f8e14208..c230353f2a284 100644
--- a/app/code/Magento/Customer/Model/Options.php
+++ b/app/code/Magento/Customer/Model/Options.php
@@ -74,7 +74,7 @@ public function getNameSuffixOptions($store = null)
      * @param bool $isOptional
      * @return array|bool
      *
-     * @deprecated
+     * @deprecated 101.0.4
      * @see prepareNamePrefixSuffixOptions()
      */
     protected function _prepareNamePrefixSuffixOptions($options, $isOptional = false)
diff --git a/app/code/Magento/Customer/Model/ResourceModel/Address.php b/app/code/Magento/Customer/Model/ResourceModel/Address.php
index 200eaabe6517d..8e44638e7aee8 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/Address.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/Address.php
@@ -126,7 +126,7 @@ public function delete($object)
     /**
      * Get instance of DeleteRelation class
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return DeleteRelation
      */
     private function getDeleteRelation()
@@ -137,7 +137,7 @@ private function getDeleteRelation()
     /**
      * Get instance of CustomerRegistry class
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CustomerRegistry
      */
     private function getCustomerRegistry()
diff --git a/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/Country.php b/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/Country.php
index 37b3b1af0a42d..62339cc7b974f 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/Country.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/Address/Attribute/Source/Country.php
@@ -67,7 +67,7 @@ protected function _createCountriesCollection()
 
     /**
      * Retrieve Store Manager
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return StoreManagerInterface
      */
     private function getStoreManager()
diff --git a/app/code/Magento/Customer/Model/ResourceModel/Address/Relation.php b/app/code/Magento/Customer/Model/ResourceModel/Address/Relation.php
index cf837e2924161..dd502abcafca9 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/Address/Relation.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/Address/Relation.php
@@ -142,7 +142,7 @@ private function updateCustomerRegistry(Customer $customer, array $changedAddres
     /**
      * Checks if address has chosen as default and has had an id
      *
-     * @deprecated Is not used anymore due to changes in logic of save of address.
+     * @deprecated 102.0.1 Is not used anymore due to changes in logic of save of address.
      *             If address was default and becomes not default than default address id for customer must be
      *             set to null
      * @param AbstractModel $object
diff --git a/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php b/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
index 3fe61785de897..48828d58fca04 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/AddressRepository.php
@@ -209,7 +209,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
@@ -268,7 +268,7 @@ public function deleteById($addressId)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
index 0611a2df641e7..9820e162ac1c0 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/CustomerRepository.php
@@ -425,7 +425,7 @@ public function deleteById($customerId)
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
diff --git a/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php b/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php
index 664f85f841e3f..10979cd9cc22a 100644
--- a/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php
+++ b/app/code/Magento/Customer/Model/ResourceModel/GroupRepository.php
@@ -220,7 +220,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
     /**
      * Helper function that adds a FilterGroup to the collection.
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
@@ -243,7 +243,7 @@ protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collecti
     /**
      * Translates a field name to a DB column name for use in collection queries.
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @param string $field a field name that should be translated to a DB column name.
      * @return string
      */
@@ -343,7 +343,7 @@ protected function _verifyTaxClassModel($taxClassId, $group)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Address.php b/app/code/Magento/CustomerImportExport/Model/Import/Address.php
index 09d76ec3fb71f..ec2a1220d02b0 100644
--- a/app/code/Magento/CustomerImportExport/Model/Import/Address.php
+++ b/app/code/Magento/CustomerImportExport/Model/Import/Address.php
@@ -167,7 +167,7 @@ class Address extends AbstractCustomer
      * Array of region parameters
      *
      * @var array
-     * @deprecated field not in use
+     * @deprecated 100.3.4 field not in use
      */
     protected $_regionParameters;
 
@@ -197,19 +197,19 @@ class Address extends AbstractCustomer
 
     /**
      * @var \Magento\Eav\Model\Config
-     * @deprecated field not-in use
+     * @deprecated 100.3.4 field not-in use
      */
     protected $_eavConfig;
 
     /**
      * @var \Magento\Customer\Model\AddressFactory
-     * @deprecated not utilized anymore
+     * @deprecated 100.3.4 not utilized anymore
      */
     protected $_addressFactory;
 
     /**
      * @var \Magento\Framework\Stdlib\DateTime
-     * @deprecated the property isn't used
+     * @deprecated 100.3.4 the property isn't used
      */
     protected $dateTime;
 
diff --git a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php
index 8f5bb951ce737..5ebf242bd6ac4 100644
--- a/app/code/Magento/CustomerImportExport/Model/Import/Customer.php
+++ b/app/code/Magento/CustomerImportExport/Model/Import/Customer.php
@@ -367,6 +367,7 @@ protected function _getNextEntityId()
      * @param array|AbstractSource $rows
      *
      * @return void
+     * @since 100.2.3
      */
     public function prepareCustomerData($rows): void
     {
@@ -387,6 +388,7 @@ public function prepareCustomerData($rows): void
 
     /**
      * @inheritDoc
+     * @since 100.2.3
      */
     public function validateData()
     {
diff --git a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
index 11f326e6dfc8f..f08278af864e7 100644
--- a/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
+++ b/app/code/Magento/CustomerImportExport/Model/ResourceModel/Import/Customer/Storage.php
@@ -130,7 +130,7 @@ public function addCustomerByArray(array $customer): Storage
     /**
      * Add customer to array
      *
-     * @deprecated @see addCustomerByArray
+     * @deprecated 100.3.0 @see addCustomerByArray
      * @param DataObject $customer
      * @return $this
      */
diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php
index 6587b462099be..d9b89b23d3d69 100644
--- a/app/code/Magento/Dhl/Model/Carrier.php
+++ b/app/code/Magento/Dhl/Model/Carrier.php
@@ -1084,7 +1084,7 @@ function () use ($deferredResponses, $responseBodies) {
      *
      * @param string $request
      * @return string
-     * @deprecated Use asynchronous client.
+     * @deprecated 100.3.3 Use asynchronous client.
      * @see _getQuotes()
      */
     protected function _getQuotesFromServer($request)
@@ -1396,7 +1396,7 @@ protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
      *
      * @param \Magento\Framework\DataObject $request
      * @return $this|\Magento\Framework\DataObject|boolean
-     * @deprecated
+     * @deprecated 100.2.3
      */
     public function proccessAdditionalValidation(\Magento\Framework\DataObject $request)
     {
diff --git a/app/code/Magento/Directory/Block/Data.php b/app/code/Magento/Directory/Block/Data.php
index 5d94eacf9de96..0424b824e4454 100644
--- a/app/code/Magento/Directory/Block/Data.php
+++ b/app/code/Magento/Directory/Block/Data.php
@@ -175,7 +175,7 @@ public function getRegionCollection()
      * Returns region html select
      *
      * @return string
-     * @deprecated
+     * @deprecated 100.3.3
      * @see getRegionSelect() method for more configurations
      */
     public function getRegionHtmlSelect()
diff --git a/app/code/Magento/Directory/Model/ResourceModel/Currency.php b/app/code/Magento/Directory/Model/ResourceModel/Currency.php
index 5db880c00343a..aec2da291f1b3 100644
--- a/app/code/Magento/Directory/Model/ResourceModel/Currency.php
+++ b/app/code/Magento/Directory/Model/ResourceModel/Currency.php
@@ -165,7 +165,7 @@ public function saveRates($rates)
      * @param string $path
      * @return array
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @deprecated because doesn't take into consideration scopes and system config values.
+     * @deprecated 100.2.3 because doesn't take into consideration scopes and system config values.
      * @see \Magento\Directory\Model\CurrencyConfig::getConfigCurrencies()
      */
     public function getConfigCurrencies($model, $path)
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Downloadable.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Downloadable.php
index 973d52e865dc9..b3c906c1bb9ad 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Downloadable.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Downloadable.php
@@ -11,7 +11,7 @@
  *
  * @api
  * @since 100.0.2
- * @deprecated
+ * @deprecated 100.3.1
  * @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite
  */
 class Downloadable extends \Magento\Downloadable\Block\Catalog\Product\Links
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php
index 8fdf1d395308e..707e9788141c4 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php
@@ -15,7 +15,7 @@
  * Adminhtml catalog product downloadable items tab and form
  *
  * @author      Magento Core Team <core@magentocommerce.com>
- * @deprecated
+ * @deprecated 100.3.1
  * @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite
  */
 class Downloadable extends Widget implements TabInterface
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php
index e0026765f269b..5895f3a92c54c 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php
@@ -11,7 +11,7 @@
  * @author      Magento Core Team <core@magentocommerce.com>
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  *
- * @deprecated in favor of new class which adds grid links
+ * @deprecated 100.3.1 in favor of new class which adds grid links
  * @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links
  */
 class Links extends \Magento\Backend\Block\Template
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php
index 83a5a93405158..04210d54f38aa 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php
@@ -10,7 +10,7 @@
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  *
- * @deprecated because of new class which adds grids samples
+ * @deprecated 100.3.1 because of new class which adds grids samples
  * @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Samples
  */
 class Samples extends \Magento\Backend\Block\Widget
diff --git a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit/Form.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit/Form.php
index fe430566d63ce..dbd236d5e8827 100644
--- a/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit/Form.php
+++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Downloadable/Product/Edit/Form.php
@@ -9,7 +9,7 @@
 /**
  * Class Form
  *
- * @deprecated since downloadable information rendering moved to UI components.
+ * @deprecated 100.3.1 since downloadable information rendering moved to UI components.
  * @see \Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite
  * @package Magento\Downloadable\Controller\Adminhtml\Downloadable\Product\Edit
  */
diff --git a/app/code/Magento/Downloadable/Model/Sample/Builder.php b/app/code/Magento/Downloadable/Model/Sample/Builder.php
index ca1fab224f86f..163e641935db0 100644
--- a/app/code/Magento/Downloadable/Model/Sample/Builder.php
+++ b/app/code/Magento/Downloadable/Model/Sample/Builder.php
@@ -78,6 +78,7 @@ public function __construct(
      * @param array $data
      * @return $this
      * @since 100.1.0
+     * @since 100.1.0
      */
     public function setData(array $data)
     {
diff --git a/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php b/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php
index 56ae16c53402c..45022e25c5c31 100644
--- a/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php
+++ b/app/code/Magento/Eav/Api/Data/AttributeDefaultValueInterface.php
@@ -11,7 +11,7 @@
  * Allows to manage attribute default value through interface
  * @api
  * @package Magento\Eav\Api\Data
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface AttributeDefaultValueInterface
 {
@@ -20,13 +20,13 @@ interface AttributeDefaultValueInterface
     /**
      * @param string $defaultValue
      * @return \Magento\Framework\Api\MetadataObjectInterface
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function setDefaultValue($defaultValue);
 
     /**
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getDefaultValue();
 }
diff --git a/app/code/Magento/Eav/Api/Data/AttributeInterface.php b/app/code/Magento/Eav/Api/Data/AttributeInterface.php
index 55d6e58b64b71..d96c2329ec594 100644
--- a/app/code/Magento/Eav/Api/Data/AttributeInterface.php
+++ b/app/code/Magento/Eav/Api/Data/AttributeInterface.php
@@ -316,6 +316,7 @@ public function getExtensionAttributes();
      *
      * @param \Magento\Eav\Api\Data\AttributeExtensionInterface $extensionAttributes
      * @return $this
+     * @since 102.0.0
      */
     public function setExtensionAttributes(
         \Magento\Eav\Api\Data\AttributeExtensionInterface $extensionAttributes
diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php
index 7dd6b0a19ec02..577dac5b0c28b 100644
--- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php
+++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php
@@ -38,7 +38,7 @@ public function __construct(
     }
 
     /**
-     * @deprecated Misspelled method
+     * @deprecated 102.0.0 Misspelled method
      * @see getCompatibleInputTypes
      */
     public function getComaptibleInputTypes()
diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php
index 9b44b2c7395ac..70fd5b2914600 100644
--- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php
+++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/AbstractOptions.php
@@ -9,7 +9,7 @@
  * Attribute add/edit form options tab
  *
  * @api
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @since 100.0.2
  */
 abstract class AbstractOptions extends \Magento\Framework\View\Element\AbstractBlock
diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Grid/AbstractGrid.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Grid/AbstractGrid.php
index 55c0583191492..839ee7584cf03 100644
--- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Grid/AbstractGrid.php
+++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Grid/AbstractGrid.php
@@ -10,7 +10,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @since 100.0.2
  */
 abstract class AbstractGrid extends \Magento\Backend\Block\Widget\Grid\Extended
diff --git a/app/code/Magento/Eav/Model/Attribute/GroupRepository.php b/app/code/Magento/Eav/Model/Attribute/GroupRepository.php
index 07ca71d95eba5..f717a01a4384f 100644
--- a/app/code/Magento/Eav/Model/Attribute/GroupRepository.php
+++ b/app/code/Magento/Eav/Model/Attribute/GroupRepository.php
@@ -181,7 +181,7 @@ public function deleteById($groupId)
     /**
      * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
      * @return null|string
-     * @deprecated
+     * @deprecated 101.0.3
      */
     protected function retrieveAttributeSetIdFromSearchCriteria(
         \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
@@ -199,7 +199,7 @@ protected function retrieveAttributeSetIdFromSearchCriteria(
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Eav/Model/AttributeRepository.php b/app/code/Magento/Eav/Model/AttributeRepository.php
index 337ae7334486e..bb307d5581121 100644
--- a/app/code/Magento/Eav/Model/AttributeRepository.php
+++ b/app/code/Magento/Eav/Model/AttributeRepository.php
@@ -208,7 +208,7 @@ public function deleteById($attributeId)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Eav/Model/AttributeSetRepository.php b/app/code/Magento/Eav/Model/AttributeSetRepository.php
index caab82da3910d..73e8749952812 100644
--- a/app/code/Magento/Eav/Model/AttributeSetRepository.php
+++ b/app/code/Magento/Eav/Model/AttributeSetRepository.php
@@ -126,7 +126,7 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
     /**
      * Retrieve entity type code from search criteria
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
      * @return null|string
      */
@@ -188,7 +188,7 @@ public function deleteById($attributeSetId)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Eav/Model/Config.php b/app/code/Magento/Eav/Model/Config.php
index 718ef1a748590..ec099eb576425 100644
--- a/app/code/Magento/Eav/Model/Config.php
+++ b/app/code/Magento/Eav/Model/Config.php
@@ -509,12 +509,12 @@ protected function _initAttributes($entityType)
     /**
      * Get attributes by entity type
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see \Magento\Eav\Model\Config::getEntityAttributes
      *
      * @param string $entityType
      * @return AbstractAttribute[]
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getAttributes($entityType)
     {
@@ -724,7 +724,7 @@ private function createAttribute($model)
     /**
      * Get codes of all entity type attributes
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see \Magento\Eav\Model\Config::getEntityAttributes
      *
      * @param mixed $entityType
@@ -745,7 +745,7 @@ public function getEntityAttributeCodes($entityType, $object = null)
      *
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getEntityAttributes($entityType, $object = null)
     {
diff --git a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php
index a298aad6356c3..f2f767b4e41fa 100644
--- a/app/code/Magento/Eav/Model/Entity/AbstractEntity.php
+++ b/app/code/Magento/Eav/Model/Entity/AbstractEntity.php
@@ -1013,7 +1013,7 @@ public function load($object, $entityId, $attributes = [])
     /**
      * Loads attributes metadata.
      *
-     * @deprecated 100.2.0 Use self::loadAttributesForObject instead
+     * @deprecated 101.0.0 Use self::loadAttributesForObject instead
      * @param array|null $attributes
      * @return $this
      * @since 100.1.0
@@ -1991,7 +1991,7 @@ public function afterDelete(DataObject $object)
      * @param array $attributes
      * @param AbstractEntity|null $object
      * @return void
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function loadAttributesForObject($attributes, $object = null)
     {
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php
index 7066a752fe2a2..af621e17f4249 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php
@@ -130,7 +130,7 @@ abstract class AbstractAttribute extends \Magento\Framework\Model\AbstractExtens
      * Serializer Instance.
      *
      * @var Json
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected $serializer;
 
@@ -219,10 +219,10 @@ public function __construct(
     /**
      * Get Serializer instance.
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      *
      * @return Json
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function getSerializer()
     {
@@ -929,7 +929,7 @@ public function _getFlatColumnsDdlDefinition()
      *
      * Used in database compatible mode
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return array
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php b/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php
index fa50aa588b4ed..892018983cd1c 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/AttributeGroupAlreadyExistsException.php
@@ -9,7 +9,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class AttributeGroupAlreadyExistsException extends AlreadyExistsException
 {
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/JsonEncoded.php b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/JsonEncoded.php
index 156c0326f2b6f..b9fbb876dd6c3 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Backend/JsonEncoded.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Backend/JsonEncoded.php
@@ -11,7 +11,7 @@
  * Backend model for attribute that stores structures in json format
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class JsonEncoded extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
 {
@@ -35,7 +35,7 @@ public function __construct(Json $jsonSerializer)
      *
      * @param \Magento\Framework\DataObject $object
      * @return $this
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function beforeSave($object)
     {
@@ -52,7 +52,7 @@ public function beforeSave($object)
      *
      * @param \Magento\Framework\DataObject $object
      * @return $this
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function afterLoad($object)
     {
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php
index c3725ac580dcf..71c090c359fd4 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Set.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Set.php
@@ -375,7 +375,7 @@ public function getDefaultGroupId($setId = null)
      * Get resource instance
      *
      * @return \Magento\Framework\Model\ResourceModel\Db\AbstractDb
-     * @deprecated 100.2.0 because resource models should be used directly
+     * @deprecated 101.0.0 because resource models should be used directly
      */
     protected function _getResource()
     {
diff --git a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php
index 1fc513ed0ea80..0e1e4f035fc14 100644
--- a/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php
+++ b/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php
@@ -1604,6 +1604,7 @@ protected function _reset()
      *
      * @param string $attributeCode
      * @return bool
+     * @since 102.0.0
      */
     public function isAttributeAdded($attributeCode) : bool
     {
diff --git a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php
index f980d2e11c2f5..637d4e17e852d 100644
--- a/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php
+++ b/app/code/Magento/Eav/Model/ResourceModel/Entity/Attribute.php
@@ -205,6 +205,7 @@ protected function _beforeSave(AbstractModel $object)
      * @param AbstractModel $attribute
      * @return AbstractDb
      * @throws CouldNotDeleteException
+     * @since 102.0.2
      */
     protected function _beforeDelete(AbstractModel $attribute)
     {
diff --git a/app/code/Magento/Eav/Model/ResourceModel/ReadHandler.php b/app/code/Magento/Eav/Model/ResourceModel/ReadHandler.php
index bf1405fa64122..1971eeeff3147 100644
--- a/app/code/Magento/Eav/Model/ResourceModel/ReadHandler.php
+++ b/app/code/Magento/Eav/Model/ResourceModel/ReadHandler.php
@@ -71,7 +71,7 @@ public function __construct(
      * @param string $entityType
      * @return \Magento\Eav\Api\Data\AttributeInterface[]
      * @throws Exception if for unknown entity type
-     * @deprecated Not used anymore
+     * @deprecated 101.0.5 Not used anymore
      * @see ReadHandler::getEntityAttributes
      */
     protected function getAttributes($entityType)
diff --git a/app/code/Magento/Eav/Model/TypeLocator/ServiceClassLocator.php b/app/code/Magento/Eav/Model/TypeLocator/ServiceClassLocator.php
index a4225b550ab10..7ffcf689c4381 100644
--- a/app/code/Magento/Eav/Model/TypeLocator/ServiceClassLocator.php
+++ b/app/code/Magento/Eav/Model/TypeLocator/ServiceClassLocator.php
@@ -14,7 +14,7 @@
 
 /**
  * Class to find type based off of ServiceTypeToEntityTypeMap. This locator is introduced for backwards compatibility.
- * @deprecated
+ * @deprecated 102.0.0
  */
 class ServiceClassLocator implements CustomAttributeTypeLocatorInterface
 {
diff --git a/app/code/Magento/Eav/Setup/EavSetup.php b/app/code/Magento/Eav/Setup/EavSetup.php
index d440a84fc8e65..96c7b86a8682d 100644
--- a/app/code/Magento/Eav/Setup/EavSetup.php
+++ b/app/code/Magento/Eav/Setup/EavSetup.php
@@ -125,7 +125,7 @@ public function __construct(
     /**
      * Gets setup model.
      *
-     * @deprecated
+     * @deprecated 102.0.0
      * @return ModuleDataSetupInterface
      */
     public function getSetup()
diff --git a/app/code/Magento/EavGraphQl/Model/Resolver/Query/Type.php b/app/code/Magento/EavGraphQl/Model/Resolver/Query/Type.php
index ef21a26f1f62e..7ee87681dc630 100644
--- a/app/code/Magento/EavGraphQl/Model/Resolver/Query/Type.php
+++ b/app/code/Magento/EavGraphQl/Model/Resolver/Query/Type.php
@@ -15,6 +15,7 @@
  * Translate type names found by the custom type locator to GraphQL type names.
  *
  * @api
+ * @since 100.3.0
  */
 class Type
 {
@@ -55,6 +56,7 @@ public function __construct(
      * @param string $entityType
      * @return string
      * @throws GraphQlInputException
+     * @since 100.3.0
      */
     public function getType(string $attributeCode, string $entityType) : string
     {
diff --git a/app/code/Magento/Elasticsearch/Block/Adminhtml/System/Config/Elasticsearch5/TestConnection.php b/app/code/Magento/Elasticsearch/Block/Adminhtml/System/Config/Elasticsearch5/TestConnection.php
index 2b2da7522dfa6..41a5edc900af8 100644
--- a/app/code/Magento/Elasticsearch/Block/Adminhtml/System/Config/Elasticsearch5/TestConnection.php
+++ b/app/code/Magento/Elasticsearch/Block/Adminhtml/System/Config/Elasticsearch5/TestConnection.php
@@ -8,7 +8,7 @@
 /**
  * Elasticsearch 5x test connection block
  * @codeCoverageIgnore
- * @deprecated because of EOL for Elasticsearch5
+ * @deprecated 100.3.5 because of EOL for Elasticsearch5
  */
 class TestConnection extends \Magento\AdvancedSearch\Block\Adminhtml\System\Config\TestConnection
 {
diff --git a/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Adapter/FieldMapper/ProductFieldMapperProxy.php b/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Adapter/FieldMapper/ProductFieldMapperProxy.php
index b912446acd63e..840a4e16e8ab2 100644
--- a/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Adapter/FieldMapper/ProductFieldMapperProxy.php
+++ b/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Adapter/FieldMapper/ProductFieldMapperProxy.php
@@ -50,7 +50,6 @@ private function getProductFieldMapper()
      * @param string $attributeCode
      * @param array $context
      * @return string
-     * @since 100.1.0
      */
     public function getFieldName($attributeCode, $context = [])
     {
@@ -62,7 +61,6 @@ public function getFieldName($attributeCode, $context = [])
      *
      * @param array $context
      * @return array
-     * @since 100.1.0
      */
     public function getAllAttributesTypes($context = [])
     {
diff --git a/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php b/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php
index bd9a380230652..f0b91b0891f30 100644
--- a/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php
+++ b/app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php
@@ -11,7 +11,7 @@
 /**
  * Elasticsearch client
  *
- * @deprecated the Elasticsearch 5 doesn't supported due to EOL
+ * @deprecated 100.3.5 the Elasticsearch 5 doesn't supported due to EOL
  */
 class Elasticsearch implements ClientInterface
 {
diff --git a/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Mapper.php b/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Mapper.php
index abd27abdac8a7..9db1375f16c71 100644
--- a/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Mapper.php
+++ b/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Mapper.php
@@ -17,25 +17,25 @@
 /**
  * Mapper class
  * @api
- * @since 100.1.0
+ * @since 100.2.2
  */
 class Mapper
 {
     /**
      * @var QueryBuilder
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $queryBuilder;
 
     /**
      * @var MatchQueryBuilder
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $matchQueryBuilder;
 
     /**
      * @var FilterBuilder
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $filterBuilder;
 
@@ -59,7 +59,7 @@ public function __construct(
      *
      * @param RequestInterface $request
      * @return array
-     * @since 100.1.0
+     * @since 100.2.2
      */
     public function buildQuery(RequestInterface $request)
     {
@@ -89,7 +89,7 @@ public function buildQuery(RequestInterface $request)
      * @param string $conditionType
      * @return array
      * @throws \InvalidArgumentException
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected function processQuery(
         RequestQueryInterface $requestQuery,
@@ -126,7 +126,7 @@ protected function processQuery(
      * @param BoolQuery $query
      * @param array $selectQuery
      * @return array
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected function processBoolQuery(
         BoolQuery $query,
@@ -160,7 +160,7 @@ protected function processBoolQuery(
      * @param array $selectQuery
      * @param string $conditionType
      * @return array
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected function processBoolQueryCondition(
         array $subQueryList,
diff --git a/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Query/Builder.php b/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Query/Builder.php
index b75621191dae7..ac99c91dcfac1 100644
--- a/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Query/Builder.php
+++ b/app/code/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/Query/Builder.php
@@ -18,31 +18,31 @@
  * Query builder for search adapter.
  *
  * @api
- * @since 100.1.0
+ * @since 100.2.2
  */
 class Builder
 {
     /**
      * @var Config
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $clientConfig;
 
     /**
      * @var SearchIndexNameResolver
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $searchIndexNameResolver;
 
     /**
      * @var AggregationBuilder
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $aggregationBuilder;
 
     /**
      * @var ScopeResolverInterface
-     * @since 100.1.0
+     * @since 100.2.2
      */
     protected $scopeResolver;
 
@@ -77,7 +77,7 @@ public function __construct(
      *
      * @param RequestInterface $request
      * @return array
-     * @since 100.1.0
+     * @since 100.2.2
      */
     public function initQuery(RequestInterface $request)
     {
@@ -104,7 +104,7 @@ public function initQuery(RequestInterface $request)
      * @param RequestInterface $request
      * @param array $searchQuery
      * @return array
-     * @since 100.1.0
+     * @since 100.2.2
      */
     public function initAggregations(
         RequestInterface $request,
diff --git a/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/FieldType/ConverterInterface.php b/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/FieldType/ConverterInterface.php
index 3e7c3e9b592bd..a1563f75e6607 100644
--- a/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/FieldType/ConverterInterface.php
+++ b/app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/FieldType/ConverterInterface.php
@@ -10,6 +10,7 @@
 /**
  * @api
  * Field type converter from internal data types to elastic service.
+ * @since 100.3.0
  */
 interface ConverterInterface
 {
@@ -28,6 +29,7 @@ interface ConverterInterface
      *
      * @param string $internalType
      * @return string
+     * @since 100.3.0
      */
     public function convert(string $internalType): string;
 }
diff --git a/app/code/Magento/Elasticsearch/Model/Adapter/FieldType.php b/app/code/Magento/Elasticsearch/Model/Adapter/FieldType.php
index e7d8d0672aaf0..069bf6e2ab33a 100644
--- a/app/code/Magento/Elasticsearch/Model/Adapter/FieldType.php
+++ b/app/code/Magento/Elasticsearch/Model/Adapter/FieldType.php
@@ -14,7 +14,7 @@
  * @api
  * @since 100.1.0
  *
- * @deprecated This class provide not full data about field type. Only basic rules apply in this class.
+ * @deprecated 100.3.0 This class provide not full data about field type. Only basic rules apply in this class.
  * @see ResolverInterface
  */
 class FieldType
@@ -37,11 +37,12 @@ class FieldType
     /**
      * Get field type.
      *
-     * @deprecated
+     * @deprecated 100.3.0
      * @see ResolverInterface::getFieldType
      *
      * @param AbstractAttribute $attribute
      * @return string
+     * @since 100.1.0
      */
     public function getFieldType($attribute)
     {
diff --git a/app/code/Magento/Elasticsearch/Model/DataProvider/Suggestions.php b/app/code/Magento/Elasticsearch/Model/DataProvider/Suggestions.php
index 54e9890e02e59..56cdebdfc2813 100644
--- a/app/code/Magento/Elasticsearch/Model/DataProvider/Suggestions.php
+++ b/app/code/Magento/Elasticsearch/Model/DataProvider/Suggestions.php
@@ -20,7 +20,7 @@
 /**
  * The implementation to provide suggestions mechanism for Elasticsearch5
  *
- * @deprecated because of EOL for Elasticsearch5
+ * @deprecated 100.3.5 because of EOL for Elasticsearch5
  * @see \Magento\Elasticsearch\Model\DataProvider\Base\Suggestions
  */
 class Suggestions implements SuggestedQueriesInterface
diff --git a/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php b/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php
index 21ff9a53e4f96..12887207e2c5e 100644
--- a/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php
+++ b/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/DefaultFilterStrategyApplyChecker.php
@@ -10,7 +10,7 @@
 
 /**
  * This class add in backward compatibility purposes to check if need to apply old strategy for filter prepare process.
- * @deprecated
+ * @deprecated 100.3.2
  */
 class DefaultFilterStrategyApplyChecker implements DefaultFilterStrategyApplyCheckerInterface
 {
diff --git a/app/code/Magento/Elasticsearch/SearchAdapter/Mapper.php b/app/code/Magento/Elasticsearch/SearchAdapter/Mapper.php
index d76086ee2f809..1654e02558a83 100644
--- a/app/code/Magento/Elasticsearch/SearchAdapter/Mapper.php
+++ b/app/code/Magento/Elasticsearch/SearchAdapter/Mapper.php
@@ -19,7 +19,7 @@
  *
  * @api
  * @since 100.1.0
- * @deprecated because of EOL for Elasticsearch2
+ * @deprecated 100.3.5 because of EOL for Elasticsearch2
  */
 class Mapper extends Elasticsearch5Mapper
 {
diff --git a/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php b/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php
index 112813c3b096c..7beb266508cc9 100644
--- a/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php
+++ b/app/code/Magento/Email/Block/Adminhtml/Template/Edit.php
@@ -20,7 +20,7 @@ class Edit extends Widget implements ContainerInterface
 {
     /**
      * @var \Magento\Framework\Registry
-     * @deprecated since 2.3.0 in favor of stateful global objects elimination.
+     * @deprecated 101.0.0 since 2.3.0 in favor of stateful global objects elimination.
      */
     protected $_registryManager;
 
diff --git a/app/code/Magento/Email/Controller/Adminhtml/Email/Template.php b/app/code/Magento/Email/Controller/Adminhtml/Email/Template.php
index 50153b2bb6520..5af5230b0e33d 100644
--- a/app/code/Magento/Email/Controller/Adminhtml/Email/Template.php
+++ b/app/code/Magento/Email/Controller/Adminhtml/Email/Template.php
@@ -23,7 +23,7 @@ abstract class Template extends \Magento\Backend\App\Action
      * Core registry
      *
      * @var \Magento\Framework\Registry
-     * @deprecated since 2.3.0 in favor of stateful global objects elimination.
+     * @deprecated 101.0.0 since 2.3.0 in favor of stateful global objects elimination.
      */
     protected $_coreRegistry = null;
 
diff --git a/app/code/Magento/Email/Model/Template/Filter.php b/app/code/Magento/Email/Model/Template/Filter.php
index cd075a5115ff0..648e4ab8fc380 100644
--- a/app/code/Magento/Email/Model/Template/Filter.php
+++ b/app/code/Magento/Email/Model/Template/Filter.php
@@ -53,7 +53,7 @@ class Filter extends \Magento\Framework\Filter\Template
      * Modifier Callbacks
      *
      * @var array
-     * @deprecated Use the new Directive Processor interfaces
+     * @deprecated 101.0.4 Use the new Directive Processor interfaces
      */
     protected $_modifiers = ['nl2br' => ''];
 
@@ -665,7 +665,7 @@ public function varDirective($construction)
      * @param string $value
      * @param string $default assumed modifier if none present
      * @return array
-     * @deprecated Use the new FilterApplier or Directive Processor interfaces
+     * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces
      */
     protected function explodeModifiers($value, $default = null)
     {
@@ -684,7 +684,7 @@ protected function explodeModifiers($value, $default = null)
      * @param string $value
      * @param string $modifiers
      * @return string
-     * @deprecated Use the new FilterApplier or Directive Processor interfaces
+     * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces
      */
     protected function applyModifiers($value, $modifiers)
     {
@@ -712,7 +712,7 @@ protected function applyModifiers($value, $modifiers)
      * @param string $value
      * @param string $type
      * @return string
-     * @deprecated Use the new FilterApplier or Directive Processor interfaces
+     * @deprecated 101.0.4 Use the new FilterApplier or Directive Processor interfaces
      */
     public function modifierEscape($value, $type = 'html')
     {
diff --git a/app/code/Magento/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php
index 4a9311c1b4ba2..475f1c2b717ae 100644
--- a/app/code/Magento/GiftMessage/Block/Message/Inline.php
+++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php
@@ -280,7 +280,7 @@ public function countItems()
     /**
      * Call method getItemsHasMessages
      *
-     * @deprecated Misspelled method
+     * @deprecated 100.2.4 Misspelled method
      * @see getItemsHasMessages
      */
     public function getItemsHasMesssages()
diff --git a/app/code/Magento/GoogleAdwords/Helper/Data.php b/app/code/Magento/GoogleAdwords/Helper/Data.php
index 0e95859193d42..e3b85822059d8 100644
--- a/app/code/Magento/GoogleAdwords/Helper/Data.php
+++ b/app/code/Magento/GoogleAdwords/Helper/Data.php
@@ -280,6 +280,7 @@ public function getConversionValue()
      * Get send order currency to Google Adwords
      *
      * @return boolean
+     * @since 100.3.0
      */
     public function hasSendConversionValueCurrency()
     {
@@ -293,6 +294,7 @@ public function hasSendConversionValueCurrency()
      * Get Google AdWords conversion value currency
      *
      * @return string|false
+     * @since 100.3.0
      */
     public function getConversionValueCurrency()
     {
diff --git a/app/code/Magento/GraphQl/Controller/GraphQl.php b/app/code/Magento/GraphQl/Controller/GraphQl.php
index 2d72fde91b031..34dbeaa2ed0a2 100644
--- a/app/code/Magento/GraphQl/Controller/GraphQl.php
+++ b/app/code/Magento/GraphQl/Controller/GraphQl.php
@@ -28,12 +28,13 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.3.0
  */
 class GraphQl implements FrontControllerInterface
 {
     /**
      * @var \Magento\Framework\Webapi\Response
-     * @deprecated
+     * @deprecated 100.3.2
      */
     private $response;
 
@@ -59,7 +60,7 @@ class GraphQl implements FrontControllerInterface
 
     /**
      * @var ContextInterface
-     * @deprecated $contextFactory is used for creating Context object
+     * @deprecated 100.3.3 $contextFactory is used for creating Context object
      */
     private $resolverContext;
 
@@ -133,6 +134,7 @@ public function __construct(
      *
      * @param RequestInterface $request
      * @return ResponseInterface
+     * @since 100.3.0
      */
     public function dispatch(RequestInterface $request) : ResponseInterface
     {
diff --git a/app/code/Magento/GraphQl/Model/Query/Resolver/Context.php b/app/code/Magento/GraphQl/Model/Query/Resolver/Context.php
index 2b8e3fabd6863..9403ccaf07099 100644
--- a/app/code/Magento/GraphQl/Model/Query/Resolver/Context.php
+++ b/app/code/Magento/GraphQl/Model/Query/Resolver/Context.php
@@ -12,7 +12,7 @@
 /**
  * Do not use this class. It was kept for backward compatibility.
  *
- * @deprecated \Magento\GraphQl\Model\Query\Context is used instead of this
+ * @deprecated 100.3.3 \Magento\GraphQl\Model\Query\Context is used instead of this
  */
 class Context extends \Magento\Framework\Model\AbstractExtensibleModel implements ContextInterface
 {
diff --git a/app/code/Magento/GroupedProduct/Block/Order/Email/Items/CreditMemo/Grouped.php b/app/code/Magento/GroupedProduct/Block/Order/Email/Items/CreditMemo/Grouped.php
index 6df890b3e94dc..2b4ee3a7d27da 100644
--- a/app/code/Magento/GroupedProduct/Block/Order/Email/Items/CreditMemo/Grouped.php
+++ b/app/code/Magento/GroupedProduct/Block/Order/Email/Items/CreditMemo/Grouped.php
@@ -13,6 +13,7 @@
  * Class renders grouped product(s) in the CreditMemo email
  *
  * @api
+ * @since 100.4.0
  */
 class Grouped extends DefaultItems
 {
@@ -22,6 +23,7 @@ class Grouped extends DefaultItems
      * This method uses renderer for real product type
      *
      * @return string
+     * @since 100.4.0
      */
     protected function _toHtml()
     {
diff --git a/app/code/Magento/ImportExport/Api/Data/ExportInfoInterface.php b/app/code/Magento/ImportExport/Api/Data/ExportInfoInterface.php
index 01c41e35fc4eb..f670d97626725 100644
--- a/app/code/Magento/ImportExport/Api/Data/ExportInfoInterface.php
+++ b/app/code/Magento/ImportExport/Api/Data/ExportInfoInterface.php
@@ -10,6 +10,7 @@
 /**
  * Basic interface with data needed for export operation.
  * @api
+ * @since 100.3.2
  */
 interface ExportInfoInterface
 {
@@ -17,6 +18,7 @@ interface ExportInfoInterface
      * Return filename.
      *
      * @return string
+     * @since 100.3.2
      */
     public function getFileName();
 
@@ -25,6 +27,7 @@ public function getFileName();
      *
      * @param string $fileName
      * @return void
+     * @since 100.3.2
      */
     public function setFileName($fileName);
 
@@ -32,6 +35,7 @@ public function setFileName($fileName);
      * Override standard entity getter.
      *
      * @return string
+     * @since 100.3.2
      */
     public function getFileFormat();
 
@@ -40,6 +44,7 @@ public function getFileFormat();
      *
      * @param string $fileFormat
      * @return void
+     * @since 100.3.2
      */
     public function setFileFormat($fileFormat);
 
@@ -47,6 +52,7 @@ public function setFileFormat($fileFormat);
      * Return content type.
      *
      * @return string
+     * @since 100.3.2
      */
     public function getContentType();
 
@@ -55,6 +61,7 @@ public function getContentType();
      *
      * @param string $contentType
      * @return void
+     * @since 100.3.2
      */
     public function setContentType($contentType);
 
@@ -62,6 +69,7 @@ public function setContentType($contentType);
      * Returns entity.
      *
      * @return string
+     * @since 100.3.2
      */
     public function getEntity();
 
@@ -70,6 +78,7 @@ public function getEntity();
      *
      * @param string $entity
      * @return void
+     * @since 100.3.2
      */
     public function setEntity($entity);
 
@@ -77,6 +86,7 @@ public function setEntity($entity);
      * Returns export filter.
      *
      * @return string
+     * @since 100.3.2
      */
     public function getExportFilter();
 
@@ -85,6 +95,7 @@ public function getExportFilter();
      *
      * @param string $exportFilter
      * @return void
+     * @since 100.3.2
      */
     public function setExportFilter($exportFilter);
 }
diff --git a/app/code/Magento/ImportExport/Api/ExportManagementInterface.php b/app/code/Magento/ImportExport/Api/ExportManagementInterface.php
index 39bb89b43c838..0383b2a43b45e 100644
--- a/app/code/Magento/ImportExport/Api/ExportManagementInterface.php
+++ b/app/code/Magento/ImportExport/Api/ExportManagementInterface.php
@@ -12,6 +12,7 @@
 /**
  * Describes how to do export operation with data interface.
  * @api
+ * @since 100.3.2
  */
 interface ExportManagementInterface
 {
@@ -20,6 +21,7 @@ interface ExportManagementInterface
      *
      * @param ExportInfoInterface $exportInfo
      * @return string
+     * @since 100.3.2
      */
     public function export(ExportInfoInterface $exportInfo);
 }
diff --git a/app/code/Magento/ImportExport/Helper/Report.php b/app/code/Magento/ImportExport/Helper/Report.php
index 02bc4d8b8a047..29d1928d837d6 100644
--- a/app/code/Magento/ImportExport/Helper/Report.php
+++ b/app/code/Magento/ImportExport/Helper/Report.php
@@ -140,6 +140,7 @@ protected function getFilePath($filename)
      * Get csv delimiter from request.
      *
      * @return string
+     * @since 100.2.2
      */
     public function getDelimiter()
     {
diff --git a/app/code/Magento/ImportExport/Model/Export.php b/app/code/Magento/ImportExport/Model/Export.php
index 850ded7c8f256..3d7a190919525 100644
--- a/app/code/Magento/ImportExport/Model/Export.php
+++ b/app/code/Magento/ImportExport/Model/Export.php
@@ -13,7 +13,7 @@
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @since 100.0.2
- * @deprecated
+ * @deprecated 100.3.2
  */
 class Export extends \Magento\ImportExport\Model\AbstractModel
 {
diff --git a/app/code/Magento/ImportExport/Model/Export/Adapter/Csv.php b/app/code/Magento/ImportExport/Model/Export/Adapter/Csv.php
index 09b17371ae4e8..580695d0db058 100644
--- a/app/code/Magento/ImportExport/Model/Export/Adapter/Csv.php
+++ b/app/code/Magento/ImportExport/Model/Export/Adapter/Csv.php
@@ -39,6 +39,7 @@ class Csv extends AbstractAdapter
 
     /**
      * Object destructor
+     * @since 100.3.5
      */
     public function __destruct()
     {
diff --git a/app/code/Magento/ImportExport/Model/History.php b/app/code/Magento/ImportExport/Model/History.php
index b85bf7da81a35..9a97367ba8453 100644
--- a/app/code/Magento/ImportExport/Model/History.php
+++ b/app/code/Magento/ImportExport/Model/History.php
@@ -44,6 +44,7 @@ class History extends \Magento\Framework\Model\AbstractModel
 
     /**
      * @var \Magento\Backend\Model\Auth\Session
+     * @since 100.3.1
      */
     protected $session;
 
diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php
index cf20001882c0d..fba7c6860bbb5 100644
--- a/app/code/Magento/ImportExport/Model/Import.php
+++ b/app/code/Magento/ImportExport/Model/Import.php
@@ -614,6 +614,7 @@ public function uploadSource()
      *
      * @return Import\AbstractSource
      * @throws LocalizedException
+     * @since 100.2.7
      */
     public function uploadFileAndGetSource()
     {
diff --git a/app/code/Magento/InstantPurchase/Block/Button.php b/app/code/Magento/InstantPurchase/Block/Button.php
index e6ea50073ed48..d4f19918afaf3 100644
--- a/app/code/Magento/InstantPurchase/Block/Button.php
+++ b/app/code/Magento/InstantPurchase/Block/Button.php
@@ -13,6 +13,7 @@
  * Configuration for JavaScript instant purchase button component.
  *
  * @api
+ * @since 100.2.0
  */
 class Button extends Template
 {
@@ -40,6 +41,7 @@ public function __construct(
      * Checks if button enabled.
      *
      * @return bool
+     * @since 100.2.0
      */
     public function isEnabled(): bool
     {
@@ -48,6 +50,7 @@ public function isEnabled(): bool
 
     /**
      * @inheritdoc
+     * @since 100.2.0
      */
     public function getJsLayout(): string
     {
diff --git a/app/code/Magento/InstantPurchase/Model/BillingAddressChoose/BillingAddressChooserInterface.php b/app/code/Magento/InstantPurchase/Model/BillingAddressChoose/BillingAddressChooserInterface.php
index cfed97cfefd36..91eb91e2cd33c 100644
--- a/app/code/Magento/InstantPurchase/Model/BillingAddressChoose/BillingAddressChooserInterface.php
+++ b/app/code/Magento/InstantPurchase/Model/BillingAddressChoose/BillingAddressChooserInterface.php
@@ -12,12 +12,14 @@
  * Interface to choose billing address for a customer if available.
  *
  * @api
+ * @since 100.2.0
  */
 interface BillingAddressChooserInterface
 {
     /**
      * @param Customer $customer
      * @return Address|null
+     * @since 100.2.0
      */
     public function choose(Customer $customer);
 }
diff --git a/app/code/Magento/InstantPurchase/Model/InstantPurchaseInterface.php b/app/code/Magento/InstantPurchase/Model/InstantPurchaseInterface.php
index b205ccab5067d..24a9569128064 100644
--- a/app/code/Magento/InstantPurchase/Model/InstantPurchaseInterface.php
+++ b/app/code/Magento/InstantPurchase/Model/InstantPurchaseInterface.php
@@ -12,6 +12,7 @@
  * Interface for detecting customer option to make instant purchase in a store.
  *
  * @api
+ * @since 100.2.0
  */
 interface InstantPurchaseInterface
 {
@@ -21,6 +22,7 @@ interface InstantPurchaseInterface
      * @param Store $store
      * @param Customer $customer
      * @return InstantPurchaseOption
+     * @since 100.2.0
      */
     public function getOption(
         Store $store,
diff --git a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php
index 0748c5818c857..11ab119d6e5a5 100644
--- a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php
+++ b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php
@@ -16,6 +16,7 @@
  * Option to make instant purchase.
  *
  * @api
+ * @since 100.2.0
  */
 class InstantPurchaseOption
 {
@@ -82,6 +83,7 @@ public function __construct(
      * Checks if option available
      *
      * @return bool
+     * @since 100.2.0
      */
     public function isAvailable(): bool
     {
@@ -98,6 +100,7 @@ public function isAvailable(): bool
      *
      * @return PaymentTokenInterface
      * @throws LocalizedException if payment token is not defined
+     * @since 100.2.0
      */
     public function getPaymentToken(): PaymentTokenInterface
     {
@@ -114,6 +117,7 @@ public function getPaymentToken(): PaymentTokenInterface
      *
      * @return Address
      * @throws LocalizedException if shipping address is not defined
+     * @since 100.2.0
      */
     public function getShippingAddress(): Address
     {
@@ -128,6 +132,7 @@ public function getShippingAddress(): Address
      *
      * @return Address
      * @throws LocalizedException if billing address is not defined
+     * @since 100.2.0
      */
     public function getBillingAddress(): Address
     {
@@ -142,6 +147,7 @@ public function getBillingAddress(): Address
      *
      * @return ShippingMethodInterface
      * @throws LocalizedException if shipping method is not defined
+     * @since 100.2.0
      */
     public function getShippingMethod(): ShippingMethodInterface
     {
diff --git a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionFactory.php b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionFactory.php
index bd5811578ab1c..6e9490c9edb69 100644
--- a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionFactory.php
+++ b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionFactory.php
@@ -14,6 +14,7 @@
  * Create instances of instant purchase option.
  *
  * @api
+ * @since 100.2.0
  */
 class InstantPurchaseOptionFactory
 {
@@ -39,6 +40,7 @@ public function __construct(ObjectManagerInterface $objectManager)
      * @param Address|null $billingAddress
      * @param ShippingMethodInterface|null $shippingMethod
      * @return InstantPurchaseOption
+     * @since 100.2.0
      */
     public function create(
         PaymentTokenInterface $paymentToken = null,
@@ -58,6 +60,7 @@ public function create(
      * Creates new empty instance (no option available).
      *
      * @return InstantPurchaseOption
+     * @since 100.2.0
      */
     public function createDisabledOption(): InstantPurchaseOption
     {
diff --git a/app/code/Magento/InstantPurchase/Model/PaymentMethodChoose/PaymentTokenChooserInterface.php b/app/code/Magento/InstantPurchase/Model/PaymentMethodChoose/PaymentTokenChooserInterface.php
index 2a4f1adeb4155..b96173081164c 100644
--- a/app/code/Magento/InstantPurchase/Model/PaymentMethodChoose/PaymentTokenChooserInterface.php
+++ b/app/code/Magento/InstantPurchase/Model/PaymentMethodChoose/PaymentTokenChooserInterface.php
@@ -13,6 +13,7 @@
  * Interface to choose one of the stored payment methods for a customer if available.
  *
  * @api
+ * @since 100.2.0
  */
 interface PaymentTokenChooserInterface
 {
@@ -20,6 +21,7 @@ interface PaymentTokenChooserInterface
      * @param Store $store
      * @param Customer $customer
      * @return PaymentTokenInterface|null
+     * @since 100.2.0
      */
     public function choose(Store $store, Customer $customer);
 }
diff --git a/app/code/Magento/InstantPurchase/Model/PlaceOrder.php b/app/code/Magento/InstantPurchase/Model/PlaceOrder.php
index 2ad56a8859cf3..bd30d19d6456b 100644
--- a/app/code/Magento/InstantPurchase/Model/PlaceOrder.php
+++ b/app/code/Magento/InstantPurchase/Model/PlaceOrder.php
@@ -21,6 +21,7 @@
  * Place an order using instant purchase option.
  *
  * @api
+ * @since 100.2.0
  */
 class PlaceOrder
 {
@@ -90,6 +91,7 @@ public function __construct(
      * @return int order identifier
      * @throws LocalizedException if order can not be placed.
      * @throws Throwable if unpredictable error occurred.
+     * @since 100.2.0
      */
     public function placeOrder(
         Store $store,
diff --git a/app/code/Magento/InstantPurchase/Model/QuoteManagement/PaymentConfiguration.php b/app/code/Magento/InstantPurchase/Model/QuoteManagement/PaymentConfiguration.php
index 9c8c44231e843..d1dfb11851500 100644
--- a/app/code/Magento/InstantPurchase/Model/QuoteManagement/PaymentConfiguration.php
+++ b/app/code/Magento/InstantPurchase/Model/QuoteManagement/PaymentConfiguration.php
@@ -15,6 +15,7 @@
  * Configure payment method for quote.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class PaymentConfiguration
 {
@@ -42,6 +43,7 @@ public function __construct(
      * @param PaymentTokenInterface $paymentToken
      * @return Quote
      * @throws LocalizedException if payment method can not be configured for a quote.
+     * @since 100.2.0
      */
     public function configurePayment(
         Quote $quote,
diff --git a/app/code/Magento/InstantPurchase/Model/QuoteManagement/Purchase.php b/app/code/Magento/InstantPurchase/Model/QuoteManagement/Purchase.php
index b8220b4ca87eb..d05a4f2a1621a 100644
--- a/app/code/Magento/InstantPurchase/Model/QuoteManagement/Purchase.php
+++ b/app/code/Magento/InstantPurchase/Model/QuoteManagement/Purchase.php
@@ -14,6 +14,7 @@
  * Purchase products from quote.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class Purchase
 {
@@ -46,6 +47,7 @@ public function __construct(
      * @param Quote $quote
      * @return int Order id
      * @throws LocalizedException if order can not be placed for a quote.
+     * @since 100.2.0
      */
     public function purchase(Quote $quote): int
     {
diff --git a/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteCreation.php b/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteCreation.php
index 993a64a3f0d7d..4db9c86f7184e 100644
--- a/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteCreation.php
+++ b/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteCreation.php
@@ -16,6 +16,7 @@
  * Create Quote for instance purchase.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class QuoteCreation
 {
@@ -43,6 +44,7 @@ public function __construct(
      * @param Address $billingAddress
      * @return Quote
      * @throws LocalizedException if quote can not be created.
+     * @since 100.2.0
      */
     public function createQuote(
         Store $store,
diff --git a/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteFilling.php b/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteFilling.php
index 4afa964050fcd..727917f9e3406 100644
--- a/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteFilling.php
+++ b/app/code/Magento/InstantPurchase/Model/QuoteManagement/QuoteFilling.php
@@ -14,6 +14,7 @@
  * Fill quote with products for instant purchase.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class QuoteFilling
 {
@@ -25,6 +26,7 @@ class QuoteFilling
      * @param array $productRequest
      * @return Quote
      * @throws LocalizedException if product can not be added to quote.
+     * @since 100.2.0
      */
     public function fillQuote(
         Quote $quote,
diff --git a/app/code/Magento/InstantPurchase/Model/QuoteManagement/ShippingConfiguration.php b/app/code/Magento/InstantPurchase/Model/QuoteManagement/ShippingConfiguration.php
index 796fb924b31c9..772d6c6a033fa 100644
--- a/app/code/Magento/InstantPurchase/Model/QuoteManagement/ShippingConfiguration.php
+++ b/app/code/Magento/InstantPurchase/Model/QuoteManagement/ShippingConfiguration.php
@@ -16,6 +16,7 @@
  * Configure shipping method for instant purchase
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class ShippingConfiguration
 {
@@ -41,6 +42,7 @@ public function __construct(
      * @param ShippingMethodInterface $shippingMethod
      * @return Quote
      * @throws LocalizedException if shipping can not be configured for a quote.
+     * @since 100.2.0
      */
     public function configureShippingMethod(
         Quote $quote,
diff --git a/app/code/Magento/InstantPurchase/Model/ShippingAddressChoose/ShippingAddressChooserInterface.php b/app/code/Magento/InstantPurchase/Model/ShippingAddressChoose/ShippingAddressChooserInterface.php
index a65c8036a1e82..06f4358ecfa92 100644
--- a/app/code/Magento/InstantPurchase/Model/ShippingAddressChoose/ShippingAddressChooserInterface.php
+++ b/app/code/Magento/InstantPurchase/Model/ShippingAddressChoose/ShippingAddressChooserInterface.php
@@ -12,12 +12,14 @@
  * Interface to choose shipping address for a customer if available.
  *
  * @api
+ * @since 100.2.0
  */
 interface ShippingAddressChooserInterface
 {
     /**
      * @param Customer $customer
      * @return Address|null
+     * @since 100.2.0
      */
     public function choose(Customer $customer);
 }
diff --git a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserInterface.php b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserInterface.php
index 3339ca34ee29b..0476f2c690d4d 100644
--- a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserInterface.php
+++ b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserInterface.php
@@ -11,6 +11,7 @@
  * Provides mechanism to defer shipping method choose to the moment when quote is defined.
  *
  * @api
+ * @since 100.2.0
  */
 interface DeferredShippingMethodChooserInterface
 {
@@ -24,6 +25,7 @@ interface DeferredShippingMethodChooserInterface
      *
      * @param Address $address
      * @return string|null Quote shipping method code if available
+     * @since 100.2.0
      */
     public function choose(Address $address);
 }
diff --git a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php
index ca0e9351967ad..6e2e8e562167c 100644
--- a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php
+++ b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php
@@ -10,6 +10,7 @@
  * Use deferred shipping method code as a key for a deferred chooser.
  *
  * @api
+ * @since 100.2.0
  */
 class DeferredShippingMethodChooserPool
 {
@@ -34,6 +35,7 @@ public function __construct(array $choosers)
     /**
      * @param string $type
      * @return DeferredShippingMethodChooserInterface
+     * @since 100.2.0
      */
     public function get($type) : DeferredShippingMethodChooserInterface
     {
diff --git a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/ShippingMethodChooserInterface.php b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/ShippingMethodChooserInterface.php
index c227ad793f255..dd3f9d0a6cd52 100644
--- a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/ShippingMethodChooserInterface.php
+++ b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/ShippingMethodChooserInterface.php
@@ -20,12 +20,14 @@
  * DeferredShippingMethodChooserPool.
  *
  * @api
+ * @since 100.2.0
  */
 interface ShippingMethodChooserInterface
 {
     /**
      * @param Address $address
      * @return ShippingMethodInterface|null
+     * @since 100.2.0
      */
     public function choose(Address $address);
 }
diff --git a/app/code/Magento/InstantPurchase/Model/Ui/CustomerAddressesFormatter.php b/app/code/Magento/InstantPurchase/Model/Ui/CustomerAddressesFormatter.php
index 31c98143385a6..3b886fb03929e 100644
--- a/app/code/Magento/InstantPurchase/Model/Ui/CustomerAddressesFormatter.php
+++ b/app/code/Magento/InstantPurchase/Model/Ui/CustomerAddressesFormatter.php
@@ -11,6 +11,7 @@
  * Address string presentation.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class CustomerAddressesFormatter
 {
@@ -19,6 +20,7 @@ class CustomerAddressesFormatter
      *
      * @param Address $address
      * @return string
+     * @since 100.2.0
      */
     public function format(Address $address): string
     {
diff --git a/app/code/Magento/InstantPurchase/Model/Ui/PaymentTokenFormatter.php b/app/code/Magento/InstantPurchase/Model/Ui/PaymentTokenFormatter.php
index 4c2a78e3a6024..16992ff6bf3f1 100644
--- a/app/code/Magento/InstantPurchase/Model/Ui/PaymentTokenFormatter.php
+++ b/app/code/Magento/InstantPurchase/Model/Ui/PaymentTokenFormatter.php
@@ -12,6 +12,7 @@
  * Payment token string presentation.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class PaymentTokenFormatter
 {
@@ -34,6 +35,7 @@ public function __construct(IntegrationsManager $integrationsManager)
      *
      * @param PaymentTokenInterface $paymentToken
      * @return string
+     * @since 100.2.0
      */
     public function format(PaymentTokenInterface $paymentToken): string
     {
diff --git a/app/code/Magento/InstantPurchase/Model/Ui/ShippingMethodFormatter.php b/app/code/Magento/InstantPurchase/Model/Ui/ShippingMethodFormatter.php
index ec56b3e3dae02..eaefbe4c5f104 100644
--- a/app/code/Magento/InstantPurchase/Model/Ui/ShippingMethodFormatter.php
+++ b/app/code/Magento/InstantPurchase/Model/Ui/ShippingMethodFormatter.php
@@ -11,12 +11,14 @@
  * Ship[ping method string presentation.
  *
  * @api May be used for pluginization.
+ * @since 100.2.0
  */
 class ShippingMethodFormatter
 {
     /**
      * @param ShippingMethodInterface $shippingMethod
      * @return string
+     * @since 100.2.0
      */
     public function format(ShippingMethodInterface $shippingMethod) : string
     {
diff --git a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/AvailabilityCheckerInterface.php b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/AvailabilityCheckerInterface.php
index 825c6830b3aa6..7fe336b7a6a66 100644
--- a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/AvailabilityCheckerInterface.php
+++ b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/AvailabilityCheckerInterface.php
@@ -12,6 +12,7 @@
  * instant_purchase/available configuration option in vault payment config.
  *
  * @api
+ * @since 100.2.0
  */
 interface AvailabilityCheckerInterface
 {
@@ -19,6 +20,7 @@ interface AvailabilityCheckerInterface
      * Checks if payment method may be used for instant purchase.
      *
      * @return bool
+     * @since 100.2.0
      */
     public function isAvailable(): bool;
 }
diff --git a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentAdditionalInformationProviderInterface.php b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentAdditionalInformationProviderInterface.php
index 6f1e291a9a83b..9119b54329486 100644
--- a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentAdditionalInformationProviderInterface.php
+++ b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentAdditionalInformationProviderInterface.php
@@ -14,6 +14,7 @@
  * instant_purchase/additionalInformation configuration option in vault payment config.
  *
  * @api
+ * @since 100.2.0
  */
 interface PaymentAdditionalInformationProviderInterface
 {
@@ -22,6 +23,7 @@ interface PaymentAdditionalInformationProviderInterface
      *
      * @param PaymentTokenInterface $paymentToken
      * @return array
+     * @since 100.2.0
      */
     public function getAdditionalInformation(PaymentTokenInterface $paymentToken): array;
 }
diff --git a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentTokenFormatterInterface.php b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentTokenFormatterInterface.php
index 1ee583c45cf40..c6d31a86b622d 100644
--- a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentTokenFormatterInterface.php
+++ b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/PaymentTokenFormatterInterface.php
@@ -15,6 +15,7 @@
  * instant_purchase/tokenFormat configuration option in vault payment config.
  *
  * @api
+ * @since 100.2.0
  */
 interface PaymentTokenFormatterInterface
 {
@@ -23,6 +24,7 @@ interface PaymentTokenFormatterInterface
      *
      * @param PaymentTokenInterface $paymentToken
      * @return string
+     * @since 100.2.0
      */
     public function formatPaymentToken(PaymentTokenInterface $paymentToken): string;
 }
diff --git a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAdditionalInformationProvider.php b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAdditionalInformationProvider.php
index 56079823e9e91..0e788079794d6 100644
--- a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAdditionalInformationProvider.php
+++ b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAdditionalInformationProvider.php
@@ -11,6 +11,7 @@
  * Payment additional information provider that returns predefined value.
  *
  * @api
+ * @since 100.2.0
  */
 class StaticAdditionalInformationProvider implements PaymentAdditionalInformationProviderInterface
 {
@@ -30,6 +31,7 @@ public function __construct(array $value = [])
 
     /**
      * @inheritdoc
+     * @since 100.2.0
      */
     public function getAdditionalInformation(PaymentTokenInterface $paymentToken): array
     {
diff --git a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAvailabilityChecker.php b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAvailabilityChecker.php
index 02e24b78f741c..78f421db6aaa8 100644
--- a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAvailabilityChecker.php
+++ b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/StaticAvailabilityChecker.php
@@ -9,6 +9,7 @@
  * Availability checker with predefined result.
  *
  * @api
+ * @since 100.2.0
  */
 class StaticAvailabilityChecker implements AvailabilityCheckerInterface
 {
@@ -28,6 +29,7 @@ public function __construct(bool $value = true)
 
     /**
      * @inheritdoc
+     * @since 100.2.0
      */
     public function isAvailable(): bool
     {
diff --git a/app/code/Magento/LayeredNavigation/Block/Navigation.php b/app/code/Magento/LayeredNavigation/Block/Navigation.php
index e394fe7f6cf5b..85d3dd2a2a01d 100644
--- a/app/code/Magento/LayeredNavigation/Block/Navigation.php
+++ b/app/code/Magento/LayeredNavigation/Block/Navigation.php
@@ -76,6 +76,7 @@ protected function _prepareLayout()
 
     /**
      * @inheritdoc
+     * @since 100.3.4
      */
     protected function _beforeToHtml()
     {
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/Block/Adminhtml/ConfirmationPopup.php b/app/code/Magento/LoginAsCustomerAdminUi/Block/Adminhtml/ConfirmationPopup.php
index e2d11b2c8cb80..ce5a5501fbe55 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/Block/Adminhtml/ConfirmationPopup.php
+++ b/app/code/Magento/LoginAsCustomerAdminUi/Block/Adminhtml/ConfirmationPopup.php
@@ -16,6 +16,7 @@
  * Login confirmation pop-up
  *
  * @api
+ * @since 100.4.0
  */
 class ConfirmationPopup extends Template
 {
@@ -56,6 +57,7 @@ public function __construct(
 
     /**
      * @inheritdoc
+     * @since 100.4.0
      */
     public function getJsLayout()
     {
@@ -78,6 +80,7 @@ public function getJsLayout()
 
     /**
      * @inheritdoc
+     * @since 100.4.0
      */
     public function toHtml()
     {
diff --git a/app/code/Magento/LoginAsCustomerApi/Api/ConfigInterface.php b/app/code/Magento/LoginAsCustomerApi/Api/ConfigInterface.php
index aadcc8e1b566b..7048fa5a9e418 100644
--- a/app/code/Magento/LoginAsCustomerApi/Api/ConfigInterface.php
+++ b/app/code/Magento/LoginAsCustomerApi/Api/ConfigInterface.php
@@ -11,6 +11,7 @@
  * LoginAsCustomer config
  *
  * @api
+ * @since 100.4.0
  */
 interface ConfigInterface
 {
@@ -18,6 +19,7 @@ interface ConfigInterface
      * Check if Login as Customer extension is enabled
      *
      * @return bool
+     * @since 100.4.0
      */
     public function isEnabled(): bool;
 
@@ -25,6 +27,7 @@ public function isEnabled(): bool;
      * Check if store view manual choice is enabled
      *
      * @return bool
+     * @since 100.4.0
      */
     public function isStoreManualChoiceEnabled(): bool;
 
@@ -32,6 +35,7 @@ public function isStoreManualChoiceEnabled(): bool;
      * Get authentication data expiration time (in seconds)
      *
      * @return int
+     * @since 100.4.0
      */
     public function getAuthenticationDataExpirationTime(): int;
 }
diff --git a/app/code/Magento/LoginAsCustomerApi/Api/Data/AuthenticationDataInterface.php b/app/code/Magento/LoginAsCustomerApi/Api/Data/AuthenticationDataInterface.php
index f74f63c39f7ba..1126de140192a 100644
--- a/app/code/Magento/LoginAsCustomerApi/Api/Data/AuthenticationDataInterface.php
+++ b/app/code/Magento/LoginAsCustomerApi/Api/Data/AuthenticationDataInterface.php
@@ -13,6 +13,7 @@
  * Authentication data
  *
  * @api
+ * @since 100.4.0
  */
 interface AuthenticationDataInterface extends ExtensibleDataInterface
 {
@@ -20,6 +21,7 @@ interface AuthenticationDataInterface extends ExtensibleDataInterface
      * Get Customer Id
      *
      * @return int
+     * @since 100.4.0
      */
     public function getCustomerId(): int;
 
@@ -27,6 +29,7 @@ public function getCustomerId(): int;
      * Get Admin Id
      *
      * @return int
+     * @since 100.4.0
      */
     public function getAdminId(): int;
 
@@ -36,6 +39,7 @@ public function getAdminId(): int;
      * Fully qualified namespaces is needed for proper work of ccode generation
      *
      * @return \Magento\LoginAsCustomerApi\Api\Data\AuthenticationDataExtensionInterface|null
+     * @since 100.4.0
      */
     public function getExtensionAttributes(): ?AuthenticationDataExtensionInterface;
 }
diff --git a/app/code/Magento/LoginAsCustomerApi/Api/GetAuthenticationDataBySecretInterface.php b/app/code/Magento/LoginAsCustomerApi/Api/GetAuthenticationDataBySecretInterface.php
index 47e8d72b3b47e..b5c7405d05cdd 100644
--- a/app/code/Magento/LoginAsCustomerApi/Api/GetAuthenticationDataBySecretInterface.php
+++ b/app/code/Magento/LoginAsCustomerApi/Api/GetAuthenticationDataBySecretInterface.php
@@ -14,6 +14,7 @@
  * Get authentication data by secret
  *
  * @api
+ * @since 100.4.0
  */
 interface GetAuthenticationDataBySecretInterface
 {
@@ -23,6 +24,7 @@ interface GetAuthenticationDataBySecretInterface
      * @param string $secret
      * @return AuthenticationDataInterface
      * @throws LocalizedException
+     * @since 100.4.0
      */
     public function execute(string $secret): AuthenticationDataInterface;
 }
diff --git a/app/code/Magento/LoginAsCustomerApi/Api/IsLoginAsCustomerSessionActiveInterface.php b/app/code/Magento/LoginAsCustomerApi/Api/IsLoginAsCustomerSessionActiveInterface.php
index 30674375ed021..6e3688e586c7c 100644
--- a/app/code/Magento/LoginAsCustomerApi/Api/IsLoginAsCustomerSessionActiveInterface.php
+++ b/app/code/Magento/LoginAsCustomerApi/Api/IsLoginAsCustomerSessionActiveInterface.php
@@ -11,6 +11,7 @@
  * Check if Login as Customer session is still active.
  *
  * @api
+ * @since 100.4.0
  */
 interface IsLoginAsCustomerSessionActiveInterface
 {
@@ -20,6 +21,7 @@ interface IsLoginAsCustomerSessionActiveInterface
      * @param int $customerId
      * @param int $userId
      * @return bool
+     * @since 100.4.0
      */
     public function execute(int $customerId, int $userId): bool;
 }
diff --git a/app/code/Magento/LoginAsCustomerApi/Api/SaveAuthenticationDataInterface.php b/app/code/Magento/LoginAsCustomerApi/Api/SaveAuthenticationDataInterface.php
index 88d4cb8056cf6..1d828d7f802c0 100644
--- a/app/code/Magento/LoginAsCustomerApi/Api/SaveAuthenticationDataInterface.php
+++ b/app/code/Magento/LoginAsCustomerApi/Api/SaveAuthenticationDataInterface.php
@@ -14,6 +14,7 @@
  * Save authentication data. Return secret key
  *
  * @api
+ * @since 100.4.0
  */
 interface SaveAuthenticationDataInterface
 {
@@ -23,6 +24,7 @@ interface SaveAuthenticationDataInterface
      * @param Data\AuthenticationDataInterface $authenticationData
      * @return string
      * @throws LocalizedException
+     * @since 100.4.0
      */
     public function execute(AuthenticationDataInterface $authenticationData): string;
 }
diff --git a/app/code/Magento/LoginAsCustomerLog/Api/Data/LogInterface.php b/app/code/Magento/LoginAsCustomerLog/Api/Data/LogInterface.php
index 10d793d6c4c0b..7a058ecfc5df8 100644
--- a/app/code/Magento/LoginAsCustomerLog/Api/Data/LogInterface.php
+++ b/app/code/Magento/LoginAsCustomerLog/Api/Data/LogInterface.php
@@ -13,6 +13,7 @@
  * Data interface for login as customer log.
  *
  * @api
+ * @since 100.4.0
  */
 interface LogInterface extends ExtensibleDataInterface
 {
@@ -28,6 +29,7 @@ interface LogInterface extends ExtensibleDataInterface
      *
      * @param int $logId
      * @return void
+     * @since 100.4.0
      */
     public function setLogId(int $logId): void;
 
@@ -35,6 +37,7 @@ public function setLogId(int $logId): void;
      * Retrieve login as customer log id.
      *
      * @return null|int
+     * @since 100.4.0
      */
     public function getLogId(): ?int;
 
@@ -43,6 +46,7 @@ public function getLogId(): ?int;
      *
      * @param string $time
      * @return void
+     * @since 100.4.0
      */
     public function setTime(string $time): void;
 
@@ -50,6 +54,7 @@ public function setTime(string $time): void;
      * Retrieve login as customer log time.
      *
      * @return null|string
+     * @since 100.4.0
      */
     public function getTime(): ?string;
 
@@ -58,6 +63,7 @@ public function getTime(): ?string;
      *
      * @param int $userId
      * @return void
+     * @since 100.4.0
      */
     public function setUserId(int $userId): void;
 
@@ -65,6 +71,7 @@ public function setUserId(int $userId): void;
      * Retrieve login as customer log user id.
      *
      * @return null|int
+     * @since 100.4.0
      */
     public function getUserId(): ?int;
 
@@ -73,6 +80,7 @@ public function getUserId(): ?int;
      *
      * @param string $userName
      * @return void
+     * @since 100.4.0
      */
     public function setUserName(string $userName): void;
 
@@ -80,6 +88,7 @@ public function setUserName(string $userName): void;
      * Retrieve login as customer log user name.
      *
      * @return null|string
+     * @since 100.4.0
      */
     public function getUserName(): ?string;
 
@@ -88,6 +97,7 @@ public function getUserName(): ?string;
      *
      * @param int $customerId
      * @return void
+     * @since 100.4.0
      */
     public function setCustomerId(int $customerId): void;
 
@@ -95,6 +105,7 @@ public function setCustomerId(int $customerId): void;
      * Retrieve login as customer log customer id.
      *
      * @return null|int
+     * @since 100.4.0
      */
     public function getCustomerId(): ?int;
 
@@ -103,6 +114,7 @@ public function getCustomerId(): ?int;
      *
      * @param string $customerEmail
      * @return void
+     * @since 100.4.0
      */
     public function setCustomerEmail(string $customerEmail): void;
 
@@ -110,6 +122,7 @@ public function setCustomerEmail(string $customerEmail): void;
      * Retrieve login as customer log customer email.
      *
      * @return null|string
+     * @since 100.4.0
      */
     public function getCustomerEmail(): ?string;
 
@@ -118,6 +131,7 @@ public function getCustomerEmail(): ?string;
      *
      * @param \Magento\LoginAsCustomerLog\Api\Data\LogExtensionInterface $extensionAttributes
      * @return void
+     * @since 100.4.0
      */
     public function setExtensionAttributes(LogExtensionInterface $extensionAttributes): void;
 
@@ -125,6 +139,7 @@ public function setExtensionAttributes(LogExtensionInterface $extensionAttribute
      * Retrieve log extension attributes.
      *
      * @return \Magento\LoginAsCustomerLog\Api\Data\LogExtensionInterface
+     * @since 100.4.0
      */
     public function getExtensionAttributes(): LogExtensionInterface;
 }
diff --git a/app/code/Magento/LoginAsCustomerLog/Api/Data/LogSearchResultsInterface.php b/app/code/Magento/LoginAsCustomerLog/Api/Data/LogSearchResultsInterface.php
index 5b08d28af6335..0f6f06a3b3e43 100644
--- a/app/code/Magento/LoginAsCustomerLog/Api/Data/LogSearchResultsInterface.php
+++ b/app/code/Magento/LoginAsCustomerLog/Api/Data/LogSearchResultsInterface.php
@@ -13,6 +13,7 @@
  * Login as customer log entity search results interface.
  *
  * @api
+ * @since 100.4.0
  */
 interface LogSearchResultsInterface extends SearchResultsInterface
 {
@@ -20,6 +21,7 @@ interface LogSearchResultsInterface extends SearchResultsInterface
      * Get log list.
      *
      * @return \Magento\LoginAsCustomerLog\Api\Data\LogInterface[]
+     * @since 100.4.0
      */
     public function getItems();
 
@@ -28,6 +30,7 @@ public function getItems();
      *
      * @param \Magento\LoginAsCustomerLog\Api\Data\LogInterface[] $items
      * @return void
+     * @since 100.4.0
      */
     public function setItems(array $items);
 }
diff --git a/app/code/Magento/LoginAsCustomerLog/Api/GetLogsListInterface.php b/app/code/Magento/LoginAsCustomerLog/Api/GetLogsListInterface.php
index 4b5ee382c908a..58b232f26e656 100644
--- a/app/code/Magento/LoginAsCustomerLog/Api/GetLogsListInterface.php
+++ b/app/code/Magento/LoginAsCustomerLog/Api/GetLogsListInterface.php
@@ -14,6 +14,7 @@
  * Get login as customer log list considering search criteria.
  *
  * @api
+ * @since 100.4.0
  */
 interface GetLogsListInterface
 {
@@ -22,6 +23,7 @@ interface GetLogsListInterface
      *
      * @param SearchCriteriaInterface $searchCriteria
      * @return LogSearchResultsInterface
+     * @since 100.4.0
      */
     public function execute(SearchCriteriaInterface $searchCriteria): LogSearchResultsInterface;
 }
diff --git a/app/code/Magento/LoginAsCustomerLog/Api/SaveLogsInterface.php b/app/code/Magento/LoginAsCustomerLog/Api/SaveLogsInterface.php
index 67e1ece477727..0d76db641b421 100644
--- a/app/code/Magento/LoginAsCustomerLog/Api/SaveLogsInterface.php
+++ b/app/code/Magento/LoginAsCustomerLog/Api/SaveLogsInterface.php
@@ -11,6 +11,7 @@
  * Save login as custom logs entities.
  *
  * @api
+ * @since 100.4.0
  */
 interface SaveLogsInterface
 {
@@ -19,6 +20,7 @@ interface SaveLogsInterface
      *
      * @param \Magento\LoginAsCustomerLog\Api\Data\LogInterface[] $logs
      * @return void
+     * @since 100.4.0
      */
     public function execute(array $logs): void;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/Data/ContentAssetLinkInterface.php b/app/code/Magento/MediaContentApi/Api/Data/ContentAssetLinkInterface.php
index 5ff490655d464..c438d90aeb4f0 100644
--- a/app/code/Magento/MediaContentApi/Api/Data/ContentAssetLinkInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/Data/ContentAssetLinkInterface.php
@@ -14,6 +14,7 @@
 /**
  * Data interface representing the identificator of content. I.e. short description field of product entity with id 42
  * @api
+ * @since 100.4.0
  */
 interface ContentAssetLinkInterface extends ExtensibleDataInterface
 {
@@ -21,6 +22,7 @@ interface ContentAssetLinkInterface extends ExtensibleDataInterface
      * Return the object that represent content identity
      *
      * @return ContentIdentityInterface
+     * @since 100.4.0
      */
     public function getContentId(): ContentIdentityInterface;
 
@@ -28,6 +30,7 @@ public function getContentId(): ContentIdentityInterface;
      * Array of assets related to the content entity
      *
      * @return int
+     * @since 100.4.0
      */
     public function getAssetId(): int;
 
@@ -35,6 +38,7 @@ public function getAssetId(): int;
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\MediaContentApi\Api\Data\ContentAssetLinkExtensionInterface|null
+     * @since 100.4.0
      */
     public function getExtensionAttributes(): ?ContentAssetLinkExtensionInterface;
 
@@ -43,6 +47,7 @@ public function getExtensionAttributes(): ?ContentAssetLinkExtensionInterface;
      *
      * @param \Magento\MediaContentApi\Api\Data\ContentAssetLinkExtensionInterface|null $extensionAttributes
      * @return void
+     * @since 100.4.0
      */
     public function setExtensionAttributes(?ContentAssetLinkExtensionInterface $extensionAttributes): void;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/Data/ContentIdentityInterface.php b/app/code/Magento/MediaContentApi/Api/Data/ContentIdentityInterface.php
index f1b701fe9d964..16851b657ab90 100644
--- a/app/code/Magento/MediaContentApi/Api/Data/ContentIdentityInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/Data/ContentIdentityInterface.php
@@ -14,6 +14,7 @@
 /**
  * Data interface representing the identificator of content. I.e. short description field of product entity with id 42
  * @api
+ * @since 100.4.0
  */
 interface ContentIdentityInterface extends ExtensibleDataInterface
 {
@@ -21,6 +22,7 @@ interface ContentIdentityInterface extends ExtensibleDataInterface
      * Type of entity that can have a content with media. I.e. catalog_product or cms_page
      *
      * @return string
+     * @since 100.4.0
      */
     public function getEntityType(): string;
 
@@ -28,6 +30,7 @@ public function getEntityType(): string;
      * Id of the entity containing content with media
      *
      * @return string
+     * @since 100.4.0
      */
     public function getEntityId(): string;
 
@@ -35,6 +38,7 @@ public function getEntityId(): string;
      * Field of the entity where the content can be stored. I.e. short_description for product
      *
      * @return string
+     * @since 100.4.0
      */
     public function getField(): string;
 
@@ -42,6 +46,7 @@ public function getField(): string;
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\MediaContentApi\Api\Data\ContentIdentityExtensionInterface|null
+     * @since 100.4.0
      */
     public function getExtensionAttributes(): ?ContentIdentityExtensionInterface;
 
@@ -50,6 +55,7 @@ public function getExtensionAttributes(): ?ContentIdentityExtensionInterface;
      *
      * @param \Magento\MediaContentApi\Api\Data\ContentIdentityExtensionInterface|null $extensionAttributes
      * @return void
+     * @since 100.4.0
      */
     public function setExtensionAttributes(?ContentIdentityExtensionInterface $extensionAttributes): void;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksByAssetIdsInterface.php b/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksByAssetIdsInterface.php
index 8997e4b6e7e77..753dcc3ed7aae 100644
--- a/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksByAssetIdsInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksByAssetIdsInterface.php
@@ -13,6 +13,7 @@
 /**
  * Delete the relation between media asset and the piece of content. I.e media asset no longer part of the content
  * @api
+ * @since 100.4.0
  */
 interface DeleteContentAssetLinksByAssetIdsInterface
 {
@@ -21,6 +22,7 @@ interface DeleteContentAssetLinksByAssetIdsInterface
      *
      * @param int[] $assetIds
      * @throws \Magento\Framework\Exception\CouldNotDeleteException
+     * @since 100.4.0
      */
     public function execute(array $assetIds): void;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksInterface.php b/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksInterface.php
index 9c50793f51303..433db3923ceb4 100644
--- a/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/DeleteContentAssetLinksInterface.php
@@ -13,6 +13,7 @@
 /**
  * Remove the relation between media asset and the piece of content. I.e media asset no longer part of the content
  * @api
+ * @since 100.4.0
  */
 interface DeleteContentAssetLinksInterface
 {
@@ -21,6 +22,7 @@ interface DeleteContentAssetLinksInterface
      *
      * @param ContentAssetLinkInterface[] $contentAssetLinks
      * @throws \Magento\Framework\Exception\CouldNotDeleteException
+     * @since 100.4.0
      */
     public function execute(array $contentAssetLinks): void;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/ExtractAssetsFromContentInterface.php b/app/code/Magento/MediaContentApi/Api/ExtractAssetsFromContentInterface.php
index 4f95571f30ffd..06ac7a5bd0778 100644
--- a/app/code/Magento/MediaContentApi/Api/ExtractAssetsFromContentInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/ExtractAssetsFromContentInterface.php
@@ -12,6 +12,7 @@
 /**
  * Parse the content string for references to media assets and return the list of identified media assets
  * @api
+ * @since 100.4.0
  */
 interface ExtractAssetsFromContentInterface
 {
@@ -20,6 +21,7 @@ interface ExtractAssetsFromContentInterface
      *
      * @param string $content
      * @return AssetInterface[]
+     * @since 100.4.0
      */
     public function execute(string $content): array;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/GetAssetIdsByContentIdentityInterface.php b/app/code/Magento/MediaContentApi/Api/GetAssetIdsByContentIdentityInterface.php
index 4316a0d6ee33d..cca5127c3eb4a 100644
--- a/app/code/Magento/MediaContentApi/Api/GetAssetIdsByContentIdentityInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/GetAssetIdsByContentIdentityInterface.php
@@ -13,6 +13,7 @@
 /**
  * Get media asset ids that are used in the piece of content identified by the specified content identity
  * @api
+ * @since 100.4.0
  */
 interface GetAssetIdsByContentIdentityInterface
 {
@@ -22,6 +23,7 @@ interface GetAssetIdsByContentIdentityInterface
      * @param ContentIdentityInterface $contentIdentity
      * @return int[]
      * @throws \Magento\Framework\Exception\IntegrationException
+     * @since 100.4.0
      */
     public function execute(ContentIdentityInterface $contentIdentity): array;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/GetContentByAssetIdsInterface.php b/app/code/Magento/MediaContentApi/Api/GetContentByAssetIdsInterface.php
index cb117545c257e..93d5901044e36 100644
--- a/app/code/Magento/MediaContentApi/Api/GetContentByAssetIdsInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/GetContentByAssetIdsInterface.php
@@ -13,6 +13,7 @@
 /**
  * Get list of content identifiers for pieces of content that include the specified media asset
  * @api
+ * @since 100.4.0
  */
 interface GetContentByAssetIdsInterface
 {
@@ -22,6 +23,7 @@ interface GetContentByAssetIdsInterface
      * @param int[] $assetIds
      * @return ContentIdentityInterface[]
      * @throws \Magento\Framework\Exception\IntegrationException
+     * @since 100.4.0
      */
     public function execute(array $assetIds): array;
 }
diff --git a/app/code/Magento/MediaContentApi/Api/SaveContentAssetLinksInterface.php b/app/code/Magento/MediaContentApi/Api/SaveContentAssetLinksInterface.php
index 1c86953ce6f84..8363a85ea83be 100644
--- a/app/code/Magento/MediaContentApi/Api/SaveContentAssetLinksInterface.php
+++ b/app/code/Magento/MediaContentApi/Api/SaveContentAssetLinksInterface.php
@@ -13,6 +13,7 @@
 /**
  * Save a media asset to content relation.
  * @api
+ * @since 100.4.0
  */
 interface SaveContentAssetLinksInterface
 {
@@ -21,6 +22,7 @@ interface SaveContentAssetLinksInterface
      *
      * @param ContentAssetLinkInterface[] $contentAssetLinks
      * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @since 100.4.0
      */
     public function execute(array $contentAssetLinks): void;
 }
diff --git a/app/code/Magento/MediaContentApi/Model/GetEntityContentsInterface.php b/app/code/Magento/MediaContentApi/Model/GetEntityContentsInterface.php
index c58d543a597b7..ac24a32d35475 100644
--- a/app/code/Magento/MediaContentApi/Model/GetEntityContentsInterface.php
+++ b/app/code/Magento/MediaContentApi/Model/GetEntityContentsInterface.php
@@ -12,6 +12,7 @@
 /**
  * Get Entity Contents.
  * @api
+ * @since 100.4.0
  */
 interface GetEntityContentsInterface
 {
@@ -20,6 +21,7 @@ interface GetEntityContentsInterface
      *
      * @param ContentIdentityInterface $contentIdentity
      * @return string[]
+     * @since 100.4.0
      */
     public function execute(ContentIdentityInterface $contentIdentity): array;
 }
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByDirectoryPath.php b/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByDirectoryPath.php
index 3abe4cb50f2ea..51e4b0c1cb24d 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByDirectoryPath.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByDirectoryPath.php
@@ -15,7 +15,7 @@
 
 /**
  * Remove asset(s) that correspond the provided directory path
- * @deprecated use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface instead
  * @see \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterfac
  */
 class DeleteByDirectoryPath implements DeleteByDirectoryPathInterface
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByPath.php b/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByPath.php
index fc8e5d7c84bfd..898d31a304804 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByPath.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/DeleteByPath.php
@@ -16,7 +16,7 @@
 /**
  * Delete media asset by path
  *
- * @deprecated use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface instead
  * @see \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface
  */
 class DeleteByPath implements DeleteByPathInterface
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php b/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php
index 71e2cb70663f3..81bcbb7fe28a8 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/GetById.php
@@ -17,7 +17,7 @@
 
 /**
  * Get media asset by id
- * @deprecated use \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface instead
  * @see \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface
  */
 class GetById implements GetByIdInterface
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php b/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php
index 02512a12f9d07..aabc3986a21d4 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/GetByPath.php
@@ -18,7 +18,7 @@
 /**
  * Provide media asset by path
  *
- * @deprecated use \Magento\MediaGalleryApi\Api\GetAssetsByPathsInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\GetAssetsByPathsInterface instead
  * @see \Magento\MediaGalleryApi\Api\GetAssetsByPathsInterface
  */
 class GetByPath implements GetByPathInterface
diff --git a/app/code/Magento/MediaGallery/Model/Asset/Command/Save.php b/app/code/Magento/MediaGallery/Model/Asset/Command/Save.php
index 1710176c1b3af..ba8497fe49205 100644
--- a/app/code/Magento/MediaGallery/Model/Asset/Command/Save.php
+++ b/app/code/Magento/MediaGallery/Model/Asset/Command/Save.php
@@ -16,7 +16,7 @@
 /**
  * Save media asset
  *
- * @deprecated use \Magento\MediaGalleryApi\Api\SaveAssetsInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\SaveAssetsInterface instead
  * @see \Magento\MediaGalleryApi\Api\SaveAssetsInterface
  */
 class Save implements SaveInterface
diff --git a/app/code/Magento/MediaGallery/Model/Keyword/Command/GetAssetKeywords.php b/app/code/Magento/MediaGallery/Model/Keyword/Command/GetAssetKeywords.php
index 4118fd1495dbb..a37eaa8fc11fa 100644
--- a/app/code/Magento/MediaGallery/Model/Keyword/Command/GetAssetKeywords.php
+++ b/app/code/Magento/MediaGallery/Model/Keyword/Command/GetAssetKeywords.php
@@ -16,7 +16,7 @@
 
 /**
  * Retrieve keywords for the media asset
- * @deprecated use \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface instead
  */
 class GetAssetKeywords implements GetAssetKeywordsInterface
 {
diff --git a/app/code/Magento/MediaGallery/Model/Keyword/Command/SaveAssetKeywords.php b/app/code/Magento/MediaGallery/Model/Keyword/Command/SaveAssetKeywords.php
index f21db25bac767..aa9f05af70b2f 100644
--- a/app/code/Magento/MediaGallery/Model/Keyword/Command/SaveAssetKeywords.php
+++ b/app/code/Magento/MediaGallery/Model/Keyword/Command/SaveAssetKeywords.php
@@ -18,7 +18,7 @@
 
 /**
  * Save media asset keywords to database
- * @deprecated use \Magento\MediaGalleryApi\Api\SaveAssetKeywordsInterface instead
+ * @deprecated 100.4.0 use \Magento\MediaGalleryApi\Api\SaveAssetKeywordsInterface instead
  */
 class SaveAssetKeywords implements SaveAssetKeywordsInterface
 {
diff --git a/app/code/Magento/MediaGalleryApi/Api/CreateDirectoriesByPathsInterface.php b/app/code/Magento/MediaGalleryApi/Api/CreateDirectoriesByPathsInterface.php
index a0a1ec891237f..20e57cfa2d138 100644
--- a/app/code/Magento/MediaGalleryApi/Api/CreateDirectoriesByPathsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/CreateDirectoriesByPathsInterface.php
@@ -10,6 +10,7 @@
 /**
  * Create folders by provided paths
  * @api
+ * @since 101.0.0
  */
 interface CreateDirectoriesByPathsInterface
 {
@@ -19,6 +20,7 @@ interface CreateDirectoriesByPathsInterface
      * @param string[] $paths
      * @return void
      * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @since 101.0.0
      */
     public function execute(array $paths): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php b/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php
index a747cb963baab..41d682ed1bc6b 100644
--- a/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/Data/AssetInterface.php
@@ -14,6 +14,7 @@
  * Represents a media gallery asset which contains information about a media asset entity such
  * as path to the media storage, media asset title and its content type, etc.
  * @api
+ * @since 100.3.0
  */
 interface AssetInterface extends ExtensibleDataInterface
 {
@@ -21,6 +22,7 @@ interface AssetInterface extends ExtensibleDataInterface
      * Get ID
      *
      * @return int|null
+     * @since 100.3.0
      */
     public function getId(): ?int;
 
@@ -28,6 +30,7 @@ public function getId(): ?int;
      * Get Path
      *
      * @return string
+     * @since 100.3.0
      */
     public function getPath(): string;
 
@@ -35,6 +38,7 @@ public function getPath(): string;
      * Get title
      *
      * @return string|null
+     * @since 100.3.0
      */
     public function getTitle(): ?string;
 
@@ -49,6 +53,7 @@ public function getDescription(): ?string;
      * Get the name of the channel/stock/integration file was retrieved from. null if not identified.
      *
      * @return string|null
+     * @since 100.3.0
      */
     public function getSource(): ?string;
 
@@ -63,6 +68,7 @@ public function getHash(): ?string;
      * Get content type
      *
      * @return string
+     * @since 100.3.0
      */
     public function getContentType(): string;
 
@@ -70,6 +76,7 @@ public function getContentType(): string;
      * Retrieve full licensed asset's height
      *
      * @return int
+     * @since 100.3.0
      */
     public function getHeight(): int;
 
@@ -77,6 +84,7 @@ public function getHeight(): int;
      * Retrieve full licensed asset's width
      *
      * @return int
+     * @since 100.3.0
      */
     public function getWidth(): int;
 
@@ -84,6 +92,7 @@ public function getWidth(): int;
      * Retrieve asset file size in bytes
      *
      * @return int
+     * @since 101.0.0
      */
     public function getSize(): int;
 
@@ -91,6 +100,7 @@ public function getSize(): int;
      * Get created at
      *
      * @return string|null
+     * @since 100.3.0
      */
     public function getCreatedAt(): ?string;
 
@@ -98,6 +108,7 @@ public function getCreatedAt(): ?string;
      * Get updated at
      *
      * @return string|null
+     * @since 100.3.0
      */
     public function getUpdatedAt(): ?string;
 
@@ -105,6 +116,7 @@ public function getUpdatedAt(): ?string;
      * Retrieve existing extension attributes object or create a new one.
      *
      * @return \Magento\MediaGalleryApi\Api\Data\AssetExtensionInterface|null
+     * @since 100.3.0
      */
     public function getExtensionAttributes(): ?AssetExtensionInterface;
 
@@ -113,6 +125,7 @@ public function getExtensionAttributes(): ?AssetExtensionInterface;
      *
      * @param \Magento\MediaGalleryApi\Api\Data\AssetExtensionInterface|null $extensionAttributes
      * @return void
+     * @since 100.3.0
      */
     public function setExtensionAttributes(?AssetExtensionInterface $extensionAttributes): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/Data/AssetKeywordsInterface.php b/app/code/Magento/MediaGalleryApi/Api/Data/AssetKeywordsInterface.php
index 1c18225470493..f303f723981d5 100644
--- a/app/code/Magento/MediaGalleryApi/Api/Data/AssetKeywordsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/Data/AssetKeywordsInterface.php
@@ -13,6 +13,7 @@
 /**
  * Interface for asset's keywords aggregation
  * @api
+ * @since 101.0.0
  */
 interface AssetKeywordsInterface extends ExtensibleDataInterface
 {
@@ -20,6 +21,7 @@ interface AssetKeywordsInterface extends ExtensibleDataInterface
      * Get ID
      *
      * @return int
+     * @since 101.0.0
      */
     public function getAssetId(): int;
 
@@ -27,6 +29,7 @@ public function getAssetId(): int;
      * Get the keyword
      *
      * @return KeywordInterface[]
+     * @since 101.0.0
      */
     public function getKeywords(): array;
 
@@ -34,6 +37,7 @@ public function getKeywords(): array;
      * Get extension attributes
      *
      * @return \Magento\MediaGalleryApi\Api\Data\AssetKeywordsExtensionInterface|null
+     * @since 101.0.0
      */
     public function getExtensionAttributes(): ?AssetKeywordsExtensionInterface;
 
@@ -42,6 +46,7 @@ public function getExtensionAttributes(): ?AssetKeywordsExtensionInterface;
      *
      * @param \Magento\MediaGalleryApi\Api\Data\AssetKeywordsExtensionInterface|null $extensionAttributes
      * @return void
+     * @since 101.0.0
      */
     public function setExtensionAttributes(?AssetKeywordsExtensionInterface $extensionAttributes): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/Data/KeywordInterface.php b/app/code/Magento/MediaGalleryApi/Api/Data/KeywordInterface.php
index 3cba118e03a1a..3f3c583fc182c 100644
--- a/app/code/Magento/MediaGalleryApi/Api/Data/KeywordInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/Data/KeywordInterface.php
@@ -13,6 +13,7 @@
 /**
  * Represents a media gallery keyword. This object contains information about a media asset keyword entity.
  * @api
+ * @since 100.3.0
  */
 interface KeywordInterface extends ExtensibleDataInterface
 {
@@ -20,6 +21,7 @@ interface KeywordInterface extends ExtensibleDataInterface
      * Get ID
      *
      * @return int|null
+     * @since 100.3.0
      */
     public function getId(): ?int;
 
@@ -27,6 +29,7 @@ public function getId(): ?int;
      * Get the keyword
      *
      * @return string
+     * @since 100.3.0
      */
     public function getKeyword(): string;
 
@@ -34,6 +37,7 @@ public function getKeyword(): string;
      * Get extension attributes
      *
      * @return \Magento\MediaGalleryApi\Api\Data\KeywordExtensionInterface|null
+     * @since 100.3.0
      */
     public function getExtensionAttributes(): ?KeywordExtensionInterface;
 
@@ -42,6 +46,7 @@ public function getExtensionAttributes(): ?KeywordExtensionInterface;
      *
      * @param \Magento\MediaGalleryApi\Api\Data\KeywordExtensionInterface|null $extensionAttributes
      * @return void
+     * @since 100.3.0
      */
     public function setExtensionAttributes(?KeywordExtensionInterface $extensionAttributes): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/DeleteAssetsByPathsInterface.php b/app/code/Magento/MediaGalleryApi/Api/DeleteAssetsByPathsInterface.php
index 5370235a31b95..3e824bdaffd6f 100644
--- a/app/code/Magento/MediaGalleryApi/Api/DeleteAssetsByPathsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/DeleteAssetsByPathsInterface.php
@@ -11,6 +11,7 @@
 /**
  * Delete media assets by exact or directory paths
  * @api
+ * @since 101.0.0
  */
 interface DeleteAssetsByPathsInterface
 {
@@ -19,6 +20,7 @@ interface DeleteAssetsByPathsInterface
      *
      * @param string[] $paths
      * @return void
+     * @since 101.0.0
      */
     public function execute(array $paths): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/DeleteDirectoriesByPathsInterface.php b/app/code/Magento/MediaGalleryApi/Api/DeleteDirectoriesByPathsInterface.php
index fe3be88fa0073..c3c1c0ad577a7 100644
--- a/app/code/Magento/MediaGalleryApi/Api/DeleteDirectoriesByPathsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/DeleteDirectoriesByPathsInterface.php
@@ -10,6 +10,7 @@
 /**
  * Delete folders by provided paths
  * @api
+ * @since 101.0.0
  */
 interface DeleteDirectoriesByPathsInterface
 {
@@ -19,6 +20,7 @@ interface DeleteDirectoriesByPathsInterface
      * @param string[] $paths
      * @return void
      * @throws \Magento\Framework\Exception\CouldNotDeleteException
+     * @since 101.0.0
      */
     public function execute(array $paths): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/GetAssetsByIdsInterface.php b/app/code/Magento/MediaGalleryApi/Api/GetAssetsByIdsInterface.php
index 5df6722a190d4..0c0ea7c812ce9 100644
--- a/app/code/Magento/MediaGalleryApi/Api/GetAssetsByIdsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/GetAssetsByIdsInterface.php
@@ -11,6 +11,7 @@
 /**
  * Get media gallery assets by id attribute
  * @api
+ * @since 101.0.0
  */
 interface GetAssetsByIdsInterface
 {
@@ -20,6 +21,7 @@ interface GetAssetsByIdsInterface
      * @param int[] $ids
      * @return \Magento\MediaGalleryApi\Api\Data\AssetInterface[]
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @since 101.0.0
      */
     public function execute(array $ids): array;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/GetAssetsByPathsInterface.php b/app/code/Magento/MediaGalleryApi/Api/GetAssetsByPathsInterface.php
index dbaed6e0e9123..458d004fe74f8 100644
--- a/app/code/Magento/MediaGalleryApi/Api/GetAssetsByPathsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/GetAssetsByPathsInterface.php
@@ -10,6 +10,7 @@
 /**
  * Get media gallery assets by paths in media storage
  * @api
+ * @since 101.0.0
  */
 interface GetAssetsByPathsInterface
 {
@@ -19,6 +20,7 @@ interface GetAssetsByPathsInterface
      * @param string[] $paths
      * @return \Magento\MediaGalleryApi\Api\Data\AssetInterface[]
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @since 101.0.0
      */
     public function execute(array $paths): array;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/GetAssetsKeywordsInterface.php b/app/code/Magento/MediaGalleryApi/Api/GetAssetsKeywordsInterface.php
index 99b05291f32a0..317559e447b60 100644
--- a/app/code/Magento/MediaGalleryApi/Api/GetAssetsKeywordsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/GetAssetsKeywordsInterface.php
@@ -10,6 +10,7 @@
 /**
  * Get a media gallery asset keywords related to media gallery asset ids provided
  * @api
+ * @since 101.0.0
  */
 interface GetAssetsKeywordsInterface
 {
@@ -18,6 +19,7 @@ interface GetAssetsKeywordsInterface
      *
      * @param int[] $assetIds
      * @return \Magento\MediaGalleryApi\Api\Data\AssetKeywordsInterface[]
+     * @since 101.0.0
      */
     public function execute(array $assetIds): array;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/SaveAssetsInterface.php b/app/code/Magento/MediaGalleryApi/Api/SaveAssetsInterface.php
index c63f7bd8c0818..823c858342a62 100644
--- a/app/code/Magento/MediaGalleryApi/Api/SaveAssetsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/SaveAssetsInterface.php
@@ -11,6 +11,7 @@
 /**
  * Save media gallery assets to the database
  * @api
+ * @since 101.0.0
  */
 interface SaveAssetsInterface
 {
@@ -20,6 +21,7 @@ interface SaveAssetsInterface
      * @param \Magento\MediaGalleryApi\Api\Data\AssetInterface[] $assets
      * @return void
      * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @since 101.0.0
      */
     public function execute(array $assets): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Api/SaveAssetsKeywordsInterface.php b/app/code/Magento/MediaGalleryApi/Api/SaveAssetsKeywordsInterface.php
index 04efe7d32ccc1..714a4bc605423 100644
--- a/app/code/Magento/MediaGalleryApi/Api/SaveAssetsKeywordsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Api/SaveAssetsKeywordsInterface.php
@@ -10,6 +10,7 @@
 /**
  * Save keywords related to assets to the database
  * @api
+ * @since 101.0.0
  */
 interface SaveAssetsKeywordsInterface
 {
@@ -19,6 +20,7 @@ interface SaveAssetsKeywordsInterface
      * @param \Magento\MediaGalleryApi\Api\Data\AssetKeywordsInterface[] $assetKeywords
      * @return void
      * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @since 101.0.0
      */
     public function execute(array $assetKeywords): void;
 }
diff --git a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByDirectoryPathInterface.php b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByDirectoryPathInterface.php
index 79b209823aeb0..1ed46566cfb21 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByDirectoryPathInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByDirectoryPathInterface.php
@@ -11,7 +11,7 @@
 /**
  * A command represents the media gallery assets delete action. A media gallery asset is filtered by directory
  * path value.
- * @deprecated use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathsInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathsInterface instead
  * @see \Magento\MediaGalleryApi\Api\DeleteAssetsByPathsInterface
  */
 interface DeleteByDirectoryPathInterface
diff --git a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByPathInterface.php b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByPathInterface.php
index f33022e75d2fe..7a307a2940a0e 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByPathInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/DeleteByPathInterface.php
@@ -10,7 +10,7 @@
 
 /**
  * A command represents the media gallery asset delete action. A media gallery asset is filtered by path value.
- * @deprecated use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\DeleteAssetsByPathInterface instead
  * @see \Magento\MediaGalleryApi\Api\DeleteAssetsByPathsInterface
  */
 interface DeleteByPathInterface
diff --git a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByIdInterface.php b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByIdInterface.php
index 65cc2e3eae109..db8fd7e2baa6c 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByIdInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByIdInterface.php
@@ -10,7 +10,7 @@
 
 /**
  * A command represents the get media gallery asset by using media gallery asset id as a filter parameter.
- * @deprecated use \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface instead
  * @see \Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface
  */
 interface GetByIdInterface
diff --git a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByPathInterface.php b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByPathInterface.php
index d8d5b6773fbbc..3163574336061 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByPathInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/GetByPathInterface.php
@@ -10,7 +10,7 @@
 
 /**
  * A command represents the get media gallery asset by using media gallery asset path as a filter parameter.
- * @deprecated use \Magento\MediaGalleryApi\Api\GetAssetsByPathInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\GetAssetsByPathInterface instead
  * @see \Magento\MediaGalleryApi\Api\GetAssetsByPathsInterface
  */
 interface GetByPathInterface
diff --git a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/SaveInterface.php b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/SaveInterface.php
index 610ecf0cd22bf..f00486116b9be 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Asset/Command/SaveInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Asset/Command/SaveInterface.php
@@ -12,7 +12,7 @@
 
 /**
  * A command which executes the media gallery asset save operation.
- * @deprecated use \Magento\MediaGalleryApi\Api\SaveAssetsInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\SaveAssetsInterface instead
  * @see \Magento\MediaGalleryApi\Api\SaveAssetsInterface
  */
 interface SaveInterface
diff --git a/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/GetAssetKeywordsInterface.php b/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/GetAssetKeywordsInterface.php
index e42c370c1c6f7..acb18f268d167 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/GetAssetKeywordsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/GetAssetKeywordsInterface.php
@@ -9,7 +9,7 @@
 
 /**
  * A command represents functionality to get a media gallery asset keywords filtered by media gallery asset id.
- * @deprecated use \Magento\MediaGalleryApi\Api\GetAssetsKeywordsInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\GetAssetsKeywordsInterface instead
  * @see \Magento\MediaGalleryApi\Api\GetAssetsKeywordsInterface
  */
 interface GetAssetKeywordsInterface
diff --git a/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/SaveAssetKeywordsInterface.php b/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/SaveAssetKeywordsInterface.php
index 824cbca178988..03cc76cc1760b 100644
--- a/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/SaveAssetKeywordsInterface.php
+++ b/app/code/Magento/MediaGalleryApi/Model/Keyword/Command/SaveAssetKeywordsInterface.php
@@ -9,7 +9,7 @@
 
 /**
  * A command represents the media gallery asset keywords save operation.
- * @deprecated use \Magento\MediaGalleryApi\Api\SaveAssetsKeywordsInterface instead
+ * @deprecated 101.0.0 use \Magento\MediaGalleryApi\Api\SaveAssetsKeywordsInterface instead
  * @see \Magento\MediaGalleryApi\Api\SaveAssetsKeywordsInterface
  */
 interface SaveAssetKeywordsInterface
diff --git a/app/code/Magento/MediaStorage/Model/File/Uploader.php b/app/code/Magento/MediaStorage/Model/File/Uploader.php
index daa9116e5138d..173211dfac011 100644
--- a/app/code/Magento/MediaStorage/Model/File/Uploader.php
+++ b/app/code/Magento/MediaStorage/Model/File/Uploader.php
@@ -142,6 +142,7 @@ public function validateFile()
 
     /**
      * @inheritDoc
+     * @since 100.4.0
      */
     protected function _validateFile()
     {
diff --git a/app/code/Magento/Multishipping/Block/Checkout/Overview.php b/app/code/Magento/Multishipping/Block/Checkout/Overview.php
index 0251732a15732..1ea2dc2618778 100644
--- a/app/code/Magento/Multishipping/Block/Checkout/Overview.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Overview.php
@@ -400,7 +400,7 @@ public function getQuote()
      * Get billin address totals
      *
      * @return     mixed
-     * @deprecated
+     * @deprecated 100.2.3
      * typo in method name, see getBillingAddressTotals()
      */
     public function getBillinAddressTotals()
@@ -412,6 +412,7 @@ public function getBillinAddressTotals()
      * Get billing address totals
      *
      * @return mixed
+     * @since 100.2.3
      */
     public function getBillingAddressTotals()
     {
diff --git a/app/code/Magento/Multishipping/Block/Checkout/Results.php b/app/code/Magento/Multishipping/Block/Checkout/Results.php
index 35c050d5ff8c1..40cbce1990d00 100644
--- a/app/code/Magento/Multishipping/Block/Checkout/Results.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Results.php
@@ -21,6 +21,7 @@
  * Multi-shipping checkout results information
  *
  * @api
+ * @since 100.2.1
  */
 class Results extends Success
 {
@@ -66,6 +67,7 @@ public function __construct(
      * Returns shipping addresses from quote.
      *
      * @return array
+     * @since 100.2.1
      */
     public function getQuoteShippingAddresses(): array
     {
@@ -76,6 +78,7 @@ public function getQuoteShippingAddresses(): array
      * Returns all failed addresses from quote.
      *
      * @return array
+     * @since 100.2.1
      */
     public function getFailedAddresses(): array
     {
@@ -91,6 +94,7 @@ public function getFailedAddresses(): array
      *
      * @param int $orderId
      * @return OrderAddress|null
+     * @since 100.2.1
      */
     public function getOrderShippingAddress(int $orderId)
     {
@@ -101,6 +105,7 @@ public function getOrderShippingAddress(int $orderId)
      * Retrieve quote billing address.
      *
      * @return QuoteAddress
+     * @since 100.2.1
      */
     public function getQuoteBillingAddress(): QuoteAddress
     {
@@ -112,6 +117,7 @@ public function getQuoteBillingAddress(): QuoteAddress
      *
      * @param OrderAddress $address
      * @return string
+     * @since 100.2.1
      */
     public function formatOrderShippingAddress(OrderAddress $address): string
     {
@@ -123,6 +129,7 @@ public function formatOrderShippingAddress(OrderAddress $address): string
      *
      * @param QuoteAddress $address
      * @return string
+     * @since 100.2.1
      */
     public function formatQuoteShippingAddress(QuoteAddress $address): string
     {
@@ -134,6 +141,7 @@ public function formatQuoteShippingAddress(QuoteAddress $address): string
      *
      * @param QuoteAddress $address
      * @return bool
+     * @since 100.2.1
      */
     public function isShippingAddress(QuoteAddress $address): bool
     {
@@ -158,6 +166,7 @@ private function getAddressOneline(array $address): string
      *
      * @param QuoteAddress $address
      * @return string
+     * @since 100.2.1
      */
     public function getAddressError(QuoteAddress $address): string
     {
@@ -171,6 +180,7 @@ public function getAddressError(QuoteAddress $address): string
      *
      * @throws LocalizedException
      * @return Success
+     * @since 100.2.1
      */
     protected function _prepareLayout(): Success
     {
diff --git a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/PlaceOrderInterface.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/PlaceOrderInterface.php
index 5d384a5373d5e..85726a8dab0b5 100644
--- a/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/PlaceOrderInterface.php
+++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/PlaceOrderInterface.php
@@ -13,6 +13,7 @@
  * Place orders during multishipping checkout flow.
  *
  * @api
+ * @since 100.2.1
  */
 interface PlaceOrderInterface
 {
@@ -21,6 +22,7 @@ interface PlaceOrderInterface
      *
      * @param OrderInterface[] $orderList
      * @return array
+     * @since 100.2.1
      */
     public function place(array $orderList): array;
 }
diff --git a/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php b/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php
index aa3a2bcfe0f59..0f20a8379d04b 100644
--- a/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php
+++ b/app/code/Magento/Newsletter/Model/Queue/TransportBuilder.php
@@ -185,7 +185,7 @@ public function setReplyTo($email, $name = null)
      * @throws MailException
      * @see setFromByScope()
      *
-     * @deprecated This function sets the from address but does not provide
+     * @deprecated 100.3.3 This function sets the from address but does not provide
      * a way of setting the correct from addresses based on the scope.
      */
     public function setFrom($from)
diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php
index 33c539fbba84f..2914a25ba7214 100644
--- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php
+++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php
@@ -213,6 +213,7 @@ public function addSubscriberFilter($subscriberId)
      *
      * @param int $customerId
      * @return $this
+     * @since 100.4.0
      */
     public function addCustomerFilter(int $customerId): Collection
     {
diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber.php b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber.php
index 6391219e23c7e..b20e43574aeab 100644
--- a/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber.php
+++ b/app/code/Magento/Newsletter/Model/ResourceModel/Subscriber.php
@@ -116,6 +116,7 @@ public function setMessagesScope($scope)
      * @param string $email
      * @param int $websiteId
      * @return array
+     * @since 100.4.0
      */
     public function loadBySubscriberEmail(string $email, int $websiteId): array
     {
@@ -140,6 +141,7 @@ public function loadBySubscriberEmail(string $email, int $websiteId): array
      * @param int $customerId
      * @param int $websiteId
      * @return array
+     * @since 100.4.0
      */
     public function loadByCustomerId(int $customerId, int $websiteId): array
     {
@@ -199,7 +201,7 @@ public function received(SubscriberModel $subscriber, \Magento\Newsletter\Model\
      *
      * @param string $subscriberEmail
      * @return array
-     * @deprecated The subscription should be loaded by website id
+     * @deprecated 100.4.0 The subscription should be loaded by website id
      * @see loadBySubscriberEmail
      */
     public function loadByEmail($subscriberEmail)
@@ -213,7 +215,7 @@ public function loadByEmail($subscriberEmail)
      *
      * @param CustomerInterface $customer
      * @return array
-     * @deprecated The subscription should be loaded by website id
+     * @deprecated 100.4.0 The subscription should be loaded by website id
      * @see loadByCustomerId
      */
     public function loadByCustomerData(CustomerInterface $customer)
diff --git a/app/code/Magento/Newsletter/Model/Subscriber.php b/app/code/Magento/Newsletter/Model/Subscriber.php
index 5c573f47aa0bf..c2d80f9000792 100644
--- a/app/code/Magento/Newsletter/Model/Subscriber.php
+++ b/app/code/Magento/Newsletter/Model/Subscriber.php
@@ -382,6 +382,7 @@ public function isSubscribed()
      * @param string $email
      * @param int $websiteId
      * @return $this
+     * @since 100.4.0
      */
     public function loadBySubscriberEmail(string $email, int $websiteId): Subscriber
     {
@@ -400,6 +401,7 @@ public function loadBySubscriberEmail(string $email, int $websiteId): Subscriber
      * @param int $customerId
      * @param int $websiteId
      * @return $this
+     * @since 100.4.0
      */
     public function loadByCustomer(int $customerId, int $websiteId): Subscriber
     {
@@ -588,6 +590,7 @@ public function getSubscriberFullName()
      * Set date of last changed status
      *
      * @return $this
+     * @since 100.2.1
      */
     public function beforeSave()
     {
@@ -603,7 +606,7 @@ public function beforeSave()
      *
      * @param string $subscriberEmail
      * @return $this
-     * @deprecated The subscription should be loaded by website id
+     * @deprecated 100.4.0 The subscription should be loaded by website id
      * @see loadBySubscriberEmail
      */
     public function loadByEmail($subscriberEmail)
@@ -619,7 +622,7 @@ public function loadByEmail($subscriberEmail)
      *
      * @param int $customerId
      * @return $this
-     * @deprecated The subscription should be loaded by website id
+     * @deprecated 100.4.0 The subscription should be loaded by website id
      * @see loadByCustomer
      */
     public function loadByCustomerId($customerId)
@@ -644,7 +647,7 @@ public function loadByCustomerId($customerId)
      *
      * @param string $email
      * @return int
-     * @deprecated The subscription should be updated by store id
+     * @deprecated 100.4.0 The subscription should be updated by store id
      * @see \Magento\Newsletter\Model\SubscriptionManager::subscribe
      */
     public function subscribe($email)
@@ -661,7 +664,7 @@ public function subscribe($email)
      *
      * @param int $customerId
      * @return $this
-     * @deprecated The subscription should be updated by store id
+     * @deprecated 100.4.0 The subscription should be updated by store id
      * @see \Magento\Newsletter\Model\SubscriptionManager::subscribeCustomer
      */
     public function subscribeCustomerById($customerId)
@@ -674,7 +677,7 @@ public function subscribeCustomerById($customerId)
      *
      * @param int $customerId
      * @return $this
-     * @deprecated The subscription should be updated by store id
+     * @deprecated 100.4.0 The subscription should be updated by store id
      * @see \Magento\Newsletter\Model\SubscriptionManager::unsubscribeCustomer
      */
     public function unsubscribeCustomerById($customerId)
@@ -687,7 +690,7 @@ public function unsubscribeCustomerById($customerId)
      *
      * @param int $customerId
      * @return $this
-     * @deprecated The subscription should be updated by store id
+     * @deprecated 100.4.0 The subscription should be updated by store id
      * @see \Magento\Newsletter\Model\SubscriptionManager::subscribeCustomer
      */
     public function updateSubscription($customerId)
@@ -703,7 +706,7 @@ public function updateSubscription($customerId)
      * @param int $customerId
      * @param bool $subscribe indicates whether the customer should be subscribed or unsubscribed
      * @return $this
-     * @deprecated The subscription should be updated by store id
+     * @deprecated 100.4.0 The subscription should be updated by store id
      * @see \Magento\Newsletter\Model\SubscriptionManager::subscribeCustomer
      */
     protected function _updateCustomerSubscription($customerId, $subscribe)
diff --git a/app/code/Magento/Newsletter/Model/Template.php b/app/code/Magento/Newsletter/Model/Template.php
index 88fbfb152d14f..58afd45b26f44 100644
--- a/app/code/Magento/Newsletter/Model/Template.php
+++ b/app/code/Magento/Newsletter/Model/Template.php
@@ -40,7 +40,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate
     /**
      * Mail object
      *
-     * @deprecated Unused property
+     * @deprecated 100.3.0 Unused property
      *
      */
     protected $_mail;
diff --git a/app/code/Magento/OfflinePayments/Model/Purchaseorder.php b/app/code/Magento/OfflinePayments/Model/Purchaseorder.php
index 464142df5b996..fe30570aba50d 100644
--- a/app/code/Magento/OfflinePayments/Model/Purchaseorder.php
+++ b/app/code/Magento/OfflinePayments/Model/Purchaseorder.php
@@ -62,6 +62,7 @@ public function assignData(\Magento\Framework\DataObject $data)
      * @return $this
      * @throws LocalizedException
      * @api
+     * @since 100.2.3
      */
     public function validate()
     {
diff --git a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/LocationDirectory.php b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/LocationDirectory.php
index e015f7b54637d..bd75a1ffe698c 100644
--- a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/LocationDirectory.php
+++ b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate/LocationDirectory.php
@@ -155,7 +155,7 @@ protected function loadRegions()
      * @param int $countryId
      * @param string $regionCode
      * @return string
-     * @deprecated
+     * @deprecated 100.3.1
      */
     public function getRegionId($countryId, $regionCode)
     {
diff --git a/app/code/Magento/PageCache/Observer/SwitchPageCacheOnMaintenance/PageCacheState.php b/app/code/Magento/PageCache/Observer/SwitchPageCacheOnMaintenance/PageCacheState.php
index da6a71a0c2655..14b72e75d9473 100644
--- a/app/code/Magento/PageCache/Observer/SwitchPageCacheOnMaintenance/PageCacheState.php
+++ b/app/code/Magento/PageCache/Observer/SwitchPageCacheOnMaintenance/PageCacheState.php
@@ -17,7 +17,7 @@
  *
  * Page Cache State Observer
  *
- * @deprecated Originally used by now removed observer SwitchPageCacheOnMaintenance
+ * @deprecated 100.4.0 Originally used by now removed observer SwitchPageCacheOnMaintenance
  */
 class PageCacheState
 {
diff --git a/app/code/Magento/Payment/Block/Transparent/Redirect.php b/app/code/Magento/Payment/Block/Transparent/Redirect.php
index 1be6dec4cc1d8..4b45b2d687d30 100644
--- a/app/code/Magento/Payment/Block/Transparent/Redirect.php
+++ b/app/code/Magento/Payment/Block/Transparent/Redirect.php
@@ -13,6 +13,7 @@
  * Redirect block for register specific params in layout
  *
  * @api
+ * @since 100.3.5
  */
 class Redirect extends Template
 {
@@ -44,6 +45,7 @@ public function __construct(
      * Returns url for redirect.
      *
      * @return string
+     * @since 100.3.5
      */
     public function getRedirectUrl(): string
     {
@@ -54,6 +56,7 @@ public function getRedirectUrl(): string
      * Returns params to be redirected.
      *
      * @return array
+     * @since 100.3.5
      */
     public function getPostParams(): array
     {
diff --git a/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapper.php b/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapper.php
index 2072615a39b92..8a9f08e83005e 100644
--- a/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapper.php
+++ b/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapper.php
@@ -17,6 +17,7 @@
  * In that case, this implementation can be extended via di.xml and configured with appropriate mappers.
  *
  * @api
+ * @since 100.2.2
  */
 class ErrorMessageMapper implements ErrorMessageMapperInterface
 {
@@ -35,6 +36,7 @@ public function __construct(DataInterface $messageMapping)
 
     /**
      * @inheritdoc
+     * @since 100.2.2
      */
     public function getMessage(string $code)
     {
diff --git a/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapperInterface.php b/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapperInterface.php
index f09f49b7f8100..fc8c69902f373 100644
--- a/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapperInterface.php
+++ b/app/code/Magento/Payment/Gateway/ErrorMapper/ErrorMessageMapperInterface.php
@@ -13,6 +13,7 @@
  * Interface to provide customization for payment validation errors.
  *
  * @api
+ * @since 100.2.2
  */
 interface ErrorMessageMapperInterface
 {
@@ -22,6 +23,7 @@ interface ErrorMessageMapperInterface
      *
      * @param string $code
      * @return Phrase|null
+     * @since 100.2.2
      */
     public function getMessage(string $code);
 }
diff --git a/app/code/Magento/Payment/Gateway/Validator/ResultInterface.php b/app/code/Magento/Payment/Gateway/Validator/ResultInterface.php
index c1ad947e49c5b..9ed30b1c56cf4 100644
--- a/app/code/Magento/Payment/Gateway/Validator/ResultInterface.php
+++ b/app/code/Magento/Payment/Gateway/Validator/ResultInterface.php
@@ -33,6 +33,7 @@ public function getFailsDescription();
      * Returns list of error codes.
      *
      * @return string[]
+     * @since 100.3.0
      */
     public function getErrorCodes();
 }
diff --git a/app/code/Magento/Payment/Gateway/Validator/ValidatorComposite.php b/app/code/Magento/Payment/Gateway/Validator/ValidatorComposite.php
index f96c08a9605a8..8c8d13300849e 100644
--- a/app/code/Magento/Payment/Gateway/Validator/ValidatorComposite.php
+++ b/app/code/Magento/Payment/Gateway/Validator/ValidatorComposite.php
@@ -14,6 +14,7 @@
  * Compiles a result using the results of multiple validators
  *
  * @api
+ * @since 100.0.2
  */
 class ValidatorComposite extends AbstractValidator
 {
diff --git a/app/code/Magento/Payment/Model/Method/Adapter.php b/app/code/Magento/Payment/Model/Method/Adapter.php
index dba48efaae837..1a9831c47f5b1 100644
--- a/app/code/Magento/Payment/Model/Method/Adapter.php
+++ b/app/code/Magento/Payment/Model/Method/Adapter.php
@@ -668,6 +668,7 @@ public function getConfigPaymentAction()
 
     /**
      * @inheritdoc
+     * @since 100.4.0
      */
     public function canSale(): bool
     {
@@ -676,6 +677,7 @@ public function canSale(): bool
 
     /**
      * @inheritdoc
+     * @since 100.4.0
      */
     public function sale(InfoInterface $payment, float $amount)
     {
diff --git a/app/code/Magento/Payment/Model/Method/ConfigInterface.php b/app/code/Magento/Payment/Model/Method/ConfigInterface.php
index 06afde4657f26..7c74736cf2ef1 100644
--- a/app/code/Magento/Payment/Model/Method/ConfigInterface.php
+++ b/app/code/Magento/Payment/Model/Method/ConfigInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface for payment methods config
  *
- * @deprecated This interface has no semantic meaning and all it implementations has no joint points.
+ * @deprecated 100.3.0 This interface has no semantic meaning and all it implementations has no joint points.
  */
 interface ConfigInterface extends \Magento\Payment\Gateway\ConfigInterface
 {
diff --git a/app/code/Magento/Payment/Model/MethodList.php b/app/code/Magento/Payment/Model/MethodList.php
index 746306cbd0bbf..0700f25fcbee5 100644
--- a/app/code/Magento/Payment/Model/MethodList.php
+++ b/app/code/Magento/Payment/Model/MethodList.php
@@ -19,7 +19,7 @@ class MethodList
 {
     /**
      * @var \Magento\Payment\Helper\Data
-     * @deprecated 100.1.3 Do not use this property in case of inheritance.
+     * @deprecated 100.1.0 Do not use this property in case of inheritance.
      */
     protected $paymentHelper;
 
diff --git a/app/code/Magento/Payment/Model/SaleOperationInterface.php b/app/code/Magento/Payment/Model/SaleOperationInterface.php
index 384913a75ae26..da7dc5dfcb390 100644
--- a/app/code/Magento/Payment/Model/SaleOperationInterface.php
+++ b/app/code/Magento/Payment/Model/SaleOperationInterface.php
@@ -11,6 +11,7 @@
  * Responsible for support of `sale` payment operation via Magento payment provider gateway.
  *
  * @api
+ * @since 100.4.0
  */
 interface SaleOperationInterface
 {
@@ -18,6 +19,7 @@ interface SaleOperationInterface
      * Checks `sale` payment operation availability.
      *
      * @return bool
+     * @since 100.4.0
      */
     public function canSale(): bool;
 
@@ -27,6 +29,7 @@ public function canSale(): bool;
      * @param InfoInterface $payment
      * @param float $amount
      * @return void
+     * @since 100.4.0
      */
     public function sale(InfoInterface $payment, float $amount);
 }
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Order/View.php b/app/code/Magento/Paypal/Block/Adminhtml/Order/View.php
index 0cbd82798a2c1..82f2b6ab577e0 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/Order/View.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/Order/View.php
@@ -19,6 +19,7 @@
 /**
  * Adminhtml sales order view.
  * @api
+ * @since 100.2.2
  */
 class View extends OrderView
 {
@@ -59,6 +60,7 @@ public function __construct(
      *
      * @return void
      * @throws LocalizedException
+     * @since 100.2.2
      */
     protected function _construct()
     {
@@ -97,6 +99,7 @@ private function getPaymentAuthorizationUrl(): string
      * @param Order $order
      * @return bool
      * @throws LocalizedException
+     * @since 100.2.2
      */
     public function canAuthorize(Order $order): bool
     {
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Enable/BmlApi.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Enable/BmlApi.php
index 88a33f19de2f4..76fa0856fd23c 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Enable/BmlApi.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Field/Enable/BmlApi.php
@@ -7,7 +7,7 @@
 
 /**
  * Class Bml
- * @deprecated
+ * @deprecated 100.3.1
  * "Enable PayPal Credit" setting was removed. Please @see "Disable Funding Options"
  */
 class BmlApi extends AbstractEnable
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php
index 944b30f5792ae..567322fd89372 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Fieldset/Hint.php
@@ -17,7 +17,7 @@ class Hint extends Template implements RendererInterface
 {
     /**
      * @var string
-     * @deprecated 100.1.2
+     * @deprecated 100.1.0
      */
     protected $_template = 'Magento_Paypal::system/config/fieldset/hint.phtml';
 
diff --git a/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php b/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php
index 8d1e04c1397fc..6b4071120b511 100644
--- a/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php
+++ b/app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php
@@ -16,7 +16,7 @@
 
 /**
  * Class Button
- * @deprecated @see \Magento\Paypal\Block\Express\InContext\Minicart\SmartButton
+ * @deprecated 100.3.1 @see \Magento\Paypal\Block\Express\InContext\Minicart\SmartButton
  */
 class Button extends Template implements ShortcutInterface
 {
diff --git a/app/code/Magento/Paypal/Model/AbstractConfig.php b/app/code/Magento/Paypal/Model/AbstractConfig.php
index cf7e8009dab65..6fc3ac7a7732d 100644
--- a/app/code/Magento/Paypal/Model/AbstractConfig.php
+++ b/app/code/Magento/Paypal/Model/AbstractConfig.php
@@ -229,7 +229,7 @@ public function shouldUseUnilateralPayments()
     /**
      * Check whether WPP API credentials are available for this method
      *
-     * @deprecated
+     * @deprecated 100.3.1
      * @return bool
      */
     public function isWppApiAvailabe()
diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php
index 9e4f7693f4bfb..7d247eed7397d 100644
--- a/app/code/Magento/Paypal/Model/Api/Nvp.php
+++ b/app/code/Magento/Paypal/Model/Api/Nvp.php
@@ -1465,7 +1465,7 @@ protected function _exportLineItems(array &$request, $i = 0)
      *
      * @param array $data
      * @return void
-     * @deprecated 100.2.2 typo in method name
+     * @deprecated 100.2.4 typo in method name
      * @see _exportAddresses
      */
     protected function _exportAddressses($data)
diff --git a/app/code/Magento/Quote/Model/BillingAddressManagement.php b/app/code/Magento/Quote/Model/BillingAddressManagement.php
index bc055e71c662e..6f8a44dff464c 100644
--- a/app/code/Magento/Quote/Model/BillingAddressManagement.php
+++ b/app/code/Magento/Quote/Model/BillingAddressManagement.php
@@ -103,7 +103,7 @@ public function get($cartId)
      * Get shipping address assignment
      *
      * @return \Magento\Quote\Model\ShippingAddressAssignment
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getShippingAddressAssignment()
     {
diff --git a/app/code/Magento/Quote/Model/MaskedQuoteIdToQuoteIdInterface.php b/app/code/Magento/Quote/Model/MaskedQuoteIdToQuoteIdInterface.php
index 152d575e059c8..5cdcca5349c1b 100644
--- a/app/code/Magento/Quote/Model/MaskedQuoteIdToQuoteIdInterface.php
+++ b/app/code/Magento/Quote/Model/MaskedQuoteIdToQuoteIdInterface.php
@@ -12,6 +12,7 @@
 /**
  * Converts masked quote id to the quote id (entity id)
  * @api
+ * @since 101.1.0
  */
 interface MaskedQuoteIdToQuoteIdInterface
 {
@@ -19,6 +20,7 @@ interface MaskedQuoteIdToQuoteIdInterface
      * @param string $maskedQuoteId
      * @return int
      * @throws NoSuchEntityException
+     * @since 101.1.0
      */
     public function execute(string $maskedQuoteId): int;
 }
diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php
index c7d40c82bbcc2..8b51c9e1bd774 100644
--- a/app/code/Magento/Quote/Model/Quote.php
+++ b/app/code/Magento/Quote/Model/Quote.php
@@ -873,7 +873,7 @@ public function beforeSave()
      * Loading quote data by customer
      *
      * @param \Magento\Customer\Model\Customer|int $customer
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return $this
      */
     public function loadByCustomer($customer)
diff --git a/app/code/Magento/Quote/Model/Quote/Address.php b/app/code/Magento/Quote/Model/Quote/Address.php
index 39148f990b714..a7b5178765010 100644
--- a/app/code/Magento/Quote/Model/Quote/Address.php
+++ b/app/code/Magento/Quote/Model/Quote/Address.php
@@ -238,7 +238,7 @@ class Address extends AbstractAddress implements
 
     /**
      * @var RateFactory
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected $_addressRateFactory;
 
diff --git a/app/code/Magento/Quote/Model/Quote/Address/Item.php b/app/code/Magento/Quote/Model/Quote/Address/Item.php
index ade4f9270b68f..bbf74d5a28935 100644
--- a/app/code/Magento/Quote/Model/Quote/Address/Item.php
+++ b/app/code/Magento/Quote/Model/Quote/Address/Item.php
@@ -199,6 +199,7 @@ public function importQuoteItem(\Magento\Quote\Model\Quote\Item $quoteItem)
 
     /**
      * @inheritdoc
+     * @since 101.1.1
      */
     public function getOptionByCode($code)
     {
diff --git a/app/code/Magento/Quote/Model/Quote/Item.php b/app/code/Magento/Quote/Model/Quote/Item.php
index 2e4a9c7ded683..22554380ca61e 100644
--- a/app/code/Magento/Quote/Model/Quote/Item.php
+++ b/app/code/Magento/Quote/Model/Quote/Item.php
@@ -173,7 +173,7 @@ class Item extends \Magento\Quote\Model\Quote\Item\AbstractItem implements \Mage
 
     /**
      * @var \Magento\CatalogInventory\Api\StockRegistryInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $stockRegistry;
 
diff --git a/app/code/Magento/Quote/Model/Quote/Validator/MinimumOrderAmount/ValidationMessage.php b/app/code/Magento/Quote/Model/Quote/Validator/MinimumOrderAmount/ValidationMessage.php
index 38bfcbf1d30ca..78aa31d7d9527 100644
--- a/app/code/Magento/Quote/Model/Quote/Validator/MinimumOrderAmount/ValidationMessage.php
+++ b/app/code/Magento/Quote/Model/Quote/Validator/MinimumOrderAmount/ValidationMessage.php
@@ -19,7 +19,7 @@ class ValidationMessage
 
     /**
      * @var \Magento\Framework\Locale\CurrencyInterface
-     * @deprecated since 101.0.0
+     * @deprecated 101.0.3 since 101.0.0
      */
     private $currency;
 
diff --git a/app/code/Magento/Quote/Model/QuoteAddressValidator.php b/app/code/Magento/Quote/Model/QuoteAddressValidator.php
index e7750f5879de5..f0bc12f7b3a36 100644
--- a/app/code/Magento/Quote/Model/QuoteAddressValidator.php
+++ b/app/code/Magento/Quote/Model/QuoteAddressValidator.php
@@ -31,7 +31,7 @@ class QuoteAddressValidator
     protected $customerRepository;
 
     /**
-     * @deprecated This class is not a part of HTML presentation layer and should not use sessions.
+     * @deprecated 101.1.1 This class is not a part of HTML presentation layer and should not use sessions.
      */
     protected $customerSession;
 
diff --git a/app/code/Magento/Quote/Model/QuoteIdToMaskedQuoteIdInterface.php b/app/code/Magento/Quote/Model/QuoteIdToMaskedQuoteIdInterface.php
index 4d2a8ce877d8c..2a73a648889fb 100644
--- a/app/code/Magento/Quote/Model/QuoteIdToMaskedQuoteIdInterface.php
+++ b/app/code/Magento/Quote/Model/QuoteIdToMaskedQuoteIdInterface.php
@@ -12,6 +12,7 @@
 /**
  * Converts quote id to the masked quote id
  * @api
+ * @since 101.1.0
  */
 interface QuoteIdToMaskedQuoteIdInterface
 {
@@ -19,6 +20,7 @@ interface QuoteIdToMaskedQuoteIdInterface
      * @param int $quoteId
      * @return string
      * @throws NoSuchEntityException
+     * @since 101.1.0
      */
     public function execute(int $quoteId): string;
 }
diff --git a/app/code/Magento/Quote/Model/QuoteRepository.php b/app/code/Magento/Quote/Model/QuoteRepository.php
index ccfd3df5fafa3..0dd2b00a596ea 100644
--- a/app/code/Magento/Quote/Model/QuoteRepository.php
+++ b/app/code/Magento/Quote/Model/QuoteRepository.php
@@ -43,7 +43,7 @@ class QuoteRepository implements CartRepositoryInterface
 
     /**
      * @var QuoteFactory
-     * @deprecated
+     * @deprecated 101.1.2
      */
     protected $quoteFactory;
 
@@ -54,7 +54,7 @@ class QuoteRepository implements CartRepositoryInterface
 
     /**
      * @var QuoteCollection
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $quoteCollection;
 
@@ -261,7 +261,7 @@ public function getList(SearchCriteriaInterface $searchCriteria)
      * @param FilterGroup $filterGroup The filter group.
      * @param QuoteCollection $collection The quote collection.
      * @return void
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @throws InputException The specified filter group or quote collection does not exist.
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, QuoteCollection $collection)
diff --git a/app/code/Magento/Quote/Model/ResourceModel/Quote.php b/app/code/Magento/Quote/Model/ResourceModel/Quote.php
index 48945dacd1738..8c0829b4712f4 100644
--- a/app/code/Magento/Quote/Model/ResourceModel/Quote.php
+++ b/app/code/Magento/Quote/Model/ResourceModel/Quote.php
@@ -257,7 +257,7 @@ public function subtractProductFromQuotes($product)
      *
      * @param \Magento\Catalog\Model\Product $product
      *
-     * @deprecated 101.0.1
+     * @deprecated 101.0.3
      * @see \Magento\Quote\Model\ResourceModel\Quote::subtractProductFromQuotes
      *
      * @return $this
diff --git a/app/code/Magento/Quote/Model/ShippingMethodManagement.php b/app/code/Magento/Quote/Model/ShippingMethodManagement.php
index d9fa37c0185a9..dab4fa98607a0 100644
--- a/app/code/Magento/Quote/Model/ShippingMethodManagement.php
+++ b/app/code/Magento/Quote/Model/ShippingMethodManagement.php
@@ -286,7 +286,7 @@ public function estimateByAddressId($cartId, $addressId)
      * @param ExtensibleDataInterface|null $address
      * @return ShippingMethodInterface[] An array of shipping methods.
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @deprecated 100.2.0
+     * @deprecated 100.1.6
      */
     protected function getEstimatedRates(
         Quote $quote,
@@ -366,7 +366,7 @@ private function extractAddressData($address)
      * Gets the data object processor
      *
      * @return DataObjectProcessor
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getDataObjectProcessor()
     {
diff --git a/app/code/Magento/QuoteGraphQl/Model/Resolver/SetPaymentAndPlaceOrder.php b/app/code/Magento/QuoteGraphQl/Model/Resolver/SetPaymentAndPlaceOrder.php
index dd4ce8fe7f7a6..e4ad4542ab251 100644
--- a/app/code/Magento/QuoteGraphQl/Model/Resolver/SetPaymentAndPlaceOrder.php
+++ b/app/code/Magento/QuoteGraphQl/Model/Resolver/SetPaymentAndPlaceOrder.php
@@ -22,7 +22,7 @@
 /**
  * Resolver for setting payment method and placing order
  *
- * @deprecated Should use setPaymentMethodOnCart and placeOrder mutations in single request.
+ * @deprecated 100.3.4 Should use setPaymentMethodOnCart and placeOrder mutations in single request.
  * @see \Magento\QuoteGraphQl\Model\Resolver\SetPaymentMethodOnCart
  * @see \Magento\QuoteGraphQl\Model\Resolver\PlaceOrder
  */
diff --git a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php
index dd42874b55795..257eb481e1923 100644
--- a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php
+++ b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php
@@ -9,7 +9,7 @@
 /**
  * Adminhtml wishlist report page content block
  *
- * @deprecated
+ * @deprecated 100.3.3
  * @author      Magento Core Team <core@magentocommerce.com>
  */
 class Wishlist extends \Magento\Backend\Block\Template
diff --git a/app/code/Magento/Reports/Block/Product/Widget/Viewed/Item.php b/app/code/Magento/Reports/Block/Product/Widget/Viewed/Item.php
index 12959f083d376..1e3eb12331bde 100644
--- a/app/code/Magento/Reports/Block/Product/Widget/Viewed/Item.php
+++ b/app/code/Magento/Reports/Block/Product/Widget/Viewed/Item.php
@@ -8,7 +8,7 @@
 /**
  * Reports Recently Viewed Products Widget
  *
- * @deprecated
+ * @deprecated 100.3.3
  * @author     Magento Core Team <core@magentocommerce.com>
  */
 class Item extends \Magento\Catalog\Block\Product\AbstractProduct implements \Magento\Widget\Block\BlockInterface
diff --git a/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php
index 0a74c23fad991..44571550459c2 100644
--- a/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php
+++ b/app/code/Magento/Reports/Model/ResourceModel/Order/Collection.php
@@ -818,7 +818,7 @@ public function addSumAvgTotals($storeId = 0)
      * @param string $baseSubtotalCanceled
      * @param string $baseDiscountCanceled
      * @return string
-     * @deprecated
+     * @deprecated 100.3.2
      * @see getTotalsExpressionWithDiscountRefunded
      */
     protected function getTotalsExpression(
diff --git a/app/code/Magento/Reports/Model/ResourceModel/Product/Downloads/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Product/Downloads/Collection.php
index d194526858cde..ed3e4e8c4446d 100644
--- a/app/code/Magento/Reports/Model/ResourceModel/Product/Downloads/Collection.php
+++ b/app/code/Magento/Reports/Model/ResourceModel/Product/Downloads/Collection.php
@@ -100,6 +100,7 @@ public function addFieldToFilter($field, $condition = null)
 
     /**
      * @inheritDoc
+     * @since 100.3.2
      */
     public function getSelectCountSql()
     {
diff --git a/app/code/Magento/Reports/Model/ResourceModel/Quote/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Quote/Collection.php
index c1c6fb2eaed88..b69ea94aac9bb 100644
--- a/app/code/Magento/Reports/Model/ResourceModel/Quote/Collection.php
+++ b/app/code/Magento/Reports/Model/ResourceModel/Quote/Collection.php
@@ -58,6 +58,7 @@ public function __construct(
      * @param array $storeIds
      * @param bool $withAdmin
      * @return $this
+     * @since 100.3.1
      */
     public function addStoreFilter(array $storeIds, $withAdmin = true)
     {
diff --git a/app/code/Magento/Reports/Model/ResourceModel/Review/Customer/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Review/Customer/Collection.php
index f37bd6c6a7bd2..1ee47f3cd7bbb 100644
--- a/app/code/Magento/Reports/Model/ResourceModel/Review/Customer/Collection.php
+++ b/app/code/Magento/Reports/Model/ResourceModel/Review/Customer/Collection.php
@@ -113,6 +113,7 @@ protected function _joinCustomers()
      *
      * Additional processing of 'customer_name' field is required, as it is a concat field, which can not be aliased.
      * @see _joinCustomers
+     * @since 100.2.2
      */
     public function addFieldToFilter($field, $condition = null)
     {
diff --git a/app/code/Magento/Reports/Model/ResourceModel/Review/Product/Collection.php b/app/code/Magento/Reports/Model/ResourceModel/Review/Product/Collection.php
index 6f7738a8273bb..69221af3322f0 100644
--- a/app/code/Magento/Reports/Model/ResourceModel/Review/Product/Collection.php
+++ b/app/code/Magento/Reports/Model/ResourceModel/Review/Product/Collection.php
@@ -106,6 +106,7 @@ public function addAttributeToSort($attribute, $dir = self::SORT_ORDER_ASC)
      * @param array|null $condition
      * @param string $joinType
      * @return $this|\Magento\Catalog\Model\ResourceModel\Product\Collection
+     * @since 100.3.5
      */
     public function addAttributeToFilter($attribute, $condition = null, $joinType = 'inner')
     {
diff --git a/app/code/Magento/Review/Block/Adminhtml/Edit/Tab/Reviews.php b/app/code/Magento/Review/Block/Adminhtml/Edit/Tab/Reviews.php
index 15d41fad0a595..bf3c0e5b82ccb 100644
--- a/app/code/Magento/Review/Block/Adminhtml/Edit/Tab/Reviews.php
+++ b/app/code/Magento/Review/Block/Adminhtml/Edit/Tab/Reviews.php
@@ -13,6 +13,7 @@
  * Review tab in adminhtml area.
  *
  * @api
+ * @since 100.4.0
  */
 class Reviews extends Grid
 {
@@ -20,6 +21,7 @@ class Reviews extends Grid
      * Hide grid mass action elements.
      *
      * @return Reviews
+     * @since 100.4.0
      */
     protected function _prepareMassaction()
     {
@@ -30,6 +32,7 @@ protected function _prepareMassaction()
      * Determine ajax url for grid refresh
      *
      * @return string
+     * @since 100.4.0
      */
     public function getGridUrl()
     {
diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php
index da5aff1f4d2f8..bb322f17b6ce9 100644
--- a/app/code/Magento/Review/Block/Customer/View.php
+++ b/app/code/Magento/Review/Block/Customer/View.php
@@ -161,7 +161,7 @@ public function getRating()
     /**
      * Get rating summary
      *
-     * @deprecated
+     * @deprecated 100.3.3
      * @return array
      */
     public function getRatingSummary()
diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php
index 82a5f37f9b6bf..fcfa11faa169d 100644
--- a/app/code/Magento/Review/Block/View.php
+++ b/app/code/Magento/Review/Block/View.php
@@ -119,7 +119,7 @@ public function getRating()
     /**
      * Retrieve rating summary for current product
      *
-     * @deprecated
+     * @deprecated 100.3.3
      * @return string
      */
     public function getRatingSummary()
diff --git a/app/code/Magento/Review/Controller/Adminhtml/Rating.php b/app/code/Magento/Review/Controller/Adminhtml/Rating.php
index 02649661154af..672c3ed327941 100644
--- a/app/code/Magento/Review/Controller/Adminhtml/Rating.php
+++ b/app/code/Magento/Review/Controller/Adminhtml/Rating.php
@@ -41,7 +41,7 @@ public function __construct(
     }
 
     /**
-     * @deprecated Misspelled method
+     * @deprecated 100.3.0 Misspelled method
      * @see initEntityId
      */
     protected function initEnityId()
diff --git a/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php b/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php
index ab264ef1b6179..1fb7e7df2461f 100644
--- a/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php
+++ b/app/code/Magento/Review/Model/ResourceModel/Review/Product/Collection.php
@@ -553,6 +553,7 @@ protected function _afterLoad()
      * Not add store ids to items
      *
      * @return $this
+     * @since 100.2.8
      */
     protected function prepareStoreId()
     {
diff --git a/app/code/Magento/Review/Model/Review.php b/app/code/Magento/Review/Model/Review.php
index 0c581f570ef0c..f2e0997ea8878 100644
--- a/app/code/Magento/Review/Model/Review.php
+++ b/app/code/Magento/Review/Model/Review.php
@@ -101,7 +101,7 @@ class Review extends \Magento\Framework\Model\AbstractModel implements IdentityI
     /**
      * Review model summary
      *
-     * @deprecated Summary factory injected as separate property
+     * @deprecated 100.3.3 Summary factory injected as separate property
      * @var \Magento\Review\Model\Review\Summary
      */
     protected $_reviewSummary;
@@ -216,7 +216,7 @@ public function aggregate()
     /**
      * Get entity summary
      *
-     * @deprecated
+     * @deprecated 100.3.3
      * @param Product $product
      * @param int $storeId
      * @return void
@@ -306,7 +306,7 @@ public function afterDeleteCommit()
     /**
      * Append review summary data object to product collection
      *
-     * @deprecated
+     * @deprecated 100.3.3
      * @param ProductCollection $collection
      * @return $this
      * @throws \Magento\Framework\Exception\NoSuchEntityException
diff --git a/app/code/Magento/Robots/Block/Data.php b/app/code/Magento/Robots/Block/Data.php
index 460225d3ed71c..9a28f91de19d9 100644
--- a/app/code/Magento/Robots/Block/Data.php
+++ b/app/code/Magento/Robots/Block/Data.php
@@ -19,7 +19,7 @@
  * Prepares base content for robots.txt and implements Page Cache functionality.
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.0
  */
 class Data extends AbstractBlock implements IdentityInterface
 {
@@ -60,7 +60,7 @@ public function __construct(
      * Retrieve base content for robots.txt file
      *
      * @return string
-     * @since 100.2.0
+     * @since 100.1.0
      */
     protected function _toHtml()
     {
@@ -71,7 +71,7 @@ protected function _toHtml()
      * Get unique page cache identities
      *
      * @return array
-     * @since 100.2.0
+     * @since 100.1.0
      */
     public function getIdentities()
     {
diff --git a/app/code/Magento/Robots/Model/Config/Value.php b/app/code/Magento/Robots/Model/Config/Value.php
index 16a5a486e1078..ab955dadbe33d 100644
--- a/app/code/Magento/Robots/Model/Config/Value.php
+++ b/app/code/Magento/Robots/Model/Config/Value.php
@@ -23,7 +23,7 @@
  * Required to implement Page Cache functionality.
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.0
  */
 class Value extends ConfigValue implements IdentityInterface
 {
@@ -35,7 +35,7 @@ class Value extends ConfigValue implements IdentityInterface
     /**
      * @inheritdoc
      *
-     * @since 100.2.0
+     * @since 100.1.0
      */
     protected $_cacheTag = [self::CACHE_TAG];
 
@@ -86,7 +86,7 @@ public function __construct(
      * Get unique page cache identities
      *
      * @return array
-     * @since 100.2.0
+     * @since 100.1.0
      */
     public function getIdentities()
     {
diff --git a/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php b/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php
index ac400206b8a2f..8f9ab43313968 100644
--- a/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php
+++ b/app/code/Magento/Sales/Api/Data/OrderPaymentInterface.php
@@ -1047,6 +1047,7 @@ public function setCcTransId($id);
      *
      * @param string[] $additionalInformation
      * @return $this
+     * @since 102.1.0
      */
     public function setAdditionalInformation($additionalInformation);
 
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php
index 9adfd0407a9ba..8ec07f9765204 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Items/Grid.php
@@ -433,7 +433,7 @@ protected function _getTierPriceInfo($prices)
      * @param Item $item
      * @return string
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function getCustomOptions(Item $item)
     {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Cart.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Cart.php
index a927b7177294a..77765b242001f 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Cart.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/Cart.php
@@ -66,6 +66,7 @@ public function getItemCollection()
 
     /**
      * @inheritdoc
+     * @since 102.0.1
      */
     public function getItemPrice(Product $product)
     {
@@ -150,6 +151,7 @@ private function getCartItemCustomPrice(Product $product): ?float
 
     /**
      * @inheritdoc
+     * @since 102.0.4
      */
     public function getItemCount()
     {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php
index a7649fecaf2bb..781fb3b7501b5 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Adjustments.php
@@ -76,6 +76,7 @@ public function initTotals()
      * @param null|float $value
      *
      * @return string
+     * @since 102.1.0
      */
     public function formatValue($value)
     {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Totalbar.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Totalbar.php
index c4ce48d162c2c..33e5250d27d26 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Totalbar.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Totalbar.php
@@ -8,7 +8,7 @@
 /**
  * Adminhtml creditmemo bar
  *
- * @deprecated
+ * @deprecated 101.0.6
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
  * @since 100.0.2
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
index 598a3e226a879..22f61d3583faa 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Info.php
@@ -305,7 +305,7 @@ public function getFormattedAddress(Address $address)
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getChildHtml($alias = '', $useCache = true)
     {
diff --git a/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php b/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php
index 0a1e87e5e0a27..bfb668a674095 100644
--- a/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php
+++ b/app/code/Magento/Sales/Block/Order/Email/Creditmemo/Items.php
@@ -71,6 +71,7 @@ protected function _prepareItem(\Magento\Framework\View\Element\AbstractBlock $r
      * For legacy custom email templates it can pass as an object.
      *
      * @return OrderInterface|null
+     * @since 102.1.0
      */
     public function getOrder()
     {
@@ -96,6 +97,7 @@ public function getOrder()
      * For legacy custom email templates it can pass as an object.
      *
      * @return CreditmemoInterface|null
+     * @since 102.1.0
      */
     public function getCreditmemo()
     {
diff --git a/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php b/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php
index cc2b197ab0eb2..7b5389a54e878 100644
--- a/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php
+++ b/app/code/Magento/Sales/Block/Order/Email/Invoice/Items.php
@@ -71,6 +71,7 @@ protected function _prepareItem(\Magento\Framework\View\Element\AbstractBlock $r
      * For legacy custom email templates it can pass as an object.
      *
      * @return OrderInterface|null
+     * @since 102.1.0
      */
     public function getOrder()
     {
@@ -96,6 +97,7 @@ public function getOrder()
      * For legacy custom email templates it can pass as an object.
      *
      * @return InvoiceInterface|null
+     * @since 102.1.0
      */
     public function getInvoice()
     {
diff --git a/app/code/Magento/Sales/Block/Order/Email/Items.php b/app/code/Magento/Sales/Block/Order/Email/Items.php
index e11981285f04f..8a7256d1f1175 100644
--- a/app/code/Magento/Sales/Block/Order/Email/Items.php
+++ b/app/code/Magento/Sales/Block/Order/Email/Items.php
@@ -52,6 +52,7 @@ public function __construct(
      * For legacy custom email templates it can pass as an object.
      *
      * @return OrderInterface|null
+     * @since 102.1.0
      */
     public function getOrder()
     {
diff --git a/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php b/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php
index 1f9b353180fd9..db7fa6b03715a 100644
--- a/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php
+++ b/app/code/Magento/Sales/Block/Order/Email/Shipment/Items.php
@@ -71,6 +71,7 @@ protected function _prepareItem(\Magento\Framework\View\Element\AbstractBlock $r
      * For legacy custom email templates it can pass as an object.
      *
      * @return OrderInterface|null
+     * @since 102.1.0
      */
     public function getOrder()
     {
@@ -96,6 +97,7 @@ public function getOrder()
      * For legacy custom email templates it can pass as an object.
      *
      * @return ShipmentInterface|null
+     * @since 102.1.0
      */
     public function getShipment()
     {
diff --git a/app/code/Magento/Sales/Block/Order/History.php b/app/code/Magento/Sales/Block/Order/History.php
index 09300424212fe..98b1ccfc5b2e8 100644
--- a/app/code/Magento/Sales/Block/Order/History.php
+++ b/app/code/Magento/Sales/Block/Order/History.php
@@ -158,7 +158,7 @@ public function getViewUrl($order)
      *
      * @param object $order
      * @return string
-     * @deprecated Action does not exist
+     * @deprecated 102.0.3 Action does not exist
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function getTrackUrl($order)
@@ -193,6 +193,7 @@ public function getBackUrl()
      * Get message for no orders.
      *
      * @return \Magento\Framework\Phrase
+     * @since 102.1.0
      */
     public function getEmptyOrdersMessage()
     {
diff --git a/app/code/Magento/Sales/Block/Order/PrintShipment.php b/app/code/Magento/Sales/Block/Order/PrintShipment.php
index 0006a38f0f1ce..039bf2c79e78b 100644
--- a/app/code/Magento/Sales/Block/Order/PrintShipment.php
+++ b/app/code/Magento/Sales/Block/Order/PrintShipment.php
@@ -88,7 +88,7 @@ public function getOrder()
      * Disable pager for printing page
      *
      * @return bool
-     * @since 100.2.0
+     * @since 100.1.9
      */
     public function isPagerDisplayed()
     {
@@ -99,7 +99,7 @@ public function isPagerDisplayed()
      * Get order items
      *
      * @return \Magento\Framework\DataObject[]
-     * @since 100.2.0
+     * @since 100.1.9
      */
     public function getItems()
     {
diff --git a/app/code/Magento/Sales/Block/Order/Recent.php b/app/code/Magento/Sales/Block/Order/Recent.php
index 79119c1851347..934f1b5efdcdd 100644
--- a/app/code/Magento/Sales/Block/Order/Recent.php
+++ b/app/code/Magento/Sales/Block/Order/Recent.php
@@ -120,7 +120,7 @@ public function getViewUrl($order)
      *
      * @param object $order
      * @return string
-     * @deprecated Action does not exist
+     * @deprecated 102.0.3 Action does not exist
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function getTrackUrl($order)
diff --git a/app/code/Magento/Sales/Block/Order/View.php b/app/code/Magento/Sales/Block/Order/View.php
index 03d1340e0f690..eef13fd47bf94 100644
--- a/app/code/Magento/Sales/Block/Order/View.php
+++ b/app/code/Magento/Sales/Block/Order/View.php
@@ -29,7 +29,7 @@ class View extends \Magento\Framework\View\Element\Template
 
     /**
      * @var \Magento\Framework\App\Http\Context
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected $httpContext;
 
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/AbstractMassAction.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/AbstractMassAction.php
index c6b45f282debc..1f75008897102 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/AbstractMassAction.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/AbstractMassAction.php
@@ -14,7 +14,7 @@
 
 /**
  * Class AbstractMassStatus
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * Never extend from this action. Implement mass-action logic in the "execute" method of your controller.
  */
 abstract class AbstractMassAction extends \Magento\Backend\App\Action
diff --git a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php
index fc4e238d47c99..069b2783076d9 100644
--- a/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php
+++ b/app/code/Magento/Sales/Controller/Download/DownloadCustomOption.php
@@ -33,7 +33,7 @@ class DownloadCustomOption extends \Magento\Framework\App\Action\Action implemen
 
     /**
      * @var \Magento\Framework\Unserialize\Unserialize
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $unserialize;
 
diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php
index 67a533ea88550..a8178cbfe249f 100644
--- a/app/code/Magento/Sales/Model/AdminOrder/Create.php
+++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php
@@ -1151,7 +1151,7 @@ public function updateQuoteItems($items)
      * @return array
      * @throws \Magento\Framework\Exception\LocalizedException
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function _parseOptions(\Magento\Quote\Model\Quote\Item $item, $additionalOptions)
     {
@@ -1221,7 +1221,7 @@ protected function _parseOptions(\Magento\Quote\Model\Quote\Item $item, $additio
      * @param array $options
      * @return $this
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function _assignOptionsToItem(\Magento\Quote\Model\Quote\Item $item, $options)
     {
diff --git a/app/code/Magento/Sales/Model/Increment.php b/app/code/Magento/Sales/Model/Increment.php
index 75ff1ee044a95..813b3dcc40a7a 100644
--- a/app/code/Magento/Sales/Model/Increment.php
+++ b/app/code/Magento/Sales/Model/Increment.php
@@ -9,7 +9,7 @@
 
 /**
  * Class Increment
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 class Increment
 {
diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php
index 598b204a33097..46b296d7f8964 100644
--- a/app/code/Magento/Sales/Model/Order.php
+++ b/app/code/Magento/Sales/Model/Order.php
@@ -193,7 +193,7 @@ class Order extends AbstractModel implements EntityInterface, OrderInterface
 
     /**
      * @var \Magento\Catalog\Api\ProductRepositoryInterface
-     * @deprecated 100.1.7 Remove unused dependency.
+     * @deprecated 100.1.0 Remove unused dependency.
      */
     protected $productRepository;
 
@@ -1076,6 +1076,7 @@ public function setState($state)
      * Retrieve frontend label of order status
      *
      * @return string
+     * @since 102.0.1
      */
     public function getFrontendStatusLabel()
     {
@@ -1115,7 +1116,7 @@ public function addStatusToHistory($status, $comment = '', $isCustomerNotified =
      * @param string $comment
      * @param bool|string $status
      * @return OrderStatusHistoryInterface
-     * @deprecated
+     * @deprecated 101.0.5
      * @see addCommentToStatusHistory
      */
     public function addStatusHistoryComment($comment, $status = false)
@@ -1132,6 +1133,7 @@ public function addStatusHistoryComment($comment, $status = false)
      * @param bool|string $status
      * @param bool $isVisibleOnFront
      * @return OrderStatusHistoryInterface
+     * @since 101.0.5
      */
     public function addCommentToStatusHistory($comment, $status = false, $isVisibleOnFront = false)
     {
diff --git a/app/code/Magento/Sales/Model/Order/Address.php b/app/code/Magento/Sales/Model/Order/Address.php
index 9b8f4e79c23fa..0fd4555238ed5 100644
--- a/app/code/Magento/Sales/Model/Order/Address.php
+++ b/app/code/Magento/Sales/Model/Order/Address.php
@@ -732,6 +732,7 @@ public function setExtensionAttributes(\Magento\Sales\Api\Data\OrderAddressExten
 
     /**
      * @inheritdoc
+     * @since 102.0.3
      */
     public function beforeSave()
     {
diff --git a/app/code/Magento/Sales/Model/Order/AddressRepository.php b/app/code/Magento/Sales/Model/Order/AddressRepository.php
index deeeb16b7714c..1a700826dbc3f 100644
--- a/app/code/Magento/Sales/Model/Order/AddressRepository.php
+++ b/app/code/Magento/Sales/Model/Order/AddressRepository.php
@@ -240,7 +240,7 @@ public function create()
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Sales/Model/Order/Config.php b/app/code/Magento/Sales/Model/Order/Config.php
index 92681f3ecf181..32b9298be2b5f 100644
--- a/app/code/Magento/Sales/Model/Order/Config.php
+++ b/app/code/Magento/Sales/Model/Order/Config.php
@@ -157,6 +157,7 @@ public function getStatusLabel($code)
      *
      * @param string|null $code
      * @return string|null
+     * @since 102.0.1
      */
     public function getStatusFrontendLabel(?string $code): ?string
     {
@@ -307,7 +308,7 @@ protected function _getStatuses($visibility)
      * @param string $state
      * @param string $status
      * @return \Magento\Framework\Phrase|string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getStateLabelByStateAndStatus($state, $status)
     {
diff --git a/app/code/Magento/Sales/Model/Order/CreditmemoFactory.php b/app/code/Magento/Sales/Model/Order/CreditmemoFactory.php
index 8138e193e7978..26706c6e76e31 100644
--- a/app/code/Magento/Sales/Model/Order/CreditmemoFactory.php
+++ b/app/code/Magento/Sales/Model/Order/CreditmemoFactory.php
@@ -32,7 +32,7 @@ class CreditmemoFactory
 
     /**
      * @var \Magento\Framework\Unserialize\Unserialize
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $unserialize;
 
diff --git a/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php b/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php
index ce4a0aa5b3e3a..269ee313c09df 100644
--- a/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php
+++ b/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php
@@ -151,7 +151,7 @@ public function save(\Magento\Sales\Api\Data\CreditmemoInterface $entity)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Sales/Model/Order/CustomerManagement.php b/app/code/Magento/Sales/Model/Order/CustomerManagement.php
index ae3f940dbb2ba..50c7f88af546b 100644
--- a/app/code/Magento/Sales/Model/Order/CustomerManagement.php
+++ b/app/code/Magento/Sales/Model/Order/CustomerManagement.php
@@ -27,17 +27,17 @@ class CustomerManagement implements \Magento\Sales\Api\OrderCustomerManagementIn
     protected $accountManagement;
 
     /**
-     * @deprecated
+     * @deprecated 101.0.4
      */
     protected $customerFactory;
 
     /**
-     * @deprecated
+     * @deprecated 101.0.4
      */
     protected $addressFactory;
 
     /**
-     * @deprecated
+     * @deprecated 101.0.4
      */
     protected $regionFactory;
 
@@ -47,7 +47,7 @@ class CustomerManagement implements \Magento\Sales\Api\OrderCustomerManagementIn
     protected $orderRepository;
 
     /**
-     * @deprecated
+     * @deprecated 101.0.4
      */
     protected $objectCopyService;
 
diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php
index 4c8e1744ac0e0..49aef3de7fecb 100644
--- a/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php
+++ b/app/code/Magento/Sales/Model/Order/Email/Sender/ShipmentSender.php
@@ -19,7 +19,7 @@
 /**
  * Sends order shipment email to the customer.
  *
- * @deprecated since this class works only with the concrete model and no data interface
+ * @deprecated 102.1.0 since this class works only with the concrete model and no data interface
  * @see \Magento\Sales\Model\Order\Shipment\Sender\EmailSender
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
diff --git a/app/code/Magento/Sales/Model/Order/InvoiceRepository.php b/app/code/Magento/Sales/Model/Order/InvoiceRepository.php
index 2244a86260c2f..ac1a782367ab3 100644
--- a/app/code/Magento/Sales/Model/Order/InvoiceRepository.php
+++ b/app/code/Magento/Sales/Model/Order/InvoiceRepository.php
@@ -145,7 +145,7 @@ public function save(\Magento\Sales\Api\Data\InvoiceInterface $entity)
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Sales/Model/Order/Item.php b/app/code/Magento/Sales/Model/Order/Item.php
index ba01090e5abff..bc55b2229770d 100644
--- a/app/code/Magento/Sales/Model/Order/Item.php
+++ b/app/code/Magento/Sales/Model/Order/Item.php
@@ -2409,7 +2409,7 @@ public function setExtensionAttributes(\Magento\Sales\Api\Data\OrderItemExtensio
      * Check if it is possible to process item after cancellation
      *
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isProcessingAvailable()
     {
diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php
index 3076c6dfd2ba7..6a2a77b52927a 100644
--- a/app/code/Magento/Sales/Model/Order/Payment.php
+++ b/app/code/Magento/Sales/Model/Order/Payment.php
@@ -1494,7 +1494,7 @@ protected function _getInvoiceForTransactionId($transactionId)
     /**
      * Get order state resolver instance.
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return OrderStateResolverInterface
      */
     private function getOrderStateResolver()
diff --git a/app/code/Magento/Sales/Model/Order/Payment/Repository.php b/app/code/Magento/Sales/Model/Order/Payment/Repository.php
index 4353f6b1cc391..27686ffb46c9d 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/Repository.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/Repository.php
@@ -131,7 +131,7 @@ public function create()
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php
index 89731b5130605..d17f3b51f3934 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/State/AuthorizeCommand.php
@@ -90,7 +90,7 @@ private function getNotificationMessage(OrderPaymentInterface $payment): ?string
      * @param string $status
      * @param string $state
      * @return void
-     * @deprecated 100.2.0 Replaced by a StatusResolver class call.
+     * @deprecated 100.1.9 Replaced by a StatusResolver class call.
      */
     protected function setOrderStateAndStatus(Order $order, $status, $state)
     {
diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php
index f57e1933a7e5a..79b329cd486e5 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/State/CaptureCommand.php
@@ -74,7 +74,7 @@ public function execute(OrderPaymentInterface $payment, $amount, OrderInterface
      * @param string $status
      * @param string $state
      * @return void
-     * @deprecated 100.2.0 Replaced by a StatusResolver class call.
+     * @deprecated 100.1.9 Replaced by a StatusResolver class call.
      */
     protected function setOrderStateAndStatus(Order $order, $status, $state)
     {
diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/OrderCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/OrderCommand.php
index 2a7e7145f6886..d6acd82613c0a 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/State/OrderCommand.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/State/OrderCommand.php
@@ -61,7 +61,7 @@ public function execute(OrderPaymentInterface $payment, $amount, OrderInterface
     }
 
     /**
-     * @deprecated 100.2.0 Replaced by a StatusResolver class call.
+     * @deprecated 100.1.9 Replaced by a StatusResolver class call.
      *
      * @param Order $order
      * @param string $status
diff --git a/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php b/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php
index 2551092a64e9a..ff375c995a183 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php
@@ -73,7 +73,7 @@ public function execute(OrderPaymentInterface $payment, $amount, OrderInterface
     /**
      * Sets the state and status of the order
      *
-     * @deprecated 100.2.0 Replaced by a StatusResolver class call.
+     * @deprecated 100.1.9 Replaced by a StatusResolver class call.
      *
      * @param Order $order
      * @param string $status
diff --git a/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php b/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php
index a602fe54363ed..30af4e07a42bf 100644
--- a/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php
+++ b/app/code/Magento/Sales/Model/Order/Payment/Transaction/Repository.php
@@ -233,7 +233,7 @@ public function create()
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Sales/Model/Order/ProductOption.php b/app/code/Magento/Sales/Model/Order/ProductOption.php
index 9a4f847b135e7..3d0b5433d7a4f 100644
--- a/app/code/Magento/Sales/Model/Order/ProductOption.php
+++ b/app/code/Magento/Sales/Model/Order/ProductOption.php
@@ -17,6 +17,7 @@
  * Adds product option to the order item according to product options processors pool.
  *
  * @api
+ * @since 102.0.1
  */
 class ProductOption
 {
@@ -54,6 +55,7 @@ public function __construct(
      * Adds product option to the order item.
      *
      * @param OrderItemInterface $orderItem
+     * @since 102.0.1
      */
     public function add(OrderItemInterface $orderItem): void
     {
diff --git a/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityChecker.php b/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityChecker.php
index dd70c6b5481df..e4f2ff0d57035 100644
--- a/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityChecker.php
+++ b/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityChecker.php
@@ -16,7 +16,7 @@
  * of the array $productAvailabilityChecks(constructor argument). A product type should be a key for the new element.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class OrderedProductAvailabilityChecker implements OrderedProductAvailabilityCheckerInterface
 {
@@ -36,7 +36,7 @@ public function __construct(array $productAvailabilityChecks)
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isAvailable(Item $item)
     {
diff --git a/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityCheckerInterface.php b/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityCheckerInterface.php
index 989bd482ed4e8..59f7dfc63b095 100644
--- a/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityCheckerInterface.php
+++ b/app/code/Magento/Sales/Model/Order/Reorder/OrderedProductAvailabilityCheckerInterface.php
@@ -9,7 +9,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface OrderedProductAvailabilityCheckerInterface
 {
@@ -19,7 +19,7 @@ interface OrderedProductAvailabilityCheckerInterface
      *
      * @param Item $item
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function isAvailable(Item $item);
 }
diff --git a/app/code/Magento/Sales/Model/Order/ShipmentFactory.php b/app/code/Magento/Sales/Model/Order/ShipmentFactory.php
index 21b42abeb293d..3cd318ea67adb 100644
--- a/app/code/Magento/Sales/Model/Order/ShipmentFactory.php
+++ b/app/code/Magento/Sales/Model/Order/ShipmentFactory.php
@@ -12,6 +12,7 @@
  * Factory class for @see \Magento\Sales\Api\Data\ShipmentInterface
  *
  * @api
+ * @since 100.0.2
  */
 class ShipmentFactory
 {
diff --git a/app/code/Magento/Sales/Model/Order/ShipmentRepository.php b/app/code/Magento/Sales/Model/Order/ShipmentRepository.php
index 0b86bec895b75..ad73b22e94555 100644
--- a/app/code/Magento/Sales/Model/Order/ShipmentRepository.php
+++ b/app/code/Magento/Sales/Model/Order/ShipmentRepository.php
@@ -166,7 +166,7 @@ public function create()
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Sales/Model/OrderRepository.php b/app/code/Magento/Sales/Model/OrderRepository.php
index f93de4c32d888..ecd4e7babb1e3 100644
--- a/app/code/Magento/Sales/Model/OrderRepository.php
+++ b/app/code/Magento/Sales/Model/OrderRepository.php
@@ -317,7 +317,7 @@ private function getShippingAssignmentBuilderDependency()
      * @param \Magento\Framework\Api\Search\FilterGroup $filterGroup
      * @param \Magento\Sales\Api\Data\OrderSearchResultInterface $searchResult
      * @return void
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(
diff --git a/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php b/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php
index 25c15449a9fb4..444fc589748ab 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php
@@ -90,7 +90,7 @@ public function purge($value, $field = null)
      *
      * @param string $default
      * @return string
-     * @deprecated 100.2.0 this method is not used in abstract model but only in single child so
+     * @deprecated 101.0.0 this method is not used in abstract model but only in single child so
      * this deprecation is a part of cleaning abstract classes.
      * @see \Magento\Sales\Model\ResourceModel\Provider\UpdatedIdListProvider
      */
diff --git a/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php b/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php
index 3f2ba38fa5a55..2739226c5fb5a 100644
--- a/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php
+++ b/app/code/Magento/SalesInventory/Model/Order/ReturnProcessor.php
@@ -12,6 +12,7 @@
  * Class ReturnProcessor
  *
  * @api
+ * @since 100.0.0
  */
 class ReturnProcessor
 {
@@ -68,6 +69,7 @@ public function __construct(
      * @param array $returnToStockItems
      * @param bool $isAutoReturn
      * @return void
+     * @since 100.0.0
      */
     public function execute(
         CreditmemoInterface $creditmemo,
diff --git a/app/code/Magento/SalesRule/Api/Data/CouponInterface.php b/app/code/Magento/SalesRule/Api/Data/CouponInterface.php
index bd44ea829fe66..2ab731f2f7974 100644
--- a/app/code/Magento/SalesRule/Api/Data/CouponInterface.php
+++ b/app/code/Magento/SalesRule/Api/Data/CouponInterface.php
@@ -110,7 +110,7 @@ public function setTimesUsed($timesUsed);
      * Get expiration date
      *
      * @return string|null
-     * @deprecated Coupon expiration must follow sales rule expiration date.
+     * @deprecated 101.1.3 Coupon expiration must follow sales rule expiration date.
      */
     public function getExpirationDate();
 
@@ -119,7 +119,7 @@ public function getExpirationDate();
      *
      * @param string $expirationDate
      * @return $this
-     * @deprecated Coupon expiration must follow sales rule expiration date.
+     * @deprecated 101.1.3 Coupon expiration must follow sales rule expiration date.
      */
     public function setExpirationDate($expirationDate);
 
diff --git a/app/code/Magento/SalesRule/Model/Coupon.php b/app/code/Magento/SalesRule/Model/Coupon.php
index a8c77c6ceeec8..070ce89c1d474 100644
--- a/app/code/Magento/SalesRule/Model/Coupon.php
+++ b/app/code/Magento/SalesRule/Model/Coupon.php
@@ -207,7 +207,7 @@ public function setTimesUsed($timesUsed)
      * Get expiration date
      *
      * @return string|null
-     * @deprecated Coupon expiration must follow sales rule expiration date.
+     * @deprecated 101.1.3 Coupon expiration must follow sales rule expiration date.
      */
     public function getExpirationDate()
     {
@@ -219,7 +219,7 @@ public function getExpirationDate()
      *
      * @param string $expirationDate
      * @return $this
-     * @deprecated Coupon expiration must follow sales rule expiration date.
+     * @deprecated 101.1.3 Coupon expiration must follow sales rule expiration date.
      */
     public function setExpirationDate($expirationDate)
     {
diff --git a/app/code/Magento/SalesRule/Model/CouponRepository.php b/app/code/Magento/SalesRule/Model/CouponRepository.php
index 4c557832fa8d6..f32fbc3d12134 100644
--- a/app/code/Magento/SalesRule/Model/CouponRepository.php
+++ b/app/code/Magento/SalesRule/Model/CouponRepository.php
@@ -197,7 +197,7 @@ public function deleteById($couponId)
      *
      * @param FilterGroup $filterGroup
      * @param Collection $collection
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return void
      */
     protected function addFilterGroupToCollection(
@@ -219,7 +219,7 @@ protected function addFilterGroupToCollection(
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php
index e44200614fa00..46790f92540aa 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Action/Discount/CartFixed.php
@@ -118,7 +118,7 @@ public function calculate($rule, $item, $qty)
     /**
      * Set information about usage cart fixed rule by quote address
      *
-     * @deprecated should be removed as it is not longer used
+     * @deprecated 101.2.0 should be removed as it is not longer used
      * @param int $ruleId
      * @param int $itemId
      * @return void
@@ -131,7 +131,7 @@ protected function setCartFixedRuleUsedForAddress($ruleId, $itemId)
     /**
      * Retrieve information about usage cart fixed rule by quote address
      *
-     * @deprecated should be removed as it is not longer used
+     * @deprecated 101.2.0 should be removed as it is not longer used
      * @param int $ruleId
      * @return int|null
      */
diff --git a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Combine.php b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Combine.php
index 6ade7a064e849..35e7e62144611 100644
--- a/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Combine.php
+++ b/app/code/Magento/SalesRule/Model/Rule/Condition/Product/Combine.php
@@ -89,6 +89,7 @@ public function collectValidatedAttributes($productCollection)
 
     /**
      * @inheritdoc
+     * @since 101.0.6
      */
     protected function _isValid($entity)
     {
diff --git a/app/code/Magento/SalesRule/Model/RuleRepository.php b/app/code/Magento/SalesRule/Model/RuleRepository.php
index 2cff0d64dba01..2016ae0dde1c7 100644
--- a/app/code/Magento/SalesRule/Model/RuleRepository.php
+++ b/app/code/Magento/SalesRule/Model/RuleRepository.php
@@ -184,7 +184,7 @@ public function deleteById($id)
      *
      * @param FilterGroup $filterGroup
      * @param Collection $collection
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return void
      */
     protected function addFilterGroupToCollection(
@@ -206,7 +206,7 @@ protected function addFilterGroupToCollection(
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/SalesRule/Model/Service/CouponManagementService.php b/app/code/Magento/SalesRule/Model/Service/CouponManagementService.php
index b698190997d7e..7f355a62c4631 100644
--- a/app/code/Magento/SalesRule/Model/Service/CouponManagementService.php
+++ b/app/code/Magento/SalesRule/Model/Service/CouponManagementService.php
@@ -19,7 +19,7 @@ class CouponManagementService implements \Magento\SalesRule\Api\CouponManagement
 {
     /**
      * @var \Magento\SalesRule\Model\CouponFactory
-     * @deprecated
+     * @deprecated 101.1.2
      */
     protected $couponFactory;
 
@@ -30,7 +30,7 @@ class CouponManagementService implements \Magento\SalesRule\Api\CouponManagement
 
     /**
      * @var \Magento\SalesRule\Model\ResourceModel\Coupon\CollectionFactory
-     * @deprecated
+     * @deprecated 101.1.2
      */
     protected $collectionFactory;
 
@@ -41,7 +41,7 @@ class CouponManagementService implements \Magento\SalesRule\Api\CouponManagement
 
     /**
      * @var \Magento\SalesRule\Model\Spi\CouponResourceInterface
-     * @deprecated
+     * @deprecated 101.1.2
      */
     protected $resourceModel;
 
diff --git a/app/code/Magento/Search/Model/AdapterFactory.php b/app/code/Magento/Search/Model/AdapterFactory.php
index 917603ce57dc3..f6d2013bd4886 100644
--- a/app/code/Magento/Search/Model/AdapterFactory.php
+++ b/app/code/Magento/Search/Model/AdapterFactory.php
@@ -17,7 +17,7 @@ class AdapterFactory
      * Scope configuration
      *
      * @var \Magento\Framework\App\Config\ScopeConfigInterface
-     * @deprecated since it is not used anymore
+     * @deprecated 101.0.0 since it is not used anymore
      */
     protected $scopeConfig;
 
@@ -32,13 +32,13 @@ class AdapterFactory
      * Config path
      *
      * @var string
-     * @deprecated since it is not used anymore
+     * @deprecated 101.0.0 since it is not used anymore
      */
     protected $path;
 
     /**
      * Config Scope
-     * @deprecated since it is not used anymore
+     * @deprecated 101.0.0 since it is not used anymore
      */
     protected $scope;
 
diff --git a/app/code/Magento/Search/Model/ResourceModel/Query/Collection.php b/app/code/Magento/Search/Model/ResourceModel/Query/Collection.php
index 2fc71fc6a6d73..8d3db36e35dec 100644
--- a/app/code/Magento/Search/Model/ResourceModel/Query/Collection.php
+++ b/app/code/Magento/Search/Model/ResourceModel/Query/Collection.php
@@ -168,6 +168,7 @@ public function setPopularQueryFilter($storeIds = null)
      * @param int $storeId
      * @param int $maxCountCacheableSearchTerms
      * @return bool
+     * @since 101.1.0
      */
     public function isTopSearchResult(string $term, int $storeId, int $maxCountCacheableSearchTerms):bool
     {
diff --git a/app/code/Magento/Search/Model/Search/PageSizeProvider.php b/app/code/Magento/Search/Model/Search/PageSizeProvider.php
index 5572bac6addc3..ae2a8ca954d63 100644
--- a/app/code/Magento/Search/Model/Search/PageSizeProvider.php
+++ b/app/code/Magento/Search/Model/Search/PageSizeProvider.php
@@ -10,6 +10,7 @@
 /**
  * Returns max  page size by search engine name
  * @api
+ * @since 101.0.0
  */
 class PageSizeProvider
 {
@@ -39,6 +40,7 @@ public function __construct(
      * Returns max_page_size depends on engine
      *
      * @return integer
+     * @since 101.0.0
      */
     public function getMaxPageSize() : int
     {
diff --git a/app/code/Magento/SendFriend/Block/Send.php b/app/code/Magento/SendFriend/Block/Send.php
index 1c4b550361359..6f2154ba29f47 100644
--- a/app/code/Magento/SendFriend/Block/Send.php
+++ b/app/code/Magento/SendFriend/Block/Send.php
@@ -228,6 +228,7 @@ public function canSend()
 
     /**
      * @inheritdoc
+     * @since 100.3.1
      */
     protected function _prepareLayout()
     {
diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
index 76555ce8a6d8c..0965c4a472c25 100644
--- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
+++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
@@ -332,6 +332,7 @@ public function checkAvailableShipCountries(\Magento\Framework\DataObject $reque
      * @param \Magento\Framework\DataObject $request
      * @return $this|bool|\Magento\Framework\DataObject
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @since 100.2.6
      */
     public function processAdditionalValidation(\Magento\Framework\DataObject $request)
     {
@@ -343,7 +344,7 @@ public function processAdditionalValidation(\Magento\Framework\DataObject $reque
      *
      * @param \Magento\Framework\DataObject $request
      * @return $this|bool|\Magento\Framework\DataObject
-     * @deprecated
+     * @deprecated 100.2.6
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function proccessAdditionalValidation(\Magento\Framework\DataObject $request)
diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
index 27047ae46bf1f..c2238ff1a3809 100644
--- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
+++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrierOnline.php
@@ -303,7 +303,7 @@ public function getAllItems(RateRequest $request)
      *
      * @param \Magento\Framework\DataObject $request
      * @return $this|bool|\Magento\Framework\DataObject
-     * @deprecated
+     * @deprecated 100.2.6
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
@@ -319,6 +319,7 @@ public function proccessAdditionalValidation(\Magento\Framework\DataObject $requ
      * @return $this|bool|\Magento\Framework\DataObject
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
+     * @since 100.2.6
      */
     public function processAdditionalValidation(\Magento\Framework\DataObject $request)
     {
diff --git a/app/code/Magento/Shipping/Model/ShipmentProviderInterface.php b/app/code/Magento/Shipping/Model/ShipmentProviderInterface.php
index 4ff9ba0008340..546afdca5028b 100644
--- a/app/code/Magento/Shipping/Model/ShipmentProviderInterface.php
+++ b/app/code/Magento/Shipping/Model/ShipmentProviderInterface.php
@@ -11,6 +11,7 @@
  * Provide shipment items data.
  *
  * @api
+ * @since 100.3.0
  */
 interface ShipmentProviderInterface
 {
@@ -18,6 +19,7 @@ interface ShipmentProviderInterface
      * Retrieve shipment items.
      *
      * @return array
+     * @since 100.3.0
      */
     public function getShipmentData(): array;
 }
diff --git a/app/code/Magento/Sitemap/Block/Robots.php b/app/code/Magento/Sitemap/Block/Robots.php
index ac99b2ab1cd4a..2beb31bd06570 100644
--- a/app/code/Magento/Sitemap/Block/Robots.php
+++ b/app/code/Magento/Sitemap/Block/Robots.php
@@ -18,7 +18,7 @@
  * Prepares sitemap links to add to the robots.txt file
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.5
  */
 class Robots extends AbstractBlock implements IdentityInterface
 {
@@ -70,7 +70,7 @@ public function __construct(
      * and adds links for this sitemap files into result data.
      *
      * @return string
-     * @since 100.2.0
+     * @since 100.1.5
      */
     protected function _toHtml()
     {
@@ -102,7 +102,7 @@ protected function _toHtml()
      *
      * @param int[] $storeIds
      * @return array
-     * @since 100.2.0
+     * @since 100.1.5
      */
     protected function getSitemapLinks(array $storeIds)
     {
@@ -128,7 +128,7 @@ protected function getSitemapLinks(array $storeIds)
      * Get unique page cache identities
      *
      * @return array
-     * @since 100.2.0
+     * @since 100.1.5
      */
     public function getIdentities()
     {
diff --git a/app/code/Magento/Sitemap/Helper/Data.php b/app/code/Magento/Sitemap/Helper/Data.php
index 44661bbef888e..118aeff28a14f 100644
--- a/app/code/Magento/Sitemap/Helper/Data.php
+++ b/app/code/Magento/Sitemap/Helper/Data.php
@@ -12,7 +12,7 @@
 use Magento\Store\Model\ScopeInterface;
 
 /**
- * @deprecated
+ * @deprecated 100.3.0
  */
 class Data extends \Magento\Framework\App\Helper\AbstractHelper
 {
@@ -70,7 +70,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      *
      * @param int $storeId
      * @return int
-     * @deprecated
+     * @deprecated 100.3.0
      * @see SitemapConfigReader::getMaximumLinesNumber()
      */
     public function getMaximumLinesNumber($storeId)
@@ -87,7 +87,7 @@ public function getMaximumLinesNumber($storeId)
      *
      * @param int $storeId
      * @return int
-     * @deprecated
+     * @deprecated 100.3.0
      * @see SitemapConfigReader::getMaximumFileSize()
      */
     public function getMaximumFileSize($storeId)
@@ -104,7 +104,7 @@ public function getMaximumFileSize($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see CategoryConfigReader::getChangeFrequency()
      */
     public function getCategoryChangefreq($storeId)
@@ -121,7 +121,7 @@ public function getCategoryChangefreq($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see ProductConfigReader::getChangeFrequency()
      */
     public function getProductChangefreq($storeId)
@@ -138,7 +138,7 @@ public function getProductChangefreq($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see CmsPageConfigReader::getChangeFrequency()
      */
     public function getPageChangefreq($storeId)
@@ -155,7 +155,7 @@ public function getPageChangefreq($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see CategoryConfigReader::getPriority()
      */
     public function getCategoryPriority($storeId)
@@ -172,7 +172,7 @@ public function getCategoryPriority($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see ProductConfigReader::getPriority()
      */
     public function getProductPriority($storeId)
@@ -189,7 +189,7 @@ public function getProductPriority($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see CmsPageConfigReader::getPriority()
      */
     public function getPagePriority($storeId)
@@ -206,7 +206,7 @@ public function getPagePriority($storeId)
      *
      * @param int $storeId
      * @return int
-     * @deprecated
+     * @deprecated 100.3.0
      * @see SitemapConfigReader::getEnableSubmissionRobots()
      */
     public function getEnableSubmissionRobots($storeId)
@@ -223,7 +223,7 @@ public function getEnableSubmissionRobots($storeId)
      *
      * @param int $storeId
      * @return string
-     * @deprecated
+     * @deprecated 100.3.0
      * @see SitemapConfigReader::getProductImageIncludePolicy()
      */
     public function getProductImageIncludePolicy($storeId)
@@ -239,7 +239,7 @@ public function getProductImageIncludePolicy($storeId)
      * Get list valid paths for generate a sitemap XML file
      *
      * @return string[]
-     * @deprecated
+     * @deprecated 100.3.0
      * @see SitemapConfigReader::getValidPaths()
      */
     public function getValidPaths()
diff --git a/app/code/Magento/Sitemap/Model/ItemProvider/ConfigReaderInterface.php b/app/code/Magento/Sitemap/Model/ItemProvider/ConfigReaderInterface.php
index 1e8b545728a04..6c8ff087aeb60 100644
--- a/app/code/Magento/Sitemap/Model/ItemProvider/ConfigReaderInterface.php
+++ b/app/code/Magento/Sitemap/Model/ItemProvider/ConfigReaderInterface.php
@@ -10,6 +10,7 @@
  * Item resolver config reader interface
  *
  * @api
+ * @since 100.3.0
  */
 interface ConfigReaderInterface
 {
@@ -18,6 +19,7 @@ interface ConfigReaderInterface
      *
      * @param int $storeId
      * @return string
+     * @since 100.3.0
      */
     public function getPriority($storeId);
 
@@ -26,6 +28,7 @@ public function getPriority($storeId);
      *
      * @param int $storeId
      * @return string
+     * @since 100.3.0
      */
     public function getChangeFrequency($storeId);
 }
diff --git a/app/code/Magento/Sitemap/Model/ItemProvider/ItemProviderInterface.php b/app/code/Magento/Sitemap/Model/ItemProvider/ItemProviderInterface.php
index 89ad2afdd01a2..da56f86b7237c 100644
--- a/app/code/Magento/Sitemap/Model/ItemProvider/ItemProviderInterface.php
+++ b/app/code/Magento/Sitemap/Model/ItemProvider/ItemProviderInterface.php
@@ -11,6 +11,7 @@
  * Sitemap item provider interface
  *
  * @api
+ * @since 100.3.0
  */
 interface ItemProviderInterface
 {
@@ -19,6 +20,7 @@ interface ItemProviderInterface
      *
      * @param int $storeId
      * @return SitemapItemInterface[]
+     * @since 100.3.0
      */
     public function getItems($storeId);
 }
diff --git a/app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php b/app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php
index 8b2154e6ee47a..dc15819b087b2 100644
--- a/app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php
+++ b/app/code/Magento/Sitemap/Model/ResourceModel/Catalog/Product.php
@@ -474,6 +474,7 @@ protected function _getMediaConfig()
      *
      * @param \Magento\Framework\DB\Select $select
      * @return \Magento\Framework\DB\Select
+     * @since 100.2.1
      */
     public function prepareSelectStatement(\Magento\Framework\DB\Select $select)
     {
diff --git a/app/code/Magento/Sitemap/Model/ResourceModel/Cms/Page.php b/app/code/Magento/Sitemap/Model/ResourceModel/Cms/Page.php
index 01addd0c19666..92cbcbd500e8a 100644
--- a/app/code/Magento/Sitemap/Model/ResourceModel/Cms/Page.php
+++ b/app/code/Magento/Sitemap/Model/ResourceModel/Cms/Page.php
@@ -38,7 +38,6 @@ class Page extends AbstractDb
 
     /**
      * @var GetUtilityPageIdentifiersInterface
-     * @since 100.2.0
      */
     private $getUtilityPageIdentifiers;
 
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index ea5659cf909ff..e58559101c2d2 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -160,7 +160,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel implements \Magento
     /**
      * @inheritdoc
      *
-     * @since 100.2.0
+     * @since 100.1.5
      */
     protected $_cacheTag = [Value::CACHE_TAG];
 
@@ -297,8 +297,9 @@ protected function _getStream()
      *
      * @param DataObject $sitemapItem
      * @return $this
-     * @deprecated 100.2.0
+     * @deprecated 100.3.0
      * @see ItemProviderInterface
+     * @since 100.2.0
      */
     public function addSitemapItem(DataObject $sitemapItem)
     {
@@ -311,8 +312,9 @@ public function addSitemapItem(DataObject $sitemapItem)
      * Collect all sitemap items
      *
      * @return void
-     * @deprecated 100.2.0
+     * @deprecated 100.3.0
      * @see ItemProviderInterface
+     * @since 100.2.0
      */
     public function collectSitemapItems()
     {
@@ -709,7 +711,7 @@ protected function _getUrl($url, $type = UrlInterface::URL_TYPE_LINK)
      *
      * @param string $url
      * @return string
-     * @deprecated No longer used, as we're generating product image URLs inside collection instead
+     * @deprecated 100.2.0 No longer used, as we're generating product image URLs inside collection instead
      * @see \Magento\Sitemap\Model\ResourceModel\Catalog\Product::_loadProductImages()
      */
     protected function _getMediaUrl($url)
@@ -793,7 +795,7 @@ public function getSitemapUrl($sitemapPath, $sitemapFileName)
      * Check is enabled submission to robots.txt
      *
      * @return bool
-     * @deprecated Because the robots.txt file is not generated anymore,
+     * @deprecated 100.1.5 Because the robots.txt file is not generated anymore,
      *             this method is not needed and will be removed in major release.
      */
     protected function _isEnabledSubmissionRobots()
@@ -807,7 +809,7 @@ protected function _isEnabledSubmissionRobots()
      *
      * @param string $sitemapFileName
      * @return void
-     * @deprecated Because the robots.txt file is not generated anymore,
+     * @deprecated 100.1.5 Because the robots.txt file is not generated anymore,
      *             this method is not needed and will be removed in major release.
      */
     protected function _addSitemapToRobotsTxt($sitemapFileName)
@@ -877,7 +879,7 @@ private function mapToSitemapItem()
      * Get unique page cache identities
      *
      * @return array
-     * @since 100.2.0
+     * @since 100.1.5
      */
     public function getIdentities()
     {
diff --git a/app/code/Magento/Sitemap/Model/SitemapConfigReaderInterface.php b/app/code/Magento/Sitemap/Model/SitemapConfigReaderInterface.php
index f094b8856ab14..f11b54c5842f8 100644
--- a/app/code/Magento/Sitemap/Model/SitemapConfigReaderInterface.php
+++ b/app/code/Magento/Sitemap/Model/SitemapConfigReaderInterface.php
@@ -10,6 +10,7 @@
  * Sitemap config reader interface
  *
  * @api
+ * @since 100.3.0
  */
 interface SitemapConfigReaderInterface
 {
@@ -18,6 +19,7 @@ interface SitemapConfigReaderInterface
      *
      * @param int $storeId
      * @return int
+     * @since 100.3.0
      */
     public function getEnableSubmissionRobots($storeId);
 
@@ -26,6 +28,7 @@ public function getEnableSubmissionRobots($storeId);
      *
      * @param int $storeId
      * @return int
+     * @since 100.3.0
      */
     public function getMaximumFileSize($storeId);
 
@@ -34,6 +37,7 @@ public function getMaximumFileSize($storeId);
      *
      * @param int $storeId
      * @return int
+     * @since 100.3.0
      */
     public function getMaximumLinesNumber($storeId);
 
@@ -42,6 +46,7 @@ public function getMaximumLinesNumber($storeId);
      *
      * @param int $storeId
      * @return string
+     * @since 100.3.0
      */
     public function getProductImageIncludePolicy($storeId);
 
@@ -49,6 +54,7 @@ public function getProductImageIncludePolicy($storeId);
      * Get list valid paths for generate a sitemap XML file
      *
      * @return string[]
+     * @since 100.3.0
      */
     public function getValidPaths();
 }
diff --git a/app/code/Magento/Sitemap/Model/SitemapItemInterface.php b/app/code/Magento/Sitemap/Model/SitemapItemInterface.php
index afd95768a2c84..94f19c5726b13 100644
--- a/app/code/Magento/Sitemap/Model/SitemapItemInterface.php
+++ b/app/code/Magento/Sitemap/Model/SitemapItemInterface.php
@@ -10,6 +10,7 @@
  * Representation of sitemap item
  *
  * @api
+ * @since 100.3.0
  */
 interface SitemapItemInterface
 {
@@ -18,6 +19,7 @@ interface SitemapItemInterface
      * Get url
      *
      * @return string
+     * @since 100.3.0
      */
     public function getUrl();
 
@@ -25,6 +27,7 @@ public function getUrl();
      * Get priority
      *
      * @return string
+     * @since 100.3.0
      */
     public function getPriority();
 
@@ -32,6 +35,7 @@ public function getPriority();
      * Get change frequency
      *
      * @return string
+     * @since 100.3.0
      */
     public function getChangeFrequency();
 
@@ -39,6 +43,7 @@ public function getChangeFrequency();
      * Get images
      *
      * @return array|null
+     * @since 100.3.0
      */
     public function getImages();
 
@@ -46,6 +51,7 @@ public function getImages();
      * Get last update date
      *
      * @return string|null
+     * @since 100.3.0
      */
     public function getUpdatedAt();
 }
diff --git a/app/code/Magento/Store/Api/Data/StoreInterface.php b/app/code/Magento/Store/Api/Data/StoreInterface.php
index 0f724a23fc096..527a7038e261a 100644
--- a/app/code/Magento/Store/Api/Data/StoreInterface.php
+++ b/app/code/Magento/Store/Api/Data/StoreInterface.php
@@ -69,11 +69,13 @@ public function getStoreGroupId();
     /**
      * @param int $isActive
      * @return $this
+     * @since 101.0.0
      */
     public function setIsActive($isActive);
 
     /**
      * @return int
+     * @since 101.0.0
      */
     public function getIsActive();
 
diff --git a/app/code/Magento/Store/Api/StoreResolverInterface.php b/app/code/Magento/Store/Api/StoreResolverInterface.php
index 7c32e321fa6c4..d03d68d213135 100644
--- a/app/code/Magento/Store/Api/StoreResolverInterface.php
+++ b/app/code/Magento/Store/Api/StoreResolverInterface.php
@@ -8,7 +8,7 @@
 /**
  * Store resolver interface
  *
- * @deprecated
+ * @deprecated 101.0.0
  * @see \Magento\Store\Model\StoreManagerInterface
  */
 interface StoreResolverInterface
diff --git a/app/code/Magento/Store/Controller/Store/SwitchAction.php b/app/code/Magento/Store/Controller/Store/SwitchAction.php
index 41acb1605ec7c..bea7dbbaaa5fb 100644
--- a/app/code/Magento/Store/Controller/Store/SwitchAction.php
+++ b/app/code/Magento/Store/Controller/Store/SwitchAction.php
@@ -36,7 +36,7 @@ class SwitchAction extends Action implements HttpGetActionInterface, HttpPostAct
 
     /**
      * @var HttpContext
-     * @deprecated
+     * @deprecated 100.2.5
      */
     protected $httpContext;
 
@@ -47,7 +47,7 @@ class SwitchAction extends Action implements HttpGetActionInterface, HttpPostAct
 
     /**
      * @var StoreManagerInterface
-     * @deprecated
+     * @deprecated 100.2.5
      */
     protected $storeManager;
 
diff --git a/app/code/Magento/Store/Model/Config/Importer/Processor/Create.php b/app/code/Magento/Store/Model/Config/Importer/Processor/Create.php
index 317e4bf43e42c..2cbd4aeb20d4d 100644
--- a/app/code/Magento/Store/Model/Config/Importer/Processor/Create.php
+++ b/app/code/Magento/Store/Model/Config/Importer/Processor/Create.php
@@ -51,7 +51,7 @@ class Create implements ProcessorInterface
     /**
      * The event manager.
      *
-     * @deprecated logic moved inside of "afterSave" method
+     * @deprecated 100.2.5 logic moved inside of "afterSave" method
      *             \Magento\Store\Model\Website::afterSave
      *             \Magento\Store\Model\Group::afterSave
      *             \Magento\Store\Model\Store::afterSave
diff --git a/app/code/Magento/Store/Model/Config/Placeholder.php b/app/code/Magento/Store/Model/Config/Placeholder.php
index be84c7f444c44..e04dc81c1359e 100644
--- a/app/code/Magento/Store/Model/Config/Placeholder.php
+++ b/app/code/Magento/Store/Model/Config/Placeholder.php
@@ -84,7 +84,7 @@ public function process(array $data = [])
     /**
      * Process array data recursively
      *
-     * @deprecated This method isn't used in process() implementation anymore
+     * @deprecated 101.0.4 This method isn't used in process() implementation anymore
      *
      * @param array &$data
      * @param string $path
@@ -178,7 +178,7 @@ protected function _getValue($path, array $data)
     /**
      * Set array value by path
      *
-     * @deprecated This method isn't used in process() implementation anymore
+     * @deprecated 101.0.4 This method isn't used in process() implementation anymore
      *
      * @param array &$container
      * @param string $path
diff --git a/app/code/Magento/Store/Model/Group.php b/app/code/Magento/Store/Model/Group.php
index 4cd7bc93d3334..7f1e71c422251 100644
--- a/app/code/Magento/Store/Model/Group.php
+++ b/app/code/Magento/Store/Model/Group.php
@@ -454,6 +454,7 @@ public function afterDelete()
 
     /**
      * @inheritdoc
+     * @since 100.2.5
      */
     public function afterSave()
     {
diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php
index 5187bb8776632..7bcb3282ba552 100644
--- a/app/code/Magento/Store/Model/Store.php
+++ b/app/code/Magento/Store/Model/Store.php
@@ -208,7 +208,7 @@ class Store extends AbstractExtensibleModel implements
      * Flag that shows that backend URLs are secure
      *
      * @var boolean|null
-     * @deprecated unused protected property
+     * @deprecated 101.0.0 unused protected property
      */
     protected $_isAdminSecure = null;
 
@@ -278,7 +278,7 @@ class Store extends AbstractExtensibleModel implements
 
     /**
      * @var \Magento\Framework\Session\SidResolverInterface
-     * @deprecated Not used anymore.
+     * @deprecated 101.0.5 Not used anymore.
      */
     protected $_sidResolver;
 
@@ -1134,6 +1134,7 @@ public function setStoreGroupId($storeGroupId)
 
     /**
      * @inheritdoc
+     * @since 101.0.0
      */
     public function getIsActive()
     {
@@ -1142,6 +1143,7 @@ public function getIsActive()
 
     /**
      * @inheritdoc
+     * @since 101.0.0
      */
     public function setIsActive($isActive)
     {
@@ -1389,6 +1391,7 @@ public function getStorePath()
 
     /**
      * @inheritdoc
+     * @since 100.1.0
      */
     public function getScopeType()
     {
@@ -1397,6 +1400,7 @@ public function getScopeType()
 
     /**
      * @inheritdoc
+     * @since 100.1.0
      */
     public function getScopeTypeName()
     {
diff --git a/app/code/Magento/Store/Model/StoreResolver.php b/app/code/Magento/Store/Model/StoreResolver.php
index aafdd15138981..2a950b699abe7 100644
--- a/app/code/Magento/Store/Model/StoreResolver.php
+++ b/app/code/Magento/Store/Model/StoreResolver.php
@@ -28,12 +28,12 @@ class StoreResolver implements \Magento\Store\Api\StoreResolverInterface
     protected $storeCookieManager;
 
     /**
-     * @deprecated
+     * @deprecated 101.0.0
      */
     protected $cache;
 
     /**
-     * @deprecated
+     * @deprecated 101.0.0
      */
     protected $readerList;
 
@@ -142,7 +142,7 @@ protected function getStoresData() : array
      * Read stores data. First element is allowed store ids, second is default store id
      *
      * @return array
-     * @deprecated
+     * @deprecated 101.0.0
      * @see \Magento\Store\Model\StoreResolver::getStoresData
      */
     protected function readStoresData() : array
diff --git a/app/code/Magento/Store/Model/System/Store.php b/app/code/Magento/Store/Model/System/Store.php
index d13781b8c146b..a56cdcc37dd54 100644
--- a/app/code/Magento/Store/Model/System/Store.php
+++ b/app/code/Magento/Store/Model/System/Store.php
@@ -229,6 +229,7 @@ public function getStoresStructure($isAll = false, $storeIds = [], $groupIds = [
      * @param array $groupIds
      * @param array $websiteIds
      * @return array Format: array(array('value' => '<value>', 'label' => '<label>'), ...)
+     * @since 101.1.0
      */
     public function getStoreOptionsTree($isAll = false, $storeIds = [], $groupIds = [], $websiteIds = []): array
     {
diff --git a/app/code/Magento/Store/Setup/Patch/Schema/InitializeStoresAndWebsites.php b/app/code/Magento/Store/Setup/Patch/Schema/InitializeStoresAndWebsites.php
index 05e46e04b5c96..dc1932bdd8943 100644
--- a/app/code/Magento/Store/Setup/Patch/Schema/InitializeStoresAndWebsites.php
+++ b/app/code/Magento/Store/Setup/Patch/Schema/InitializeStoresAndWebsites.php
@@ -142,7 +142,7 @@ public function apply()
     /**
      * Get default category.
      *
-     * @deprecated 100.1.0
+     * @deprecated 101.0.0
      * @return DefaultCategory
      */
     private function getDefaultCategory()
diff --git a/app/code/Magento/Swagger/Api/Data/SchemaTypeInterface.php b/app/code/Magento/Swagger/Api/Data/SchemaTypeInterface.php
index f1bc6fcc105dc..f7167f6494312 100644
--- a/app/code/Magento/Swagger/Api/Data/SchemaTypeInterface.php
+++ b/app/code/Magento/Swagger/Api/Data/SchemaTypeInterface.php
@@ -14,6 +14,7 @@
  * Swagger Schema Type.
  *
  * @api
+ * @since 100.2.4
  */
 interface SchemaTypeInterface extends ArgumentInterface
 {
@@ -21,6 +22,7 @@ interface SchemaTypeInterface extends ArgumentInterface
      * Retrieve the available types of Swagger schema.
      *
      * @return string
+     * @since 100.2.4
      */
     public function getCode();
 
@@ -29,6 +31,7 @@ public function getCode();
      *
      * @param  string|null $store
      * @return string
+     * @since 100.2.4
      */
     public function getSchemaUrlPath($store = null);
 }
diff --git a/app/code/Magento/Swagger/Block/Index.php b/app/code/Magento/Swagger/Block/Index.php
index 549495190ef34..8eecfbb24935d 100644
--- a/app/code/Magento/Swagger/Block/Index.php
+++ b/app/code/Magento/Swagger/Block/Index.php
@@ -17,6 +17,7 @@
  * @method SchemaTypeInterface[] getSchemaTypes()
  * @method bool hasSchemaTypes()
  * @method string getDefaultSchemaTypeCode()
+ * @since 100.2.1
  */
 class Index extends Template
 {
@@ -53,6 +54,7 @@ private function getSchemaType()
 
     /**
      * @return string|null
+     * @since 100.2.1
      */
     public function getSchemaUrl()
     {
diff --git a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php
index a2cae7f7b5a20..32df3daf4599b 100644
--- a/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php
+++ b/app/code/Magento/Swatches/Block/Product/Renderer/Configurable.php
@@ -81,7 +81,7 @@ class Configurable extends \Magento\ConfigurableProduct\Block\Product\View\Type\
     /**
      * Indicate if product has one or more Swatch attributes
      *
-     * @deprecated 100.1.5 unused
+     * @deprecated 100.1.0 unused
      *
      * @var boolean
      */
@@ -250,7 +250,7 @@ protected function getSwatchAttributesData()
     /**
      * Init isProductHasSwatchAttribute.
      *
-     * @deprecated 100.1.5 Method isProductHasSwatchAttribute() is used instead of this.
+     * @deprecated 100.2.0 Method isProductHasSwatchAttribute() is used instead of this.
      *
      * @codeCoverageIgnore
      * @return void
@@ -510,6 +510,7 @@ public function getIdentities()
      * Get Swatch image size config data.
      *
      * @return string
+     * @since 100.2.5
      */
     public function getJsonSwatchSizeConfig()
     {
diff --git a/app/code/Magento/Swatches/Block/Product/Renderer/Listing/Configurable.php b/app/code/Magento/Swatches/Block/Product/Renderer/Listing/Configurable.php
index 6e0a1e8d01360..e9b813003a09b 100644
--- a/app/code/Magento/Swatches/Block/Product/Renderer/Listing/Configurable.php
+++ b/app/code/Magento/Swatches/Block/Product/Renderer/Listing/Configurable.php
@@ -158,6 +158,7 @@ public function getJsonConfig()
      * Composes configuration for js price format
      *
      * @return string
+     * @since 100.2.3
      */
     public function getPriceFormatJson()
     {
@@ -168,6 +169,7 @@ public function getPriceFormatJson()
      * Composes configuration for js price
      *
      * @return string
+     * @since 100.2.3
      */
     public function getPricesJson()
     {
diff --git a/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php b/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php
index 9ad62265be21f..121d85ecc181d 100644
--- a/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php
+++ b/app/code/Magento/Swatches/Model/ResourceModel/Swatch.php
@@ -47,6 +47,7 @@ public function saveDefaultSwatchOption($id, $defaultValue)
      * @param array $optionIDs
      * @param int $type
      * @throws \Magento\Framework\Exception\LocalizedException
+     * @since 100.2.4
      */
     public function clearSwatchOptionByOptionIdAndType($optionIDs, $type = null)
     {
diff --git a/app/code/Magento/Tax/Block/Adminhtml/Items/Price/Renderer.php b/app/code/Magento/Tax/Block/Adminhtml/Items/Price/Renderer.php
index 376adba63db62..a1f538e0b0c70 100644
--- a/app/code/Magento/Tax/Block/Adminhtml/Items/Price/Renderer.php
+++ b/app/code/Magento/Tax/Block/Adminhtml/Items/Price/Renderer.php
@@ -22,7 +22,7 @@ class Renderer extends \Magento\Backend\Block\Template
 {
     /**
      * @var \Magento\Tax\Helper\Data
-     * @deprecated
+     * @deprecated 100.3.0
      * Marked as deprecated as it is unused.
      */
     protected $taxHelper;
diff --git a/app/code/Magento/Tax/Model/System/Message/Notifications.php b/app/code/Magento/Tax/Model/System/Message/Notifications.php
index ca59ab9eec3bf..163054d9e9394 100644
--- a/app/code/Magento/Tax/Model/System/Message/Notifications.php
+++ b/app/code/Magento/Tax/Model/System/Message/Notifications.php
@@ -16,7 +16,7 @@ class Notifications implements \Magento\Framework\Notification\MessageInterface
      * Store manager object
      *
      * @var \Magento\Store\Model\StoreManagerInterface
-     * @deprecated 100.1.3
+     * @deprecated 100.1.0
      */
     protected $storeManager;
 
@@ -36,7 +36,7 @@ class Notifications implements \Magento\Framework\Notification\MessageInterface
      * Stores with invalid display settings
      *
      * @var array
-     * @deprecated 100.1.3
+     * @deprecated 100.1.0
      * @see \Magento\Tax\Model\System\Message\Notification\RoundingErrors
      */
     protected $storesWithInvalidDisplaySettings;
@@ -45,7 +45,7 @@ class Notifications implements \Magento\Framework\Notification\MessageInterface
      * Websites with invalid discount settings
      *
      * @var array
-     * @deprecated 100.1.3
+     * @deprecated 100.1.0
      * @see \Magento\Tax\Model\System\Message\Notification\DiscountErrors
      */
     protected $storesWithInvalidDiscountSettings;
diff --git a/app/code/Magento/Theme/Block/Html/Footer.php b/app/code/Magento/Theme/Block/Html/Footer.php
index cdb350336f38f..7f9b9cf86a809 100644
--- a/app/code/Magento/Theme/Block/Html/Footer.php
+++ b/app/code/Magento/Theme/Block/Html/Footer.php
@@ -127,6 +127,7 @@ public function getIdentities()
      * Get block cache life time
      *
      * @return int
+     * @since 100.2.4
      */
     protected function getCacheLifetime()
     {
diff --git a/app/code/Magento/Theme/Block/Html/Header/Logo.php b/app/code/Magento/Theme/Block/Html/Header/Logo.php
index 626a771b4e309..792ee95de4995 100644
--- a/app/code/Magento/Theme/Block/Html/Header/Logo.php
+++ b/app/code/Magento/Theme/Block/Html/Header/Logo.php
@@ -43,7 +43,7 @@ public function __construct(
     /**
      * Check if current url is url for home page
      *
-     * @deprecated This function is no longer used. It was previously used by
+     * @deprecated 101.0.1 This function is no longer used. It was previously used by
      * Magento/Theme/view/frontend/templates/html/header/logo.phtml
      * to check if the logo should be clickable on the homepage.
      *
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/UploadJs.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/UploadJs.php
index fc396615e71e7..fb2ceb0a91fc9 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/UploadJs.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/UploadJs.php
@@ -11,7 +11,7 @@
 
 /**
  * Class UploadJs
- * @deprecated
+ * @deprecated 101.0.0
  */
 class UploadJs extends \Magento\Theme\Controller\Adminhtml\System\Design\Theme implements HttpGetActionInterface
 {
diff --git a/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php b/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php
index c4a7bb11a78f7..4ee6880c8190d 100644
--- a/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php
+++ b/app/code/Magento/Theme/Model/ResourceModel/Theme/Grid/Collection.php
@@ -7,7 +7,7 @@
 
 /**
  * Theme grid collection
- * @deprecated
+ * @deprecated 101.0.0
  * @see \Magento\Theme\Ui\Component\Theme\DataProvider\SearchResult
  */
 class Collection extends \Magento\Theme\Model\ResourceModel\Theme\Collection
diff --git a/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php b/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php
index 4b71fc6faba15..f0e668d10c3a6 100644
--- a/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php
+++ b/app/code/Magento/Theme/Ui/Component/Design/Config/SearchRobots/ResetButton.php
@@ -14,7 +14,7 @@
  * ResetButton field instance
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.9
  */
 class ResetButton extends Field
 {
@@ -66,7 +66,7 @@ private function getRobotsDefaultCustomInstructions()
      *
      * @return void
      * @throws \Magento\Framework\Exception\LocalizedException
-     * @since 100.2.0
+     * @since 100.1.9
      */
     public function prepare()
     {
diff --git a/app/code/Magento/Tinymce3/Model/Config/Gallery/Config.php b/app/code/Magento/Tinymce3/Model/Config/Gallery/Config.php
index e59aa2934e4ed..e525bf62cc3a3 100644
--- a/app/code/Magento/Tinymce3/Model/Config/Gallery/Config.php
+++ b/app/code/Magento/Tinymce3/Model/Config/Gallery/Config.php
@@ -12,7 +12,7 @@
 /**
  * Class Config adds information about required configurations to display media gallery of tinymce3 editor
  *
- * @deprecated use \Magento\Cms\Model\Wysiwyg\DefaultConfigProvider instead
+ * @deprecated 100.3.0 use \Magento\Cms\Model\Wysiwyg\DefaultConfigProvider instead
  */
 class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
 {
diff --git a/app/code/Magento/Tinymce3/Model/Config/Source/Wysiwyg/Editor.php b/app/code/Magento/Tinymce3/Model/Config/Source/Wysiwyg/Editor.php
index 00f1a82698381..96a3d42d15f36 100644
--- a/app/code/Magento/Tinymce3/Model/Config/Source/Wysiwyg/Editor.php
+++ b/app/code/Magento/Tinymce3/Model/Config/Source/Wysiwyg/Editor.php
@@ -9,7 +9,7 @@
 
 /**
  * Class Editor provides configuration value for TinyMCE3 editor
- * @deprecated use as configuration value tinymce4 path: mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter
+ * @deprecated 100.3.0 use as configuration value tinymce4 path: mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter
  */
 class Editor
 {
diff --git a/app/code/Magento/Tinymce3/Model/Config/Variable/Config.php b/app/code/Magento/Tinymce3/Model/Config/Variable/Config.php
index 2d016a5101abe..97aab0f38c4ee 100644
--- a/app/code/Magento/Tinymce3/Model/Config/Variable/Config.php
+++ b/app/code/Magento/Tinymce3/Model/Config/Variable/Config.php
@@ -9,7 +9,7 @@
 
 /**
  * Class Config adds variable plugin information required for tinymce3 editor
- * @deprecated use \Magento\Variable\Model\Variable\ConfigProvider instead
+ * @deprecated 100.3.0 use \Magento\Variable\Model\Variable\ConfigProvider instead
  */
 class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
 {
diff --git a/app/code/Magento/Tinymce3/Model/Config/Widget/Config.php b/app/code/Magento/Tinymce3/Model/Config/Widget/Config.php
index de548df4bc9f3..fcb8235495d47 100644
--- a/app/code/Magento/Tinymce3/Model/Config/Widget/Config.php
+++ b/app/code/Magento/Tinymce3/Model/Config/Widget/Config.php
@@ -9,7 +9,7 @@
 
 /**
  * Class Config adds widget plugin information required for tinymce3 editor
- * @deprecated use \Magento\Widget\Model\Widget\Config instead
+ * @deprecated 100.3.0 use \Magento\Widget\Model\Widget\Config instead
  */
 class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
 {
diff --git a/app/code/Magento/Tinymce3/Model/Config/Widget/PlaceholderImagesPool.php b/app/code/Magento/Tinymce3/Model/Config/Widget/PlaceholderImagesPool.php
index 1ab3de708dd26..7004beea70f1c 100644
--- a/app/code/Magento/Tinymce3/Model/Config/Widget/PlaceholderImagesPool.php
+++ b/app/code/Magento/Tinymce3/Model/Config/Widget/PlaceholderImagesPool.php
@@ -8,7 +8,7 @@
 
 /**
  * Class PlaceholderImages provide ability to override placeholder images for Widgets
- * @deprecated
+ * @deprecated 100.3.0
  */
 class PlaceholderImagesPool
 {
diff --git a/app/code/Magento/Tinymce3/Model/Config/Wysiwyg/Config.php b/app/code/Magento/Tinymce3/Model/Config/Wysiwyg/Config.php
index f3dc4c8591cbd..c70ad28a114df 100644
--- a/app/code/Magento/Tinymce3/Model/Config/Wysiwyg/Config.php
+++ b/app/code/Magento/Tinymce3/Model/Config/Wysiwyg/Config.php
@@ -9,7 +9,7 @@
 
 /**
  * Class Config adds information about required css files for tinymce3 editor
- * @deprecated use \Magento\Cms\Model\Wysiwyg\DefaultConfigProvider instead
+ * @deprecated 100.3.0 use \Magento\Cms\Model\Wysiwyg\DefaultConfigProvider instead
  */
 class Config implements \Magento\Framework\Data\Wysiwyg\ConfigProviderInterface
 {
diff --git a/app/code/Magento/Translation/Block/Js.php b/app/code/Magento/Translation/Block/Js.php
index db26feb8067ff..e193e675885c2 100644
--- a/app/code/Magento/Translation/Block/Js.php
+++ b/app/code/Magento/Translation/Block/Js.php
@@ -78,6 +78,7 @@ public function getTranslationFilePath()
      * Gets current version of the translation file.
      *
      * @return string
+     * @since 100.3.0
      */
     public function getTranslationFileVersion()
     {
diff --git a/app/code/Magento/Ui/Block/Wysiwyg/ActiveEditor.php b/app/code/Magento/Ui/Block/Wysiwyg/ActiveEditor.php
index b6077b7b1625d..462e4a4695ef0 100644
--- a/app/code/Magento/Ui/Block/Wysiwyg/ActiveEditor.php
+++ b/app/code/Magento/Ui/Block/Wysiwyg/ActiveEditor.php
@@ -13,6 +13,7 @@
  * ActiveEditor block
  *
  * @api
+ * @since 101.1.0
  */
 class ActiveEditor extends \Magento\Framework\View\Element\Template
 {
@@ -50,6 +51,7 @@ public function __construct(
      * Get active wysiwyg adapter path
      *
      * @return string
+     * @since 101.1.0
      */
     public function getWysiwygAdapterPath()
     {
diff --git a/app/code/Magento/Ui/Component/Form/Element/ColorPicker.php b/app/code/Magento/Ui/Component/Form/Element/ColorPicker.php
index b1925b4641d0b..23188363cc1d1 100644
--- a/app/code/Magento/Ui/Component/Form/Element/ColorPicker.php
+++ b/app/code/Magento/Ui/Component/Form/Element/ColorPicker.php
@@ -17,6 +17,7 @@
  * Prepares Color Picker UI component with mode and format
  *
  * @api
+ * @since 101.1.0
  */
 class ColorPicker extends AbstractElement
 {
@@ -54,6 +55,7 @@ public function __construct(
      * Get component name
      *
      * @return string
+     * @since 101.1.0
      */
     public function getComponentName(): string
     {
@@ -64,6 +66,7 @@ public function getComponentName(): string
      * Prepare component configuration
      *
      * @return void
+     * @since 101.1.0
      */
     public function prepare() : void
     {
diff --git a/app/code/Magento/Ui/Component/Listing/Columns/Date.php b/app/code/Magento/Ui/Component/Listing/Columns/Date.php
index f0b3ee4334d4f..d141499718a76 100644
--- a/app/code/Magento/Ui/Component/Listing/Columns/Date.php
+++ b/app/code/Magento/Ui/Component/Listing/Columns/Date.php
@@ -77,6 +77,7 @@ public function __construct(
 
     /**
      * @inheritdoc
+     * @since 101.1.1
      */
     public function prepare()
     {
diff --git a/app/code/Magento/Ui/Component/Wrapper/Block.php b/app/code/Magento/Ui/Component/Wrapper/Block.php
index a4e5bbf213062..0380a447e0cb9 100644
--- a/app/code/Magento/Ui/Component/Wrapper/Block.php
+++ b/app/code/Magento/Ui/Component/Wrapper/Block.php
@@ -11,7 +11,7 @@
 use Magento\Framework\View\Element\UiComponent\BlockWrapperInterface;
 
 /**
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 class Block extends AbstractComponent implements BlockWrapperInterface
 {
diff --git a/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php b/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php
index b45880c1ce726..803495439d65e 100644
--- a/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php
+++ b/app/code/Magento/Ui/Controller/Adminhtml/Bookmark/Save.php
@@ -54,7 +54,7 @@ class Save extends AbstractAction implements HttpPostActionInterface
 
     /**
      * @var DecoderInterface
-     * @deprecated
+     * @deprecated 101.1.0
      */
     protected $jsonDecoder;
 
diff --git a/app/code/Magento/Ui/DataProvider/AbstractDataProvider.php b/app/code/Magento/Ui/DataProvider/AbstractDataProvider.php
index abbc79859a038..6e4e488619e86 100644
--- a/app/code/Magento/Ui/DataProvider/AbstractDataProvider.php
+++ b/app/code/Magento/Ui/DataProvider/AbstractDataProvider.php
@@ -297,7 +297,7 @@ public function setConfigData($config)
      * Retrieve all ids from collection
      *
      * @return int[]
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getAllIds()
     {
diff --git a/app/code/Magento/Ui/DataProvider/Modifier/WysiwygModifierInterface.php b/app/code/Magento/Ui/DataProvider/Modifier/WysiwygModifierInterface.php
index 6336d8f8fb828..c2926a64a7a13 100644
--- a/app/code/Magento/Ui/DataProvider/Modifier/WysiwygModifierInterface.php
+++ b/app/code/Magento/Ui/DataProvider/Modifier/WysiwygModifierInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 101.1.0
  */
 interface WysiwygModifierInterface
 {
@@ -15,12 +16,14 @@ interface WysiwygModifierInterface
      * For example tmce3 or tmce4
      *
      * @return array
+     * @since 101.1.0
      */
     public function getEditorName();
 
     /**
      * @param array $meta
      * @return array
+     * @since 101.1.0
      */
     public function modifyMeta(array $meta);
 }
diff --git a/app/code/Magento/Ui/DataProvider/SearchResultFactory.php b/app/code/Magento/Ui/DataProvider/SearchResultFactory.php
index f2ed0677d4cd9..83d06c7cf5fc1 100644
--- a/app/code/Magento/Ui/DataProvider/SearchResultFactory.php
+++ b/app/code/Magento/Ui/DataProvider/SearchResultFactory.php
@@ -17,6 +17,7 @@
  * Allows to use Repositories (instead of Collections) in UI Components Data providers
  *
  * @api
+ * @since 101.1.0
  */
 class SearchResultFactory
 {
@@ -64,6 +65,7 @@ public function __construct(
      * @param SearchCriteriaInterface SearchCriteriaInterface $searchCriteria
      * @param string $idFieldName
      * @return SearchResultInterface
+     * @since 101.1.0
      */
     public function create(
         array $items,
diff --git a/app/code/Magento/Ui/Model/Bookmark.php b/app/code/Magento/Ui/Model/Bookmark.php
index b404e8d3b475f..2cb5666063067 100644
--- a/app/code/Magento/Ui/Model/Bookmark.php
+++ b/app/code/Magento/Ui/Model/Bookmark.php
@@ -23,7 +23,7 @@ class Bookmark extends AbstractExtensibleModel implements BookmarkInterface
 {
     /**
      * @var DecoderInterface
-     * @deprecated
+     * @deprecated 101.1.0
      */
     protected $jsonDecoder;
 
diff --git a/app/code/Magento/Ui/Model/Manager.php b/app/code/Magento/Ui/Model/Manager.php
index 1bacdc80a5c5e..357a41285e275 100644
--- a/app/code/Magento/Ui/Model/Manager.php
+++ b/app/code/Magento/Ui/Model/Manager.php
@@ -24,7 +24,7 @@
 /**
  * @inheritdoc
  *
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Manager implements ManagerInterface
diff --git a/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php b/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php
index 3e738baa404c8..f773daaaf50c4 100644
--- a/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php
+++ b/app/code/Magento/Ui/Model/ResourceModel/BookmarkRepository.php
@@ -162,7 +162,7 @@ public function deleteById($bookmarkId)
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
@@ -176,7 +176,7 @@ protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collecti
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php
index 5b333e2dc2d5c..3b77183c68398 100644
--- a/app/code/Magento/Ups/Model/Carrier.php
+++ b/app/code/Magento/Ups/Model/Carrier.php
@@ -1566,7 +1566,7 @@ protected function _formShipmentRequest(DataObject $request)
      *
      * @param Element $shipmentConfirmResponse
      * @return DataObject
-     * @deprecated New asynchronous methods introduced.
+     * @deprecated 100.3.3 New asynchronous methods introduced.
      * @see requestToShipment
      */
     protected function _sendShipmentAcceptRequest(Element $shipmentConfirmResponse)
@@ -1752,7 +1752,7 @@ private function requestShipments(array $quoteIds): array
      *
      * @param DataObject $request
      * @return DataObject
-     * @deprecated New asynchronous methods introduced.
+     * @deprecated 100.3.3 New asynchronous methods introduced.
      * @see requestToShipment
      */
     protected function _doShipmentRequest(DataObject $request)
diff --git a/app/code/Magento/UrlRewrite/Block/GridContainer.php b/app/code/Magento/UrlRewrite/Block/GridContainer.php
index 1a3a6e89fa854..066b76ed610e0 100644
--- a/app/code/Magento/UrlRewrite/Block/GridContainer.php
+++ b/app/code/Magento/UrlRewrite/Block/GridContainer.php
@@ -10,7 +10,7 @@
  * Url rewrite grid container class
  *
  * @api
- * @deprecated Moved to UI component implementation
+ * @deprecated 102.0.0 Moved to UI component implementation
  * @since 100.0.2
  */
 class GridContainer extends \Magento\Backend\Block\Widget\Grid\Container
diff --git a/app/code/Magento/UrlRewrite/Model/Exception/UrlAlreadyExistsException.php b/app/code/Magento/UrlRewrite/Model/Exception/UrlAlreadyExistsException.php
index 906ba1f625477..12620edf460d2 100644
--- a/app/code/Magento/UrlRewrite/Model/Exception/UrlAlreadyExistsException.php
+++ b/app/code/Magento/UrlRewrite/Model/Exception/UrlAlreadyExistsException.php
@@ -11,7 +11,7 @@
  * Exception for already created url.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class UrlAlreadyExistsException extends \Magento\Framework\Exception\AlreadyExistsException
 {
@@ -39,7 +39,7 @@ public function __construct(Phrase $phrase = null, \Exception $cause = null, $co
      * Get URLs
      *
      * @return array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getUrls()
     {
diff --git a/app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php b/app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php
index f187408d45a9d..9a62ed211d2b1 100644
--- a/app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php
+++ b/app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php
@@ -353,7 +353,7 @@ protected function insertMultiple($data): void
      *
      * @param      UrlRewrite[] $urls
      * @return     array
-     * @deprecated Not used anymore.
+     * @deprecated 101.0.3 Not used anymore.
      */
     protected function createFilterDataBasedOnUrls($urls): array
     {
diff --git a/app/code/Magento/User/Block/User/Edit.php b/app/code/Magento/User/Block/User/Edit.php
index 6e036cf20fa25..233fe1e0cfee5 100644
--- a/app/code/Magento/User/Block/User/Edit.php
+++ b/app/code/Magento/User/Block/User/Edit.php
@@ -87,7 +87,7 @@ protected function _construct()
      * - click "Delete User" at top left part of the page;
      *
      * @return \Magento\Framework\Phrase
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getDeleteMessage()
     {
@@ -100,7 +100,7 @@ public function getDeleteMessage()
      * Magento\User\Controller\Adminhtml\User\Delete
      *
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getDeleteUrl()
     {
@@ -113,7 +113,7 @@ public function getDeleteUrl()
      * to create a new user account OR to edit the previously created user account
      *
      * @return int
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getObjectId()
     {
diff --git a/app/code/Magento/User/Model/ResourceModel/User/Collection.php b/app/code/Magento/User/Model/ResourceModel/User/Collection.php
index 7683adae84365..422afb47f0a0e 100644
--- a/app/code/Magento/User/Model/ResourceModel/User/Collection.php
+++ b/app/code/Magento/User/Model/ResourceModel/User/Collection.php
@@ -27,6 +27,7 @@ protected function _construct()
      * Collection Init Select
      *
      * @return $this
+     * @since 101.1.0
      */
     protected function _initSelect()
     {
diff --git a/app/code/Magento/User/Model/User.php b/app/code/Magento/User/Model/User.php
index 00d2aa140a991..61af14d943615 100644
--- a/app/code/Magento/User/Model/User.php
+++ b/app/code/Magento/User/Model/User.php
@@ -120,12 +120,12 @@ class User extends AbstractModel implements StorageInterface, UserInterface
     protected $_encryptor;
 
     /**
-     * @deprecated
+     * @deprecated 101.1.0
      */
     protected $_transportBuilder;
 
     /**
-     * @deprecated
+     * @deprecated 101.1.0
      */
     protected $_storeManager;
 
@@ -145,7 +145,7 @@ class User extends AbstractModel implements StorageInterface, UserInterface
     private $notificator;
 
     /**
-     * @deprecated
+     * @deprecated 101.1.0
      */
     private $deploymentConfig;
 
@@ -451,7 +451,7 @@ public function roleUserExists()
      *
      * @return $this
      * @throws NotificationExceptionInterface
-     * @deprecated
+     * @deprecated 101.1.0
      * @see NotificatorInterface::sendForgotPassword()
      */
     public function sendPasswordResetConfirmationEmail()
@@ -529,7 +529,7 @@ protected function createChangesDescriptionString()
      * @throws NotificationExceptionInterface
      * @return $this
      * @since 100.1.0
-     * @deprecated
+     * @deprecated 101.1.0
      * @see NotificatorInterface::sendUpdated()
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
diff --git a/app/code/Magento/Usps/Model/Carrier.php b/app/code/Magento/Usps/Model/Carrier.php
index 1c8ff0ce9efa9..85e0cf2f6999a 100644
--- a/app/code/Magento/Usps/Model/Carrier.php
+++ b/app/code/Magento/Usps/Model/Carrier.php
@@ -1470,7 +1470,7 @@ protected function _filterServiceName($name)
      *
      * @param \Magento\Framework\DataObject $request
      * @return string
-     * @deprecated This method should not be used anymore.
+     * @deprecated 100.2.1 This method should not be used anymore.
      * @see \Magento\Usps\Model\Carrier::_doShipmentRequest method doc block.
      */
     protected function _formUsExpressShipmentRequest(\Magento\Framework\DataObject $request)
@@ -1647,7 +1647,7 @@ protected function _convertPoundOunces($weightInPounds)
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
-     * @deprecated Should not be used anymore.
+     * @deprecated 100.2.1 Should not be used anymore.
      * @see \Magento\Usps\Model\Carrier::_doShipmentRequest doc block.
      */
     protected function _formIntlShipmentRequest(\Magento\Framework\DataObject $request)
@@ -1902,7 +1902,7 @@ protected function _formIntlShipmentRequest(\Magento\Framework\DataObject $reque
      * @param \Magento\Framework\DataObject $request
      * @return \Magento\Framework\DataObject
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
-     * @deprecated This method must not be used anymore. Starting from 23.02.2018 USPS elimates API usage for
+     * @deprecated 100.2.1 This method must not be used anymore. Starting from 23.02.2018 USPS elimates API usage for
      * free shipping labels generating.
      */
     protected function _doShipmentRequest(\Magento\Framework\DataObject $request)
diff --git a/app/code/Magento/Vault/Api/Data/PaymentTokenFactoryInterface.php b/app/code/Magento/Vault/Api/Data/PaymentTokenFactoryInterface.php
index bb6343691f726..94d14dc14228c 100644
--- a/app/code/Magento/Vault/Api/Data/PaymentTokenFactoryInterface.php
+++ b/app/code/Magento/Vault/Api/Data/PaymentTokenFactoryInterface.php
@@ -9,7 +9,7 @@
 /**
  * Interface PaymentTokenFactoryInterface
  * @api
- * @since 100.3.0
+ * @since 101.0.0
  */
 interface PaymentTokenFactoryInterface
 {
@@ -24,7 +24,7 @@ interface PaymentTokenFactoryInterface
      * Create payment token entity
      * @param $type string|null
      * @return PaymentTokenInterface
-     * @since 100.3.0
+     * @since 101.0.0
      */
     public function create($type = null);
 }
diff --git a/app/code/Magento/Vault/Api/Data/PaymentTokenInterfaceFactory.php b/app/code/Magento/Vault/Api/Data/PaymentTokenInterfaceFactory.php
index 1a854ec814844..501e516841b6e 100644
--- a/app/code/Magento/Vault/Api/Data/PaymentTokenInterfaceFactory.php
+++ b/app/code/Magento/Vault/Api/Data/PaymentTokenInterfaceFactory.php
@@ -8,7 +8,7 @@
 
 /**
  * Interface PaymentTokenInterfaceFactory
- * @deprecated 100.3.0
+ * @deprecated 101.0.0
  * @see PaymentTokenFactoryInterface
  * @codingStandardsIgnoreStart
  */
diff --git a/app/code/Magento/Vault/Model/AbstractPaymentTokenFactory.php b/app/code/Magento/Vault/Model/AbstractPaymentTokenFactory.php
index d568a91c0421b..ab1e2ccd783d5 100644
--- a/app/code/Magento/Vault/Model/AbstractPaymentTokenFactory.php
+++ b/app/code/Magento/Vault/Model/AbstractPaymentTokenFactory.php
@@ -12,7 +12,7 @@
 
 /**
  * Class AbstractPaymentTokenFactory
- * @deprecated 100.3.0
+ * @deprecated 101.0.0
  * @see PaymentTokenFactoryInterface
  */
 abstract class AbstractPaymentTokenFactory implements PaymentTokenInterfaceFactory
diff --git a/app/code/Magento/Vault/Model/AccountPaymentTokenFactory.php b/app/code/Magento/Vault/Model/AccountPaymentTokenFactory.php
index 8fb060b41a24f..e9178ccaf50a8 100644
--- a/app/code/Magento/Vault/Model/AccountPaymentTokenFactory.php
+++ b/app/code/Magento/Vault/Model/AccountPaymentTokenFactory.php
@@ -7,7 +7,7 @@
 
 /**
  * Class AccountPaymentTokenFactory
- * @deprecated 100.3.0
+ * @deprecated 101.0.0
  * @see PaymentTokenFactoryInterface
  */
 class AccountPaymentTokenFactory extends AbstractPaymentTokenFactory
diff --git a/app/code/Magento/Vault/Model/CreditCardTokenFactory.php b/app/code/Magento/Vault/Model/CreditCardTokenFactory.php
index 735dc7c706f62..b0015e3f78316 100644
--- a/app/code/Magento/Vault/Model/CreditCardTokenFactory.php
+++ b/app/code/Magento/Vault/Model/CreditCardTokenFactory.php
@@ -7,7 +7,7 @@
 
 /**
  * Class CreditCardTokenFactory
- * @deprecated 100.3.0
+ * @deprecated 101.0.0
  * @see PaymentTokenFactoryInterface
  */
 class CreditCardTokenFactory extends AbstractPaymentTokenFactory
diff --git a/app/code/Magento/Vault/Model/PaymentTokenFactory.php b/app/code/Magento/Vault/Model/PaymentTokenFactory.php
index 6249fa4944a2c..cee838d622749 100644
--- a/app/code/Magento/Vault/Model/PaymentTokenFactory.php
+++ b/app/code/Magento/Vault/Model/PaymentTokenFactory.php
@@ -13,7 +13,7 @@
 /**
  * PaymentTokenFactory class
  * @api
- * @since 100.3.0
+ * @since 101.0.0
  */
 class PaymentTokenFactory implements PaymentTokenFactoryInterface
 {
@@ -42,7 +42,7 @@ public function __construct(ObjectManagerInterface $objectManager, array $tokenT
      * Create payment token entity
      * @param $type string
      * @return PaymentTokenInterface
-     * @since 100.3.0
+     * @since 101.0.0
      */
     public function create($type = null)
     {
diff --git a/app/code/Magento/Vault/Model/PaymentTokenRepository.php b/app/code/Magento/Vault/Model/PaymentTokenRepository.php
index 2ccd6181b9b81..46d7b6d2e80fe 100644
--- a/app/code/Magento/Vault/Model/PaymentTokenRepository.php
+++ b/app/code/Magento/Vault/Model/PaymentTokenRepository.php
@@ -158,7 +158,7 @@ public function save(Data\PaymentTokenInterface $paymentToken)
      * @param FilterGroup $filterGroup
      * @param Collection $collection
      * @return void
-     * @deprecated 100.3.0
+     * @deprecated 101.0.0
      * @throws \Magento\Framework\Exception\InputException
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collection $collection)
@@ -172,7 +172,7 @@ protected function addFilterGroupToCollection(FilterGroup $filterGroup, Collecti
     /**
      * Retrieve collection processor
      *
-     * @deprecated 100.3.0
+     * @deprecated 101.0.0
      * @return CollectionProcessorInterface
      */
     private function getCollectionProcessor()
diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
index 5e50cdee794ce..a01c5054f9b5f 100644
--- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
+++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
@@ -179,7 +179,7 @@ private function prepareOperationInput(string $serviceClass, array $methodMetada
      * @param string $serviceMethod
      * @param array $arguments
      * @return array
-     * @deprecated
+     * @deprecated 100.3.2
      * @see Handler::prepareOperationInput()
      */
     protected function _prepareRequestData($serviceClass, $serviceMethod, $arguments)
diff --git a/app/code/Magento/Webapi/Model/ConfigInterface.php b/app/code/Magento/Webapi/Model/ConfigInterface.php
index 338c18795595f..a0467fb840ccb 100644
--- a/app/code/Magento/Webapi/Model/ConfigInterface.php
+++ b/app/code/Magento/Webapi/Model/ConfigInterface.php
@@ -12,6 +12,7 @@
  * This class gives access to consolidated web API configuration from <Module_Name>/etc/webapi.xml files.
  *
  * @api
+ * @since 100.2.4
  */
 interface ConfigInterface
 {
@@ -19,6 +20,7 @@ interface ConfigInterface
      * Return services loaded from cache if enabled or from files merged previously
      *
      * @return array
+     * @since 100.2.4
      */
     public function getServices();
 }
diff --git a/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php b/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php
index a0499087c35b9..febe7cba0b7fc 100644
--- a/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php
+++ b/app/code/Magento/WebapiAsync/Model/BulkServiceConfig.php
@@ -15,6 +15,7 @@
 
 /**
  * @api
+ * @since 100.2.0
  */
 class BulkServiceConfig implements \Magento\Webapi\Model\ConfigInterface
 {
@@ -58,6 +59,7 @@ public function __construct(
      * Return services loaded from cache if enabled or from files merged previously
      *
      * @return array
+     * @since 100.2.0
      */
     public function getServices()
     {
diff --git a/app/code/Magento/WebapiAsync/Model/ServiceConfig.php b/app/code/Magento/WebapiAsync/Model/ServiceConfig.php
index 4c085935090bd..8387b2dc53118 100644
--- a/app/code/Magento/WebapiAsync/Model/ServiceConfig.php
+++ b/app/code/Magento/WebapiAsync/Model/ServiceConfig.php
@@ -17,6 +17,7 @@
  * This class gives access to consolidated web API configuration from <Module_Name>/etc/webapi_async.xml files.
  *
  * @api
+ * @since 100.2.0
  */
 class ServiceConfig
 {
@@ -63,6 +64,7 @@ public function __construct(
      * Return services loaded from cache if enabled or from files merged previously
      *
      * @return array
+     * @since 100.2.0
      */
     public function getServices()
     {
diff --git a/app/code/Magento/Widget/Controller/Adminhtml/Widget/LoadOptions.php b/app/code/Magento/Widget/Controller/Adminhtml/Widget/LoadOptions.php
index 03d9d10311382..fe96cbecb425a 100644
--- a/app/code/Magento/Widget/Controller/Adminhtml/Widget/LoadOptions.php
+++ b/app/code/Magento/Widget/Controller/Adminhtml/Widget/LoadOptions.php
@@ -60,7 +60,7 @@ public function execute()
 
     /**
      * @return \Magento\Widget\Helper\Conditions
-     * @deprecated 100.1.4
+     * @deprecated 101.0.0
      */
     private function getConditionsHelper()
     {
diff --git a/app/code/Magento/Widget/Model/ResourceModel/Widget.php b/app/code/Magento/Widget/Model/ResourceModel/Widget.php
index 8d78bb5a56800..4ed77b48f297d 100644
--- a/app/code/Magento/Widget/Model/ResourceModel/Widget.php
+++ b/app/code/Magento/Widget/Model/ResourceModel/Widget.php
@@ -9,7 +9,7 @@
 /**
  * Resource model for widget.
  *
- * @deprecated 100.2.0 Data from this table was moved to xml(widget.xml).
+ * @deprecated 101.0.0 Data from this table was moved to xml(widget.xml).
  */
 class Widget extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
 {
diff --git a/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php b/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php
index 8e5d8d63840fb..0532c57f0306d 100644
--- a/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php
+++ b/app/code/Magento/Widget/Model/ResourceModel/Widget/Instance/Options/ThemeId.php
@@ -9,7 +9,7 @@
 /**
  * Widget Instance Theme Id Options
  *
- * @deprecated 100.2.0 created new class that correctly loads theme options and whose name follows naming convention
+ * @deprecated 100.1.7 created new class that correctly loads theme options and whose name follows naming convention
  * @see \Magento\Widget\Model\ResourceModel\Widget\Instance\Options\Themes
  */
 class ThemeId implements \Magento\Framework\Option\ArrayInterface
diff --git a/app/code/Magento/Widget/Model/Widget.php b/app/code/Magento/Widget/Model/Widget.php
index d07e84186b2c9..195c3f397ff18 100644
--- a/app/code/Magento/Widget/Model/Widget.php
+++ b/app/code/Magento/Widget/Model/Widget.php
@@ -88,7 +88,7 @@ public function __construct(
      *
      * @return \Magento\Framework\Math\Random
      *
-     * @deprecated 100.1.0
+     * @deprecated 100.0.10
      */
     private function getMathRandom()
     {
@@ -127,7 +127,7 @@ public function getWidgetByClassType($type)
      * @param string $type Widget type
      * @return null|\Magento\Framework\Simplexml\Element
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function getConfigAsXml($type)
     {
diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php
index 4ca126e659e09..7f4e3ae8610ba 100644
--- a/app/code/Magento/Widget/Model/Widget/Instance.php
+++ b/app/code/Magento/Widget/Model/Widget/Instance.php
@@ -99,11 +99,13 @@ class Instance extends \Magento\Framework\Model\AbstractModel
 
     /**
      * @var \Magento\Catalog\Model\Product\Type
+     * @since 101.0.4
      */
     protected $_productType;
 
     /**
      * @var \Magento\Widget\Model\Config\Reader
+     * @since 101.0.4
      */
     protected $_reader;
 
diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php
index 981a0da1d241f..5f4a7c8f3814b 100644
--- a/app/code/Magento/Wishlist/Block/AbstractBlock.php
+++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php
@@ -231,7 +231,7 @@ public function hasDescription($item)
      * Retrieve formatted Date
      *
      * @param string $date
-     * @deprecated
+     * @deprecated 101.1.1
      * @return string
      */
     public function getFormatedDate($date)
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php
index d02f2229401c1..bc94f53a7625a 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php
@@ -31,6 +31,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
 
     /**
      * @var  \Magento\Wishlist\Model\ResourceModel\Item\Collection
+     * @since 101.1.1
      */
     protected $_collection;
 
@@ -101,6 +102,7 @@ private function paginateCollection()
      * Retrieve Wishlist Product Items collection
      *
      * @return \Magento\Wishlist\Model\ResourceModel\Item\Collection
+     * @since 101.1.1
      */
     public function getWishlistItems()
     {
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php
index 40882ae00dae1..db92a10907d39 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Actions.php
@@ -13,7 +13,7 @@
  * Model for item column in customer wishlist.
  *
  * @api
- * @deprecated
+ * @deprecated 101.1.2
  * @since 100.0.2
  */
 class Actions extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php
index 53f67626e956d..57d182dee4e1c 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Comment.php
@@ -13,7 +13,7 @@
  * Wishlist block customer item cart column.
  *
  * @api
- * @deprecated
+ * @deprecated 101.1.2
  * @since 100.0.2
  */
 class Comment extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php
index c4c786961694b..f41146051ae96 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Edit.php
@@ -13,7 +13,7 @@
  * Edit item in customer wishlist table.
  *
  * @api
- * @deprecated
+ * @deprecated 101.1.2
  * @since 100.0.2
  */
 class Edit extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Image.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Image.php
index 5595d189b15eb..c578e9d1c5d22 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Image.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Image.php
@@ -53,6 +53,7 @@ public function __construct(
      * Identify the product from which thumbnail should be taken.
      *
      * @return \Magento\Catalog\Model\Product
+     * @since 101.0.5
      */
     public function getProductForThumbnail(\Magento\Wishlist\Model\Item $item) : \Magento\Catalog\Model\Product
     {
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php
index b7eaf53fc23b5..092ede9ceb016 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Info.php
@@ -13,7 +13,7 @@
  * Wishlist block customer item cart column.
  *
  * @api
- * @deprecated
+ * @deprecated 101.1.2
  * @since 100.0.2
  */
 class Info extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php
index 09f5014edead6..472cd3cc70f09 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Column/Remove.php
@@ -13,7 +13,7 @@
  * Delete item column in customer wishlist table
  *
  * @api
- * @deprecated
+ * @deprecated 101.1.2
  * @since 100.0.2
  */
 class Remove extends \Magento\Wishlist\Block\Customer\Wishlist\Item\Column
diff --git a/app/code/Magento/Wishlist/Block/Link.php b/app/code/Magento/Wishlist/Block/Link.php
index 2d78852f0fd32..c410a1254edee 100644
--- a/app/code/Magento/Wishlist/Block/Link.php
+++ b/app/code/Magento/Wishlist/Block/Link.php
@@ -75,7 +75,7 @@ public function getLabel()
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSortOrder()
     {
diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Items.php b/app/code/Magento/Wishlist/Block/Share/Email/Items.php
index 130c7cb136afb..077f8ce3c4930 100644
--- a/app/code/Magento/Wishlist/Block/Share/Email/Items.php
+++ b/app/code/Magento/Wishlist/Block/Share/Email/Items.php
@@ -59,6 +59,7 @@ public function __construct(
      * @param Item $item
      *
      * @return Product
+     * @since 101.2.0
      */
     public function getProductForThumbnail(Item $item): Product
     {
diff --git a/app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php b/app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php
index 61d444f786ca8..92592e8417c64 100644
--- a/app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php
+++ b/app/code/Magento/Wishlist/Model/ResourceModel/Item/Collection.php
@@ -352,6 +352,7 @@ protected function _assignProducts()
 
     /**
      * @inheritdoc
+     * @since 101.1.3
      */
     protected function _renderFiltersBefore()
     {
diff --git a/app/code/Magento/Wishlist/Observer/AddToCart.php b/app/code/Magento/Wishlist/Observer/AddToCart.php
index 1ab24d87efbf7..e31a8993670c6 100644
--- a/app/code/Magento/Wishlist/Observer/AddToCart.php
+++ b/app/code/Magento/Wishlist/Observer/AddToCart.php
@@ -15,7 +15,7 @@
 
 /**
  * Class AddToCart
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @package Magento\Wishlist\Observer
  */
 class AddToCart implements ObserverInterface
diff --git a/lib/internal/Magento/Framework/Acl.php b/lib/internal/Magento/Framework/Acl.php
index 86b28f7e2ceb4..8c80bf94e3f2a 100644
--- a/lib/internal/Magento/Framework/Acl.php
+++ b/lib/internal/Magento/Framework/Acl.php
@@ -9,6 +9,7 @@
  * ACL. Can be queried for relations between roles and resources.
  *
  * @api
+ * @since 100.0.2
  */
 class Acl extends \Zend_Acl
 {
diff --git a/lib/internal/Magento/Framework/Acl/AclResource.php b/lib/internal/Magento/Framework/Acl/AclResource.php
index 585b4b5d8514b..47a85a069329e 100644
--- a/lib/internal/Magento/Framework/Acl/AclResource.php
+++ b/lib/internal/Magento/Framework/Acl/AclResource.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class AclResource extends \Zend_Acl_Resource
 {
diff --git a/lib/internal/Magento/Framework/Acl/AclResource/ProviderInterface.php b/lib/internal/Magento/Framework/Acl/AclResource/ProviderInterface.php
index 34f85f3641ccd..c11fb7fcd56ed 100644
--- a/lib/internal/Magento/Framework/Acl/AclResource/ProviderInterface.php
+++ b/lib/internal/Magento/Framework/Acl/AclResource/ProviderInterface.php
@@ -9,6 +9,7 @@
  * Acl resources provider interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/Acl/Builder.php b/lib/internal/Magento/Framework/Acl/Builder.php
index 50e4f0b7b5ca9..03adaca0589ce 100644
--- a/lib/internal/Magento/Framework/Acl/Builder.php
+++ b/lib/internal/Magento/Framework/Acl/Builder.php
@@ -11,6 +11,7 @@
  * On consequent requests, ACL object is deserialized from cache.
  *
  * @api
+ * @since 100.0.2
  */
 class Builder
 {
@@ -77,7 +78,7 @@ public function getAcl()
      * Remove cached ACL instance.
      *
      * @return $this
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function resetRuntimeAcl()
     {
diff --git a/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php b/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php
index bd6ce6d2c2095..e0a1617fd226d 100644
--- a/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php
+++ b/lib/internal/Magento/Framework/Acl/Data/CacheInterface.php
@@ -10,7 +10,7 @@
  * Interface for caching ACL data
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface CacheInterface extends \Magento\Framework\Cache\FrontendInterface
 {
diff --git a/lib/internal/Magento/Framework/Acl/LoaderInterface.php b/lib/internal/Magento/Framework/Acl/LoaderInterface.php
index 920186fc2121a..a61fcbdc24255 100644
--- a/lib/internal/Magento/Framework/Acl/LoaderInterface.php
+++ b/lib/internal/Magento/Framework/Acl/LoaderInterface.php
@@ -12,6 +12,7 @@
  * with data (roles/rules/resources) persisted in external storage.
  *
  * @api
+ * @since 100.0.2
  */
 interface LoaderInterface
 {
diff --git a/lib/internal/Magento/Framework/Acl/RootResource.php b/lib/internal/Magento/Framework/Acl/RootResource.php
index 326416c346563..9247784e94414 100644
--- a/lib/internal/Magento/Framework/Acl/RootResource.php
+++ b/lib/internal/Magento/Framework/Acl/RootResource.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class RootResource
 {
diff --git a/lib/internal/Magento/Framework/Amqp/Config.php b/lib/internal/Magento/Framework/Amqp/Config.php
index 684c5cd38b1e4..44e033f4a7b80 100644
--- a/lib/internal/Magento/Framework/Amqp/Config.php
+++ b/lib/internal/Magento/Framework/Amqp/Config.php
@@ -16,7 +16,7 @@
  * Reads the Amqp config in the deployed environment configuration
  *
  * @api
- * @since 100.0.0
+ * @since 103.0.0
  */
 class Config
 {
@@ -96,7 +96,6 @@ class Config
      * @param DeploymentConfig $config
      * @param string $connectionName
      * @param ConnectionFactory|null $connectionFactory
-     * @since 100.0.0
      */
     public function __construct(
         DeploymentConfig $config,
@@ -113,7 +112,7 @@ public function __construct(
      * Destructor
      *
      * @return void
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function __destruct()
     {
@@ -126,7 +125,7 @@ public function __destruct()
      * @param string $key
      * @return string
      * @throws \LogicException
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function getValue($key)
     {
@@ -162,7 +161,7 @@ private function createConnection(): AbstractConnection
      *
      * @return AMQPChannel
      * @throws \LogicException
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function getChannel()
     {
diff --git a/lib/internal/Magento/Framework/Amqp/ConnectionTypeResolver.php b/lib/internal/Magento/Framework/Amqp/ConnectionTypeResolver.php
index 9b600278144f0..54fa80f59c292 100644
--- a/lib/internal/Magento/Framework/Amqp/ConnectionTypeResolver.php
+++ b/lib/internal/Magento/Framework/Amqp/ConnectionTypeResolver.php
@@ -12,7 +12,7 @@
  * Amqp connection type resolver.
  *
  * @api
- * @since 100.0.0
+ * @since 103.0.0
  */
 class ConnectionTypeResolver implements ConnectionTypeResolverInterface
 {
@@ -27,7 +27,6 @@ class ConnectionTypeResolver implements ConnectionTypeResolverInterface
      * Initialize dependencies.
      *
      * @param DeploymentConfig $deploymentConfig
-     * @since 100.0.0
      */
     public function __construct(DeploymentConfig $deploymentConfig)
     {
@@ -42,7 +41,7 @@ public function __construct(DeploymentConfig $deploymentConfig)
 
     /**
      * {@inheritdoc}
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function getConnectionType($connectionName)
     {
diff --git a/lib/internal/Magento/Framework/Amqp/Exchange.php b/lib/internal/Magento/Framework/Amqp/Exchange.php
index e57fa09b83d1b..56fb25debc9bc 100644
--- a/lib/internal/Magento/Framework/Amqp/Exchange.php
+++ b/lib/internal/Magento/Framework/Amqp/Exchange.php
@@ -18,7 +18,7 @@
  * Class message exchange.
  *
  * @api
- * @since 100.0.0
+ * @since 103.0.0
  */
 class Exchange implements ExchangeInterface
 {
@@ -57,7 +57,6 @@ class Exchange implements ExchangeInterface
      * @param ResponseQueueNameBuilder $responseQueueNameBuilder
      * @param CommunicationConfigInterface $communicationConfig
      * @param int $rpcConnectionTimeout
-     * @since 100.0.0
      */
     public function __construct(
         Config $amqpConfig,
@@ -75,7 +74,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function enqueue($topic, EnvelopeInterface $envelope)
     {
diff --git a/lib/internal/Magento/Framework/Amqp/ExchangeFactory.php b/lib/internal/Magento/Framework/Amqp/ExchangeFactory.php
index 5291b3ab59794..1474d45dd5363 100644
--- a/lib/internal/Magento/Framework/Amqp/ExchangeFactory.php
+++ b/lib/internal/Magento/Framework/Amqp/ExchangeFactory.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\Amqp\Exchange
  *
  * @api
- * @since 100.0.0
+ * @since 103.0.0
  */
 class ExchangeFactory implements \Magento\Framework\MessageQueue\ExchangeFactoryInterface
 {
@@ -38,7 +38,6 @@ class ExchangeFactory implements \Magento\Framework\MessageQueue\ExchangeFactory
      * @param \Magento\Framework\ObjectManagerInterface $objectManager
      * @param ConfigPool $configPool
      * @param string $instanceName
-     * @since 100.0.0
      */
     public function __construct(
         \Magento\Framework\ObjectManagerInterface $objectManager,
@@ -52,7 +51,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function create($connectionName, array $data = [])
     {
diff --git a/lib/internal/Magento/Framework/Amqp/Queue.php b/lib/internal/Magento/Framework/Amqp/Queue.php
index ff5bae5017fb9..84689c294af0c 100644
--- a/lib/internal/Magento/Framework/Amqp/Queue.php
+++ b/lib/internal/Magento/Framework/Amqp/Queue.php
@@ -17,7 +17,7 @@
  * Class Queue
  *
  * @api
- * @since 100.0.0
+ * @since 103.0.0
  */
 class Queue implements QueueInterface
 {
@@ -48,7 +48,6 @@ class Queue implements QueueInterface
      * @param EnvelopeFactory $envelopeFactory
      * @param string $queueName
      * @param LoggerInterface $logger
-     * @since 100.0.0
      */
     public function __construct(
         Config $amqpConfig,
@@ -64,7 +63,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function dequeue()
     {
@@ -99,7 +98,7 @@ public function dequeue()
 
     /**
      * @inheritdoc
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function acknowledge(EnvelopeInterface $envelope)
     {
@@ -120,7 +119,7 @@ public function acknowledge(EnvelopeInterface $envelope)
 
     /**
      * @inheritdoc
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function subscribe($callback)
     {
@@ -154,7 +153,7 @@ public function subscribe($callback)
 
     /**
      * @inheritdoc
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function reject(EnvelopeInterface $envelope, $requeue = true, $rejectionMessage = null)
     {
@@ -173,7 +172,7 @@ public function reject(EnvelopeInterface $envelope, $requeue = true, $rejectionM
 
     /**
      * @inheritdoc
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function push(EnvelopeInterface $envelope)
     {
diff --git a/lib/internal/Magento/Framework/Amqp/QueueFactory.php b/lib/internal/Magento/Framework/Amqp/QueueFactory.php
index 9f1635a87977b..9fe8a3551823a 100644
--- a/lib/internal/Magento/Framework/Amqp/QueueFactory.php
+++ b/lib/internal/Magento/Framework/Amqp/QueueFactory.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\Amqp\Queue
  *
  * @api
- * @since 100.0.0
+ * @since 103.0.0
  */
 class QueueFactory implements \Magento\Framework\MessageQueue\QueueFactoryInterface
 {
@@ -38,7 +38,6 @@ class QueueFactory implements \Magento\Framework\MessageQueue\QueueFactoryInterf
      * @param \Magento\Framework\ObjectManagerInterface $objectManager
      * @param ConfigPool $configPool
      * @param string $instanceName
-     * @since 100.0.0
      */
     public function __construct(
         \Magento\Framework\ObjectManagerInterface $objectManager,
@@ -52,7 +51,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 100.0.0
+     * @since 103.0.0
      */
     public function create($queueName, $connectionName)
     {
diff --git a/lib/internal/Magento/Framework/Amqp/Topology/ArgumentProcessor.php b/lib/internal/Magento/Framework/Amqp/Topology/ArgumentProcessor.php
index caa5db4e7ef5c..d5aaf1769eae4 100644
--- a/lib/internal/Magento/Framework/Amqp/Topology/ArgumentProcessor.php
+++ b/lib/internal/Magento/Framework/Amqp/Topology/ArgumentProcessor.php
@@ -6,7 +6,7 @@
 namespace Magento\Framework\Amqp\Topology;
 
 /**
- * @deprecated 100.0.0
+ * @deprecated 103.0.0
  * see: https://github.com/php-amqplib/php-amqplib/issues/405
  */
 trait ArgumentProcessor
diff --git a/lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php b/lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php
index 902709bbedcd3..ae92ee9d934f0 100644
--- a/lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php
+++ b/lib/internal/Magento/Framework/Api/AbstractExtensibleObject.php
@@ -13,8 +13,9 @@
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
- * @deprecated
+ * @deprecated 103.0.0
  * @see \Magento\Framework\Model\AbstractExtensibleModel
+ * @since 100.0.2
  */
 abstract class AbstractExtensibleObject extends AbstractSimpleObject implements CustomAttributesDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php b/lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php
index 029a78bf0ddf7..35f115634ccda 100644
--- a/lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php
+++ b/lib/internal/Magento/Framework/Api/AbstractSimpleObjectBuilder.php
@@ -9,7 +9,7 @@
 
 /**
  * Base Builder Class for simple data Objects
- * @deprecated Every builder should have their own implementation of \Magento\Framework\Api\SimpleBuilderInterface
+ * @deprecated 103.0.0 Every builder should have their own implementation of \Magento\Framework\Api\SimpleBuilderInterface
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  */
 abstract class AbstractSimpleObjectBuilder implements SimpleBuilderInterface
diff --git a/lib/internal/Magento/Framework/Api/AttributeInterface.php b/lib/internal/Magento/Framework/Api/AttributeInterface.php
index d208d861d4d2e..5324ddb499fd5 100644
--- a/lib/internal/Magento/Framework/Api/AttributeInterface.php
+++ b/lib/internal/Magento/Framework/Api/AttributeInterface.php
@@ -10,6 +10,7 @@
  * Interface for custom attribute value.
  *
  * @api
+ * @since 100.0.2
  */
 interface AttributeInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/CustomAttributesDataInterface.php b/lib/internal/Magento/Framework/Api/CustomAttributesDataInterface.php
index 3019f84abb15a..d6567db27fc10 100644
--- a/lib/internal/Magento/Framework/Api/CustomAttributesDataInterface.php
+++ b/lib/internal/Magento/Framework/Api/CustomAttributesDataInterface.php
@@ -10,6 +10,7 @@
  * Interface for entities which can be extended with custom attributes.
  *
  * @api
+ * @since 100.0.2
  */
 interface CustomAttributesDataInterface extends ExtensibleDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Data/ImageContentInterface.php b/lib/internal/Magento/Framework/Api/Data/ImageContentInterface.php
index abd770dd12f14..06467be9522cc 100644
--- a/lib/internal/Magento/Framework/Api/Data/ImageContentInterface.php
+++ b/lib/internal/Magento/Framework/Api/Data/ImageContentInterface.php
@@ -10,6 +10,7 @@
  * Image Content data interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ImageContentInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Data/VideoContentInterface.php b/lib/internal/Magento/Framework/Api/Data/VideoContentInterface.php
index 7b1ea05cf939c..6c8f796ee8655 100644
--- a/lib/internal/Magento/Framework/Api/Data/VideoContentInterface.php
+++ b/lib/internal/Magento/Framework/Api/Data/VideoContentInterface.php
@@ -12,6 +12,7 @@
  * Video Content data interface
  *
  * @api
+ * @since 100.0.2
  */
 interface VideoContentInterface extends ExtensibleDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php b/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php
index affe86992f273..38cc075559804 100644
--- a/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php
+++ b/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php
@@ -10,6 +10,7 @@
  * Interface for entities which can be extended with extension attributes.
  *
  * @api
+ * @since 100.0.2
  */
 interface ExtensibleDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinDataInterface.php b/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinDataInterface.php
index a0a2f649900fb..3bcd0c2fec29d 100644
--- a/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinDataInterface.php
+++ b/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinDataInterface.php
@@ -10,6 +10,7 @@
  * Interface of data holder for extension attribute joins.
  *
  * @api
+ * @since 100.0.2
  */
 interface JoinDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessorInterface.php b/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessorInterface.php
index 1eaeaef24f419..7fb44aa337cc7 100644
--- a/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessorInterface.php
+++ b/lib/internal/Magento/Framework/Api/ExtensionAttribute/JoinProcessorInterface.php
@@ -12,6 +12,7 @@
  * Join processor allows to join extension attributes during collections loading.
  *
  * @api
+ * @since 100.0.2
  */
 interface JoinProcessorInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/ExtensionAttributesInterface.php b/lib/internal/Magento/Framework/Api/ExtensionAttributesInterface.php
index 5578ed0137a62..b808fb5a22a38 100644
--- a/lib/internal/Magento/Framework/Api/ExtensionAttributesInterface.php
+++ b/lib/internal/Magento/Framework/Api/ExtensionAttributesInterface.php
@@ -10,6 +10,7 @@
  * Marker interface for all extension attributes interfaces.
  *
  * @api
+ * @since 100.0.2
  */
 interface ExtensionAttributesInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Filter.php b/lib/internal/Magento/Framework/Api/Filter.php
index 03af29a00ad67..7e99a0038bd78 100644
--- a/lib/internal/Magento/Framework/Api/Filter.php
+++ b/lib/internal/Magento/Framework/Api/Filter.php
@@ -13,6 +13,7 @@
  *
  * @api
  * @codeCoverageIgnore
+ * @since 100.0.2
  */
 class Filter extends AbstractSimpleObject
 {
diff --git a/lib/internal/Magento/Framework/Api/FilterBuilder.php b/lib/internal/Magento/Framework/Api/FilterBuilder.php
index 056cc07657deb..c1e7fee39390a 100644
--- a/lib/internal/Magento/Framework/Api/FilterBuilder.php
+++ b/lib/internal/Magento/Framework/Api/FilterBuilder.php
@@ -11,6 +11,7 @@
  *
  * @api
  * @method Filter create()
+ * @since 100.0.2
  */
 class FilterBuilder extends AbstractSimpleObjectBuilder
 {
diff --git a/lib/internal/Magento/Framework/Api/ImageContentValidatorInterface.php b/lib/internal/Magento/Framework/Api/ImageContentValidatorInterface.php
index 686e47f7a933f..eecd7dbe8f19b 100644
--- a/lib/internal/Magento/Framework/Api/ImageContentValidatorInterface.php
+++ b/lib/internal/Magento/Framework/Api/ImageContentValidatorInterface.php
@@ -13,6 +13,7 @@
  * Image content validation interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ImageContentValidatorInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/ImageProcessorInterface.php b/lib/internal/Magento/Framework/Api/ImageProcessorInterface.php
index 676e89974fe09..38e66fc9a1feb 100644
--- a/lib/internal/Magento/Framework/Api/ImageProcessorInterface.php
+++ b/lib/internal/Magento/Framework/Api/ImageProcessorInterface.php
@@ -13,6 +13,7 @@
  * Interface ImageProcessorInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface ImageProcessorInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/MetadataObjectInterface.php b/lib/internal/Magento/Framework/Api/MetadataObjectInterface.php
index 64593d87f2a2d..a4a48fcbf7bb0 100644
--- a/lib/internal/Magento/Framework/Api/MetadataObjectInterface.php
+++ b/lib/internal/Magento/Framework/Api/MetadataObjectInterface.php
@@ -10,6 +10,7 @@
  * Provides metadata about an attribute.
  *
  * @api
+ * @since 100.0.2
  */
 interface MetadataObjectInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/MetadataServiceInterface.php b/lib/internal/Magento/Framework/Api/MetadataServiceInterface.php
index c6c3492420922..8993d7bc0003d 100644
--- a/lib/internal/Magento/Framework/Api/MetadataServiceInterface.php
+++ b/lib/internal/Magento/Framework/Api/MetadataServiceInterface.php
@@ -10,6 +10,7 @@
  * MetadataService returns custom attribute metadata for a given class or interface it implements
  *
  * @api
+ * @since 100.0.2
  */
 interface MetadataServiceInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/Document.php b/lib/internal/Magento/Framework/Api/Search/Document.php
index 7454fa7974ece..c1edec9860f67 100644
--- a/lib/internal/Magento/Framework/Api/Search/Document.php
+++ b/lib/internal/Magento/Framework/Api/Search/Document.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Document extends AbstractSimpleObject implements DocumentInterface, \IteratorAggregate
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/FilterGroup.php b/lib/internal/Magento/Framework/Api/Search/FilterGroup.php
index aef3df998a550..a8057d6d0d8b0 100644
--- a/lib/internal/Magento/Framework/Api/Search/FilterGroup.php
+++ b/lib/internal/Magento/Framework/Api/Search/FilterGroup.php
@@ -12,6 +12,7 @@
  * Groups two or more filters together using a logical OR
  *
  * @api
+ * @since 100.0.2
  */
 class FilterGroup extends AbstractSimpleObject
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php b/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php
index cfde284524482..64bb7431819b0 100644
--- a/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php
+++ b/lib/internal/Magento/Framework/Api/Search/FilterGroupBuilder.php
@@ -14,6 +14,7 @@
  * Builder for FilterGroup Data.
  *
  * @api
+ * @since 100.0.2
  */
 class FilterGroupBuilder extends AbstractSimpleObjectBuilder
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/SearchCriteria.php b/lib/internal/Magento/Framework/Api/Search/SearchCriteria.php
index 964e506120167..728b32ebfd06e 100644
--- a/lib/internal/Magento/Framework/Api/Search/SearchCriteria.php
+++ b/lib/internal/Magento/Framework/Api/Search/SearchCriteria.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class SearchCriteria extends BaseSearchCriteria implements SearchCriteriaInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php b/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php
index 918a16a255729..ba443f116f652 100644
--- a/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php
+++ b/lib/internal/Magento/Framework/Api/Search/SearchCriteriaBuilder.php
@@ -14,6 +14,7 @@
  * Builder for SearchCriteria Service Data Object
  *
  * @api
+ * @since 100.0.2
  */
 class SearchCriteriaBuilder extends AbstractSimpleObjectBuilder
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/SearchCriteriaInterface.php b/lib/internal/Magento/Framework/Api/Search/SearchCriteriaInterface.php
index 6dda50569ca03..a61a33260fc5c 100644
--- a/lib/internal/Magento/Framework/Api/Search/SearchCriteriaInterface.php
+++ b/lib/internal/Magento/Framework/Api/Search/SearchCriteriaInterface.php
@@ -12,6 +12,7 @@
  *
  * @api
  * @package Magento\Framework\Api\Search
+ * @since 100.0.2
  */
 interface SearchCriteriaInterface extends BaseSearchCriteriaInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/SearchInterface.php b/lib/internal/Magento/Framework/Api/Search/SearchInterface.php
index 9793e005b70b5..0b161b04561e8 100644
--- a/lib/internal/Magento/Framework/Api/Search/SearchInterface.php
+++ b/lib/internal/Magento/Framework/Api/Search/SearchInterface.php
@@ -9,6 +9,7 @@
  * Search API for all requests
  *
  * @api
+ * @since 100.0.2
  */
 interface SearchInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/Search/SearchResultInterface.php b/lib/internal/Magento/Framework/Api/Search/SearchResultInterface.php
index 792401124b96e..92941d9a9c025 100644
--- a/lib/internal/Magento/Framework/Api/Search/SearchResultInterface.php
+++ b/lib/internal/Magento/Framework/Api/Search/SearchResultInterface.php
@@ -11,6 +11,7 @@
  * Interface SearchResultInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface SearchResultInterface extends SearchResultsInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php
index c068970c93b12..a076348262a61 100644
--- a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/FilterProcessor/CustomFilterInterface.php
@@ -10,7 +10,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface CustomFilterInterface
 {
@@ -20,7 +20,7 @@ interface CustomFilterInterface
      * @param Filter $filter
      * @param AbstractDb $collection
      * @return bool Whether the filter was applied
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function apply(Filter $filter, AbstractDb $collection);
 }
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php
index 4ca55b6a1a72d..0fd4f077af984 100644
--- a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor/CustomJoinInterface.php
@@ -9,7 +9,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface CustomJoinInterface
 {
@@ -18,7 +18,7 @@ interface CustomJoinInterface
      *
      * @param AbstractDb $collection
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function apply(AbstractDb $collection);
 }
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php
index 722e1b96254d0..a87a92d8d9dfa 100644
--- a/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php
+++ b/lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessorInterface.php
@@ -10,7 +10,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface CollectionProcessorInterface
 {
@@ -21,7 +21,7 @@ interface CollectionProcessorInterface
      * @param AbstractDb $collection
      * @throws \InvalidArgumentException
      * @return void
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function process(SearchCriteriaInterface $searchCriteria, AbstractDb $collection);
 }
diff --git a/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php b/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php
index ae4057ae9c21e..45397b6a195c2 100644
--- a/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php
+++ b/lib/internal/Magento/Framework/Api/SearchCriteriaInterface.php
@@ -10,6 +10,7 @@
  * Search criteria interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface SearchCriteriaInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/SearchResultsInterface.php b/lib/internal/Magento/Framework/Api/SearchResultsInterface.php
index ba72685a80f49..c29f1134e0706 100644
--- a/lib/internal/Magento/Framework/Api/SearchResultsInterface.php
+++ b/lib/internal/Magento/Framework/Api/SearchResultsInterface.php
@@ -11,6 +11,7 @@
  * Search results interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface SearchResultsInterface
 {
diff --git a/lib/internal/Magento/Framework/Api/SortOrder.php b/lib/internal/Magento/Framework/Api/SortOrder.php
index 67897ea22570d..b2da7d180395d 100644
--- a/lib/internal/Magento/Framework/Api/SortOrder.php
+++ b/lib/internal/Magento/Framework/Api/SortOrder.php
@@ -13,6 +13,7 @@
  * Data object for sort order.
  *
  * @api
+ * @since 100.0.2
  */
 class SortOrder extends AbstractSimpleObject
 {
diff --git a/lib/internal/Magento/Framework/Api/SortOrderBuilder.php b/lib/internal/Magento/Framework/Api/SortOrderBuilder.php
index 6960440d4d522..6b3365ae5bf9c 100644
--- a/lib/internal/Magento/Framework/Api/SortOrderBuilder.php
+++ b/lib/internal/Magento/Framework/Api/SortOrderBuilder.php
@@ -11,6 +11,7 @@
  * @method SortOrder create()
  *
  * @api
+ * @since 100.0.2
  */
 class SortOrderBuilder extends AbstractSimpleObjectBuilder
 {
diff --git a/lib/internal/Magento/Framework/App/Action/AbstractAction.php b/lib/internal/Magento/Framework/App/Action/AbstractAction.php
index 27f8838f9b165..f4c11203f2760 100644
--- a/lib/internal/Magento/Framework/App/Action/AbstractAction.php
+++ b/lib/internal/Magento/Framework/App/Action/AbstractAction.php
@@ -11,7 +11,7 @@
 /**
  * Abstract redirect/forward action class
  *
- * @deprecated Inheritance in controllers should be avoided in favor of composition
+ * @deprecated 103.0.0 Inheritance in controllers should be avoided in favor of composition
  * @see \Magento\Framework\App\ActionInterface
  */
 abstract class AbstractAction implements \Magento\Framework\App\ActionInterface
diff --git a/lib/internal/Magento/Framework/App/Action/Action.php b/lib/internal/Magento/Framework/App/Action/Action.php
index 9d9b26313d7c6..b06c9799ddc04 100644
--- a/lib/internal/Magento/Framework/App/Action/Action.php
+++ b/lib/internal/Magento/Framework/App/Action/Action.php
@@ -23,13 +23,14 @@
  * It contains standard action behavior (event dispatching, flag checks)
  * Action classes that do not extend from this class will lose this behavior and might not function correctly
  *
- * @deprecated Inheritance in controllers should be avoided in favor of composition
+ * @deprecated 103.0.0 Inheritance in controllers should be avoided in favor of composition
  * @see \Magento\Framework\App\ActionInterface
  *
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @since 100.0.2
  */
 abstract class Action extends AbstractAction
 {
diff --git a/lib/internal/Magento/Framework/App/Action/Context.php b/lib/internal/Magento/Framework/App/Action/Context.php
index 5f5f013f454f2..1d2f04a23035b 100644
--- a/lib/internal/Magento/Framework/App/Action/Context.php
+++ b/lib/internal/Magento/Framework/App/Action/Context.php
@@ -19,6 +19,7 @@
  * the classes they were introduced for.
  *
  * @api
+ * @since 100.0.2
  */
 class Context implements \Magento\Framework\ObjectManager\ContextInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Action/HttpHeadActionInterface.php b/lib/internal/Magento/Framework/App/Action/HttpHeadActionInterface.php
index 389bd8089967b..6d85e0b80ee55 100644
--- a/lib/internal/Magento/Framework/App/Action/HttpHeadActionInterface.php
+++ b/lib/internal/Magento/Framework/App/Action/HttpHeadActionInterface.php
@@ -13,7 +13,7 @@
 /**
  * Marker for actions processing HEAD requests.
  *
- * @deprecated Both GET and HEAD requests map to HttpGetActionInterface
+ * @deprecated 102.0.2 Both GET and HEAD requests map to HttpGetActionInterface
  */
 interface HttpHeadActionInterface extends ActionInterface
 {
diff --git a/lib/internal/Magento/Framework/App/ActionFactory.php b/lib/internal/Magento/Framework/App/ActionFactory.php
index 94f5ef36eb9c9..4edf022e43509 100644
--- a/lib/internal/Magento/Framework/App/ActionFactory.php
+++ b/lib/internal/Magento/Framework/App/ActionFactory.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ActionFactory
 {
diff --git a/lib/internal/Magento/Framework/App/ActionFlag.php b/lib/internal/Magento/Framework/App/ActionFlag.php
index 55201504c968f..3d6c2756595ad 100644
--- a/lib/internal/Magento/Framework/App/ActionFlag.php
+++ b/lib/internal/Magento/Framework/App/ActionFlag.php
@@ -13,6 +13,7 @@
  * Please use plugins to prevent action dispatching instead.
  *
  * @api
+ * @since 100.0.2
  */
 class ActionFlag
 {
diff --git a/lib/internal/Magento/Framework/App/ActionInterface.php b/lib/internal/Magento/Framework/App/ActionInterface.php
index 1501abe9eb956..12e87ad9f4f96 100644
--- a/lib/internal/Magento/Framework/App/ActionInterface.php
+++ b/lib/internal/Magento/Framework/App/ActionInterface.php
@@ -9,6 +9,7 @@
  * Magento application action controller type. Every action controller in Application should implement this interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ActionInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Area/FrontNameResolverFactory.php b/lib/internal/Magento/Framework/App/Area/FrontNameResolverFactory.php
index 6a4f79dfefe82..fb46ec621b4f8 100644
--- a/lib/internal/Magento/Framework/App/Area/FrontNameResolverFactory.php
+++ b/lib/internal/Magento/Framework/App/Area/FrontNameResolverFactory.php
@@ -12,6 +12,7 @@
  * Keeping it for backward compatibility
  *
  * @api
+ * @since 100.0.2
  */
 class FrontNameResolverFactory
 {
diff --git a/lib/internal/Magento/Framework/App/Area/FrontNameResolverInterface.php b/lib/internal/Magento/Framework/App/Area/FrontNameResolverInterface.php
index fcdee6276c63c..960c933042e62 100644
--- a/lib/internal/Magento/Framework/App/Area/FrontNameResolverInterface.php
+++ b/lib/internal/Magento/Framework/App/Area/FrontNameResolverInterface.php
@@ -17,6 +17,7 @@
  * for areas with dynamic front names.
  *
  * @api
+ * @since 100.0.2
  */
 interface FrontNameResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Bootstrap.php b/lib/internal/Magento/Framework/App/Bootstrap.php
index 500eebcf9a7a7..93d5535d0e10e 100644
--- a/lib/internal/Magento/Framework/App/Bootstrap.php
+++ b/lib/internal/Magento/Framework/App/Bootstrap.php
@@ -23,6 +23,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Bootstrap
 {
diff --git a/lib/internal/Magento/Framework/App/Cache/Manager.php b/lib/internal/Magento/Framework/App/Cache/Manager.php
index 7ac53d5d6e070..b3531f6e0d163 100644
--- a/lib/internal/Magento/Framework/App/Cache/Manager.php
+++ b/lib/internal/Magento/Framework/App/Cache/Manager.php
@@ -12,6 +12,7 @@
  * Cache status manager
  *
  * @api
+ * @since 100.0.2
  */
 class Manager
 {
diff --git a/lib/internal/Magento/Framework/App/Cache/StateInterface.php b/lib/internal/Magento/Framework/App/Cache/StateInterface.php
index c9f6db3dd8899..1f0b2fa6e00d5 100644
--- a/lib/internal/Magento/Framework/App/Cache/StateInterface.php
+++ b/lib/internal/Magento/Framework/App/Cache/StateInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface StateInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Cache/Type/FrontendPool.php b/lib/internal/Magento/Framework/App/Cache/Type/FrontendPool.php
index 596fd833ab1ed..b89ba7067d725 100644
--- a/lib/internal/Magento/Framework/App/Cache/Type/FrontendPool.php
+++ b/lib/internal/Magento/Framework/App/Cache/Type/FrontendPool.php
@@ -12,6 +12,7 @@
  * In-memory readonly pool of cache front-ends with enforced access control, specific to cache types
  *
  * @api
+ * @since 100.0.2
  */
 class FrontendPool
 {
diff --git a/lib/internal/Magento/Framework/App/Cache/TypeListInterface.php b/lib/internal/Magento/Framework/App/Cache/TypeListInterface.php
index 8f18f5b57d6cc..c379133e94a3b 100644
--- a/lib/internal/Magento/Framework/App/Cache/TypeListInterface.php
+++ b/lib/internal/Magento/Framework/App/Cache/TypeListInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface TypeListInterface
 {
diff --git a/lib/internal/Magento/Framework/App/CacheInterface.php b/lib/internal/Magento/Framework/App/CacheInterface.php
index 374fb3cf68936..9052d93191929 100644
--- a/lib/internal/Magento/Framework/App/CacheInterface.php
+++ b/lib/internal/Magento/Framework/App/CacheInterface.php
@@ -10,6 +10,7 @@
  * System cache model interface
  *
  * @api
+ * @since 100.0.2
  */
 interface CacheInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/Data/ProcessorInterface.php b/lib/internal/Magento/Framework/App/Config/Data/ProcessorInterface.php
index 83ff73ab387a9..7d0b53cf1bc12 100644
--- a/lib/internal/Magento/Framework/App/Config/Data/ProcessorInterface.php
+++ b/lib/internal/Magento/Framework/App/Config/Data/ProcessorInterface.php
@@ -9,6 +9,7 @@
  * Processes data from admin store configuration fields
  *
  * @api
+ * @since 100.0.2
  */
 interface ProcessorInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/DataInterface.php b/lib/internal/Magento/Framework/App/Config/DataInterface.php
index 6495bbf0bc4da..e267e7311be1a 100644
--- a/lib/internal/Magento/Framework/App/Config/DataInterface.php
+++ b/lib/internal/Magento/Framework/App/Config/DataInterface.php
@@ -9,6 +9,7 @@
  * Configuration data storage
  *
  * @api
+ * @since 100.0.2
  */
 interface DataInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/Element.php b/lib/internal/Magento/Framework/App/Config/Element.php
index e5b4a5c384513..d714783847dc5 100644
--- a/lib/internal/Magento/Framework/App/Config/Element.php
+++ b/lib/internal/Magento/Framework/App/Config/Element.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Element extends \Magento\Framework\Simplexml\Element
 {
diff --git a/lib/internal/Magento/Framework/App/Config/InitialConfigSource.php b/lib/internal/Magento/Framework/App/Config/InitialConfigSource.php
index 50a250f9c6591..79305e651eeaa 100644
--- a/lib/internal/Magento/Framework/App/Config/InitialConfigSource.php
+++ b/lib/internal/Magento/Framework/App/Config/InitialConfigSource.php
@@ -25,7 +25,7 @@ class InitialConfigSource implements ConfigSourceInterface
 
     /**
      * @var string
-     * @deprecated 100.2.0 Initial configs can not be separated since 2.2.0 version
+     * @deprecated 101.0.0 Initial configs can not be separated since 2.2.0 version
      */
     private $fileKey;
 
diff --git a/lib/internal/Magento/Framework/App/Config/MutableScopeConfigInterface.php b/lib/internal/Magento/Framework/App/Config/MutableScopeConfigInterface.php
index 32d081b853f40..15c7530e80373 100644
--- a/lib/internal/Magento/Framework/App/Config/MutableScopeConfigInterface.php
+++ b/lib/internal/Magento/Framework/App/Config/MutableScopeConfigInterface.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface MutableScopeConfigInterface extends \Magento\Framework\App\Config\ScopeConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/ReinitableConfigInterface.php b/lib/internal/Magento/Framework/App/Config/ReinitableConfigInterface.php
index 7974f97ef1ffc..f180a4ce401b1 100644
--- a/lib/internal/Magento/Framework/App/Config/ReinitableConfigInterface.php
+++ b/lib/internal/Magento/Framework/App/Config/ReinitableConfigInterface.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ReinitableConfigInterface extends \Magento\Framework\App\Config\MutableScopeConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/Scope/Validator.php b/lib/internal/Magento/Framework/App/Config/Scope/Validator.php
index 9c0f60286e093..df9807ac55c79 100644
--- a/lib/internal/Magento/Framework/App/Config/Scope/Validator.php
+++ b/lib/internal/Magento/Framework/App/Config/Scope/Validator.php
@@ -15,7 +15,7 @@
 use Magento\Framework\Phrase;
 
 /**
- * @deprecated 100.2.0 Added in order to avoid backward incompatibility because class was moved to another directory.
+ * @deprecated 101.0.0 Added in order to avoid backward incompatibility because class was moved to another directory.
  * @see \Magento\Framework\App\Scope\Validator
  */
 class Validator implements ValidatorInterface
diff --git a/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php b/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php
index 122e6801ed187..cdac6f3552eea 100644
--- a/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php
+++ b/lib/internal/Magento/Framework/App/Config/ScopeConfigInterface.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ScopeConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/Storage/WriterInterface.php b/lib/internal/Magento/Framework/App/Config/Storage/WriterInterface.php
index 35b24692bd228..c1e20cf332023 100644
--- a/lib/internal/Magento/Framework/App/Config/Storage/WriterInterface.php
+++ b/lib/internal/Magento/Framework/App/Config/Storage/WriterInterface.php
@@ -12,6 +12,7 @@
 /**
  * Interface \Magento\Framework\App\Config\Storage\WriterInterface
  * @api
+ * @since 100.0.2
  */
 interface WriterInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Config/Value.php b/lib/internal/Magento/Framework/App/Config/Value.php
index 6fde4dded4695..c18da34f86a26 100644
--- a/lib/internal/Magento/Framework/App/Config/Value.php
+++ b/lib/internal/Magento/Framework/App/Config/Value.php
@@ -24,6 +24,7 @@
  * @api
  *
  * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @since 100.0.2
  */
 class Value extends \Magento\Framework\Model\AbstractModel implements \Magento\Framework\App\Config\ValueInterface
 {
@@ -134,6 +135,7 @@ public function afterSave()
      * {@inheritdoc}. In addition, it sets status 'invalidate' for config caches
      *
      * @return $this
+     * @since 100.1.0
      */
     public function afterDelete()
     {
diff --git a/lib/internal/Magento/Framework/App/DocRootLocator.php b/lib/internal/Magento/Framework/App/DocRootLocator.php
index d73baf8e4e742..698001044bdf3 100644
--- a/lib/internal/Magento/Framework/App/DocRootLocator.php
+++ b/lib/internal/Magento/Framework/App/DocRootLocator.php
@@ -22,7 +22,7 @@ class DocRootLocator
     private $request;
 
     /**
-     * @deprecated
+     * @deprecated 102.0.2
      * @var ReadFactory
      */
     private $readFactory;
diff --git a/lib/internal/Magento/Framework/App/FrontControllerInterface.php b/lib/internal/Magento/Framework/App/FrontControllerInterface.php
index afd3091097d19..712f3876355c1 100644
--- a/lib/internal/Magento/Framework/App/FrontControllerInterface.php
+++ b/lib/internal/Magento/Framework/App/FrontControllerInterface.php
@@ -11,6 +11,7 @@
  * Every application area has own front controller.
  *
  * @api
+ * @since 100.0.2
  */
 interface FrontControllerInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Language/Dictionary.php b/lib/internal/Magento/Framework/App/Language/Dictionary.php
index b4a6fdc1b5ce3..42e3f7f55018e 100644
--- a/lib/internal/Magento/Framework/App/Language/Dictionary.php
+++ b/lib/internal/Magento/Framework/App/Language/Dictionary.php
@@ -13,6 +13,7 @@
  * A service for reading language package dictionaries
  *
  * @api
+ * @since 100.0.2
  */
 class Dictionary
 {
diff --git a/lib/internal/Magento/Framework/App/ObjectManager.php b/lib/internal/Magento/Framework/App/ObjectManager.php
index 1cc1745c3a57f..f18102a1dbc78 100644
--- a/lib/internal/Magento/Framework/App/ObjectManager.php
+++ b/lib/internal/Magento/Framework/App/ObjectManager.php
@@ -15,6 +15,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class ObjectManager extends \Magento\Framework\ObjectManager\ObjectManager
 {
diff --git a/lib/internal/Magento/Framework/App/ObjectManager/ConfigCache.php b/lib/internal/Magento/Framework/App/ObjectManager/ConfigCache.php
index 0df11cb3cb6e1..846dd6011c732 100644
--- a/lib/internal/Magento/Framework/App/ObjectManager/ConfigCache.php
+++ b/lib/internal/Magento/Framework/App/ObjectManager/ConfigCache.php
@@ -68,7 +68,7 @@ public function save(array $config, $key)
      * Get serializer
      *
      * @return SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php b/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php
index 6abf2aca8d641..1d73bdf4a9956 100644
--- a/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php
+++ b/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php
@@ -86,7 +86,7 @@ public function load($area)
      * Get serializer
      *
      * @return SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
index b781a92b4714a..0c468a767ded2 100644
--- a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
+++ b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
@@ -19,6 +19,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class ObjectManagerFactory
 {
@@ -294,7 +295,7 @@ protected function _loadPrimaryConfig(DirectoryList $directoryList, $driverPool,
      * @param \Magento\Framework\ObjectManager\Config\Config $diConfig
      * @param \Magento\Framework\ObjectManager\DefinitionInterface $definitions
      * @return \Magento\Framework\Interception\PluginList\PluginList
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     protected function _createPluginList(
diff --git a/lib/internal/Magento/Framework/App/PlainTextRequestInterface.php b/lib/internal/Magento/Framework/App/PlainTextRequestInterface.php
index c986a2309888a..fbcabd15adba8 100644
--- a/lib/internal/Magento/Framework/App/PlainTextRequestInterface.php
+++ b/lib/internal/Magento/Framework/App/PlainTextRequestInterface.php
@@ -13,7 +13,7 @@
  * To read already parsed request data use \Magento\Framework\App\RequestInterface.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface PlainTextRequestInterface
 {
@@ -21,7 +21,7 @@ interface PlainTextRequestInterface
      * Returns textual representation of request to Magento.
      *
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getContent();
 }
diff --git a/lib/internal/Magento/Framework/App/ProductMetadataInterface.php b/lib/internal/Magento/Framework/App/ProductMetadataInterface.php
index 4d55092d45e03..a62b06077a842 100644
--- a/lib/internal/Magento/Framework/App/ProductMetadataInterface.php
+++ b/lib/internal/Magento/Framework/App/ProductMetadataInterface.php
@@ -9,6 +9,7 @@
  * Magento application product metadata
  *
  * @api
+ * @since 100.0.2
  */
 interface ProductMetadataInterface
 {
diff --git a/lib/internal/Magento/Framework/App/ReinitableConfig.php b/lib/internal/Magento/Framework/App/ReinitableConfig.php
index 70bc82229995d..09ba71a279636 100644
--- a/lib/internal/Magento/Framework/App/ReinitableConfig.php
+++ b/lib/internal/Magento/Framework/App/ReinitableConfig.php
@@ -9,7 +9,7 @@
 
 /**
  * @inheritdoc
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 class ReinitableConfig extends MutableScopeConfig implements ReinitableConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Request/PathInfoProcessorInterface.php b/lib/internal/Magento/Framework/App/Request/PathInfoProcessorInterface.php
index 60d867cb4388f..3c2896569c199 100644
--- a/lib/internal/Magento/Framework/App/Request/PathInfoProcessorInterface.php
+++ b/lib/internal/Magento/Framework/App/Request/PathInfoProcessorInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface PathInfoProcessorInterface
 {
diff --git a/lib/internal/Magento/Framework/App/RequestContentInterface.php b/lib/internal/Magento/Framework/App/RequestContentInterface.php
index 90848f34ccd66..29e26e0702163 100644
--- a/lib/internal/Magento/Framework/App/RequestContentInterface.php
+++ b/lib/internal/Magento/Framework/App/RequestContentInterface.php
@@ -11,7 +11,7 @@
  * Direct usage of RequestInterface and PlainTextRequestInterface is preferable.
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface RequestContentInterface extends RequestInterface, PlainTextRequestInterface
 {
diff --git a/lib/internal/Magento/Framework/App/RequestInterface.php b/lib/internal/Magento/Framework/App/RequestInterface.php
index 7abcc9208af5c..a830d46978b84 100644
--- a/lib/internal/Magento/Framework/App/RequestInterface.php
+++ b/lib/internal/Magento/Framework/App/RequestInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface RequestInterface
 {
diff --git a/lib/internal/Magento/Framework/App/RequestSafetyInterface.php b/lib/internal/Magento/Framework/App/RequestSafetyInterface.php
index f56ff9aaf8ab5..56d6312a60c7c 100644
--- a/lib/internal/Magento/Framework/App/RequestSafetyInterface.php
+++ b/lib/internal/Magento/Framework/App/RequestSafetyInterface.php
@@ -10,6 +10,7 @@
  * Request safety check. Can be used to identify if current application request is safe (does not modify state) or not.
  *
  * @api
+ * @since 100.0.2
  */
 interface RequestSafetyInterface
 {
diff --git a/lib/internal/Magento/Framework/App/ResourceConnection.php b/lib/internal/Magento/Framework/App/ResourceConnection.php
index b543cc970f640..50ebab048c7ae 100644
--- a/lib/internal/Magento/Framework/App/ResourceConnection.php
+++ b/lib/internal/Magento/Framework/App/ResourceConnection.php
@@ -15,6 +15,7 @@
  * This class provides access to all these connections.
  *
  * @api
+ * @since 100.0.2
  */
 class ResourceConnection
 {
@@ -298,6 +299,7 @@ public function getFkName($priTableName, $priColumnName, $refTableName, $refColu
      *
      * @param string $resourceName
      * @return string
+     * @since 102.0.0
      */
     public function getSchemaName($resourceName)
     {
diff --git a/lib/internal/Magento/Framework/App/ResourceConnection/SourceProviderInterface.php b/lib/internal/Magento/Framework/App/ResourceConnection/SourceProviderInterface.php
index f8ff407d4507e..0a67b4cac9785 100644
--- a/lib/internal/Magento/Framework/App/ResourceConnection/SourceProviderInterface.php
+++ b/lib/internal/Magento/Framework/App/ResourceConnection/SourceProviderInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface SourceProviderInterface extends \Traversable
 {
diff --git a/lib/internal/Magento/Framework/App/Response/HttpInterface.php b/lib/internal/Magento/Framework/App/Response/HttpInterface.php
index 17825aeb88d65..f18978b4fcaf0 100644
--- a/lib/internal/Magento/Framework/App/Response/HttpInterface.php
+++ b/lib/internal/Magento/Framework/App/Response/HttpInterface.php
@@ -9,6 +9,7 @@
  * HTTP response interface
  *
  * @api
+ * @since 100.0.2
  */
 interface HttpInterface extends \Magento\Framework\App\ResponseInterface
 {
@@ -24,7 +25,7 @@ public function setHttpResponseCode($code);
      * Get HTTP response code
      *
      * @return int
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getHttpResponseCode();
 
@@ -37,7 +38,7 @@ public function getHttpResponseCode();
      * @param string $value
      * @param boolean $replace
      * @return self
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function setHeader($name, $value, $replace = false);
 
@@ -49,7 +50,7 @@ public function setHeader($name, $value, $replace = false);
      *
      * @param string $name
      * @return \Laminas\Http\Header\HeaderInterface|bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getHeader($name);
 
@@ -58,7 +59,7 @@ public function getHeader($name);
      *
      * @param string $name
      * @return self
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function clearHeader($name);
 
@@ -76,7 +77,7 @@ public function clearHeader($name);
      * @param null|int|string $version
      * @param null|string $phrase
      * @return self
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function setStatusHeader($httpCode, $version = null, $phrase = null);
 
@@ -85,7 +86,7 @@ public function setStatusHeader($httpCode, $version = null, $phrase = null);
      *
      * @param string $value
      * @return self
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function appendBody($value);
 
@@ -96,7 +97,7 @@ public function appendBody($value);
      *
      * @param string $value
      * @return self
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function setBody($value);
 
@@ -108,7 +109,7 @@ public function setBody($value);
      * @param string $url
      * @param int $code
      * @return self
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function setRedirect($url, $code = 302);
 }
diff --git a/lib/internal/Magento/Framework/App/ResponseInterface.php b/lib/internal/Magento/Framework/App/ResponseInterface.php
index f55e2cbaa2c1c..98633720d3ba4 100644
--- a/lib/internal/Magento/Framework/App/ResponseInterface.php
+++ b/lib/internal/Magento/Framework/App/ResponseInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ResponseInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Route/Config.php b/lib/internal/Magento/Framework/App/Route/Config.php
index b8bcd75482d28..787fe6363aa07 100644
--- a/lib/internal/Magento/Framework/App/Route/Config.php
+++ b/lib/internal/Magento/Framework/App/Route/Config.php
@@ -153,7 +153,7 @@ public function getModulesByFrontName($frontName, $scope = null)
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/App/Route/ConfigInterface.php b/lib/internal/Magento/Framework/App/Route/ConfigInterface.php
index 88b1c42261fc7..26d1a6bf30ac0 100644
--- a/lib/internal/Magento/Framework/App/Route/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/App/Route/ConfigInterface.php
@@ -9,6 +9,7 @@
  * Routes configuration interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php b/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php
index 2c61c855945f2..4c20469ea9f59 100644
--- a/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php
+++ b/lib/internal/Magento/Framework/App/Rss/DataProviderInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface DataProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/App/ScopeInterface.php b/lib/internal/Magento/Framework/App/ScopeInterface.php
index 5821bf2aafa2a..81de45c5d9240 100644
--- a/lib/internal/Magento/Framework/App/ScopeInterface.php
+++ b/lib/internal/Magento/Framework/App/ScopeInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ScopeInterface
 {
diff --git a/lib/internal/Magento/Framework/App/State.php b/lib/internal/Magento/Framework/App/State.php
index 5d6ebaa2cc070..bc2b85b37442b 100644
--- a/lib/internal/Magento/Framework/App/State.php
+++ b/lib/internal/Magento/Framework/App/State.php
@@ -12,6 +12,7 @@
  * Note: Area code communication and emulation will be removed from this class.
  *
  * @api
+ * @since 100.0.2
  */
 class State
 {
@@ -219,7 +220,7 @@ private function checkAreaCode($areaCode)
      * Get Instance of AreaList
      *
      * @return AreaList
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getAreaListInstance()
     {
diff --git a/lib/internal/Magento/Framework/App/StaticResource.php b/lib/internal/Magento/Framework/App/StaticResource.php
index 86b2b15d3c446..321ded57c0885 100644
--- a/lib/internal/Magento/Framework/App/StaticResource.php
+++ b/lib/internal/Magento/Framework/App/StaticResource.php
@@ -215,7 +215,7 @@ private function getFilesystem()
      * Retrieves LoggerInterface instance
      *
      * @return LoggerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getLogger()
     {
diff --git a/lib/internal/Magento/Framework/App/TemplateTypesInterface.php b/lib/internal/Magento/Framework/App/TemplateTypesInterface.php
index bc12d4d7e1ba5..37ae5e5431b92 100644
--- a/lib/internal/Magento/Framework/App/TemplateTypesInterface.php
+++ b/lib/internal/Magento/Framework/App/TemplateTypesInterface.php
@@ -8,7 +8,7 @@
 /**
  * Template Types interface
  *
- * @deprecated 100.2.0 because of incorrect location
+ * @deprecated 101.0.0 because of incorrect location
  */
 interface TemplateTypesInterface
 {
diff --git a/lib/internal/Magento/Framework/App/Utility/Files.php b/lib/internal/Magento/Framework/App/Utility/Files.php
index 901bbbde3dc9f..44a04e1b60746 100644
--- a/lib/internal/Magento/Framework/App/Utility/Files.php
+++ b/lib/internal/Magento/Framework/App/Utility/Files.php
@@ -1020,7 +1020,7 @@ protected function _accumulateFilesByPatterns(array $patterns, $filePattern, arr
     /**
      * Parse meta-info of a static file in module
      *
-     * @deprecated Replaced with method accumulateStaticFiles()
+     * @deprecated 102.0.4 Replaced with method accumulateStaticFiles()
      *
      * @param string $file
      * @return array
diff --git a/lib/internal/Magento/Framework/App/View/Asset/Publisher.php b/lib/internal/Magento/Framework/App/View/Asset/Publisher.php
index 0af5a8199ab88..ea50f96615139 100644
--- a/lib/internal/Magento/Framework/App/View/Asset/Publisher.php
+++ b/lib/internal/Magento/Framework/App/View/Asset/Publisher.php
@@ -14,6 +14,7 @@
  * A publishing service for view assets
  *
  * @api
+ * @since 100.0.2
  */
 class Publisher
 {
diff --git a/lib/internal/Magento/Framework/App/View/Deployment/Version.php b/lib/internal/Magento/Framework/App/View/Deployment/Version.php
index 67f6d3c1ed779..e86e51eaf83d3 100644
--- a/lib/internal/Magento/Framework/App/View/Deployment/Version.php
+++ b/lib/internal/Magento/Framework/App/View/Deployment/Version.php
@@ -109,7 +109,7 @@ private function generateVersion()
      * Get logger
      *
      * @return LoggerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getLogger()
     {
diff --git a/lib/internal/Magento/Framework/App/ViewInterface.php b/lib/internal/Magento/Framework/App/ViewInterface.php
index a659cd371a9a4..6a61154ce8b40 100644
--- a/lib/internal/Magento/Framework/App/ViewInterface.php
+++ b/lib/internal/Magento/Framework/App/ViewInterface.php
@@ -10,8 +10,9 @@
  * Later replaced with Magento\Framework\View\Result component
  *
  * @api
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @see \Magento\Framework\View\Result\Layout
+ * @since 100.0.2
  */
 interface ViewInterface
 {
diff --git a/lib/internal/Magento/Framework/AppInterface.php b/lib/internal/Magento/Framework/AppInterface.php
index 25a0a9e785daa..e0397f8544536 100644
--- a/lib/internal/Magento/Framework/AppInterface.php
+++ b/lib/internal/Magento/Framework/AppInterface.php
@@ -14,6 +14,7 @@
  * Implementations of this interface should implement application type specific initialization.
  *
  * @api
+ * @since 100.0.2
  */
 interface AppInterface
 {
diff --git a/lib/internal/Magento/Framework/Archive/ArchiveInterface.php b/lib/internal/Magento/Framework/Archive/ArchiveInterface.php
index 69a524107f1e0..c6e85b558b24e 100644
--- a/lib/internal/Magento/Framework/Archive/ArchiveInterface.php
+++ b/lib/internal/Magento/Framework/Archive/ArchiveInterface.php
@@ -13,6 +13,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ArchiveInterface
 {
diff --git a/lib/internal/Magento/Framework/Authorization/PolicyInterface.php b/lib/internal/Magento/Framework/Authorization/PolicyInterface.php
index 0d9a5d3af74c9..0afcc5c80e596 100644
--- a/lib/internal/Magento/Framework/Authorization/PolicyInterface.php
+++ b/lib/internal/Magento/Framework/Authorization/PolicyInterface.php
@@ -9,6 +9,7 @@
  * Responsible for internal authorization decision making based on provided role, resource and privilege
  *
  * @api
+ * @since 100.0.2
  */
 interface PolicyInterface
 {
diff --git a/lib/internal/Magento/Framework/Authorization/RoleLocatorInterface.php b/lib/internal/Magento/Framework/Authorization/RoleLocatorInterface.php
index b273f2274df34..29b8cbdc377d4 100644
--- a/lib/internal/Magento/Framework/Authorization/RoleLocatorInterface.php
+++ b/lib/internal/Magento/Framework/Authorization/RoleLocatorInterface.php
@@ -11,6 +11,7 @@
  * Should be implemented by application developer that uses \Magento\Framework\Authorization component.
  *
  * @api
+ * @since 100.0.2
  */
 interface RoleLocatorInterface
 {
diff --git a/lib/internal/Magento/Framework/AuthorizationInterface.php b/lib/internal/Magento/Framework/AuthorizationInterface.php
index 6077e2740b75c..65f0755a48a5c 100644
--- a/lib/internal/Magento/Framework/AuthorizationInterface.php
+++ b/lib/internal/Magento/Framework/AuthorizationInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface AuthorizationInterface
 {
diff --git a/lib/internal/Magento/Framework/Backup/AbstractBackup.php b/lib/internal/Magento/Framework/Backup/AbstractBackup.php
index 66bcdbf16a54b..a46f7d629f6f1 100644
--- a/lib/internal/Magento/Framework/Backup/AbstractBackup.php
+++ b/lib/internal/Magento/Framework/Backup/AbstractBackup.php
@@ -12,6 +12,7 @@
  * Class to work with archives
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractBackup implements BackupInterface, SourceFileInterface
 {
@@ -311,6 +312,7 @@ protected function _filterName($name)
      * Check if keep files of backup
      *
      * @return bool
+     * @since 102.0.0
      */
     public function keepSourceFile()
     {
@@ -322,6 +324,7 @@ public function keepSourceFile()
      *
      * @param bool $keepSourceFile
      * @return $this
+     * @since 102.0.0
      */
     public function setKeepSourceFile(bool $keepSourceFile)
     {
diff --git a/lib/internal/Magento/Framework/Backup/BackupException.php b/lib/internal/Magento/Framework/Backup/BackupException.php
index 7694c084c10a7..6fef1d92ddbfe 100644
--- a/lib/internal/Magento/Framework/Backup/BackupException.php
+++ b/lib/internal/Magento/Framework/Backup/BackupException.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class BackupException extends \Magento\Framework\Exception\LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Backup/BackupInterface.php b/lib/internal/Magento/Framework/Backup/BackupInterface.php
index 16aada9689c11..e16eef51d25a9 100644
--- a/lib/internal/Magento/Framework/Backup/BackupInterface.php
+++ b/lib/internal/Magento/Framework/Backup/BackupInterface.php
@@ -14,7 +14,8 @@
 /**
  * @api
  *
- * @deprecated Backups should be done using other means.
+ * @deprecated 101.0.7 Backups should be done using other means.
+ * @since 100.0.2
  */
 interface BackupInterface
 {
diff --git a/lib/internal/Magento/Framework/Backup/Db.php b/lib/internal/Magento/Framework/Backup/Db.php
index d3b72f30d8cb3..b7e0edf7c4f47 100644
--- a/lib/internal/Magento/Framework/Backup/Db.php
+++ b/lib/internal/Magento/Framework/Backup/Db.php
@@ -14,6 +14,7 @@
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  * @api
+ * @since 100.0.2
  */
 class Db extends AbstractBackup
 {
diff --git a/lib/internal/Magento/Framework/Backup/Db/BackupDbInterface.php b/lib/internal/Magento/Framework/Backup/Db/BackupDbInterface.php
index a019ccac06b66..78ace64e4fe68 100644
--- a/lib/internal/Magento/Framework/Backup/Db/BackupDbInterface.php
+++ b/lib/internal/Magento/Framework/Backup/Db/BackupDbInterface.php
@@ -8,7 +8,8 @@
 /**
  * @api
  *
- * @deprecated Backups should be done using other means.
+ * @deprecated 101.0.7 Backups should be done using other means.
+ * @since 100.0.2
  */
 interface BackupDbInterface
 {
diff --git a/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php b/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php
index d1c9c3df1e9aa..a9e1cdd133f75 100644
--- a/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php
+++ b/lib/internal/Magento/Framework/Backup/Db/BackupFactory.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class BackupFactory
 {
diff --git a/lib/internal/Magento/Framework/Backup/Db/BackupInterface.php b/lib/internal/Magento/Framework/Backup/Db/BackupInterface.php
index ae5879290eb20..78940f93e33c9 100644
--- a/lib/internal/Magento/Framework/Backup/Db/BackupInterface.php
+++ b/lib/internal/Magento/Framework/Backup/Db/BackupInterface.php
@@ -8,7 +8,8 @@
 /**
  * @api
  *
- * @deprecated Backups should be done using other means.
+ * @deprecated 101.0.7 Backups should be done using other means.
+ * @since 100.0.2
  */
 interface BackupInterface
 {
diff --git a/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php b/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php
index 45d1cc21b06da..b351bc85a613b 100644
--- a/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php
+++ b/lib/internal/Magento/Framework/Backup/Exception/CantLoadSnapshot.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class CantLoadSnapshot extends \Magento\Framework\Backup\BackupException
 {
diff --git a/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php b/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php
index 9b722da10a1bd..311de25343eb7 100644
--- a/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php
+++ b/lib/internal/Magento/Framework/Backup/Exception/FtpConnectionFailed.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class FtpConnectionFailed extends \Magento\Framework\Backup\BackupException
 {
diff --git a/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php b/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php
index 53af4bfd3061b..1b197576b32c2 100644
--- a/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php
+++ b/lib/internal/Magento/Framework/Backup/Exception/FtpValidationFailed.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class FtpValidationFailed extends \Magento\Framework\Backup\BackupException
 {
diff --git a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php
index b373134d2e9a6..48cedca5aecbb 100644
--- a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php
+++ b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughFreeSpace.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class NotEnoughFreeSpace extends \Magento\Framework\Backup\BackupException
 {
diff --git a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php
index ba7e80a503f4f..df89932680029 100644
--- a/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php
+++ b/lib/internal/Magento/Framework/Backup/Exception/NotEnoughPermissions.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class NotEnoughPermissions extends \Magento\Framework\Backup\BackupException
 {
diff --git a/lib/internal/Magento/Framework/Backup/Factory.php b/lib/internal/Magento/Framework/Backup/Factory.php
index effa796a2a074..1692cc168d5f2 100644
--- a/lib/internal/Magento/Framework/Backup/Factory.php
+++ b/lib/internal/Magento/Framework/Backup/Factory.php
@@ -15,6 +15,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Factory
 {
diff --git a/lib/internal/Magento/Framework/Backup/Filesystem.php b/lib/internal/Magento/Framework/Backup/Filesystem.php
index f3946444cec20..72996cdd28fda 100644
--- a/lib/internal/Magento/Framework/Backup/Filesystem.php
+++ b/lib/internal/Magento/Framework/Backup/Filesystem.php
@@ -317,7 +317,7 @@ protected function _getTarTmpPath()
 
     /**
      * @return Ftp
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function getRollBackFtp()
     {
@@ -333,7 +333,7 @@ protected function getRollBackFtp()
 
     /**
      * @return Fs
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function getRollBackFs()
     {
diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php
index 8c8c21a8405b6..976c07ef986e0 100644
--- a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php
+++ b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/AbstractRollback.php
@@ -11,6 +11,7 @@
  * Filesystem rollback workers abstract class
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractRollback
 {
diff --git a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php
index 4820b83ceb7a8..b8eca279fdf22 100644
--- a/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php
+++ b/lib/internal/Magento/Framework/Backup/Filesystem/Rollback/Fs.php
@@ -97,7 +97,7 @@ public function run()
      * Get file system helper instance
      *
      * @return Helper
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getFsHelper()
     {
diff --git a/lib/internal/Magento/Framework/Bulk/BulkManagementInterface.php b/lib/internal/Magento/Framework/Bulk/BulkManagementInterface.php
index 9cfb2b1c97a4d..d2d247bdb271c 100644
--- a/lib/internal/Magento/Framework/Bulk/BulkManagementInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/BulkManagementInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface BulkManagementInterface
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface BulkManagementInterface
 {
@@ -20,7 +20,7 @@ interface BulkManagementInterface
      * @param string $description
      * @param int $userId
      * @return boolean
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function scheduleBulk($bulkUuid, array $operations, $description, $userId = null);
 
@@ -29,7 +29,7 @@ public function scheduleBulk($bulkUuid, array $operations, $description, $userId
      *
      * @param string $bulkId
      * @return boolean
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function deleteBulk($bulkId);
 }
diff --git a/lib/internal/Magento/Framework/Bulk/BulkStatusInterface.php b/lib/internal/Magento/Framework/Bulk/BulkStatusInterface.php
index 0f1deb0ceeeaf..45352af9c5c8c 100644
--- a/lib/internal/Magento/Framework/Bulk/BulkStatusInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/BulkStatusInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface BulkStatusInterface
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface BulkStatusInterface
 {
@@ -18,7 +18,7 @@ interface BulkStatusInterface
      * @param string $bulkUuid
      * @param int|null $failureType
      * @return \Magento\Framework\Bulk\OperationInterface[]
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getFailedOperationsByBulkId($bulkUuid, $failureType = null);
 
@@ -28,7 +28,7 @@ public function getFailedOperationsByBulkId($bulkUuid, $failureType = null);
      * @param string $bulkUuid
      * @param int $status
      * @return int
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getOperationsCountByBulkIdAndStatus($bulkUuid, $status);
 
@@ -37,7 +37,7 @@ public function getOperationsCountByBulkIdAndStatus($bulkUuid, $status);
      *
      * @param int $userId
      * @return BulkSummaryInterface[]
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getBulksByUser($userId);
 
@@ -49,7 +49,7 @@ public function getBulksByUser($userId);
      *
      * @param string $bulkUuid
      * @return int NOT_STARTED | IN_PROGRESS | FINISHED_SUCCESFULLY | FINISHED_WITH_FAILURE
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getBulkStatus($bulkUuid);
 }
diff --git a/lib/internal/Magento/Framework/Bulk/BulkSummaryInterface.php b/lib/internal/Magento/Framework/Bulk/BulkSummaryInterface.php
index 69e9b71ca00c3..f06ea9289cf6f 100644
--- a/lib/internal/Magento/Framework/Bulk/BulkSummaryInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/BulkSummaryInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface BulkSummaryInterface
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface BulkSummaryInterface
 {
@@ -35,7 +35,7 @@ interface BulkSummaryInterface
      * Get bulk uuid
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getBulkId();
 
@@ -44,7 +44,7 @@ public function getBulkId();
      *
      * @param string $bulkUuid
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setBulkId($bulkUuid);
 
@@ -52,7 +52,7 @@ public function setBulkId($bulkUuid);
      * Get bulk description
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getDescription();
 
@@ -61,7 +61,7 @@ public function getDescription();
      *
      * @param string $description
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setDescription($description);
 
@@ -69,7 +69,7 @@ public function setDescription($description);
      * Get bulk scheduled time
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getStartTime();
 
@@ -78,7 +78,7 @@ public function getStartTime();
      *
      * @param string $timestamp
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setStartTime($timestamp);
 
@@ -86,7 +86,7 @@ public function setStartTime($timestamp);
      * Get user id
      *
      * @return int
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getUserId();
 
@@ -95,7 +95,7 @@ public function getUserId();
      *
      * @param int $userId
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setUserId($userId);
 
@@ -103,7 +103,7 @@ public function setUserId($userId);
      * Get total number of operations scheduled in scope of this bulk
      *
      * @return int
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getOperationCount();
 
@@ -112,7 +112,7 @@ public function getOperationCount();
      *
      * @param int $operationCount
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setOperationCount($operationCount);
 }
diff --git a/lib/internal/Magento/Framework/Bulk/OperationInterface.php b/lib/internal/Magento/Framework/Bulk/OperationInterface.php
index c9672a031c2dd..a621106be3806 100644
--- a/lib/internal/Magento/Framework/Bulk/OperationInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/OperationInterface.php
@@ -8,7 +8,7 @@
 /**
  * Interface OperationInterface
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface OperationInterface extends \Magento\Framework\Api\ExtensibleDataInterface
 {
@@ -39,7 +39,7 @@ interface OperationInterface extends \Magento\Framework\Api\ExtensibleDataInterf
      * Operation id
      *
      * @return int
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getId();
 
@@ -48,7 +48,7 @@ public function getId();
      *
      * @param int $id
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setId($id);
 
@@ -56,7 +56,7 @@ public function setId($id);
      * Get bulk uuid
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getBulkUuid();
 
@@ -65,7 +65,7 @@ public function getBulkUuid();
      *
      * @param string $bulkId
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setBulkUuid($bulkId);
 
@@ -73,7 +73,7 @@ public function setBulkUuid($bulkId);
      * Message Queue Topic
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getTopicName();
 
@@ -82,7 +82,7 @@ public function getTopicName();
      *
      * @param string $topic
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setTopicName($topic);
 
@@ -90,7 +90,7 @@ public function setTopicName($topic);
      * Serialized Data
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getSerializedData();
 
@@ -99,7 +99,7 @@ public function getSerializedData();
      *
      * @param string $serializedData
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setSerializedData($serializedData);
 
@@ -107,7 +107,7 @@ public function setSerializedData($serializedData);
      * Result serialized Data
      *
      * @return string
-     * @since 100.3.0
+     * @since 103.0.0
      */
     public function getResultSerializedData();
 
@@ -116,7 +116,7 @@ public function getResultSerializedData();
      *
      * @param string $resultSerializedData
      * @return $this
-     * @since 100.3.0
+     * @since 103.0.0
      */
     public function setResultSerializedData($resultSerializedData);
 
@@ -126,7 +126,7 @@ public function setResultSerializedData($resultSerializedData);
      * OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED
      *
      * @return int
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getStatus();
 
@@ -135,7 +135,7 @@ public function getStatus();
      *
      * @param int $status
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setStatus($status);
 
@@ -143,7 +143,7 @@ public function setStatus($status);
      * Get result message
      *
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getResultMessage();
 
@@ -152,7 +152,7 @@ public function getResultMessage();
      *
      * @param string $resultMessage
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setResultMessage($resultMessage);
 
@@ -160,7 +160,7 @@ public function setResultMessage($resultMessage);
      * Get error code
      *
      * @return int
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getErrorCode();
 
@@ -169,7 +169,7 @@ public function getErrorCode();
      *
      * @param int $errorCode
      * @return $this
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function setErrorCode($errorCode);
 }
diff --git a/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php b/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php
index 886bd45aeaed0..4c603f3c5f76e 100644
--- a/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php
+++ b/lib/internal/Magento/Framework/Bulk/OperationManagementInterface.php
@@ -9,7 +9,7 @@
 /**
  * Interface OperationManagementInterface
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface OperationManagementInterface
 {
@@ -23,7 +23,7 @@ interface OperationManagementInterface
      * @param string|null $message property to update Result Message
      * @param string|null $data serialized data object of failed message
      * @return boolean
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function changeOperationStatus($bulkUuid, $operationKey, $status, $errorCode = null, $message = null, $data = null); // @codingStandardsIgnoreLine
 }
diff --git a/lib/internal/Magento/Framework/Cache/Frontend/Decorator/TagScope.php b/lib/internal/Magento/Framework/Cache/Frontend/Decorator/TagScope.php
index c837544a75f0f..1c5f04364b087 100644
--- a/lib/internal/Magento/Framework/Cache/Frontend/Decorator/TagScope.php
+++ b/lib/internal/Magento/Framework/Cache/Frontend/Decorator/TagScope.php
@@ -10,6 +10,7 @@
  * Cache frontend decorator that limits the cleaning scope within a tag
  *
  * @api
+ * @since 100.0.2
  */
 class TagScope extends \Magento\Framework\Cache\Frontend\Decorator\Bare
 {
diff --git a/lib/internal/Magento/Framework/Cache/FrontendInterface.php b/lib/internal/Magento/Framework/Cache/FrontendInterface.php
index d81d7fbe1c7cc..c57c97238bddd 100644
--- a/lib/internal/Magento/Framework/Cache/FrontendInterface.php
+++ b/lib/internal/Magento/Framework/Cache/FrontendInterface.php
@@ -9,6 +9,7 @@
  * Interface of a cache frontend - an ultimate publicly available interface to an actual cache storage
  *
  * @api
+ * @since 100.0.2
  */
 interface FrontendInterface
 {
diff --git a/lib/internal/Magento/Framework/Code/Generator/DefinedClasses.php b/lib/internal/Magento/Framework/Code/Generator/DefinedClasses.php
index 363c6f59b17ea..e0ae472ba20cb 100644
--- a/lib/internal/Magento/Framework/Code/Generator/DefinedClasses.php
+++ b/lib/internal/Magento/Framework/Code/Generator/DefinedClasses.php
@@ -40,7 +40,7 @@ public function isClassLoadableFromMemory($className)
      *
      * @param string $className
      * @return bool
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function isClassLoadableFromDisc($className)
     {
diff --git a/lib/internal/Magento/Framework/Code/NameBuilder.php b/lib/internal/Magento/Framework/Code/NameBuilder.php
index 993235054e490..8ceac1c569766 100644
--- a/lib/internal/Magento/Framework/Code/NameBuilder.php
+++ b/lib/internal/Magento/Framework/Code/NameBuilder.php
@@ -9,6 +9,7 @@
  * Builds namespace with classname out of the parts.
  *
  * @api
+ * @since 100.0.2
  */
 class NameBuilder
 {
diff --git a/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php b/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php
index 31243f6ad98f9..840cc2a3e943c 100644
--- a/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php
+++ b/lib/internal/Magento/Framework/Code/Reader/SourceArgumentsReader.php
@@ -87,7 +87,7 @@ public function getConstructorArgumentTypes(
      * @param string $argument
      * @param array $availableNamespaces
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see getConstructorArgumentTypes
      */
     protected function resolveNamespaces($argument, $availableNamespaces)
@@ -102,7 +102,7 @@ protected function resolveNamespaces($argument, $availableNamespaces)
      * @param string $token
      * @return string
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     protected function removeToken($argument, $token)
     {
@@ -118,7 +118,7 @@ protected function removeToken($argument, $token)
      *
      * @param array $file
      * @return array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @see getConstructorArgumentTypes
      */
     protected function getImportedNamespaces(array $file)
diff --git a/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php b/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php
index b79ba49a24ddd..3f69c3258d0b9 100644
--- a/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php
+++ b/lib/internal/Magento/Framework/Communication/Config/Reader/XmlReader/Converter.php
@@ -62,7 +62,7 @@ public function __construct(
      * The getter function to get the new ConfigParser dependency.
      *
      * @return \Magento\Framework\Communication\Config\ConfigParser
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getConfigParser()
     {
diff --git a/lib/internal/Magento/Framework/Component/ComponentRegistrar.php b/lib/internal/Magento/Framework/Component/ComponentRegistrar.php
index bd20582875ce0..7fea9a4e98b67 100644
--- a/lib/internal/Magento/Framework/Component/ComponentRegistrar.php
+++ b/lib/internal/Magento/Framework/Component/ComponentRegistrar.php
@@ -9,6 +9,7 @@
  * Provides ability to statically register components.
  *
  * @api
+ * @since 100.0.2
  */
 class ComponentRegistrar implements ComponentRegistrarInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/AbstractXml.php b/lib/internal/Magento/Framework/Config/AbstractXml.php
index caead98147bf5..35ce8348c4fc0 100644
--- a/lib/internal/Magento/Framework/Config/AbstractXml.php
+++ b/lib/internal/Magento/Framework/Config/AbstractXml.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractXml
 {
diff --git a/lib/internal/Magento/Framework/Config/CacheInterface.php b/lib/internal/Magento/Framework/Config/CacheInterface.php
index 7064dcfca0547..5d28cf7563a80 100644
--- a/lib/internal/Magento/Framework/Config/CacheInterface.php
+++ b/lib/internal/Magento/Framework/Config/CacheInterface.php
@@ -11,6 +11,7 @@
  * Config cache interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface CacheInterface extends \Magento\Framework\Cache\FrontendInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/Composer/Package.php b/lib/internal/Magento/Framework/Config/Composer/Package.php
index a8ff6ac724c3f..bc0b195297980 100644
--- a/lib/internal/Magento/Framework/Config/Composer/Package.php
+++ b/lib/internal/Magento/Framework/Config/Composer/Package.php
@@ -9,6 +9,7 @@
 /**
  * A model that represents composer package
  * @api
+ * @since 100.0.2
  */
 class Package
 {
diff --git a/lib/internal/Magento/Framework/Config/ConfigOptionsListConstants.php b/lib/internal/Magento/Framework/Config/ConfigOptionsListConstants.php
index 775611c63a9f7..96999187bd6cb 100644
--- a/lib/internal/Magento/Framework/Config/ConfigOptionsListConstants.php
+++ b/lib/internal/Magento/Framework/Config/ConfigOptionsListConstants.php
@@ -11,6 +11,7 @@
 /**
  * Deployment configuration options constant storage
  * @api
+ * @since 100.0.2
  */
 class ConfigOptionsListConstants
 {
diff --git a/lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php b/lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php
index 7f64705a6bde0..d989f03b44f4d 100644
--- a/lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php
+++ b/lib/internal/Magento/Framework/Config/Converter/Dom/Flat.php
@@ -11,6 +11,7 @@
  * Universal converter of any XML data to an array representation with no data loss
  *
  * @api
+ * @since 100.0.2
  */
 class Flat
 {
diff --git a/lib/internal/Magento/Framework/Config/ConverterInterface.php b/lib/internal/Magento/Framework/Config/ConverterInterface.php
index 4e299e31fb206..ed4b811253c40 100644
--- a/lib/internal/Magento/Framework/Config/ConverterInterface.php
+++ b/lib/internal/Magento/Framework/Config/ConverterInterface.php
@@ -9,6 +9,7 @@
  * Config DOM-to-array converter interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ConverterInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/Data.php b/lib/internal/Magento/Framework/Config/Data.php
index 2ae8eb378064a..cc11b32c410ba 100644
--- a/lib/internal/Magento/Framework/Config/Data.php
+++ b/lib/internal/Magento/Framework/Config/Data.php
@@ -13,6 +13,7 @@
  *
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * @api
+ * @since 100.0.2
  */
 class Data implements \Magento\Framework\Config\DataInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/Data/ConfigData.php b/lib/internal/Magento/Framework/Config/Data/ConfigData.php
index b6ea96e36ec56..1c3d2524efa57 100644
--- a/lib/internal/Magento/Framework/Config/Data/ConfigData.php
+++ b/lib/internal/Magento/Framework/Config/Data/ConfigData.php
@@ -9,6 +9,7 @@
 /**
  * Data transfer object to store config data for config options
  * @api
+ * @since 100.0.2
  */
 class ConfigData
 {
diff --git a/lib/internal/Magento/Framework/Config/Data/Scoped.php b/lib/internal/Magento/Framework/Config/Data/Scoped.php
index 9806d89fd5737..e453e8397a9a5 100644
--- a/lib/internal/Magento/Framework/Config/Data/Scoped.php
+++ b/lib/internal/Magento/Framework/Config/Data/Scoped.php
@@ -11,6 +11,7 @@
 /**
  * Provides scoped configuration
  * @api
+ * @since 100.0.2
  */
 class Scoped extends \Magento\Framework\Config\Data
 {
diff --git a/lib/internal/Magento/Framework/Config/DataInterface.php b/lib/internal/Magento/Framework/Config/DataInterface.php
index f0fbedae5a500..0418915a2dadb 100644
--- a/lib/internal/Magento/Framework/Config/DataInterface.php
+++ b/lib/internal/Magento/Framework/Config/DataInterface.php
@@ -9,6 +9,7 @@
  * Config data interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface DataInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/Dom.php b/lib/internal/Magento/Framework/Config/Dom.php
index e36f9615db26b..227eec631a8fe 100644
--- a/lib/internal/Magento/Framework/Config/Dom.php
+++ b/lib/internal/Magento/Framework/Config/Dom.php
@@ -18,6 +18,7 @@
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
+ * @since 100.0.2
  */
 class Dom
 {
@@ -83,7 +84,6 @@ class Dom
 
     /**
      * @var array
-     * @since 2.2.0
      */
     private static $resolvedSchemaPaths = [];
 
@@ -122,7 +122,6 @@ public function __construct(
      *
      * @param string $errorFormat
      * @return string[]
-     * @since 2.1.0
      */
     private static function getXmlErrors($errorFormat)
     {
diff --git a/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php b/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php
index 41c83c940ca04..44ebe82422aba 100644
--- a/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php
+++ b/lib/internal/Magento/Framework/Config/Dom/UrnResolver.php
@@ -16,6 +16,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class UrnResolver
 {
diff --git a/lib/internal/Magento/Framework/Config/Dom/ValidationException.php b/lib/internal/Magento/Framework/Config/Dom/ValidationException.php
index 3c74a80bdfab1..1c77e510841eb 100644
--- a/lib/internal/Magento/Framework/Config/Dom/ValidationException.php
+++ b/lib/internal/Magento/Framework/Config/Dom/ValidationException.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ValidationException extends \InvalidArgumentException
 {
diff --git a/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php b/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php
index d65cfa9a2ec9b..81548c31f6ba3 100644
--- a/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php
+++ b/lib/internal/Magento/Framework/Config/Dom/ValidationSchemaException.php
@@ -13,7 +13,7 @@
 
 /**
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class ValidationSchemaException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Config/DomFactory.php b/lib/internal/Magento/Framework/Config/DomFactory.php
index 542ebd642c71d..f079674a50b9e 100644
--- a/lib/internal/Magento/Framework/Config/DomFactory.php
+++ b/lib/internal/Magento/Framework/Config/DomFactory.php
@@ -8,6 +8,7 @@
 /**
  * Magento configuration DOM factory
  * @api
+ * @since 100.0.2
  */
 class DomFactory
 {
diff --git a/lib/internal/Magento/Framework/Config/File/ConfigFilePool.php b/lib/internal/Magento/Framework/Config/File/ConfigFilePool.php
index ffc32a300ccfe..c9fa5e3ddc606 100644
--- a/lib/internal/Magento/Framework/Config/File/ConfigFilePool.php
+++ b/lib/internal/Magento/Framework/Config/File/ConfigFilePool.php
@@ -9,6 +9,7 @@
 /**
  * Stores file key to file name config
  * @api
+ * @since 100.0.2
  */
 class ConfigFilePool
 {
@@ -39,7 +40,7 @@ class ConfigFilePool
      * Initial files for configuration
      *
      * @var array
-     * @deprecated 100.2.0 Magento does not support custom config file pools since 2.2.0 version
+     * @deprecated 101.0.0 Magento does not support custom config file pools since 2.2.0 version
      */
     private $initialConfigFiles = [
         self::DIST => [
@@ -91,7 +92,7 @@ public function getPath($fileKey)
      * Returns application initial config files.
      *
      * @return array
-     * @deprecated 100.2.0 Magento does not support custom config file pools since 2.2.0 version
+     * @deprecated 101.0.0 Magento does not support custom config file pools since 2.2.0 version
      * @since 100.1.3
      */
     public function getInitialFilePools()
@@ -104,7 +105,7 @@ public function getInitialFilePools()
      *
      * @param string $pool
      * @return array
-     * @deprecated 100.2.0 Magento does not support custom config file pools since 2.2.0 version
+     * @deprecated 101.0.0 Magento does not support custom config file pools since 2.2.0 version
      * @since 100.1.3
      */
     public function getPathsByPool($pool)
diff --git a/lib/internal/Magento/Framework/Config/FileIterator.php b/lib/internal/Magento/Framework/Config/FileIterator.php
index 0de1d8ae528f9..7cf1f34b6deb6 100644
--- a/lib/internal/Magento/Framework/Config/FileIterator.php
+++ b/lib/internal/Magento/Framework/Config/FileIterator.php
@@ -12,6 +12,7 @@
 /**
  * Class FileIterator
  * @api
+ * @since 100.0.2
  */
 class FileIterator implements \Iterator, \Countable
 {
diff --git a/lib/internal/Magento/Framework/Config/FileIteratorFactory.php b/lib/internal/Magento/Framework/Config/FileIteratorFactory.php
index 15d0edd57ded8..337a6110096b9 100644
--- a/lib/internal/Magento/Framework/Config/FileIteratorFactory.php
+++ b/lib/internal/Magento/Framework/Config/FileIteratorFactory.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class FileIteratorFactory
 {
diff --git a/lib/internal/Magento/Framework/Config/FileResolver.php b/lib/internal/Magento/Framework/Config/FileResolver.php
index 30967a8fa0014..959537d76ab91 100644
--- a/lib/internal/Magento/Framework/Config/FileResolver.php
+++ b/lib/internal/Magento/Framework/Config/FileResolver.php
@@ -55,7 +55,7 @@ class FileResolver implements \Magento\Framework\Config\FileResolverInterface, D
 
     /**
      * @var DirectoryList
-     * @deprecated Unused class property
+     * @deprecated 102.0.0 Unused class property
      */
     private $directoryList;
 
diff --git a/lib/internal/Magento/Framework/Config/FileResolverInterface.php b/lib/internal/Magento/Framework/Config/FileResolverInterface.php
index a83f1da03e123..95bf7f5249561 100644
--- a/lib/internal/Magento/Framework/Config/FileResolverInterface.php
+++ b/lib/internal/Magento/Framework/Config/FileResolverInterface.php
@@ -9,6 +9,7 @@
  * File resolver interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface FileResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php
index e2008b95c3b61..b05269b33689d 100644
--- a/lib/internal/Magento/Framework/Config/Reader/Filesystem.php
+++ b/lib/internal/Magento/Framework/Config/Reader/Filesystem.php
@@ -12,6 +12,7 @@
 /**
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * @api
+ * @since 100.0.2
  */
 class Filesystem implements \Magento\Framework\Config\ReaderInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/ReaderInterface.php b/lib/internal/Magento/Framework/Config/ReaderInterface.php
index d85ed2030a262..97883d21489b5 100644
--- a/lib/internal/Magento/Framework/Config/ReaderInterface.php
+++ b/lib/internal/Magento/Framework/Config/ReaderInterface.php
@@ -11,6 +11,7 @@
  * Config reader interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ReaderInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/SchemaLocatorInterface.php b/lib/internal/Magento/Framework/Config/SchemaLocatorInterface.php
index 242f3d62a5f2a..985614051b665 100644
--- a/lib/internal/Magento/Framework/Config/SchemaLocatorInterface.php
+++ b/lib/internal/Magento/Framework/Config/SchemaLocatorInterface.php
@@ -11,6 +11,7 @@
  * Config schema locator interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface SchemaLocatorInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/ScopeInterface.php b/lib/internal/Magento/Framework/Config/ScopeInterface.php
index 052d97eebc166..bd6bc92cdea48 100644
--- a/lib/internal/Magento/Framework/Config/ScopeInterface.php
+++ b/lib/internal/Magento/Framework/Config/ScopeInterface.php
@@ -9,6 +9,7 @@
  * Config scope interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ScopeInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/ScopeListInterface.php b/lib/internal/Magento/Framework/Config/ScopeListInterface.php
index c45938db93d41..47526c8ca0a86 100644
--- a/lib/internal/Magento/Framework/Config/ScopeListInterface.php
+++ b/lib/internal/Magento/Framework/Config/ScopeListInterface.php
@@ -9,6 +9,7 @@
  * Config scope list interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ScopeListInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/Theme.php b/lib/internal/Magento/Framework/Config/Theme.php
index 812e61483b77b..a5e216d335ae4 100644
--- a/lib/internal/Magento/Framework/Config/Theme.php
+++ b/lib/internal/Magento/Framework/Config/Theme.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Theme
 {
diff --git a/lib/internal/Magento/Framework/Config/ValidationStateInterface.php b/lib/internal/Magento/Framework/Config/ValidationStateInterface.php
index 20869d20b9dc1..6d1199adda5e2 100644
--- a/lib/internal/Magento/Framework/Config/ValidationStateInterface.php
+++ b/lib/internal/Magento/Framework/Config/ValidationStateInterface.php
@@ -9,6 +9,7 @@
  * Config validation state interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ValidationStateInterface
 {
diff --git a/lib/internal/Magento/Framework/Config/View.php b/lib/internal/Magento/Framework/Config/View.php
index 05863caeec2b6..1f15c71e5ddce 100644
--- a/lib/internal/Magento/Framework/Config/View.php
+++ b/lib/internal/Magento/Framework/Config/View.php
@@ -9,6 +9,7 @@
  * View configuration files handler
  *
  * @api
+ * @since 100.0.2
  */
 class View extends \Magento\Framework\Config\Reader\Filesystem
 {
diff --git a/lib/internal/Magento/Framework/Console/CommandListInterface.php b/lib/internal/Magento/Framework/Console/CommandListInterface.php
index 1547b5b671bfd..104d22cd735bf 100644
--- a/lib/internal/Magento/Framework/Console/CommandListInterface.php
+++ b/lib/internal/Magento/Framework/Console/CommandListInterface.php
@@ -8,6 +8,7 @@
 /**
  * Contains a list of Console commands
  * @api
+ * @since 100.0.2
  */
 interface CommandListInterface
 {
diff --git a/lib/internal/Magento/Framework/Controller/Result/Json.php b/lib/internal/Magento/Framework/Controller/Result/Json.php
index f46d0875c4250..a40cbf8f78200 100644
--- a/lib/internal/Magento/Framework/Controller/Result/Json.php
+++ b/lib/internal/Magento/Framework/Controller/Result/Json.php
@@ -15,6 +15,7 @@
  * Actual for controller actions that serve ajax requests
  *
  * @api
+ * @since 100.0.2
  */
 class Json extends AbstractResult
 {
diff --git a/lib/internal/Magento/Framework/Controller/Result/Redirect.php b/lib/internal/Magento/Framework/Controller/Result/Redirect.php
index 120b18d873cff..02daae818b120 100644
--- a/lib/internal/Magento/Framework/Controller/Result/Redirect.php
+++ b/lib/internal/Magento/Framework/Controller/Result/Redirect.php
@@ -17,6 +17,7 @@
  * so this is a result object that implements all necessary properties of a HTTP redirect
  *
  * @api
+ * @since 100.0.2
  */
 class Redirect extends AbstractResult
 {
diff --git a/lib/internal/Magento/Framework/Controller/Result/RedirectFactory.php b/lib/internal/Magento/Framework/Controller/Result/RedirectFactory.php
index 0e622b1cc5e1a..797fcea4186dc 100644
--- a/lib/internal/Magento/Framework/Controller/Result/RedirectFactory.php
+++ b/lib/internal/Magento/Framework/Controller/Result/RedirectFactory.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class RedirectFactory
 {
diff --git a/lib/internal/Magento/Framework/Controller/ResultFactory.php b/lib/internal/Magento/Framework/Controller/ResultFactory.php
index bb7ab1c8b6c85..88efcdf8d3386 100644
--- a/lib/internal/Magento/Framework/Controller/ResultFactory.php
+++ b/lib/internal/Magento/Framework/Controller/ResultFactory.php
@@ -12,6 +12,7 @@
  * Result Factory
  *
  * @api
+ * @since 100.0.2
  */
 class ResultFactory
 {
diff --git a/lib/internal/Magento/Framework/Controller/ResultInterface.php b/lib/internal/Magento/Framework/Controller/ResultInterface.php
index f20f32078a9b5..3fe42ae07f566 100644
--- a/lib/internal/Magento/Framework/Controller/ResultInterface.php
+++ b/lib/internal/Magento/Framework/Controller/ResultInterface.php
@@ -14,6 +14,7 @@
  * and be able to set it to the HTTP response
  *
  * @api
+ * @since 100.0.2
  */
 interface ResultInterface
 {
diff --git a/lib/internal/Magento/Framework/Css/PreProcessor/Instruction/MagentoImport.php b/lib/internal/Magento/Framework/Css/PreProcessor/Instruction/MagentoImport.php
index db30eb4844edb..4187650938bf9 100644
--- a/lib/internal/Magento/Framework/Css/PreProcessor/Instruction/MagentoImport.php
+++ b/lib/internal/Magento/Framework/Css/PreProcessor/Instruction/MagentoImport.php
@@ -48,7 +48,7 @@ class MagentoImport implements PreProcessorInterface
 
     /**
      * @var \Magento\Framework\View\Design\Theme\ListInterface
-     * @deprecated 100.1.1
+     * @deprecated 100.0.2
      */
     protected $themeList;
 
diff --git a/lib/internal/Magento/Framework/CurrencyInterface.php b/lib/internal/Magento/Framework/CurrencyInterface.php
index ca042bda849aa..8ddaae5459c78 100644
--- a/lib/internal/Magento/Framework/CurrencyInterface.php
+++ b/lib/internal/Magento/Framework/CurrencyInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface CurrencyInterface
 {
diff --git a/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
index 5e061100c4216..d4c6108295809 100644
--- a/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
+++ b/lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
@@ -12,6 +12,7 @@
  * Magento Database Adapter Interface
  *
  * @api
+ * @since 100.0.2
  */
 interface AdapterInterface
 {
diff --git a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
index 7db91c06d9649..24ac8fe7f4b52 100644
--- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
+++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
@@ -639,7 +639,7 @@ public function query($sql, $bind = [])
      * @throws Zend_Db_Adapter_Exception To re-throw \PDOException.
      * @throws LocalizedException In case multiple queries are attempted at once, to protect from SQL injection
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function multiQuery($sql, $bind = [])
     {
@@ -3816,7 +3816,7 @@ protected function _getInsertSqlQuery($tableName, array $columns, array $values,
      * @param array $columns
      * @param array $values
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function _getReplaceSqlQuery($tableName, array $columns, array $values)
     {
diff --git a/lib/internal/Magento/Framework/DB/Ddl/Table.php b/lib/internal/Magento/Framework/DB/Ddl/Table.php
index 9d343806d66b3..e812b49f49d23 100644
--- a/lib/internal/Magento/Framework/DB/Ddl/Table.php
+++ b/lib/internal/Magento/Framework/DB/Ddl/Table.php
@@ -11,6 +11,7 @@
  * Data Definition for table
  *
  * @api
+ * @since 100.0.2
  */
 class Table
 {
diff --git a/lib/internal/Magento/Framework/DB/Ddl/Trigger.php b/lib/internal/Magento/Framework/DB/Ddl/Trigger.php
index 94427c3d9c39d..1fd58be46d6c7 100644
--- a/lib/internal/Magento/Framework/DB/Ddl/Trigger.php
+++ b/lib/internal/Magento/Framework/DB/Ddl/Trigger.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Trigger
 {
diff --git a/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php b/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php
index 2fee8d55fb673..21192dc1a2dd4 100644
--- a/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php
+++ b/lib/internal/Magento/Framework/DB/Query/BatchRangeIterator.php
@@ -35,7 +35,7 @@ class BatchRangeIterator implements BatchIteratorInterface
 
     /**
      * @var string
-     * @deprecated unused class property
+     * @deprecated 102.0.0 unused class property
      */
     private $rangeFieldAlias;
 
diff --git a/lib/internal/Magento/Framework/DB/Query/Generator.php b/lib/internal/Magento/Framework/DB/Query/Generator.php
index 0538aec760bd7..af119b16780ee 100644
--- a/lib/internal/Magento/Framework/DB/Query/Generator.php
+++ b/lib/internal/Magento/Framework/DB/Query/Generator.php
@@ -134,7 +134,7 @@ public function generate(
      * @return BatchIteratorInterface
      * @throws LocalizedException Throws if incorrect "FROM" part in \Select exists
      * @see \Magento\Framework\DB\Query\Generator
-     * @deprecated 100.2.0 This is a temporary solution which is made due to the fact that we
+     * @deprecated 100.1.8 This is a temporary solution which is made due to the fact that we
      *             can't change method generate() in version 2.1 due to a backwards incompatibility.
      *             In 2.2 version need to use original method generate() with additional parameter.
      */
diff --git a/lib/internal/Magento/Framework/DB/Select.php b/lib/internal/Magento/Framework/DB/Select.php
index 075aa6b24faa7..7d2799cf50679 100644
--- a/lib/internal/Magento/Framework/DB/Select.php
+++ b/lib/internal/Magento/Framework/DB/Select.php
@@ -28,6 +28,7 @@
  * @method \Magento\Framework\DB\Select distinct($flag = true)
  * @method \Magento\Framework\DB\Select reset($part = null)
  * @method \Magento\Framework\DB\Select columns($cols = '*', $correlationName = null)
+ * @since 100.0.2
  */
 class Select extends \Zend_Db_Select
 {
diff --git a/lib/internal/Magento/Framework/DB/SelectFactory.php b/lib/internal/Magento/Framework/DB/SelectFactory.php
index 3c64e78839c4d..306e649addff8 100644
--- a/lib/internal/Magento/Framework/DB/SelectFactory.php
+++ b/lib/internal/Magento/Framework/DB/SelectFactory.php
@@ -32,7 +32,6 @@ class SelectFactory
     /**
      * @param SelectRenderer $selectRenderer
      * @param array $parts
-     * @since 100.1.0
      */
     public function __construct(
         SelectRenderer $selectRenderer,
diff --git a/lib/internal/Magento/Framework/DB/Sql/ColumnValueExpression.php b/lib/internal/Magento/Framework/DB/Sql/ColumnValueExpression.php
index cf033dbe297f2..b51da7c47936b 100644
--- a/lib/internal/Magento/Framework/DB/Sql/ColumnValueExpression.php
+++ b/lib/internal/Magento/Framework/DB/Sql/ColumnValueExpression.php
@@ -10,7 +10,7 @@
  *
  * Just a wrapper over Expression for implementing the specific type of expression.
  * @api
- * @since 100.2.0
+ * @since 100.1.8
  */
 class ColumnValueExpression extends Expression
 {
diff --git a/lib/internal/Magento/Framework/DB/TemporaryTableService.php b/lib/internal/Magento/Framework/DB/TemporaryTableService.php
index 881ebbe5c85ad..750b65217e50f 100644
--- a/lib/internal/Magento/Framework/DB/TemporaryTableService.php
+++ b/lib/internal/Magento/Framework/DB/TemporaryTableService.php
@@ -12,7 +12,7 @@
  * Use this class to create an index with that you want to query later for quick data access
  *
  * @api
- * @since 100.2.0
+ * @since 100.1.8
  */
 class TemporaryTableService
 {
@@ -43,7 +43,6 @@ class TemporaryTableService
      * @param \Magento\Framework\Math\Random $random
      * @param string[] $allowedIndexMethods
      * @param string[] $allowedEngines
-     * @since 100.2.0
      */
     public function __construct(
         \Magento\Framework\Math\Random $random,
@@ -79,7 +78,7 @@ public function __construct(
      * @param string $dbEngine
      * @return string
      * @throws \InvalidArgumentException
-     * @since 100.2.0
+     * @since 100.1.8
      */
     public function createFromSelect(
         Select $select,
@@ -150,7 +149,7 @@ public function createFromSelect(
      *
      * @param string $name
      * @return bool
-     * @since 100.2.0
+     * @since 100.1.8
      */
     public function dropTable($name)
     {
diff --git a/lib/internal/Magento/Framework/DB/Tree.php b/lib/internal/Magento/Framework/DB/Tree.php
index 1aeaf122131f6..6fbd014213bc8 100644
--- a/lib/internal/Magento/Framework/DB/Tree.php
+++ b/lib/internal/Magento/Framework/DB/Tree.php
@@ -18,7 +18,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * phpcs:ignoreFile
  *
- * @deprecated Not used anymore.
+ * @deprecated 102.0.0 Not used anymore.
  */
 class Tree
 {
@@ -82,7 +82,7 @@ class Tree
      * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      * @SuppressWarnings(PHPMD.NPathComplexity)
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function __construct($config = [])
     {
@@ -156,7 +156,7 @@ public function __construct($config = [])
      * @param string $name
      * @return $this
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function setIdField($name)
     {
@@ -170,7 +170,7 @@ public function setIdField($name)
      * @param string $name
      * @return $this
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function setLeftField($name)
     {
@@ -184,7 +184,7 @@ public function setLeftField($name)
      * @param string $name
      * @return $this
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function setRightField($name)
     {
@@ -198,7 +198,7 @@ public function setRightField($name)
      * @param string $name
      * @return $this
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function setLevelField($name)
     {
@@ -212,7 +212,7 @@ public function setLevelField($name)
      * @param string $name
      * @return $this
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function setPidField($name)
     {
@@ -226,7 +226,7 @@ public function setPidField($name)
      * @param string $name
      * @return $this
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function setTable($name)
     {
@@ -237,7 +237,7 @@ public function setTable($name)
     /**
      * @return array
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function getKeys()
     {
@@ -256,7 +256,7 @@ public function getKeys()
      * @param array $data
      * @return string
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function clear($data = [])
     {
@@ -283,7 +283,7 @@ public function clear($data = [])
      * @param string|int $nodeId
      * @return array
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function getNodeInfo($nodeId)
     {
@@ -303,7 +303,7 @@ public function getNodeInfo($nodeId)
      * @param array $data
      * @return false|string
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function appendChild($nodeId, $data)
     {
@@ -371,7 +371,7 @@ public function appendChild($nodeId, $data)
     /**
      * @return array
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function checkNodes()
     {
@@ -403,7 +403,7 @@ public function checkNodes()
      * @param string|int $nodeId
      * @return bool|Node|void
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function removeNode($nodeId)
     {
@@ -479,7 +479,7 @@ public function removeNode($nodeId)
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function moveNode($eId, $pId, $aId = 0)
     {
@@ -815,7 +815,7 @@ public function moveNode($eId, $pId, $aId = 0)
      * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      * @SuppressWarnings(PHPMD.UnusedLocalVariable)
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function moveNodes($eId, $pId, $aId = 0)
     {
@@ -1015,7 +1015,7 @@ public function moveNodes($eId, $pId, $aId = 0)
      * @param string $fields
      * @return void
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function addTable($tableName, $joinCondition, $fields = '*')
     {
@@ -1026,7 +1026,7 @@ public function addTable($tableName, $joinCondition, $fields = '*')
      * @param Select $select
      * @return void
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     protected function _addExtTablesToSelect(Select &$select)
     {
@@ -1041,7 +1041,7 @@ protected function _addExtTablesToSelect(Select &$select)
      * @param int $endLevel
      * @return NodeSet
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function getChildren($nodeId, $startLevel = 0, $endLevel = 0)
     {
@@ -1088,7 +1088,7 @@ public function getChildren($nodeId, $startLevel = 0, $endLevel = 0)
      * @param string|int $nodeId
      * @return Node
      *
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.0 Not used anymore.
      */
     public function getNode($nodeId)
     {
diff --git a/lib/internal/Magento/Framework/DB/Tree/Node.php b/lib/internal/Magento/Framework/DB/Tree/Node.php
index eb954a696e21e..507a09476abba 100644
--- a/lib/internal/Magento/Framework/DB/Tree/Node.php
+++ b/lib/internal/Magento/Framework/DB/Tree/Node.php
@@ -11,7 +11,7 @@
 /**
  * @SuppressWarnings(PHPMD.UnusedPrivateField)
  *
- * @deprecated Not used anymore.
+ * @deprecated 102.0.0 Not used anymore.
  */
 class Node
 {
@@ -53,14 +53,14 @@ class Node
     /**
      * @var bool
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public $hasChild = false;
 
     /**
      * @var float|int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public $numChild = 0;
 
@@ -69,7 +69,7 @@ class Node
      * @param array $keys
      * @throws LocalizedException
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function __construct($nodeData, $keys)
     {
@@ -103,7 +103,7 @@ public function __construct($nodeData, $keys)
      * @param string $name
      * @return null|array
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function getData($name)
     {
@@ -117,7 +117,7 @@ public function getData($name)
     /**
      * @return int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function getLevel()
     {
@@ -127,7 +127,7 @@ public function getLevel()
     /**
      * @return int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function getLeft()
     {
@@ -137,7 +137,7 @@ public function getLeft()
     /**
      * @return int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function getRight()
     {
@@ -147,7 +147,7 @@ public function getRight()
     /**
      * @return string|int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function getPid()
     {
@@ -157,7 +157,7 @@ public function getPid()
     /**
      * @return string|int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function getId()
     {
@@ -169,7 +169,7 @@ public function getId()
      *
      * @return bool
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function isParent()
     {
diff --git a/lib/internal/Magento/Framework/DB/Tree/NodeSet.php b/lib/internal/Magento/Framework/DB/Tree/NodeSet.php
index 75e677b77ae45..e861a90f7cd0d 100644
--- a/lib/internal/Magento/Framework/DB/Tree/NodeSet.php
+++ b/lib/internal/Magento/Framework/DB/Tree/NodeSet.php
@@ -8,7 +8,7 @@
 /**
  * TODO implements iterators
  *
- * @deprecated Not used anymore.
+ * @deprecated 102.0.0 Not used anymore.
  */
 class NodeSet implements \Iterator, \Countable
 {
@@ -35,7 +35,7 @@ class NodeSet implements \Iterator, \Countable
     /**
      * Constructor
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function __construct()
     {
@@ -49,7 +49,7 @@ public function __construct()
      * @param Node $node
      * @return int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function addNode(Node $node)
     {
@@ -61,7 +61,7 @@ public function addNode(Node $node)
     /**
      * @return int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function count()
     {
@@ -71,7 +71,7 @@ public function count()
     /**
      * @return bool
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function valid()
     {
@@ -81,7 +81,7 @@ public function valid()
     /**
      * @return false|int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function next()
     {
@@ -95,7 +95,7 @@ public function next()
     /**
      * @return int
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function key()
     {
@@ -105,7 +105,7 @@ public function key()
     /**
      * @return Node
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function current()
     {
@@ -115,7 +115,7 @@ public function current()
     /**
      * @return void
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function rewind()
     {
diff --git a/lib/internal/Magento/Framework/Data/AbstractSearchResult.php b/lib/internal/Magento/Framework/Data/AbstractSearchResult.php
index f9272683005ce..05c8e39f52465 100644
--- a/lib/internal/Magento/Framework/Data/AbstractSearchResult.php
+++ b/lib/internal/Magento/Framework/Data/AbstractSearchResult.php
@@ -64,7 +64,7 @@ abstract class AbstractSearchResult extends AbstractDataObject implements Search
     
     /**
      * @var \Magento\Framework\DB\Select
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $select;
 
diff --git a/lib/internal/Magento/Framework/Data/Argument/InterpreterInterface.php b/lib/internal/Magento/Framework/Data/Argument/InterpreterInterface.php
index 2deabdf9829ae..178efc3b23463 100644
--- a/lib/internal/Magento/Framework/Data/Argument/InterpreterInterface.php
+++ b/lib/internal/Magento/Framework/Data/Argument/InterpreterInterface.php
@@ -9,6 +9,7 @@
  * Interface that encapsulates complexity of expression computation
  *
  * @api
+ * @since 100.0.2
  */
 interface InterpreterInterface
 {
diff --git a/lib/internal/Magento/Framework/Data/Collection.php b/lib/internal/Magento/Framework/Data/Collection.php
index 7c9cf02ac6a47..51a066f2660dd 100644
--- a/lib/internal/Magento/Framework/Data/Collection.php
+++ b/lib/internal/Magento/Framework/Data/Collection.php
@@ -18,6 +18,7 @@
  * TODO: Refactor use of \Magento\Framework\Option\ArrayInterface in library.
  *
  * @api
+ * @since 100.0.2
  */
 class Collection implements \IteratorAggregate, \Countable, ArrayInterface, CollectionDataSourceInterface
 {
diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php
index 8a22c9a1ce4fc..b829f063ac2de 100644
--- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php
+++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php
@@ -19,6 +19,7 @@
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 abstract class AbstractDb extends \Magento\Framework\Data\Collection
 {
diff --git a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php
index 629b992b32cfd..6103a7df5bf0d 100644
--- a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php
+++ b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php
@@ -25,6 +25,7 @@
  * At least one target directory must be set
  *
  * @api
+ * @since 100.0.2
  */
 class Filesystem extends \Magento\Framework\Data\Collection
 {
diff --git a/lib/internal/Magento/Framework/Data/Form.php b/lib/internal/Magento/Framework/Data/Form.php
index abeda0c17542e..a9cdfbf5f9ae7 100644
--- a/lib/internal/Magento/Framework/Data/Form.php
+++ b/lib/internal/Magento/Framework/Data/Form.php
@@ -16,6 +16,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Form extends \Magento\Framework\Data\Form\AbstractForm
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
index fc1f2dd890cab..33f2c215b63bb 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php
@@ -20,6 +20,7 @@
  * @api
  * @author     Magento Core Team <core@magentocommerce.com>
  * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @since 100.0.2
  */
 abstract class AbstractElement extends AbstractForm
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php b/lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php
index 90482ab55fc71..d2c44c0f112a6 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Fieldset.php
@@ -13,6 +13,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Fieldset extends AbstractElement
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php b/lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php
index 6cd22e0f50d5e..18a0d30ba3a6d 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Renderer/RendererInterface.php
@@ -13,6 +13,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface RendererInterface
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Select.php b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
index c9529af80124f..e0563c6fa75ad 100644
--- a/lib/internal/Magento/Framework/Data/Form/Element/Select.php
+++ b/lib/internal/Magento/Framework/Data/Form/Element/Select.php
@@ -15,6 +15,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Select extends AbstractElement
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php b/lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php
index f7205fd6946a2..a9bf479cfce05 100644
--- a/lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php
+++ b/lib/internal/Magento/Framework/Data/Form/Filter/FilterInterface.php
@@ -13,6 +13,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface FilterInterface
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/FormKey.php b/lib/internal/Magento/Framework/Data/Form/FormKey.php
index 355460902eee6..2f8c6724f7a2e 100644
--- a/lib/internal/Magento/Framework/Data/Form/FormKey.php
+++ b/lib/internal/Magento/Framework/Data/Form/FormKey.php
@@ -13,6 +13,7 @@
  * @api
  *
  * @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
+ * @since 100.0.2
  */
 class FormKey
 {
diff --git a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php
index 225ff1fd140a9..a99692ed31609 100644
--- a/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php
+++ b/lib/internal/Magento/Framework/Data/Form/FormKey/Validator.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Validator
 {
diff --git a/lib/internal/Magento/Framework/Data/OptionSourceInterface.php b/lib/internal/Magento/Framework/Data/OptionSourceInterface.php
index aac9a266c7957..6d0955f294072 100644
--- a/lib/internal/Magento/Framework/Data/OptionSourceInterface.php
+++ b/lib/internal/Magento/Framework/Data/OptionSourceInterface.php
@@ -9,6 +9,7 @@
  * Source of option values in a form of value-label pairs
  *
  * @api
+ * @since 100.0.2
  */
 interface OptionSourceInterface
 {
diff --git a/lib/internal/Magento/Framework/Data/Tree.php b/lib/internal/Magento/Framework/Data/Tree.php
index b458338184885..14197eb20c00c 100644
--- a/lib/internal/Magento/Framework/Data/Tree.php
+++ b/lib/internal/Magento/Framework/Data/Tree.php
@@ -13,6 +13,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Tree
 {
diff --git a/lib/internal/Magento/Framework/Data/Tree/Node.php b/lib/internal/Magento/Framework/Data/Tree/Node.php
index f1901b71f21e6..ac0ac57e72969 100644
--- a/lib/internal/Magento/Framework/Data/Tree/Node.php
+++ b/lib/internal/Magento/Framework/Data/Tree/Node.php
@@ -13,6 +13,7 @@
  *
  * @api
  * @author      Magento Core Team <core@magentocommerce.com>
+ * @since 100.0.2
  */
 class Node extends \Magento\Framework\DataObject
 {
diff --git a/lib/internal/Magento/Framework/Data/Tree/Node/Collection.php b/lib/internal/Magento/Framework/Data/Tree/Node/Collection.php
index 94990c0340a83..cf6529988eb44 100644
--- a/lib/internal/Magento/Framework/Data/Tree/Node/Collection.php
+++ b/lib/internal/Magento/Framework/Data/Tree/Node/Collection.php
@@ -16,6 +16,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Collection implements \ArrayAccess, \IteratorAggregate, \Countable
 {
diff --git a/lib/internal/Magento/Framework/Data/Wysiwyg/ConfigProviderInterface.php b/lib/internal/Magento/Framework/Data/Wysiwyg/ConfigProviderInterface.php
index dc1dabd42d9e8..07fbd302ac573 100644
--- a/lib/internal/Magento/Framework/Data/Wysiwyg/ConfigProviderInterface.php
+++ b/lib/internal/Magento/Framework/Data/Wysiwyg/ConfigProviderInterface.php
@@ -10,12 +10,14 @@
 /**
  * Interface ConfigProviderInterface
  * @api
+ * @since 102.0.0
  */
 interface ConfigProviderInterface
 {
     /**
      * @param \Magento\Framework\DataObject $config
      * @return \Magento\Framework\DataObject
+     * @since 102.0.0
      */
     public function getConfig(\Magento\Framework\DataObject $config) : \Magento\Framework\DataObject;
 }
diff --git a/lib/internal/Magento/Framework/DataObject.php b/lib/internal/Magento/Framework/DataObject.php
index 6ecbca133e22a..11452c49fa162 100644
--- a/lib/internal/Magento/Framework/DataObject.php
+++ b/lib/internal/Magento/Framework/DataObject.php
@@ -10,6 +10,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @since 100.0.2
  */
 class DataObject implements \ArrayAccess
 {
diff --git a/lib/internal/Magento/Framework/DataObject/Copy.php b/lib/internal/Magento/Framework/DataObject/Copy.php
index e8bc194a1d983..7a400ac449577 100644
--- a/lib/internal/Magento/Framework/DataObject/Copy.php
+++ b/lib/internal/Magento/Framework/DataObject/Copy.php
@@ -268,7 +268,7 @@ protected function _setFieldsetFieldValue($target, $targetCode, $value)
      * @return mixed
      * @throws \InvalidArgumentException
      *
-     * @deprecated
+     * @deprecated 102.0.3
      * @see \Magento\Framework\DataObject\Copy::getAttributeValueFromExtensibleObject
      */
     protected function getAttributeValueFromExtensibleDataObject($source, $code)
@@ -325,7 +325,7 @@ private function getAttributeValueFromExtensibleObject(ExtensibleDataInterface $
      * @return void
      * @throws \InvalidArgumentException
      *
-     * @deprecated
+     * @deprecated 102.0.3
      * @see \Magento\Framework\DataObject\Copy::setAttributeValueFromExtensibleObject
      */
     protected function setAttributeValueFromExtensibleDataObject(ExtensibleDataInterface $target, $code, $value)
diff --git a/lib/internal/Magento/Framework/Encryption/Crypt.php b/lib/internal/Magento/Framework/Encryption/Crypt.php
index 930cfa7a44f68..55f4d1a31f53d 100644
--- a/lib/internal/Magento/Framework/Encryption/Crypt.php
+++ b/lib/internal/Magento/Framework/Encryption/Crypt.php
@@ -12,7 +12,8 @@
  * Class encapsulates cryptographic algorithm
  *
  * @api
- * @deprecated
+ * @deprecated 102.0.0
+ * @since 100.0.2
  */
 class Crypt
 {
diff --git a/lib/internal/Magento/Framework/Encryption/EncryptorInterface.php b/lib/internal/Magento/Framework/Encryption/EncryptorInterface.php
index 778cfcb897e0b..61d546daf3796 100644
--- a/lib/internal/Magento/Framework/Encryption/EncryptorInterface.php
+++ b/lib/internal/Magento/Framework/Encryption/EncryptorInterface.php
@@ -9,6 +9,7 @@
  * Encryptor interface
  *
  * @api
+ * @since 100.0.2
  */
 interface EncryptorInterface
 {
diff --git a/lib/internal/Magento/Framework/Encryption/Helper/Security.php b/lib/internal/Magento/Framework/Encryption/Helper/Security.php
index 0320468b35f02..52597c6a028b4 100644
--- a/lib/internal/Magento/Framework/Encryption/Helper/Security.php
+++ b/lib/internal/Magento/Framework/Encryption/Helper/Security.php
@@ -12,6 +12,7 @@
  * Class implements compareString from Laminas\Crypt
  *
  * @api
+ * @since 100.0.2
  */
 class Security
 {
diff --git a/lib/internal/Magento/Framework/Encryption/UrlCoder.php b/lib/internal/Magento/Framework/Encryption/UrlCoder.php
index 12e3bb27b6724..f63e64bb66e6c 100644
--- a/lib/internal/Magento/Framework/Encryption/UrlCoder.php
+++ b/lib/internal/Magento/Framework/Encryption/UrlCoder.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class UrlCoder
 {
diff --git a/lib/internal/Magento/Framework/EntityManager/MetadataPool.php b/lib/internal/Magento/Framework/EntityManager/MetadataPool.php
index dc295b97c1d28..d787daf3d1181 100644
--- a/lib/internal/Magento/Framework/EntityManager/MetadataPool.php
+++ b/lib/internal/Magento/Framework/EntityManager/MetadataPool.php
@@ -46,7 +46,6 @@ class MetadataPool
      * @param ObjectManagerInterface $objectManager
      * @param SequenceFactory $sequenceFactory
      * @param array $metadata
-     * @since 100.1.0
      */
     public function __construct(
         ObjectManagerInterface $objectManager,
diff --git a/lib/internal/Magento/Framework/EntityManager/Operation/Create.php b/lib/internal/Magento/Framework/EntityManager/Operation/Create.php
index ae9001be9e34f..a24ec39a2156d 100644
--- a/lib/internal/Magento/Framework/EntityManager/Operation/Create.php
+++ b/lib/internal/Magento/Framework/EntityManager/Operation/Create.php
@@ -142,7 +142,7 @@ public function execute($entity, $arguments = [])
     /**
      * @return SequenceApplier
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSequenceApplier()
     {
diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php
index 6af03a868cc49..9c67d2e891345 100644
--- a/lib/internal/Magento/Framework/Escaper.php
+++ b/lib/internal/Magento/Framework/Escaper.php
@@ -10,6 +10,7 @@
  * Magento escape methods
  *
  * @api
+ * @since 100.0.2
  */
 class Escaper
 {
@@ -252,7 +253,7 @@ private function escapeAttributeValue($name, $value)
      * @param string $string
      * @param boolean $escapeSingleQuote
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function escapeHtmlAttr($string, $escapeSingleQuote = true)
     {
@@ -278,7 +279,7 @@ public function escapeUrl($string)
      *
      * @param string $string
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function encodeUrlParam($string)
     {
@@ -290,7 +291,7 @@ public function encodeUrlParam($string)
      *
      * @param string $string
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function escapeJs($string)
     {
@@ -317,7 +318,7 @@ function ($matches) {
      *
      * @param string $string
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function escapeCss($string)
     {
@@ -330,7 +331,7 @@ public function escapeCss($string)
      * @param string|string[]|array $data
      * @param string $quote
      * @return string|array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escapeJsQuote($data, $quote = '\'')
     {
@@ -350,7 +351,7 @@ public function escapeJsQuote($data, $quote = '\'')
      *
      * @param string $data
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escapeXssInUrl($data)
     {
@@ -398,7 +399,7 @@ private function escapeScriptIdentifiers(string $data): string
      * @param string $data
      * @param bool $addSlashes
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escapeQuote($data, $addSlashes = false)
     {
@@ -412,7 +413,7 @@ public function escapeQuote($data, $addSlashes = false)
      * Get escaper
      *
      * @return \Magento\Framework\ZendEscaper
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getEscaper()
     {
@@ -427,7 +428,7 @@ private function getEscaper()
      * Get logger
      *
      * @return \Psr\Log\LoggerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getLogger()
     {
diff --git a/lib/internal/Magento/Framework/Event.php b/lib/internal/Magento/Framework/Event.php
index c7b15a8eb0722..9df9c315ccad8 100644
--- a/lib/internal/Magento/Framework/Event.php
+++ b/lib/internal/Magento/Framework/Event.php
@@ -13,6 +13,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Event extends \Magento\Framework\DataObject
 {
diff --git a/lib/internal/Magento/Framework/Event/Observer.php b/lib/internal/Magento/Framework/Event/Observer.php
index 4b5dc47795e6c..f3d954d641dfd 100644
--- a/lib/internal/Magento/Framework/Event/Observer.php
+++ b/lib/internal/Magento/Framework/Event/Observer.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Observer extends \Magento\Framework\DataObject
 {
diff --git a/lib/internal/Magento/Framework/Event/Observer/Collection.php b/lib/internal/Magento/Framework/Event/Observer/Collection.php
index c108d422cc9ca..595ee8f70da3a 100644
--- a/lib/internal/Magento/Framework/Event/Observer/Collection.php
+++ b/lib/internal/Magento/Framework/Event/Observer/Collection.php
@@ -13,6 +13,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Collection
 {
diff --git a/lib/internal/Magento/Framework/Event/ObserverInterface.php b/lib/internal/Magento/Framework/Event/ObserverInterface.php
index e7c9b770ea1f5..e07de37c0e15b 100644
--- a/lib/internal/Magento/Framework/Event/ObserverInterface.php
+++ b/lib/internal/Magento/Framework/Event/ObserverInterface.php
@@ -11,6 +11,7 @@
  * Interface \Magento\Framework\Event\ObserverInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface ObserverInterface
 {
diff --git a/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php b/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php
index ff142c5319006..7cc968789e4e2 100644
--- a/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php
+++ b/lib/internal/Magento/Framework/Exception/AbstractAggregateException.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractAggregateException extends LocalizedException implements AggregateExceptionInterface
 {
@@ -81,6 +82,7 @@ public function addError(Phrase $phrase)
     /**
      * @param LocalizedException $exception
      * @return $this
+     * @since 101.0.6
      */
     public function addException(LocalizedException $exception)
     {
diff --git a/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php b/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php
index d7b6f6fce3f8f..d1a9846b9cc3c 100644
--- a/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php
+++ b/lib/internal/Magento/Framework/Exception/AggregateExceptionInterface.php
@@ -10,6 +10,7 @@
  * not mandating to inherit from AbstractAggregateException class
  *
  * @api
+ * @since 101.0.7
  */
 interface AggregateExceptionInterface
 {
@@ -20,6 +21,7 @@ interface AggregateExceptionInterface
      * @see the \Magento\Framework\Webapi\Exception which receives $errors as a set of Localized Exceptions
      *
      * @return LocalizedException[]
+     * @since 101.0.7
      */
     public function getErrors();
 }
diff --git a/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php b/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php
index eaef391521979..e64f147a13ea7 100644
--- a/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php
+++ b/lib/internal/Magento/Framework/Exception/AlreadyExistsException.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class AlreadyExistsException extends LocalizedException
 {
@@ -16,7 +17,6 @@ class AlreadyExistsException extends LocalizedException
      * @param Phrase $phrase
      * @param \Exception $cause
      * @param int $code
-     * @since 100.2.0
      */
     public function __construct(Phrase $phrase = null, \Exception $cause = null, $code = 0)
     {
diff --git a/lib/internal/Magento/Framework/Exception/AuthenticationException.php b/lib/internal/Magento/Framework/Exception/AuthenticationException.php
index 9b20dea99ccf9..b16c1f5841c3d 100644
--- a/lib/internal/Magento/Framework/Exception/AuthenticationException.php
+++ b/lib/internal/Magento/Framework/Exception/AuthenticationException.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class AuthenticationException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/AuthorizationException.php b/lib/internal/Magento/Framework/Exception/AuthorizationException.php
index ed310117d6717..9cc6b4d8094bc 100644
--- a/lib/internal/Magento/Framework/Exception/AuthorizationException.php
+++ b/lib/internal/Magento/Framework/Exception/AuthorizationException.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class AuthorizationException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/BulkException.php b/lib/internal/Magento/Framework/Exception/BulkException.php
index 168e910e0d375..a7ec480341542 100644
--- a/lib/internal/Magento/Framework/Exception/BulkException.php
+++ b/lib/internal/Magento/Framework/Exception/BulkException.php
@@ -12,6 +12,7 @@
  * Exception thrown while processing bulk of entities
  *
  * @api
+ * @since 101.0.7
  */
 class BulkException extends AbstractAggregateException
 {
@@ -42,6 +43,7 @@ public function __construct(Phrase $phrase = null, \Exception $cause = null, $co
      * Add data
      *
      * @param array $data
+     * @since 101.0.7
      */
     public function addData($data)
     {
@@ -52,6 +54,7 @@ public function addData($data)
      * Retrieve data
      *
      * @return array
+     * @since 101.0.7
      */
     public function getData()
     {
diff --git a/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php b/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php
index af8e4c3c0ec57..d22a9168e1d01 100644
--- a/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php
+++ b/lib/internal/Magento/Framework/Exception/CouldNotDeleteException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class CouldNotDeleteException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php b/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php
index ea265864afd24..b0480c49d2940 100644
--- a/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php
+++ b/lib/internal/Magento/Framework/Exception/CouldNotSaveException.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class CouldNotSaveException extends AbstractAggregateException
 {
diff --git a/lib/internal/Magento/Framework/Exception/CronException.php b/lib/internal/Magento/Framework/Exception/CronException.php
index 22d23526a6558..feff3f3cb95a4 100644
--- a/lib/internal/Magento/Framework/Exception/CronException.php
+++ b/lib/internal/Magento/Framework/Exception/CronException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class CronException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php b/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php
index 330f34fb565ce..1a114f19d731e 100644
--- a/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php
+++ b/lib/internal/Magento/Framework/Exception/EmailNotConfirmedException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class EmailNotConfirmedException extends AuthenticationException
 {
diff --git a/lib/internal/Magento/Framework/Exception/FileSystemException.php b/lib/internal/Magento/Framework/Exception/FileSystemException.php
index 6c85314b6f2a6..81078ae7cd31c 100644
--- a/lib/internal/Magento/Framework/Exception/FileSystemException.php
+++ b/lib/internal/Magento/Framework/Exception/FileSystemException.php
@@ -9,6 +9,7 @@
  * Magento filesystem exception
  *
  * @api
+ * @since 100.0.2
  */
 class FileSystemException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/InputException.php b/lib/internal/Magento/Framework/Exception/InputException.php
index 7b1815dc0d1bb..f85baf4c9b0b9 100644
--- a/lib/internal/Magento/Framework/Exception/InputException.php
+++ b/lib/internal/Magento/Framework/Exception/InputException.php
@@ -12,6 +12,7 @@
  * Exception to be thrown when there is an issue with the Input to a function call.
  *
  * @api
+ * @since 100.0.2
  */
 class InputException extends AbstractAggregateException
 {
diff --git a/lib/internal/Magento/Framework/Exception/IntegrationException.php b/lib/internal/Magento/Framework/Exception/IntegrationException.php
index 9adf9c740f0e2..56db6caecacf2 100644
--- a/lib/internal/Magento/Framework/Exception/IntegrationException.php
+++ b/lib/internal/Magento/Framework/Exception/IntegrationException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class IntegrationException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php b/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php
index ba5b7d94f5328..38e69f0476b77 100644
--- a/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php
+++ b/lib/internal/Magento/Framework/Exception/InvalidEmailOrPasswordException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class InvalidEmailOrPasswordException extends AuthenticationException
 {
diff --git a/lib/internal/Magento/Framework/Exception/LocalizedException.php b/lib/internal/Magento/Framework/Exception/LocalizedException.php
index 977c69db77bbc..b279fe65906a3 100644
--- a/lib/internal/Magento/Framework/Exception/LocalizedException.php
+++ b/lib/internal/Magento/Framework/Exception/LocalizedException.php
@@ -14,6 +14,7 @@
  * Localized exception
  *
  * @api
+ * @since 100.0.2
  */
 class LocalizedException extends \Exception
 {
diff --git a/lib/internal/Magento/Framework/Exception/MailException.php b/lib/internal/Magento/Framework/Exception/MailException.php
index 1475ba04257c9..708f03adbe7b0 100644
--- a/lib/internal/Magento/Framework/Exception/MailException.php
+++ b/lib/internal/Magento/Framework/Exception/MailException.php
@@ -9,6 +9,7 @@
  * Magento mail exception
  *
  * @api
+ * @since 100.0.2
  */
 class MailException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php b/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php
index 42b30d45e4c72..f39fef57ed568 100644
--- a/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php
+++ b/lib/internal/Magento/Framework/Exception/NoSuchEntityException.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class NoSuchEntityException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/NotFoundException.php b/lib/internal/Magento/Framework/Exception/NotFoundException.php
index 40e02e70fa37c..cfc02f4f516d6 100644
--- a/lib/internal/Magento/Framework/Exception/NotFoundException.php
+++ b/lib/internal/Magento/Framework/Exception/NotFoundException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class NotFoundException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/PaymentException.php b/lib/internal/Magento/Framework/Exception/PaymentException.php
index 83b189d020ee3..fb52401229ba4 100644
--- a/lib/internal/Magento/Framework/Exception/PaymentException.php
+++ b/lib/internal/Magento/Framework/Exception/PaymentException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class PaymentException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php b/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php
index 2a5564181d43f..4d559a548eff6 100644
--- a/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php
+++ b/lib/internal/Magento/Framework/Exception/Plugin/AuthenticationException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class AuthenticationException extends \Magento\Framework\Exception\AuthenticationException
 {
diff --git a/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php b/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php
index a9af31b003333..50f01473b9dc9 100644
--- a/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php
+++ b/lib/internal/Magento/Framework/Exception/RemoteServiceUnavailableException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class RemoteServiceUnavailableException extends AuthenticationException
 {
diff --git a/lib/internal/Magento/Framework/Exception/SerializationException.php b/lib/internal/Magento/Framework/Exception/SerializationException.php
index bae56b487975c..cbb40de6578f0 100644
--- a/lib/internal/Magento/Framework/Exception/SerializationException.php
+++ b/lib/internal/Magento/Framework/Exception/SerializationException.php
@@ -12,6 +12,7 @@
  * Serialization Exception
  *
  * @api
+ * @since 100.0.2
  */
 class SerializationException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/SessionException.php b/lib/internal/Magento/Framework/Exception/SessionException.php
index b3af3ea5b5bb0..0127e3fa551e6 100644
--- a/lib/internal/Magento/Framework/Exception/SessionException.php
+++ b/lib/internal/Magento/Framework/Exception/SessionException.php
@@ -9,6 +9,7 @@
  * Session exception
  *
  * @api
+ * @since 100.0.2
  */
 class SessionException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/State/ExpiredException.php b/lib/internal/Magento/Framework/Exception/State/ExpiredException.php
index 29748b52c8351..9f127b2d1fa29 100644
--- a/lib/internal/Magento/Framework/Exception/State/ExpiredException.php
+++ b/lib/internal/Magento/Framework/Exception/State/ExpiredException.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ExpiredException extends StateException
 {
diff --git a/lib/internal/Magento/Framework/Exception/State/InitException.php b/lib/internal/Magento/Framework/Exception/State/InitException.php
index 9ca7de26c58d7..ad2e6ef283deb 100644
--- a/lib/internal/Magento/Framework/Exception/State/InitException.php
+++ b/lib/internal/Magento/Framework/Exception/State/InitException.php
@@ -11,6 +11,7 @@
  * An exception that indicates application initialization error
  *
  * @api
+ * @since 100.0.2
  */
 class InitException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php b/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php
index 752ebcf4804b1..efc8e1b4afe3e 100644
--- a/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php
+++ b/lib/internal/Magento/Framework/Exception/State/InputMismatchException.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class InputMismatchException extends StateException
 {
diff --git a/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php b/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php
index 2667d1745767e..c66163e87c9c1 100644
--- a/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php
+++ b/lib/internal/Magento/Framework/Exception/State/InvalidTransitionException.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class InvalidTransitionException extends StateException
 {
diff --git a/lib/internal/Magento/Framework/Exception/State/UserLockedException.php b/lib/internal/Magento/Framework/Exception/State/UserLockedException.php
index fa39556f6eecc..63e81f987f776 100644
--- a/lib/internal/Magento/Framework/Exception/State/UserLockedException.php
+++ b/lib/internal/Magento/Framework/Exception/State/UserLockedException.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class UserLockedException extends AuthenticationException
 {
diff --git a/lib/internal/Magento/Framework/Exception/StateException.php b/lib/internal/Magento/Framework/Exception/StateException.php
index 580ef6fabe2fa..ed80b9c2df35b 100644
--- a/lib/internal/Magento/Framework/Exception/StateException.php
+++ b/lib/internal/Magento/Framework/Exception/StateException.php
@@ -9,6 +9,7 @@
  * State Exception
  *
  * @api
+ * @since 100.0.2
  */
 class StateException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php b/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php
index 894b5be3f0bd1..4c59205b24519 100644
--- a/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php
+++ b/lib/internal/Magento/Framework/Exception/TemporaryState/CouldNotSaveException.php
@@ -13,7 +13,7 @@
  * CouldNotSaveException caused by recoverable error
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class CouldNotSaveException extends LocalizedCouldNotSaveException implements TemporaryStateExceptionInterface
 {
@@ -23,7 +23,6 @@ class CouldNotSaveException extends LocalizedCouldNotSaveException implements Te
      * @param Phrase $phrase The Exception message to throw.
      * @param \Exception $previous [optional] The previous exception used for the exception chaining.
      * @param int $code [optional] The Exception code.
-     * @since 100.2.0
      */
     public function __construct(Phrase $phrase, \Exception $previous = null, $code = 0)
     {
diff --git a/lib/internal/Magento/Framework/Exception/ValidatorException.php b/lib/internal/Magento/Framework/Exception/ValidatorException.php
index 1066fe268df44..9dbb994c111f9 100644
--- a/lib/internal/Magento/Framework/Exception/ValidatorException.php
+++ b/lib/internal/Magento/Framework/Exception/ValidatorException.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ValidatorException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/File/Csv.php b/lib/internal/Magento/Framework/File/Csv.php
index 571ad6b21efa7..1b1decdb5327c 100644
--- a/lib/internal/Magento/Framework/File/Csv.php
+++ b/lib/internal/Magento/Framework/File/Csv.php
@@ -130,7 +130,7 @@ public function getDataPairs($file, $keyIndex = 0, $valueIndex = 1)
      * @param array $data
      * @return $this
      * @throws \Magento\Framework\Exception\FileSystemException
-     * @deprecated
+     * @deprecated 102.0.0
      * @see appendData
      */
     public function saveData($file, $data)
diff --git a/lib/internal/Magento/Framework/File/Size.php b/lib/internal/Magento/Framework/File/Size.php
index c5a51ec1760e7..52cf572186f9f 100644
--- a/lib/internal/Magento/Framework/File/Size.php
+++ b/lib/internal/Magento/Framework/File/Size.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Size
 {
diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php
index f9b41709ec7c8..c0126acf70041 100644
--- a/lib/internal/Magento/Framework/File/Uploader.php
+++ b/lib/internal/Magento/Framework/File/Uploader.php
@@ -18,6 +18,7 @@
  * @SuppressWarnings(PHPMD.TooManyFields)
  *
  * @api
+ * @since 100.0.2
  */
 class Uploader
 {
@@ -701,7 +702,7 @@ public static function getNewFileName($destinationFile)
      *
      * @param string $fileName
      * @return string
-     * @deprecated
+     * @deprecated 101.0.4
      */
     public static function getDispretionPath($fileName)
     {
@@ -713,6 +714,7 @@ public static function getDispretionPath($fileName)
      *
      * @param string $fileName
      * @return string
+     * @since 101.0.4
      */
     public static function getDispersionPath($fileName)
     {
diff --git a/lib/internal/Magento/Framework/Filesystem.php b/lib/internal/Magento/Framework/Filesystem.php
index 01877fe17a716..1f65bd6885fcd 100644
--- a/lib/internal/Magento/Framework/Filesystem.php
+++ b/lib/internal/Magento/Framework/Filesystem.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Filesystem
 {
@@ -78,6 +79,7 @@ public function getDirectoryRead($directoryCode, $driverCode = DriverPool::FILE)
      *
      * @return \Magento\Framework\Filesystem\Directory\ReadInterface
      *
+     * @since 102.0.0
      */
     public function getDirectoryReadByPath($path, $driverCode = DriverPool::FILE)
     {
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php
index e23eadd57d866..d16fab37818b0 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php
@@ -11,6 +11,7 @@
 /**
  * Filesystem directory instance for read operations
  * @api
+ * @since 100.0.2
  */
 class Read implements ReadInterface
 {
@@ -67,6 +68,7 @@ public function __construct(
      * @throws ValidatorException
      *
      * @return void
+     * @since 101.0.7
      */
     protected function validatePath(
         ?string $path,
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php b/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php
index 85d41b6932629..513f925a8c8fc 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface \Magento\Framework\Filesystem\Directory\ReadInterface
  * @api
+ * @since 100.0.2
  */
 interface ReadInterface
 {
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php b/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php
index 186cbcb81bff2..5b0fd74a422c9 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/WriteInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface \Magento\Framework\Filesystem\Directory\WriteInterface
  * @api
+ * @since 100.0.2
  */
 interface WriteInterface extends ReadInterface
 {
diff --git a/lib/internal/Magento/Framework/Filesystem/DriverInterface.php b/lib/internal/Magento/Framework/Filesystem/DriverInterface.php
index 39be808875141..afea4d3bc7b07 100644
--- a/lib/internal/Magento/Framework/Filesystem/DriverInterface.php
+++ b/lib/internal/Magento/Framework/Filesystem/DriverInterface.php
@@ -13,6 +13,7 @@
  * Class Driver
  *
  * @api
+ * @since 100.0.2
  */
 interface DriverInterface
 {
diff --git a/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php
index 5d9badf42073f..e46b00bc5c74f 100644
--- a/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php
+++ b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php
@@ -11,6 +11,7 @@
 /**
  * Opens a file for reading
  * @api
+ * @since 100.0.2
  */
 class ReadFactory
 {
diff --git a/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php
index af2a43ceaedc3..7a9596586f56a 100644
--- a/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php
+++ b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php
@@ -11,6 +11,7 @@
 /**
  * Opens a file for reading and/or writing
  * @api
+ * @since 100.0.2
  */
 class WriteFactory extends ReadFactory
 {
diff --git a/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php b/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php
index ecf554de808cc..87e5f5afc95b4 100644
--- a/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php
+++ b/lib/internal/Magento/Framework/Filesystem/File/WriteInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface WriteInterface extends ReadInterface
 {
diff --git a/lib/internal/Magento/Framework/Filesystem/Io/IoInterface.php b/lib/internal/Magento/Framework/Filesystem/Io/IoInterface.php
index 93c85ebafe727..477da422def57 100644
--- a/lib/internal/Magento/Framework/Filesystem/Io/IoInterface.php
+++ b/lib/internal/Magento/Framework/Filesystem/Io/IoInterface.php
@@ -8,6 +8,7 @@
 /**
  * Input/output client interface
  * @api
+ * @since 100.0.2
  */
 interface IoInterface
 {
diff --git a/lib/internal/Magento/Framework/Filter/FilterManager.php b/lib/internal/Magento/Framework/Filter/FilterManager.php
index ca5d998af833f..1729dee2487ab 100644
--- a/lib/internal/Magento/Framework/Filter/FilterManager.php
+++ b/lib/internal/Magento/Framework/Filter/FilterManager.php
@@ -26,6 +26,7 @@
  * @method string decrypt(string $value, $params = array())
  * @method string translit(string $value)
  * @method string translitUrl(string $value)
+ * @since 100.0.2
  */
 class FilterManager
 {
diff --git a/lib/internal/Magento/Framework/Filter/Template.php b/lib/internal/Magento/Framework/Filter/Template.php
index ca597a7056566..be4c7eb750083 100644
--- a/lib/internal/Magento/Framework/Filter/Template.php
+++ b/lib/internal/Magento/Framework/Filter/Template.php
@@ -23,6 +23,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Template implements \Zend_Filter_Interface
 {
@@ -244,7 +245,7 @@ protected function resetAfterFilterCallbacks()
      *
      * @param string[] $construction
      * @return string
-     * @deprecated Use the directive interfaces instead
+     * @deprecated 102.0.4 Use the directive interfaces instead
      */
     public function varDirective($construction)
     {
@@ -259,7 +260,8 @@ public function varDirective($construction)
      *
      * @param string[] $construction
      * @return string
-     * @deprecated Use the directive interfaces instead
+     * @deprecated 102.0.4 Use the directive interfaces instead
+     * @since 102.0.4
      */
     public function forDirective($construction)
     {
@@ -283,7 +285,7 @@ public function forDirective($construction)
      *
      * @param string[] $construction
      * @return mixed
-     * @deprecated Use the directive interfaces instead
+     * @deprecated 102.0.4 Use the directive interfaces instead
      */
     public function templateDirective($construction)
     {
@@ -298,7 +300,7 @@ public function templateDirective($construction)
      *
      * @param string[] $construction
      * @return string
-     * @deprecated Use the directive interfaces instead
+     * @deprecated 102.0.4 Use the directive interfaces instead
      */
     public function dependDirective($construction)
     {
@@ -315,7 +317,7 @@ public function dependDirective($construction)
      *
      * @param string[] $construction
      * @return string
-     * @deprecated Use the directive interfaces instead
+     * @deprecated 102.0.4 Use the directive interfaces instead
      */
     public function ifDirective($construction)
     {
@@ -332,7 +334,7 @@ public function ifDirective($construction)
      *
      * @param string $value raw parameters
      * @return array
-     * @deprecated Use the directive interfaces instead
+     * @deprecated 102.0.4 Use the directive interfaces instead
      */
     protected function getParameters($value)
     {
@@ -353,7 +355,7 @@ protected function getParameters($value)
      * @param string $value raw parameters
      * @param string $default default value
      * @return string
-     * @deprecated Use \Magento\Framework\Filter\VariableResolverInterface instead
+     * @deprecated 102.0.4 Use \Magento\Framework\Filter\VariableResolverInterface instead
      */
     protected function getVariable($value, $default = '{no_value_defined}')
     {
@@ -369,7 +371,7 @@ protected function getVariable($value, $default = '{no_value_defined}')
      *
      * @param array $stack
      * @return array
-     * @deprecated Use new directive processor interfaces
+     * @deprecated 102.0.4 Use new directive processor interfaces
      */
     protected function getStackArgs($stack)
     {
@@ -396,6 +398,7 @@ protected function getStackArgs($stack)
      *
      * @param bool $strictMode Enable strict parsing of directives
      * @return bool The previous mode from before the change
+     * @since 102.0.4
      */
     public function setStrictMode(bool $strictMode): bool
     {
@@ -409,6 +412,7 @@ public function setStrictMode(bool $strictMode): bool
      * Return if the template is rendered with strict directive processing
      *
      * @return bool
+     * @since 102.0.4
      */
     public function isStrictMode(): bool
     {
diff --git a/lib/internal/Magento/Framework/Filter/Truncate.php b/lib/internal/Magento/Framework/Filter/Truncate.php
index a4dd35b302705..d56f574bac019 100644
--- a/lib/internal/Magento/Framework/Filter/Truncate.php
+++ b/lib/internal/Magento/Framework/Filter/Truncate.php
@@ -11,7 +11,7 @@
  * Truncate a string to a certain length if necessary, appending the $etc string.
  * $remainder will contain the string that has been replaced with $etc.
  *
- * @deprecated
+ * @deprecated 101.0.7
  * @see \Magento\Framework\Filter\TruncateFilter
  */
 class Truncate implements \Zend_Filter_Interface
diff --git a/lib/internal/Magento/Framework/HTTP/ClientInterface.php b/lib/internal/Magento/Framework/HTTP/ClientInterface.php
index e2e4a89af8fba..3a3aac1546698 100644
--- a/lib/internal/Magento/Framework/HTTP/ClientInterface.php
+++ b/lib/internal/Magento/Framework/HTTP/ClientInterface.php
@@ -10,6 +10,7 @@
  * Interface for HTTP clients
  *
  * @api
+ * @since 100.0.2
  */
 interface ClientInterface
 {
diff --git a/lib/internal/Magento/Framework/Image/Adapter/Config.php b/lib/internal/Magento/Framework/Image/Adapter/Config.php
index d4a28b4efc600..8926f5a0a9fa7 100644
--- a/lib/internal/Magento/Framework/Image/Adapter/Config.php
+++ b/lib/internal/Magento/Framework/Image/Adapter/Config.php
@@ -65,7 +65,7 @@ public function getAdapters()
      * Get Maximum Image Width resolution in pixels. For image resizing on client side.
      *
      * @return int
-     * @deprecated
+     * @deprecated 102.0.1
      * @see \Magento\Backend\Model\Image\UploadResizeConfigInterface::getMaxHeight()
      */
     public function getMaxWidth(): int
@@ -77,7 +77,7 @@ public function getMaxWidth(): int
      * Get Maximum Image Height resolution in pixels. For image resizing on client side.
      *
      * @return int
-     * @deprecated
+     * @deprecated 102.0.1
      * @see \Magento\Backend\Model\Image\UploadResizeConfigInterface::getMaxHeight()
      */
     public function getMaxHeight(): int
diff --git a/lib/internal/Magento/Framework/Indexer/Action/Base.php b/lib/internal/Magento/Framework/Indexer/Action/Base.php
index 636335192cbc5..b454d49578772 100644
--- a/lib/internal/Magento/Framework/Indexer/Action/Base.php
+++ b/lib/internal/Magento/Framework/Indexer/Action/Base.php
@@ -37,13 +37,13 @@ class Base implements ActionInterface
 
     /**
      * @var AdapterInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $connection;
 
     /**
      * @var SourceProviderInterface[]
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $sources;
 
@@ -54,7 +54,7 @@ class Base implements ActionInterface
 
     /**
      * @var HandlerInterface[]
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $handlers;
 
@@ -65,7 +65,7 @@ class Base implements ActionInterface
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $columnTypesMap = [
         'varchar'    => ['type' => Table::TYPE_TEXT, 'size' => 255],
@@ -75,13 +75,13 @@ class Base implements ActionInterface
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $filterColumns;
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $searchColumns;
 
@@ -102,7 +102,7 @@ class Base implements ActionInterface
 
     /**
      * @var String
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $string;
 
@@ -113,13 +113,13 @@ class Base implements ActionInterface
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $filterable = [];
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $searchable = [];
 
@@ -353,7 +353,7 @@ protected function prepareFields()
      * @param array $field
      * @return void
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function saveFieldByType($field)
     {
diff --git a/lib/internal/Magento/Framework/Indexer/ActionInterface.php b/lib/internal/Magento/Framework/Indexer/ActionInterface.php
index 68a10e23e1d60..f4e59182c3c51 100644
--- a/lib/internal/Magento/Framework/Indexer/ActionInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/ActionInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api Implement custom Action Interface
+ * @since 100.0.2
  */
 interface ActionInterface
 {
diff --git a/lib/internal/Magento/Framework/Indexer/BatchProviderInterface.php b/lib/internal/Magento/Framework/Indexer/BatchProviderInterface.php
index c318638e7e6ab..e8babffbbea78 100644
--- a/lib/internal/Magento/Framework/Indexer/BatchProviderInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/BatchProviderInterface.php
@@ -15,7 +15,7 @@
  * and process them one by one in order to reduce memory consumption and improve overall performance.
  *
  * @api retrieve Batches when implementing custom Indexer\Action
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface BatchProviderInterface
 {
@@ -27,7 +27,7 @@ interface BatchProviderInterface
      * @param string $linkField field that is used as a record identifier.
      * @param int $batchSize size of the single range.
      * @return \Generator generator that produces entity ID ranges in the format of ['from' => ..., 'to' => ...]
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getBatches(AdapterInterface $adapter, $tableName, $linkField, $batchSize);
 
@@ -38,7 +38,7 @@ public function getBatches(AdapterInterface $adapter, $tableName, $linkField, $b
      * @param Select $select
      * @param array $batch
      * @return array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getBatchIds(AdapterInterface $connection, Select $select, array $batch);
 }
diff --git a/lib/internal/Magento/Framework/Indexer/BatchSizeManagementInterface.php b/lib/internal/Magento/Framework/Indexer/BatchSizeManagementInterface.php
index b953afcd9e7e8..880d6feb3476f 100644
--- a/lib/internal/Magento/Framework/Indexer/BatchSizeManagementInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/BatchSizeManagementInterface.php
@@ -10,7 +10,7 @@
 /**
  * Batch size manager can be used to ensure that MEMORY table has enough memory for data in batch.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface BatchSizeManagementInterface
 {
@@ -20,7 +20,7 @@ interface BatchSizeManagementInterface
      * @param AdapterInterface $adapter database adapter.
      * @param int $batchSize
      * @return void
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function ensureBatchSize(\Magento\Framework\DB\Adapter\AdapterInterface $adapter, $batchSize);
 }
diff --git a/lib/internal/Magento/Framework/Indexer/Config/Converter.php b/lib/internal/Magento/Framework/Indexer/Config/Converter.php
index 7f76b6e4295c5..f012f2b6d6101 100644
--- a/lib/internal/Magento/Framework/Indexer/Config/Converter.php
+++ b/lib/internal/Magento/Framework/Indexer/Config/Converter.php
@@ -238,7 +238,7 @@ protected function convertField(\DOMElement $node, $data)
      *
      * @param \DOMNode $node
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function getTranslatedNodeValue(\DOMNode $node)
     {
diff --git a/lib/internal/Magento/Framework/Indexer/ConfigInterface.php b/lib/internal/Magento/Framework/Indexer/ConfigInterface.php
index 1769676e8ab42..14c771b5b69d3 100644
--- a/lib/internal/Magento/Framework/Indexer/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/ConfigInterface.php
@@ -9,6 +9,7 @@
  * Indexer(s) configuration
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/Indexer/Dimension.php b/lib/internal/Magento/Framework/Indexer/Dimension.php
index dacc8d7f524f5..3a484ed17dfdc 100644
--- a/lib/internal/Magento/Framework/Indexer/Dimension.php
+++ b/lib/internal/Magento/Framework/Indexer/Dimension.php
@@ -11,6 +11,7 @@
  * Index Dimension object
  *
  * @api
+ * @since 101.0.6
  */
 class Dimension
 {
@@ -38,6 +39,7 @@ public function __construct(string $name, string $value)
      * Get dimension name
      *
      * @return string
+     * @since 101.0.6
      */
     public function getName(): string
     {
@@ -48,6 +50,7 @@ public function getName(): string
      * Get dimension value
      *
      * @return string
+     * @since 101.0.6
      */
     public function getValue(): string
     {
diff --git a/lib/internal/Magento/Framework/Indexer/DimensionFactory.php b/lib/internal/Magento/Framework/Indexer/DimensionFactory.php
index 8eaeff5628d60..c5bcab73a1058 100644
--- a/lib/internal/Magento/Framework/Indexer/DimensionFactory.php
+++ b/lib/internal/Magento/Framework/Indexer/DimensionFactory.php
@@ -13,6 +13,7 @@
  * Dimension Factory
  *
  * @api
+ * @since 101.0.6
  */
 class DimensionFactory
 {
@@ -33,6 +34,7 @@ public function __construct(ObjectManagerInterface $objectManager)
      * @param string $name
      * @param string $value
      * @return Dimension
+     * @since 101.0.6
      */
     public function create(string $name, string $value): Dimension
     {
diff --git a/lib/internal/Magento/Framework/Indexer/DimensionProviderInterface.php b/lib/internal/Magento/Framework/Indexer/DimensionProviderInterface.php
index ea4f56eb48d41..bd53fc36d3b44 100644
--- a/lib/internal/Magento/Framework/Indexer/DimensionProviderInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/DimensionProviderInterface.php
@@ -10,12 +10,14 @@
 /**
  * @api
  * Provide a list of dimensions
+ * @since 101.0.6
  */
 interface DimensionProviderInterface extends \IteratorAggregate
 {
     /**
      * Get Dimension Iterator. Returns yielded value of \Magento\Framework\Indexer\Dimension
      * @return \Traversable|\Magento\Framework\Indexer\Dimension[]
+     * @since 101.0.6
      */
     public function getIterator(): \Traversable;
 }
diff --git a/lib/internal/Magento/Framework/Indexer/DimensionalIndexerInterface.php b/lib/internal/Magento/Framework/Indexer/DimensionalIndexerInterface.php
index 43c4e7a7fd70b..acf1d598e89c5 100644
--- a/lib/internal/Magento/Framework/Indexer/DimensionalIndexerInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/DimensionalIndexerInterface.php
@@ -10,6 +10,7 @@
 /**
  * @api
  * Run indexer by dimensions
+ * @since 101.0.6
  */
 interface DimensionalIndexerInterface
 {
@@ -20,6 +21,7 @@ interface DimensionalIndexerInterface
      * @param \Magento\Framework\Indexer\Dimension[] $dimensions
      * @param \Traversable $entityIds
      * @return void
+     * @since 101.0.6
      */
     public function executeByDimensions(array $dimensions, \Traversable $entityIds);
 }
diff --git a/lib/internal/Magento/Framework/Indexer/FieldsetInterface.php b/lib/internal/Magento/Framework/Indexer/FieldsetInterface.php
index 0ce1e8763ac96..85c5f698e1bb8 100644
--- a/lib/internal/Magento/Framework/Indexer/FieldsetInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/FieldsetInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api Implement custom Fieldset
+ * @since 100.0.2
  */
 interface FieldsetInterface
 {
diff --git a/lib/internal/Magento/Framework/Indexer/FieldsetPool.php b/lib/internal/Magento/Framework/Indexer/FieldsetPool.php
index 747db5d2cc00f..742e15f1f43bf 100644
--- a/lib/internal/Magento/Framework/Indexer/FieldsetPool.php
+++ b/lib/internal/Magento/Framework/Indexer/FieldsetPool.php
@@ -9,6 +9,7 @@
 
 /**
  * @api Retrieve Fieldset when implementing custom Indexer\Action
+ * @since 100.0.2
  */
 class FieldsetPool
 {
diff --git a/lib/internal/Magento/Framework/Indexer/HandlerInterface.php b/lib/internal/Magento/Framework/Indexer/HandlerInterface.php
index 5c1e9ea5a2569..8bb725a293f0c 100644
--- a/lib/internal/Magento/Framework/Indexer/HandlerInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/HandlerInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api Implement custom Handler
+ * @since 100.0.2
  */
 interface HandlerInterface
 {
diff --git a/lib/internal/Magento/Framework/Indexer/HandlerPool.php b/lib/internal/Magento/Framework/Indexer/HandlerPool.php
index ed7abf19bad47..c4e3fdb0e7c2f 100644
--- a/lib/internal/Magento/Framework/Indexer/HandlerPool.php
+++ b/lib/internal/Magento/Framework/Indexer/HandlerPool.php
@@ -10,6 +10,7 @@
 
 /**
  * @api Instantiate save handler when implementing custom Indexer\Action
+ * @since 100.0.2
  */
 class HandlerPool
 {
diff --git a/lib/internal/Magento/Framework/Indexer/IndexStructure.php b/lib/internal/Magento/Framework/Indexer/IndexStructure.php
index a39de2d5b8a62..2fd5bfa0bd955 100644
--- a/lib/internal/Magento/Framework/Indexer/IndexStructure.php
+++ b/lib/internal/Magento/Framework/Indexer/IndexStructure.php
@@ -16,7 +16,7 @@
 /**
  * Full text search index structure.
  *
- * @deprecated
+ * @deprecated 102.0.0
  * @see \Magento\ElasticSearch
  */
 class IndexStructure implements IndexStructureInterface
diff --git a/lib/internal/Magento/Framework/Indexer/IndexStructureInterface.php b/lib/internal/Magento/Framework/Indexer/IndexStructureInterface.php
index f4c518bdfea7a..f8cc53d676af8 100644
--- a/lib/internal/Magento/Framework/Indexer/IndexStructureInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/IndexStructureInterface.php
@@ -11,6 +11,7 @@
  * Indexer structure (schema) handler
  *
  * @api
+ * @since 100.0.2
  */
 interface IndexStructureInterface
 {
diff --git a/lib/internal/Magento/Framework/Indexer/IndexTableRowSizeEstimatorInterface.php b/lib/internal/Magento/Framework/Indexer/IndexTableRowSizeEstimatorInterface.php
index a0a8fcf18146f..537b144df9dd2 100644
--- a/lib/internal/Magento/Framework/Indexer/IndexTableRowSizeEstimatorInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/IndexTableRowSizeEstimatorInterface.php
@@ -9,7 +9,7 @@
 /**
  * Calculate memory size for entity according different dimensions.
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface IndexTableRowSizeEstimatorInterface
 {
@@ -17,7 +17,7 @@ interface IndexTableRowSizeEstimatorInterface
      * Calculate memory size for entity row.
      *
      * @return float
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function estimateRowSize();
 }
diff --git a/lib/internal/Magento/Framework/Indexer/IndexerInterface.php b/lib/internal/Magento/Framework/Indexer/IndexerInterface.php
index bf572b94ccc94..597266a05fd3f 100644
--- a/lib/internal/Magento/Framework/Indexer/IndexerInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/IndexerInterface.php
@@ -9,8 +9,9 @@
  * Indexer
  *
  * @api
- * @deprecated Facade will be split
+ * @deprecated 102.0.0 Facade will be split
  * @see \Magento\Framework\Indexer\ActionInterface
+ * @since 100.0.2
  */
 interface IndexerInterface
 {
@@ -163,7 +164,7 @@ public function getLatestUpdated();
      *
      * @return void
      * @throws \Exception
-     * @deprecated
+     * @deprecated 102.0.0
      * @see \Magento\Framework\Indexer\ActionInterface::executeFull
      */
     public function reindexAll();
@@ -173,7 +174,7 @@ public function reindexAll();
      *
      * @param int $id
      * @return void
-     * @deprecated
+     * @deprecated 102.0.0
      * @see \Magento\Framework\Indexer\ActionInterface::executeList
      */
     public function reindexRow($id);
@@ -183,7 +184,7 @@ public function reindexRow($id);
      *
      * @param int[] $ids
      * @return void
-     * @deprecated
+     * @deprecated 102.0.0
      * @see \Magento\Framework\Indexer\ActionInterface::executeList
      */
     public function reindexList($ids);
diff --git a/lib/internal/Magento/Framework/Indexer/IndexerRegistry.php b/lib/internal/Magento/Framework/Indexer/IndexerRegistry.php
index 5867565e0ccd5..bdc8479671f2e 100644
--- a/lib/internal/Magento/Framework/Indexer/IndexerRegistry.php
+++ b/lib/internal/Magento/Framework/Indexer/IndexerRegistry.php
@@ -7,6 +7,7 @@
 
 /**
  * @api Retrieve indexer by id, for example when indexer need to be invalidated
+ * @since 100.0.2
  */
 class IndexerRegistry
 {
diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandler/IndexerInterface.php b/lib/internal/Magento/Framework/Indexer/SaveHandler/IndexerInterface.php
index e03404d3eb8f6..a3111f9966ee2 100644
--- a/lib/internal/Magento/Framework/Indexer/SaveHandler/IndexerInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/SaveHandler/IndexerInterface.php
@@ -15,6 +15,7 @@
  * Indexer persistence handler
  *
  * @api
+ * @since 100.0.2
  */
 interface IndexerInterface
 {
diff --git a/lib/internal/Magento/Framework/Indexer/SaveHandlerFactory.php b/lib/internal/Magento/Framework/Indexer/SaveHandlerFactory.php
index 80231dd7aa290..9e1ee9a375e36 100644
--- a/lib/internal/Magento/Framework/Indexer/SaveHandlerFactory.php
+++ b/lib/internal/Magento/Framework/Indexer/SaveHandlerFactory.php
@@ -10,6 +10,7 @@
 
 /**
  * @api Instantiate save handler when implementing custom Indexer\Action
+ * @since 100.0.2
  */
 class SaveHandlerFactory
 {
diff --git a/lib/internal/Magento/Framework/Indexer/StateInterface.php b/lib/internal/Magento/Framework/Indexer/StateInterface.php
index 124b8ab50b4b8..332b3227ffc88 100644
--- a/lib/internal/Magento/Framework/Indexer/StateInterface.php
+++ b/lib/internal/Magento/Framework/Indexer/StateInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api Retrieve status of the Indexer
+ * @since 100.0.2
  */
 interface StateInterface
 {
diff --git a/lib/internal/Magento/Framework/Interception/Config/Config.php b/lib/internal/Magento/Framework/Interception/Config/Config.php
index abf2a6d9d57b7..cb14e0f148e3e 100644
--- a/lib/internal/Magento/Framework/Interception/Config/Config.php
+++ b/lib/internal/Magento/Framework/Interception/Config/Config.php
@@ -37,7 +37,7 @@ class Config implements \Magento\Framework\Interception\ConfigInterface
 
     /**
      * Cache
-     * @deprecated
+     * @deprecated 102.0.1
      * @var \Magento\Framework\Cache\FrontendInterface
      */
     protected $_cache;
diff --git a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php
index bf1372dc007a1..98591a968fd73 100644
--- a/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php
+++ b/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php
@@ -399,7 +399,7 @@ private function filterPlugins(array &$plugins)
      * Get logger
      *
      * @return \Psr\Log\LoggerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getLogger()
     {
diff --git a/lib/internal/Magento/Framework/Json/Decoder.php b/lib/internal/Magento/Framework/Json/Decoder.php
index 57e160cac7bbf..fbc99a036daa9 100644
--- a/lib/internal/Magento/Framework/Json/Decoder.php
+++ b/lib/internal/Magento/Framework/Json/Decoder.php
@@ -6,7 +6,7 @@
 namespace Magento\Framework\Json;
 
 /**
- * @deprecated 100.2.0 @see \Magento\Framework\Serialize\Serializer\Json::unserialize
+ * @deprecated 101.0.0 @see \Magento\Framework\Serialize\Serializer\Json::unserialize
  */
 class Decoder implements DecoderInterface
 {
diff --git a/lib/internal/Magento/Framework/Json/DecoderInterface.php b/lib/internal/Magento/Framework/Json/DecoderInterface.php
index 9aa630fd9ca0c..baef2154ea618 100644
--- a/lib/internal/Magento/Framework/Json/DecoderInterface.php
+++ b/lib/internal/Magento/Framework/Json/DecoderInterface.php
@@ -10,7 +10,8 @@
  *
  * @api
  *
- * @deprecated 100.2.0 @see \Magento\Framework\Serialize\Serializer\Json::unserialize
+ * @deprecated 101.0.0 @see \Magento\Framework\Serialize\Serializer\Json::unserialize
+ * @since 100.0.2
  */
 interface DecoderInterface
 {
diff --git a/lib/internal/Magento/Framework/Json/Encoder.php b/lib/internal/Magento/Framework/Json/Encoder.php
index 35d259781d67a..0c53edeb6ae00 100644
--- a/lib/internal/Magento/Framework/Json/Encoder.php
+++ b/lib/internal/Magento/Framework/Json/Encoder.php
@@ -6,7 +6,7 @@
 namespace Magento\Framework\Json;
 
 /**
- * @deprecated 100.2.0 @see \Magento\Framework\Serialize\Serializer\Json::serialize
+ * @deprecated 101.0.0 @see \Magento\Framework\Serialize\Serializer\Json::serialize
  */
 class Encoder implements EncoderInterface
 {
diff --git a/lib/internal/Magento/Framework/Json/EncoderInterface.php b/lib/internal/Magento/Framework/Json/EncoderInterface.php
index 9fb720d11fea3..59ea0f47d556c 100644
--- a/lib/internal/Magento/Framework/Json/EncoderInterface.php
+++ b/lib/internal/Magento/Framework/Json/EncoderInterface.php
@@ -10,7 +10,8 @@
  *
  * @api
  *
- * @deprecated 100.2.0 @see \Magento\Framework\Serialize\Serializer\Json::serialize
+ * @deprecated 101.0.0 @see \Magento\Framework\Serialize\Serializer\Json::serialize
+ * @since 100.0.2
  */
 interface EncoderInterface
 {
diff --git a/lib/internal/Magento/Framework/Json/Helper/Data.php b/lib/internal/Magento/Framework/Json/Helper/Data.php
index 67589d00eb99d..a1f2e01a2e92e 100644
--- a/lib/internal/Magento/Framework/Json/Helper/Data.php
+++ b/lib/internal/Magento/Framework/Json/Helper/Data.php
@@ -8,7 +8,7 @@
 /**
  * Json data helper
  *
- * @deprecated 100.2.0 @see \Magento\Framework\Serialize\Serializer\Json
+ * @deprecated 101.0.0 @see \Magento\Framework\Serialize\Serializer\Json
  */
 class Data extends \Magento\Framework\App\Helper\AbstractHelper
 {
diff --git a/lib/internal/Magento/Framework/Locale/ConfigInterface.php b/lib/internal/Magento/Framework/Locale/ConfigInterface.php
index e5f8bc00e5466..a4ee02c323b19 100644
--- a/lib/internal/Magento/Framework/Locale/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/Locale/ConfigInterface.php
@@ -9,6 +9,7 @@
  * Provides access to locale-related config information
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/Locale/CurrencyInterface.php b/lib/internal/Magento/Framework/Locale/CurrencyInterface.php
index e52ac551f54ec..e36a905a6c473 100644
--- a/lib/internal/Magento/Framework/Locale/CurrencyInterface.php
+++ b/lib/internal/Magento/Framework/Locale/CurrencyInterface.php
@@ -9,6 +9,7 @@
  * Provides access to currency config information
  *
  * @api
+ * @since 100.0.2
  */
 interface CurrencyInterface
 {
diff --git a/lib/internal/Magento/Framework/Locale/FormatInterface.php b/lib/internal/Magento/Framework/Locale/FormatInterface.php
index 1312c8841c23b..1a15b2610be54 100644
--- a/lib/internal/Magento/Framework/Locale/FormatInterface.php
+++ b/lib/internal/Magento/Framework/Locale/FormatInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface FormatInterface
 {
diff --git a/lib/internal/Magento/Framework/Locale/ListsInterface.php b/lib/internal/Magento/Framework/Locale/ListsInterface.php
index 22e9bf00ebce7..c7d509e20546a 100644
--- a/lib/internal/Magento/Framework/Locale/ListsInterface.php
+++ b/lib/internal/Magento/Framework/Locale/ListsInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ListsInterface extends OptionInterface
 {
diff --git a/lib/internal/Magento/Framework/Locale/ResolverInterface.php b/lib/internal/Magento/Framework/Locale/ResolverInterface.php
index 22ec8fb70304c..70d397ddf3cc1 100644
--- a/lib/internal/Magento/Framework/Locale/ResolverInterface.php
+++ b/lib/internal/Magento/Framework/Locale/ResolverInterface.php
@@ -9,6 +9,7 @@
  * Manages locale config information
  *
  * @api
+ * @since 100.0.2
  */
 interface ResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/Lock/LockManagerInterface.php b/lib/internal/Magento/Framework/Lock/LockManagerInterface.php
index 76cc8506eb182..81f721fac9036 100644
--- a/lib/internal/Magento/Framework/Lock/LockManagerInterface.php
+++ b/lib/internal/Magento/Framework/Lock/LockManagerInterface.php
@@ -11,6 +11,7 @@
  * Interface of a lock manager
  *
  * @api
+ * @since 101.0.5
  */
 interface LockManagerInterface
 {
@@ -21,6 +22,7 @@ interface LockManagerInterface
      * @param int $timeout How long to wait lock acquisition in seconds, negative value means infinite timeout
      * @return bool
      * @api
+     * @since 101.0.5
      */
     public function lock(string $name, int $timeout = -1): bool;
 
@@ -30,6 +32,7 @@ public function lock(string $name, int $timeout = -1): bool;
      * @param string $name lock name
      * @return bool
      * @api
+     * @since 101.0.5
      */
     public function unlock(string $name): bool;
 
@@ -39,6 +42,7 @@ public function unlock(string $name): bool;
      * @param string $name lock name
      * @return bool
      * @api
+     * @since 101.0.5
      */
     public function isLocked(string $name): bool;
 }
diff --git a/lib/internal/Magento/Framework/Mail/MailMessageInterface.php b/lib/internal/Magento/Framework/Mail/MailMessageInterface.php
index 5179e6057c4c9..e5f7d355afa6c 100644
--- a/lib/internal/Magento/Framework/Mail/MailMessageInterface.php
+++ b/lib/internal/Magento/Framework/Mail/MailMessageInterface.php
@@ -9,8 +9,9 @@
  * Mail Message interface
  *
  * @api
- * @deprecated
+ * @deprecated 102.0.4
  * @see \Magento\Framework\Mail\EmailMessageInterface
+ * @since 101.0.8
  */
 interface MailMessageInterface extends MessageInterface
 {
@@ -19,6 +20,7 @@ interface MailMessageInterface extends MessageInterface
      *
      * @param string $html
      * @return $this
+     * @since 101.0.8
      */
     public function setBodyHtml($html);
 
@@ -27,6 +29,7 @@ public function setBodyHtml($html);
      *
      * @param string $text
      * @return $this
+     * @since 101.0.8
      */
     public function setBodyText($text);
 
@@ -34,6 +37,7 @@ public function setBodyText($text);
      * Get message source code.
      *
      * @return string
+     * @since 101.0.8
      */
     public function getRawMessage();
 }
diff --git a/lib/internal/Magento/Framework/Mail/Message.php b/lib/internal/Magento/Framework/Mail/Message.php
index b140676466e5f..66ed5927b6833 100644
--- a/lib/internal/Magento/Framework/Mail/Message.php
+++ b/lib/internal/Magento/Framework/Mail/Message.php
@@ -11,7 +11,7 @@
 /**
  * Class Message for email transportation
  *
- * @deprecated a new message implementation was added
+ * @deprecated 102.0.4 a new message implementation was added
  * @see \Magento\Framework\Mail\EmailMessage
  */
 class Message implements MailMessageInterface
@@ -42,7 +42,7 @@ public function __construct($charset = 'utf-8')
     /**
      * @inheritdoc
      *
-     * @deprecated
+     * @deprecated 101.0.8
      * @see \Magento\Framework\Mail\Message::setBodyText
      * @see \Magento\Framework\Mail\Message::setBodyHtml
      */
@@ -55,7 +55,7 @@ public function setMessageType($type)
     /**
      * @inheritdoc
      *
-     * @deprecated
+     * @deprecated 101.0.8
      * @see \Magento\Framework\Mail\Message::setBodyText
      * @see \Magento\Framework\Mail\Message::setBodyHtml
      */
@@ -96,7 +96,7 @@ public function getBody()
     /**
      * @inheritdoc
      *
-     * @deprecated This function is missing the from name. The
+     * @deprecated 102.0.1 This function is missing the from name. The
      * setFromAddress() function sets both from address and from name.
      * @see setFromAddress()
      */
diff --git a/lib/internal/Magento/Framework/Mail/MessageInterface.php b/lib/internal/Magento/Framework/Mail/MessageInterface.php
index c0d3afed81e39..904c723e8bf08 100644
--- a/lib/internal/Magento/Framework/Mail/MessageInterface.php
+++ b/lib/internal/Magento/Framework/Mail/MessageInterface.php
@@ -9,8 +9,9 @@
  * Mail Message interface
  *
  * @api
- * @deprecated in favor of MailMessageInterface to avoid temporal coupling (setMessageType + setBody)
+ * @deprecated 102.0.0 in favor of MailMessageInterface to avoid temporal coupling (setMessageType + setBody)
  * @see \Magento\Framework\Mail\MailMessageInterface
+ * @since 100.0.2
  */
 interface MessageInterface
 {
@@ -46,7 +47,7 @@ public function getSubject();
      * @param mixed $body
      * @return $this
      *
-     * @deprecated
+     * @deprecated 102.0.0
      * @see \Magento\Framework\Mail\MailMessageInterface::setBodyHtml
      * @see \Magento\Framework\Mail\MailMessageInterface::setBodyText()
      */
@@ -105,7 +106,7 @@ public function setReplyTo($replyToAddress);
      * @param string $type
      * @return $this
      *
-     * @deprecated
+     * @deprecated 102.0.0
      * @see \Magento\Framework\Mail\MailMessageInterface::setBodyHtml
      * @see \Magento\Framework\Mail\MailMessageInterface::getBodyHtml
      * @see \Magento\Framework\Mail\MailMessageInterface::setBodyText()
diff --git a/lib/internal/Magento/Framework/Mail/Template/ConfigInterface.php b/lib/internal/Magento/Framework/Mail/Template/ConfigInterface.php
index b4e6cb46045fe..bac90dcbae5e0 100644
--- a/lib/internal/Magento/Framework/Mail/Template/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/Mail/Template/ConfigInterface.php
@@ -9,6 +9,7 @@
  * High-level interface for mail templates data that hides format from the client code
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/Mail/Template/FactoryInterface.php b/lib/internal/Magento/Framework/Mail/Template/FactoryInterface.php
index 4e88a9897e4a2..2c0f99e4ac1f1 100644
--- a/lib/internal/Magento/Framework/Mail/Template/FactoryInterface.php
+++ b/lib/internal/Magento/Framework/Mail/Template/FactoryInterface.php
@@ -9,6 +9,7 @@
  * Mail Template Factory interface
  *
  * @api
+ * @since 100.0.2
  */
 interface FactoryInterface
 {
diff --git a/lib/internal/Magento/Framework/Mail/Template/SenderResolverInterface.php b/lib/internal/Magento/Framework/Mail/Template/SenderResolverInterface.php
index 89fcb7478bdf5..f283fe54819ac 100644
--- a/lib/internal/Magento/Framework/Mail/Template/SenderResolverInterface.php
+++ b/lib/internal/Magento/Framework/Mail/Template/SenderResolverInterface.php
@@ -9,6 +9,7 @@
  * Mail Sender Resolver interface
  *
  * @api
+ * @since 100.0.2
  */
 interface SenderResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php
index 830d9b0f722e4..c0ca54cf228b8 100644
--- a/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php
+++ b/lib/internal/Magento/Framework/Mail/Template/TransportBuilder.php
@@ -32,6 +32,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class TransportBuilder
 {
@@ -243,7 +244,7 @@ public function setReplyTo($email, $name = null)
      * @throws InvalidArgumentException
      * @see setFromByScope()
      *
-     * @deprecated This function sets the from address but does not provide
+     * @deprecated 102.0.1 This function sets the from address but does not provide
      * a way of setting the correct from addresses based on the scope.
      */
     public function setFrom($from)
@@ -260,6 +261,7 @@ public function setFrom($from)
      * @return $this
      * @throws InvalidArgumentException
      * @throws MailException
+     * @since 102.0.1
      */
     public function setFromByScope($from, $scopeId = null)
     {
diff --git a/lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore.php b/lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore.php
index 85b1b181d4f9e..416fbb1ecb1dd 100644
--- a/lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore.php
+++ b/lib/internal/Magento/Framework/Mail/Template/TransportBuilderByStore.php
@@ -11,7 +11,7 @@
 /**
  * Class TransportBuilderByStore
  *
- * @deprecated The ability to set From address based on store is now available
+ * @deprecated 102.0.1 The ability to set From address based on store is now available
  * in the \Magento\Framework\Mail\Template\TransportBuilder class
  * @see \Magento\Framework\Mail\Template\TransportBuilder::setFromByStore
  */
diff --git a/lib/internal/Magento/Framework/Mail/TemplateInterface.php b/lib/internal/Magento/Framework/Mail/TemplateInterface.php
index ad13772876ea1..b1062aec92bee 100644
--- a/lib/internal/Magento/Framework/Mail/TemplateInterface.php
+++ b/lib/internal/Magento/Framework/Mail/TemplateInterface.php
@@ -9,6 +9,7 @@
  * Mail Template interface
  *
  * @api
+ * @since 100.0.2
  */
 interface TemplateInterface extends \Magento\Framework\App\TemplateTypesInterface
 {
diff --git a/lib/internal/Magento/Framework/Mail/TransportInterface.php b/lib/internal/Magento/Framework/Mail/TransportInterface.php
index cccfad885838e..dd65439243ba3 100644
--- a/lib/internal/Magento/Framework/Mail/TransportInterface.php
+++ b/lib/internal/Magento/Framework/Mail/TransportInterface.php
@@ -9,6 +9,7 @@
  * Mail Transport interface
  *
  * @api
+ * @since 100.0.2
  */
 interface TransportInterface
 {
@@ -24,7 +25,7 @@ public function sendMessage();
      * Get message
      *
      * @return \Magento\Framework\Mail\MessageInterface
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getMessage();
 }
diff --git a/lib/internal/Magento/Framework/Math/Calculator.php b/lib/internal/Magento/Framework/Math/Calculator.php
index c09f90d4be4da..a8971f964a668 100644
--- a/lib/internal/Magento/Framework/Math/Calculator.php
+++ b/lib/internal/Magento/Framework/Math/Calculator.php
@@ -9,6 +9,7 @@
  * Calculations Library
  *
  * @api
+ * @since 100.0.2
  */
 class Calculator
 {
diff --git a/lib/internal/Magento/Framework/Math/Division.php b/lib/internal/Magento/Framework/Math/Division.php
index 820a11b80dea9..c69bc4379e77f 100644
--- a/lib/internal/Magento/Framework/Math/Division.php
+++ b/lib/internal/Magento/Framework/Math/Division.php
@@ -9,6 +9,7 @@
  * Division library
  *
  * @api
+ * @since 100.0.2
  */
 class Division
 {
diff --git a/lib/internal/Magento/Framework/Math/FloatComparator.php b/lib/internal/Magento/Framework/Math/FloatComparator.php
index 4053404369956..affec441e89fd 100644
--- a/lib/internal/Magento/Framework/Math/FloatComparator.php
+++ b/lib/internal/Magento/Framework/Math/FloatComparator.php
@@ -11,6 +11,7 @@
  * Contains methods to compare float digits.
  *
  * @api
+ * @since 101.0.6
  */
 class FloatComparator
 {
@@ -27,6 +28,7 @@ class FloatComparator
      * @param float $a
      * @param float $b
      * @return bool
+     * @since 101.0.6
      */
     public function equal(float $a, float $b): bool
     {
@@ -39,6 +41,7 @@ public function equal(float $a, float $b): bool
      * @param float $a
      * @param float $b
      * @return bool
+     * @since 101.0.6
      */
     public function greaterThan(float $a, float $b): bool
     {
@@ -51,6 +54,7 @@ public function greaterThan(float $a, float $b): bool
      * @param float $a
      * @param float $b
      * @return bool
+     * @since 101.0.6
      */
     public function greaterThanOrEqual(float $a, float $b): bool
     {
diff --git a/lib/internal/Magento/Framework/Math/Random.php b/lib/internal/Magento/Framework/Math/Random.php
index c2059e1935a80..8adb602e00479 100644
--- a/lib/internal/Magento/Framework/Math/Random.php
+++ b/lib/internal/Magento/Framework/Math/Random.php
@@ -12,6 +12,7 @@
  * Random data generator
  *
  * @api
+ * @since 100.0.2
  */
 class Random
 {
diff --git a/lib/internal/Magento/Framework/Message/AbstractMessage.php b/lib/internal/Magento/Framework/Message/AbstractMessage.php
index 85789bca9047c..c7f0b283d1dd9 100644
--- a/lib/internal/Magento/Framework/Message/AbstractMessage.php
+++ b/lib/internal/Magento/Framework/Message/AbstractMessage.php
@@ -9,6 +9,7 @@
  * Abstract message model
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractMessage implements MessageInterface
 {
diff --git a/lib/internal/Magento/Framework/Message/Collection.php b/lib/internal/Magento/Framework/Message/Collection.php
index 32e84fc28f5a0..dfcb06dd6f291 100644
--- a/lib/internal/Magento/Framework/Message/Collection.php
+++ b/lib/internal/Magento/Framework/Message/Collection.php
@@ -9,6 +9,7 @@
  * Messages collection
  *
  * @api
+ * @since 100.0.2
  */
 class Collection
 {
diff --git a/lib/internal/Magento/Framework/Message/ManagerInterface.php b/lib/internal/Magento/Framework/Message/ManagerInterface.php
index 360444fa897ac..29063a4deecbd 100644
--- a/lib/internal/Magento/Framework/Message/ManagerInterface.php
+++ b/lib/internal/Magento/Framework/Message/ManagerInterface.php
@@ -9,6 +9,7 @@
  * Adds different types of messages to the session, and allows access to existing messages.
  *
  * @api
+ * @since 100.0.2
  */
 interface ManagerInterface
 {
diff --git a/lib/internal/Magento/Framework/Message/MessageInterface.php b/lib/internal/Magento/Framework/Message/MessageInterface.php
index 2dad284152990..5a52b9b2fe649 100644
--- a/lib/internal/Magento/Framework/Message/MessageInterface.php
+++ b/lib/internal/Magento/Framework/Message/MessageInterface.php
@@ -9,6 +9,7 @@
  * Represent a message with a type, content text, and an isSticky attribute to prevent message from being cleared.
  *
  * @api
+ * @since 100.0.2
  */
 interface MessageInterface
 {
diff --git a/lib/internal/Magento/Framework/Message/PhraseFactory.php b/lib/internal/Magento/Framework/Message/PhraseFactory.php
index 2cfa324f40dbe..7efc83a811549 100644
--- a/lib/internal/Magento/Framework/Message/PhraseFactory.php
+++ b/lib/internal/Magento/Framework/Message/PhraseFactory.php
@@ -9,7 +9,7 @@
 
 /**
  * Factory to combine several messages into one
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 class PhraseFactory
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/BatchConsumer.php b/lib/internal/Magento/Framework/MessageQueue/BatchConsumer.php
index 3dac6070e669f..e838744100a2d 100644
--- a/lib/internal/Magento/Framework/MessageQueue/BatchConsumer.php
+++ b/lib/internal/Magento/Framework/MessageQueue/BatchConsumer.php
@@ -275,7 +275,7 @@ private function lockMessages(array $messages)
      *
      * @return ConsumerConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getConsumerConfig()
     {
@@ -292,7 +292,7 @@ private function getConsumerConfig()
      *
      * @return MessageController
      *
-     * @deprecated 100.1.0
+     * @deprecated 103.0.0
      */
     private function getMessageController()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactory.php b/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactory.php
index 47775ac857b07..d55b893f31ca7 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactory.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactory.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\MessageQueue\ExchangeInterface
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 class ExchangeFactory implements ExchangeFactoryInterface
 {
@@ -27,7 +27,7 @@ class ExchangeFactory implements ExchangeFactoryInterface
      * Object Manager instance
      *
      * @var \Magento\Framework\ObjectManagerInterface
-     * @since 100.2.0
+     * @since 103.0.0
      */
     protected $objectManager = null;
 
@@ -37,7 +37,6 @@ class ExchangeFactory implements ExchangeFactoryInterface
      * @param \Magento\Framework\MessageQueue\ConnectionTypeResolver $connectionTypeResolver
      * @param \Magento\Framework\ObjectManagerInterface $objectManager
      * @param ExchangeFactoryInterface[] $exchangeFactories
-     * @since 100.2.0
      */
     public function __construct(
         \Magento\Framework\MessageQueue\ConnectionTypeResolver $connectionTypeResolver,
@@ -51,7 +50,7 @@ public function __construct(
 
     /**
      * @inheritdoc
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function create($connectionName, array $data = [])
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactoryInterface.php b/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactoryInterface.php
index dc691e632c9ed..d407be435332d 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactoryInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeFactoryInterface.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\MessageQueue\Bulk\ExchangeInterface
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface ExchangeFactoryInterface
 {
@@ -21,7 +21,7 @@ interface ExchangeFactoryInterface
      * @return ExchangeInterface
      * @throws \LogicException If exchange is not defined for the specified connection type
      *                          or it doesn't implement ExchangeInterface
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function create($connectionName, array $data = []);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeInterface.php b/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeInterface.php
index 08b64689c2940..a361d893d8d68 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Bulk/ExchangeInterface.php
@@ -9,7 +9,7 @@
  * Interface for bulk exchange.
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface ExchangeInterface
 {
@@ -19,7 +19,7 @@ interface ExchangeInterface
      * @param string $topic
      * @param \Magento\Framework\MessageQueue\EnvelopeInterface[] $envelopes
      * @return mixed
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function enqueue($topic, array $envelopes);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/Communication.php b/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/Communication.php
index 6219dbf29b14c..ec8344ac69820 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/Communication.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/Communication.php
@@ -96,7 +96,7 @@ public function read($scope = null)
      * @param string $methodName
      * @return string
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      * @see \Magento\Framework\Communication\Config\ReflectionGenerator::generateTopicName
      */
     public function generateTopicName($typeName, $methodName)
diff --git a/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/MessageQueue.php b/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/MessageQueue.php
index 9412e1c2384f0..da361f08ee598 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/MessageQueue.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Code/Generator/Config/RemoteServiceReader/MessageQueue.php
@@ -11,7 +11,7 @@
 /**
  * Remote service configuration reader.
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class MessageQueue implements \Magento\Framework\Config\ReaderInterface
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Code/Generator/RemoteServiceGenerator.php b/lib/internal/Magento/Framework/MessageQueue/Code/Generator/RemoteServiceGenerator.php
index 9dc0a9d0205f8..b68a242b50722 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Code/Generator/RemoteServiceGenerator.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Code/Generator/RemoteServiceGenerator.php
@@ -229,7 +229,7 @@ protected function validateResultClassName()
      *
      * @return ReflectionGenerator
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getReflectionGenerator()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config.php b/lib/internal/Magento/Framework/MessageQueue/Config.php
index 9a925e1417c12..9260a4afe951e 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config.php
@@ -12,7 +12,7 @@
 /**
  * Queue configuration.
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class Config implements ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Consumer/ConfigReaderPlugin.php b/lib/internal/Magento/Framework/MessageQueue/Config/Consumer/ConfigReaderPlugin.php
index c791baf4deb66..dd2448eb12561 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Consumer/ConfigReaderPlugin.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Consumer/ConfigReaderPlugin.php
@@ -11,7 +11,7 @@
 /**
  * Plugin which provides access to consumers declared in queue config using consumer config interface.
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class ConfigReaderPlugin
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Publisher/ConfigReaderPlugin.php b/lib/internal/Magento/Framework/MessageQueue/Config/Publisher/ConfigReaderPlugin.php
index 78b82a67069bf..c1a4c9c6836e8 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Publisher/ConfigReaderPlugin.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Publisher/ConfigReaderPlugin.php
@@ -11,7 +11,7 @@
 /**
  * Plugin which provides access to publishers declared in queue config using publisher config interface.
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class ConfigReaderPlugin
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml.php b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml.php
index 16efacf628d57..e09c3e411453b 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml.php
@@ -9,7 +9,7 @@
 /**
  * MessageQueue configuration filesystem loader. Loads all publisher configuration from XML file
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class Xml extends \Magento\Framework\Config\Reader\Filesystem
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/CompositeConverter.php b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/CompositeConverter.php
index 0184f720b3b4e..cffc4816a12d9 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/CompositeConverter.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/CompositeConverter.php
@@ -11,7 +11,7 @@
 /**
  * Converts MessageQueue config from \DOMDocument to array
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class CompositeConverter implements ConverterInterface
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/Converter/TopicConfig.php b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/Converter/TopicConfig.php
index e33d6ab5b1fb8..8b0d31f5abcc3 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/Converter/TopicConfig.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/Converter/TopicConfig.php
@@ -15,7 +15,7 @@
 /**
  * Converts MessageQueue config from \DOMDocument to array
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class TopicConfig implements \Magento\Framework\Config\ConverterInterface
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/SchemaLocator.php b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/SchemaLocator.php
index 613d564942e2f..37b4b34aec350 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/SchemaLocator.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Reader/Xml/SchemaLocator.php
@@ -9,7 +9,7 @@
 /**
  * Schema locator for Publishers
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Config/Topology/ConfigReaderPlugin.php b/lib/internal/Magento/Framework/MessageQueue/Config/Topology/ConfigReaderPlugin.php
index b5f8d179961c6..2ee587bd78fb3 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Config/Topology/ConfigReaderPlugin.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Config/Topology/ConfigReaderPlugin.php
@@ -10,7 +10,7 @@
 /**
  * Plugin which provides access to topology declared in queue config using topology config interface.
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class ConfigReaderPlugin
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/ConfigInterface.php b/lib/internal/Magento/Framework/MessageQueue/ConfigInterface.php
index a88b5dedbd269..99259dcac6b4c 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ConfigInterface.php
@@ -9,7 +9,7 @@
 use Magento\Framework\Exception\LocalizedException;
 
 /**
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Consumer.php b/lib/internal/Magento/Framework/MessageQueue/Consumer.php
index 8f65a2d8c5ed2..9c42a11cbb387 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Consumer.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Consumer.php
@@ -240,7 +240,7 @@ private function getTransactionCallback(QueueInterface $queue)
      *
      * @return ConsumerConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getConsumerConfig()
     {
@@ -255,7 +255,7 @@ private function getConsumerConfig()
      *
      * @return CommunicationConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getCommunicationConfig()
     {
@@ -271,7 +271,7 @@ private function getCommunicationConfig()
      *
      * @return QueueRepository
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getQueueRepository()
     {
@@ -286,7 +286,7 @@ private function getQueueRepository()
      *
      * @return MessageController
      *
-     * @deprecated 100.1.0
+     * @deprecated 103.0.0
      */
     private function getMessageController()
     {
@@ -302,7 +302,7 @@ private function getMessageController()
      *
      * @return MessageValidator
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getMessageValidator()
     {
@@ -318,7 +318,7 @@ private function getMessageValidator()
      *
      * @return EnvelopeFactory
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getEnvelopeFactory()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Consumer/ConfigInterface.php b/lib/internal/Magento/Framework/MessageQueue/Consumer/ConfigInterface.php
index 344b5ef1d580c..f0e2be9e37aa3 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Consumer/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Consumer/ConfigInterface.php
@@ -12,7 +12,7 @@
  * Consumer config interface provides access data declared in etc/queue_consumer.xml
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface ConfigInterface
 {
@@ -23,7 +23,7 @@ interface ConfigInterface
      * @return ConsumerConfigItemInterface
      * @throws LocalizedException
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getConsumer($name);
 
@@ -32,7 +32,7 @@ public function getConsumer($name);
      *
      * @return ConsumerConfigItemInterface[]
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getConsumers();
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/ConsumerConfiguration.php b/lib/internal/Magento/Framework/MessageQueue/ConsumerConfiguration.php
index 09cd5dcb8d909..70c4632092f67 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ConsumerConfiguration.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ConsumerConfiguration.php
@@ -174,7 +174,7 @@ private function getData($key)
      *
      * @return ConsumerConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getConsumerConfig()
     {
@@ -189,7 +189,7 @@ private function getConsumerConfig()
      *
      * @return CommunicationConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getCommunicationConfig()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/ConsumerConfigurationInterface.php b/lib/internal/Magento/Framework/MessageQueue/ConsumerConfigurationInterface.php
index b825949ddb019..cd5e2015caf0b 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ConsumerConfigurationInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ConsumerConfigurationInterface.php
@@ -42,7 +42,7 @@ public function getQueueName();
      * Get consumer type sync|async.
      *
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      * @see \Magento\Framework\Communication\ConfigInterface::getTopic
      * @throws \LogicException
      */
diff --git a/lib/internal/Magento/Framework/MessageQueue/ConsumerFactory.php b/lib/internal/Magento/Framework/MessageQueue/ConsumerFactory.php
index 7d9f210b4a698..6632971cd4305 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ConsumerFactory.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ConsumerFactory.php
@@ -122,7 +122,7 @@ private function createConsumerConfiguration($consumerConfigItem)
      *
      * @return ConsumerConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getConsumerConfig()
     {
@@ -137,7 +137,7 @@ private function getConsumerConfig()
      *
      * @return CommunicationConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getCommunicationConfig()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/ConsumerInterface.php b/lib/internal/Magento/Framework/MessageQueue/ConsumerInterface.php
index ca45da7eca8ff..bb28a1a5d5ea7 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ConsumerInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ConsumerInterface.php
@@ -9,6 +9,8 @@
  * Consumers will connect to a queue, read messages, and invoke a method to process the message contents.
  *
  * @api
+ * @since 103.0.0
+ * @since 100.0.2
  */
 interface ConsumerInterface
 {
@@ -18,6 +20,7 @@ interface ConsumerInterface
      * @param int|null $maxNumberOfMessages if not specified - process all queued incoming messages and terminate,
      *      otherwise terminate execution after processing the specified number of messages
      * @return void
+     * @since 103.0.0
      */
     public function process($maxNumberOfMessages = null);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/EnvelopeInterface.php b/lib/internal/Magento/Framework/MessageQueue/EnvelopeInterface.php
index 07f12d1856317..d564636f54a95 100644
--- a/lib/internal/Magento/Framework/MessageQueue/EnvelopeInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/EnvelopeInterface.php
@@ -7,6 +7,8 @@
 
 /**
  * @api
+ * @since 103.0.0
+ * @since 100.0.2
  */
 interface EnvelopeInterface
 {
@@ -14,6 +16,7 @@ interface EnvelopeInterface
      * Binary representation of message
      *
      * @return string
+     * @since 103.0.0
      */
     public function getBody();
 
@@ -21,6 +24,7 @@ public function getBody();
      * Message metadata
      *
      * @return array
+     * @since 103.0.0
      */
     public function getProperties();
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/ExchangeFactory.php b/lib/internal/Magento/Framework/MessageQueue/ExchangeFactory.php
index ca1ef769af90f..28e411c6dbbee 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ExchangeFactory.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ExchangeFactory.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\MessageQueue\ExchangeInterface
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 class ExchangeFactory implements ExchangeFactoryInterface
 {
@@ -27,7 +27,7 @@ class ExchangeFactory implements ExchangeFactoryInterface
      * Object Manager instance
      *
      * @var \Magento\Framework\ObjectManagerInterface
-     * @since 100.2.0
+     * @since 103.0.0
      */
     protected $objectManager = null;
 
@@ -37,7 +37,6 @@ class ExchangeFactory implements ExchangeFactoryInterface
      * @param ConnectionTypeResolver $connectionTypeResolver
      * @param \Magento\Framework\ObjectManagerInterface $objectManager
      * @param ExchangeFactoryInterface[] $exchangeFactories
-     * @since 100.2.0
      */
     public function __construct(
         ConnectionTypeResolver $connectionTypeResolver,
@@ -51,7 +50,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function create($connectionName, array $data = [])
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/ExchangeFactoryInterface.php b/lib/internal/Magento/Framework/MessageQueue/ExchangeFactoryInterface.php
index 1e70b0266fc4f..4b29c5e25b361 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ExchangeFactoryInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ExchangeFactoryInterface.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\MessageQueue\ExchangeInterface
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface ExchangeFactoryInterface
 {
@@ -19,7 +19,7 @@ interface ExchangeFactoryInterface
      * @param string $connectionName
      * @param array $data
      * @return ExchangeInterface
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function create($connectionName, array $data = []);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/ExchangeInterface.php b/lib/internal/Magento/Framework/MessageQueue/ExchangeInterface.php
index bb36332ae25b1..4495b210f0613 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ExchangeInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ExchangeInterface.php
@@ -9,6 +9,8 @@
  * Interface message Exchange
  *
  * @api
+ * @since 103.0.0
+ * @since 100.0.2
  */
 interface ExchangeInterface
 {
@@ -18,6 +20,7 @@ interface ExchangeInterface
      * @param string $topic
      * @param EnvelopeInterface $envelope
      * @return mixed
+     * @since 103.0.0
      */
     public function enqueue($topic, EnvelopeInterface $envelope);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/ExchangeRepository.php b/lib/internal/Magento/Framework/MessageQueue/ExchangeRepository.php
index 1f26e5d785c1a..cf17c765b49cf 100644
--- a/lib/internal/Magento/Framework/MessageQueue/ExchangeRepository.php
+++ b/lib/internal/Magento/Framework/MessageQueue/ExchangeRepository.php
@@ -53,7 +53,7 @@ public function getByConnectionName($connectionName)
      * Get exchange factory.
      *
      * @return ExchangeFactoryInterface
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getExchangeFactory()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/MessageEncoder.php b/lib/internal/Magento/Framework/MessageQueue/MessageEncoder.php
index 91ad24eaeb978..e8f8e6e3f7118 100644
--- a/lib/internal/Magento/Framework/MessageQueue/MessageEncoder.php
+++ b/lib/internal/Magento/Framework/MessageQueue/MessageEncoder.php
@@ -219,7 +219,7 @@ protected function getConverter($direction)
      *
      * @return CommunicationConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getCommunicationConfig()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/MessageIdGeneratorInterface.php b/lib/internal/Magento/Framework/MessageQueue/MessageIdGeneratorInterface.php
index 727db7d34761a..3d88c111d1b90 100644
--- a/lib/internal/Magento/Framework/MessageQueue/MessageIdGeneratorInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/MessageIdGeneratorInterface.php
@@ -9,7 +9,7 @@
  * Used to generate unique id for queue message.
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface MessageIdGeneratorInterface
 {
@@ -18,7 +18,7 @@ interface MessageIdGeneratorInterface
      *
      * @param string $topicName
      * @return string
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function generate($topicName);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/MessageLockException.php b/lib/internal/Magento/Framework/MessageQueue/MessageLockException.php
index 4ea462f7e1a8e..ac622aa6cffef 100644
--- a/lib/internal/Magento/Framework/MessageQueue/MessageLockException.php
+++ b/lib/internal/Magento/Framework/MessageQueue/MessageLockException.php
@@ -11,7 +11,7 @@
  * Class MessageLockException to be thrown when a message being processed is already in the lock table.
  *
  * @api
- * @since 100.1.0
+ * @since 103.0.0
  */
 class MessageLockException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/MessageValidator.php b/lib/internal/Magento/Framework/MessageQueue/MessageValidator.php
index 7c1a947623e9f..45ce351ed97bb 100644
--- a/lib/internal/Magento/Framework/MessageQueue/MessageValidator.php
+++ b/lib/internal/Magento/Framework/MessageQueue/MessageValidator.php
@@ -191,7 +191,7 @@ private function getRealType($message)
      *
      * @return CommunicationConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getCommunicationConfig()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Publisher.php b/lib/internal/Magento/Framework/MessageQueue/Publisher.php
index 8fe77abe69136..78d8c0f1bcafa 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Publisher.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Publisher.php
@@ -109,7 +109,7 @@ private function isAmqpConfigured()
      *
      * @return PublisherConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getPublisherConfig()
     {
@@ -124,7 +124,7 @@ private function getPublisherConfig()
      *
      * @return AmqpConfig
      *
-     * @deprecated
+     * @deprecated 100.2.0 103.0.0
      */
     private function getAmqpConfig()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Publisher/ConfigInterface.php b/lib/internal/Magento/Framework/MessageQueue/Publisher/ConfigInterface.php
index 7b5586b28a273..a10b7930c6eae 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Publisher/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Publisher/ConfigInterface.php
@@ -12,7 +12,7 @@
  * Publisher config interface provides access data declared in etc/queue_publisher.xml
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface ConfigInterface
 {
@@ -23,7 +23,7 @@ interface ConfigInterface
      * @return PublisherConfigItemInterface
      * @throws LocalizedException
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getPublisher($topic);
 
@@ -32,7 +32,7 @@ public function getPublisher($topic);
      *
      * @return PublisherConfigItemInterface[]
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getPublishers();
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/PublisherInterface.php b/lib/internal/Magento/Framework/MessageQueue/PublisherInterface.php
index 1aee963b1bd47..9f33b5b39d2ad 100644
--- a/lib/internal/Magento/Framework/MessageQueue/PublisherInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/PublisherInterface.php
@@ -9,6 +9,8 @@
  * Producer to publish messages via a specific transport to a specific queue or exchange.
  *
  * @api
+ * @since 103.0.0
+ * @since 100.0.2
  */
 interface PublisherInterface
 {
@@ -19,6 +21,7 @@ interface PublisherInterface
      * @param array|object $data
      * @return null|mixed
      * @throws \InvalidArgumentException If message is not formed properly
+     * @since 103.0.0
      */
     public function publish($topicName, $data);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/PublisherPool.php b/lib/internal/Magento/Framework/MessageQueue/PublisherPool.php
index 2c1e4e64c7d71..4a289d8f0a320 100644
--- a/lib/internal/Magento/Framework/MessageQueue/PublisherPool.php
+++ b/lib/internal/Magento/Framework/MessageQueue/PublisherPool.php
@@ -14,7 +14,7 @@
  * Publishers pool.
  *
  * @api
- * @since 100.1.0
+ * @since 103.0.0
  */
 class PublisherPool implements PublisherInterface, BulkPublisherInterface
 {
@@ -35,7 +35,7 @@ class PublisherPool implements PublisherInterface, BulkPublisherInterface
      * Publisher objects pool.
      *
      * @var \Magento\Framework\MessageQueue\PublisherInterface[]
-     * @since 100.1.0
+     * @since 103.0.0
      */
     protected $publishers = [];
 
@@ -43,7 +43,7 @@ class PublisherPool implements PublisherInterface, BulkPublisherInterface
      * Communication config.
      *
      * @var CommunicationConfig
-     * @since 100.1.0
+     * @since 103.0.0
      */
     protected $communicationConfig;
 
@@ -65,7 +65,6 @@ class PublisherPool implements PublisherInterface, BulkPublisherInterface
      * @param string[] $publishers
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @since 100.1.0
      */
     public function __construct(
         CommunicationConfig $communicationConfig,
@@ -78,7 +77,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 100.1.0
+     * @since 103.0.0
      */
     public function publish($topicName, $data)
     {
@@ -163,7 +162,7 @@ private function getPublisherForConnectionNameAndType($type, $connectionName)
      *
      * @return PublisherConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getPublisherConfig()
     {
@@ -178,7 +177,7 @@ private function getPublisherConfig()
      *
      * @return ConnectionTypeResolver
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getConnectionTypeResolver()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/QueueFactory.php b/lib/internal/Magento/Framework/MessageQueue/QueueFactory.php
index eb734df06a59f..3e1fe8f04ba6c 100644
--- a/lib/internal/Magento/Framework/MessageQueue/QueueFactory.php
+++ b/lib/internal/Magento/Framework/MessageQueue/QueueFactory.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\MessageQueue\Queuenterface
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 class QueueFactory implements QueueFactoryInterface
 {
@@ -27,7 +27,7 @@ class QueueFactory implements QueueFactoryInterface
      * Object Manager instance
      *
      * @var \Magento\Framework\ObjectManagerInterface
-     * @since 100.2.0
+     * @since 103.0.0
      */
     protected $objectManager = null;
 
@@ -37,7 +37,6 @@ class QueueFactory implements QueueFactoryInterface
      * @param ConnectionTypeResolver $connectionTypeResolver
      * @param \Magento\Framework\ObjectManagerInterface $objectManager
      * @param QueueFactoryInterface[] $queueFactories
-     * @since 100.2.0
      */
     public function __construct(
         ConnectionTypeResolver $connectionTypeResolver,
@@ -51,7 +50,7 @@ public function __construct(
 
     /**
      * {@inheritdoc}
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function create($queueName, $connectionName)
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/QueueFactoryInterface.php b/lib/internal/Magento/Framework/MessageQueue/QueueFactoryInterface.php
index 697db9296b5b0..4ca7bc6ecae87 100644
--- a/lib/internal/Magento/Framework/MessageQueue/QueueFactoryInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/QueueFactoryInterface.php
@@ -9,7 +9,7 @@
  * Factory class for @see \Magento\Framework\MessageQueue\QueueInterface
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface QueueFactoryInterface
 {
@@ -19,7 +19,7 @@ interface QueueFactoryInterface
      * @param string $queueName
      * @param string $connectionName
      * @return QueueInterface
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function create($queueName, $connectionName);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/QueueInterface.php b/lib/internal/Magento/Framework/MessageQueue/QueueInterface.php
index 1b3814b8e857a..db64e83047c03 100644
--- a/lib/internal/Magento/Framework/MessageQueue/QueueInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/QueueInterface.php
@@ -9,6 +9,8 @@
  * Interface for interaction with message queue.
  *
  * @api
+ * @since 103.0.0
+ * @since 100.0.2
  */
 interface QueueInterface
 {
@@ -16,6 +18,7 @@ interface QueueInterface
      * Get message from queue
      *
      * @return EnvelopeInterface
+     * @since 103.0.0
      */
     public function dequeue();
 
@@ -24,6 +27,7 @@ public function dequeue();
      *
      * @param EnvelopeInterface $envelope
      * @return void
+     * @since 103.0.0
      */
     public function acknowledge(EnvelopeInterface $envelope);
 
@@ -32,6 +36,7 @@ public function acknowledge(EnvelopeInterface $envelope);
      *
      * @param callable|array $callback
      * @return void
+     * @since 103.0.0
      */
     public function subscribe($callback);
 
@@ -42,6 +47,7 @@ public function subscribe($callback);
      * @param bool $requeue
      * @param string $rejectionMessage
      * @return void
+     * @since 103.0.0
      */
     public function reject(EnvelopeInterface $envelope, $requeue = true, $rejectionMessage = null);
 
@@ -50,7 +56,7 @@ public function reject(EnvelopeInterface $envelope, $requeue = true, $rejectionM
      *
      * @param EnvelopeInterface $envelope
      * @return void
-     * @since 100.1.0
+     * @since 103.0.0
      */
     public function push(EnvelopeInterface $envelope);
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/QueueRepository.php b/lib/internal/Magento/Framework/MessageQueue/QueueRepository.php
index 5d04003c9ade0..e28d44a9b5d2b 100644
--- a/lib/internal/Magento/Framework/MessageQueue/QueueRepository.php
+++ b/lib/internal/Magento/Framework/MessageQueue/QueueRepository.php
@@ -57,7 +57,7 @@ public function get($connectionName, $queueName)
      * Get queue factory.
      *
      * @return QueueFactoryInterface
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getQueueFactory()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Rpc/Consumer.php b/lib/internal/Magento/Framework/MessageQueue/Rpc/Consumer.php
index 10ef24c462808..46534eb55f613 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Rpc/Consumer.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Rpc/Consumer.php
@@ -9,7 +9,7 @@
 /**
  * A MessageQueue Consumer to handle receiving, processing and replying to an RPC message.
  *
- * @deprecated 100.2.0
+ * @deprecated 103.0.0
  */
 class Consumer extends \Magento\Framework\MessageQueue\Consumer
 {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Rpc/Publisher.php b/lib/internal/Magento/Framework/MessageQueue/Rpc/Publisher.php
index 89b987cbb4405..90b2763471ee0 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Rpc/Publisher.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Rpc/Publisher.php
@@ -107,7 +107,7 @@ public function publish($topicName, $data)
      *
      * @return ResponseQueueNameBuilder
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getResponseQueueNameBuilder()
     {
@@ -123,7 +123,7 @@ private function getResponseQueueNameBuilder()
      *
      * @return PublisherConfig
      *
-     * @deprecated 100.2.0
+     * @deprecated 103.0.0
      */
     private function getPublisherConfig()
     {
diff --git a/lib/internal/Magento/Framework/MessageQueue/Topology/ConfigInterface.php b/lib/internal/Magento/Framework/MessageQueue/Topology/ConfigInterface.php
index 81d056999b573..b7b15ecd07112 100644
--- a/lib/internal/Magento/Framework/MessageQueue/Topology/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/MessageQueue/Topology/ConfigInterface.php
@@ -13,7 +13,7 @@
  * Topology config interface provides access data declared in etc/queue_topology.xml
  *
  * @api
- * @since 100.2.0
+ * @since 103.0.0
  */
 interface ConfigInterface
 {
@@ -25,7 +25,7 @@ interface ConfigInterface
      * @return ExchangeConfigItemInterface
      * @throws LocalizedException
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getExchange($name, $connection);
 
@@ -34,7 +34,7 @@ public function getExchange($name, $connection);
      *
      * @return ExchangeConfigItemInterface[]
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getExchanges();
 
@@ -43,7 +43,7 @@ public function getExchanges();
      *
      * @return QueueConfigItemInterface[]
      * @throws \LogicException
-     * @since 100.2.0
+     * @since 103.0.0
      */
     public function getQueues();
 }
diff --git a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php
index 5484103cc27ef..306159f8d22d5 100644
--- a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php
+++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php
@@ -17,6 +17,7 @@
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractExtensibleModel extends AbstractModel implements
     \Magento\Framework\Api\CustomAttributesDataInterface
@@ -387,6 +388,7 @@ private function populateExtensionAttributes(array $extensionAttributesData = []
 
     /**
      * @inheritdoc
+     * @since 100.0.11
      */
     public function __sleep()
     {
@@ -395,6 +397,7 @@ public function __sleep()
 
     /**
      * @inheritdoc
+     * @since 100.0.11
      */
     public function __wakeup()
     {
diff --git a/lib/internal/Magento/Framework/Model/AbstractModel.php b/lib/internal/Magento/Framework/Model/AbstractModel.php
index 8018c6176390f..b6473f8b0ab3c 100644
--- a/lib/internal/Magento/Framework/Model/AbstractModel.php
+++ b/lib/internal/Magento/Framework/Model/AbstractModel.php
@@ -15,6 +15,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * @SuppressWarnings(PHPMD.TooManyFields)
+ * @since 100.0.2
  */
 abstract class AbstractModel extends \Magento\Framework\DataObject
 {
@@ -467,7 +468,7 @@ protected function _setResourceModel($resourceName, $collectionName = null)
      *
      * @throws \Magento\Framework\Exception\LocalizedException
      * @return \Magento\Framework\Model\ResourceModel\Db\AbstractDb
-     * @deprecated because resource models should be used directly
+     * @deprecated 101.0.0 because resource models should be used directly
      */
     protected function _getResource()
     {
@@ -496,7 +497,7 @@ public function getResourceName()
      * @TODO MAGETWO-23541: Incorrect dependencies between Model\AbstractModel and Data\Collection\Db from Framework
      * @throws \Magento\Framework\Exception\LocalizedException
      * @return \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
-     * @deprecated because collections should be used directly via factory
+     * @deprecated 101.0.0 because collections should be used directly via factory
      */
     public function getResourceCollection()
     {
@@ -517,7 +518,7 @@ public function getResourceCollection()
      *
      * @TODO MAGETWO-23541: Incorrect dependencies between Model\AbstractModel and Data\Collection\Db from Framework
      * @return \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
-     * @deprecated because collections should be used directly via factory
+     * @deprecated 101.0.0 because collections should be used directly via factory
      */
     public function getCollection()
     {
@@ -587,7 +588,7 @@ protected function _afterLoad()
      * @param string $identifier
      * @param string|null $field
      * @return void
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function beforeLoad($identifier, $field = null)
     {
@@ -895,7 +896,7 @@ public function afterDeleteCommit()
      * Retrieve model resource
      *
      * @return \Magento\Framework\Model\ResourceModel\Db\AbstractDb
-     * @deprecated because resource models should be used directly
+     * @deprecated 101.0.0 because resource models should be used directly
      */
     public function getResource()
     {
diff --git a/lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction.php b/lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction.php
index 430bb6f65f295..e6b492b0a04fc 100644
--- a/lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction.php
+++ b/lib/internal/Magento/Framework/Model/ActionValidator/RemoveAction.php
@@ -12,6 +12,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class RemoveAction
 {
diff --git a/lib/internal/Magento/Framework/Model/Context.php b/lib/internal/Magento/Framework/Model/Context.php
index 910a0d48a5e9c..301398a67f6de 100644
--- a/lib/internal/Magento/Framework/Model/Context.php
+++ b/lib/internal/Magento/Framework/Model/Context.php
@@ -19,6 +19,7 @@
  * the classes they were introduced for.
  *
  * @api
+ * @since 100.0.2
  */
 class Context implements \Magento\Framework\ObjectManager\ContextInterface
 {
diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/AbstractResource.php b/lib/internal/Magento/Framework/Model/ResourceModel/AbstractResource.php
index 255e6d94d741f..71e87d4cb6d87 100644
--- a/lib/internal/Magento/Framework/Model/ResourceModel/AbstractResource.php
+++ b/lib/internal/Magento/Framework/Model/ResourceModel/AbstractResource.php
@@ -14,17 +14,19 @@
  * Abstract resource model
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractResource
 {
     /**
      * @var Json
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected $serializer;
 
     /**
      * @var \Psr\Log\LoggerInterface
+     * @since 102.0.0
      */
     protected $_logger;
 
@@ -247,8 +249,8 @@ protected function _getColumnsForEntityLoad(\Magento\Framework\Model\AbstractMod
      * Get serializer
      *
      * @return Json
-     * @deprecated 100.2.0
-     * @since 100.2.0
+     * @deprecated 101.0.0
+     * @since 101.0.0
      */
     protected function getSerializer()
     {
@@ -262,7 +264,7 @@ protected function getSerializer()
      * Get logger
      *
      * @return \Psr\Log\LoggerInterface
-     * @deprecated
+     * @deprecated 101.0.1
      */
     private function getLogger()
     {
diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php
index 626fc42a80778..33427a219f9c1 100644
--- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php
+++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php
@@ -20,6 +20,7 @@
  * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractDb extends AbstractResource
 {
diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php
index cba5f133f53c8..b63291394e1d1 100644
--- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php
+++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php
@@ -15,6 +15,7 @@
  * phpcs:disable Magento2.Classes.AbstractApi
  * @api
  * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @since 100.0.2
  */
 abstract class AbstractCollection extends AbstractDb implements SourceProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/ObjectRelationProcessor.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/ObjectRelationProcessor.php
index e899cc56f4548..0851c48d50036 100644
--- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/ObjectRelationProcessor.php
+++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/ObjectRelationProcessor.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ObjectRelationProcessor
 {
diff --git a/lib/internal/Magento/Framework/Model/ResourceModel/Db/TransactionManagerInterface.php b/lib/internal/Magento/Framework/Model/ResourceModel/Db/TransactionManagerInterface.php
index 166789196cfa6..81ef2b1b5fa18 100644
--- a/lib/internal/Magento/Framework/Model/ResourceModel/Db/TransactionManagerInterface.php
+++ b/lib/internal/Magento/Framework/Model/ResourceModel/Db/TransactionManagerInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface TransactionManagerInterface
 {
diff --git a/lib/internal/Magento/Framework/Module/Dir/Reader.php b/lib/internal/Magento/Framework/Module/Dir/Reader.php
index 141a291ea6818..42d97235d578e 100644
--- a/lib/internal/Magento/Framework/Module/Dir/Reader.php
+++ b/lib/internal/Magento/Framework/Module/Dir/Reader.php
@@ -15,6 +15,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Reader
 {
diff --git a/lib/internal/Magento/Framework/Module/Manager.php b/lib/internal/Magento/Framework/Module/Manager.php
index b47349631a033..73ea68ac367c3 100644
--- a/lib/internal/Magento/Framework/Module/Manager.php
+++ b/lib/internal/Magento/Framework/Module/Manager.php
@@ -23,7 +23,7 @@ class Manager
 {
     /**
      * @var Output\ConfigInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private $outputConfig;
 
@@ -34,7 +34,7 @@ class Manager
 
     /**
      * @var array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private $outputConfigPaths;
 
@@ -69,7 +69,7 @@ public function isEnabled($moduleName)
      *
      * @param string $moduleName Fully-qualified module name
      * @return boolean
-     * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+     * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
      * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
      * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
      * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
@@ -87,7 +87,7 @@ public function isOutputEnabled($moduleName)
      *
      * @param string $moduleName Fully-qualified module name
      * @return boolean
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected function _isCustomOutputConfigEnabled($moduleName)
     {
diff --git a/lib/internal/Magento/Framework/Module/ModuleResource.php b/lib/internal/Magento/Framework/Module/ModuleResource.php
index b453ea4cba095..f7f212b829997 100644
--- a/lib/internal/Magento/Framework/Module/ModuleResource.php
+++ b/lib/internal/Magento/Framework/Module/ModuleResource.php
@@ -11,7 +11,7 @@
 /**
  * Resource Model
  *
- * @deprecated Declarative schema and data patches replace old functionality and setup_module table
+ * @deprecated 102.0.0 Declarative schema and data patches replace old functionality and setup_module table
  * So all resources related to this table, will be deprecated since 2.3.0
  */
 class ModuleResource extends AbstractDb implements ResourceInterface
@@ -141,7 +141,7 @@ public function setDataVersion($moduleName, $version)
     /**
      * Flush all class cache
      *
-     * @deprecated This method was added as temporary solution, to increase modularity:
+     * @deprecated 102.0.0 This method was added as temporary solution, to increase modularity:
      * Because before new modules appears in resource only on next bootstrap
      * @return void
      */
diff --git a/lib/internal/Magento/Framework/Module/Output/Config.php b/lib/internal/Magento/Framework/Module/Output/Config.php
index 48afc97dc5336..765998fcdb568 100644
--- a/lib/internal/Magento/Framework/Module/Output/Config.php
+++ b/lib/internal/Magento/Framework/Module/Output/Config.php
@@ -8,7 +8,7 @@
 namespace Magento\Framework\Module\Output;
 
 /**
- * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+ * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
  * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
  * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
  * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
@@ -24,13 +24,13 @@ class Config implements \Magento\Framework\Module\Output\ConfigInterface
 
     /**
      * @var \Magento\Framework\App\Config\ScopeConfigInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_scopeConfig;
 
     /**
      * @var string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     protected $_storeType;
 
@@ -50,7 +50,7 @@ public function __construct(
      * Whether a module is enabled in the configuration or not
      *
      * @param string $moduleName Fully-qualified module name
-     * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+     * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
      * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
      * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
      * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
@@ -66,7 +66,7 @@ public function isEnabled($moduleName)
      * Retrieve module enabled specific path
      *
      * @param string $path Fully-qualified config path
-     * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+     * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
      * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
      * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
      * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
diff --git a/lib/internal/Magento/Framework/Module/Output/ConfigInterface.php b/lib/internal/Magento/Framework/Module/Output/ConfigInterface.php
index 6813691b9c906..b657e742ee2f0 100644
--- a/lib/internal/Magento/Framework/Module/Output/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/Module/Output/ConfigInterface.php
@@ -6,7 +6,7 @@
 namespace Magento\Framework\Module\Output;
 
 /**
- * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+ * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
  * version. Module output can still be enabled/disabled in configuration files.
  */
 interface ConfigInterface
@@ -15,7 +15,7 @@ interface ConfigInterface
      * Whether a module is enabled in the configuration or not
      *
      * @param string $moduleName Fully-qualified module name
-     * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+     * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
      * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
      * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
      * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
@@ -28,7 +28,7 @@ public function isEnabled($moduleName);
      * Retrieve module enabled specific path
      *
      * @param string $path Fully-qualified config path
-     * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
+     * @deprecated 101.0.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
      * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
      * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
      * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
diff --git a/lib/internal/Magento/Framework/Module/Setup/Migration.php b/lib/internal/Magento/Framework/Module/Setup/Migration.php
index 1de26b5c9234a..551ea3305337a 100644
--- a/lib/internal/Magento/Framework/Module/Setup/Migration.php
+++ b/lib/internal/Magento/Framework/Module/Setup/Migration.php
@@ -15,6 +15,7 @@
  * @api
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Migration
 {
@@ -703,7 +704,7 @@ public function getCompositeModules()
      * @return string|int|float|bool|array|null
      * @throws \InvalidArgumentException
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     * @deprecated
+     * @deprecated 101.0.1
      * @see \Magento\Framework\Module\Setup\Migration::jsonDecode
      */
     protected function _jsonDecode($encodedValue, $objectDecodeType = 1)
diff --git a/lib/internal/Magento/Framework/Notification/MessageInterface.php b/lib/internal/Magento/Framework/Notification/MessageInterface.php
index a1694b042d9db..b768c0daed11b 100644
--- a/lib/internal/Magento/Framework/Notification/MessageInterface.php
+++ b/lib/internal/Magento/Framework/Notification/MessageInterface.php
@@ -14,6 +14,7 @@
  * Interface MessageInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface MessageInterface
 {
diff --git a/lib/internal/Magento/Framework/Notification/MessageList.php b/lib/internal/Magento/Framework/Notification/MessageList.php
index ac753b48c8944..62ac8e083bfd1 100644
--- a/lib/internal/Magento/Framework/Notification/MessageList.php
+++ b/lib/internal/Magento/Framework/Notification/MessageList.php
@@ -11,6 +11,7 @@
  *
  * Class MessageList
  * @api
+ * @since 100.0.2
  */
 class MessageList
 {
diff --git a/lib/internal/Magento/Framework/Notification/NotifierInterface.php b/lib/internal/Magento/Framework/Notification/NotifierInterface.php
index 0e34e69a94541..862298663a9c6 100644
--- a/lib/internal/Magento/Framework/Notification/NotifierInterface.php
+++ b/lib/internal/Magento/Framework/Notification/NotifierInterface.php
@@ -12,6 +12,7 @@
  * Interface NotifierInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface NotifierInterface
 {
diff --git a/lib/internal/Magento/Framework/Notification/NotifierList.php b/lib/internal/Magento/Framework/Notification/NotifierList.php
index e436e21cae5fc..2b2f9f5faf8a8 100644
--- a/lib/internal/Magento/Framework/Notification/NotifierList.php
+++ b/lib/internal/Magento/Framework/Notification/NotifierList.php
@@ -10,6 +10,7 @@
  * List of registered system notifiers
  * @api
  *
+ * @since 100.0.2
  */
 class NotifierList
 {
diff --git a/lib/internal/Magento/Framework/Oauth/ConsumerInterface.php b/lib/internal/Magento/Framework/Oauth/ConsumerInterface.php
index ae416b01eae94..3945233ca2b5d 100644
--- a/lib/internal/Magento/Framework/Oauth/ConsumerInterface.php
+++ b/lib/internal/Magento/Framework/Oauth/ConsumerInterface.php
@@ -9,6 +9,7 @@
  * Oauth consumer interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface ConsumerInterface
 {
diff --git a/lib/internal/Magento/Framework/Oauth/Exception.php b/lib/internal/Magento/Framework/Oauth/Exception.php
index 6e6753654fdd2..eaf1fd065ab01 100644
--- a/lib/internal/Magento/Framework/Oauth/Exception.php
+++ b/lib/internal/Magento/Framework/Oauth/Exception.php
@@ -11,6 +11,7 @@
  * OAuth Exception
  *
  * @api
+ * @since 100.0.2
  */
 class Exception extends AuthenticationException
 {
diff --git a/lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php b/lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php
index ca364aa95abeb..79dd527afc570 100644
--- a/lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php
+++ b/lib/internal/Magento/Framework/Oauth/NonceGeneratorInterface.php
@@ -11,6 +11,7 @@
  * A method for generating a current timestamp is also provided by this interface.
  *
  * @api
+ * @since 100.0.2
  */
 interface NonceGeneratorInterface
 {
diff --git a/lib/internal/Magento/Framework/Oauth/OauthInputException.php b/lib/internal/Magento/Framework/Oauth/OauthInputException.php
index 1c526dd220f25..52ff15bbb75d5 100644
--- a/lib/internal/Magento/Framework/Oauth/OauthInputException.php
+++ b/lib/internal/Magento/Framework/Oauth/OauthInputException.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class OauthInputException extends InputException
 {
diff --git a/lib/internal/Magento/Framework/Oauth/OauthInterface.php b/lib/internal/Magento/Framework/Oauth/OauthInterface.php
index 4f68eabaf69dc..8528e682ab4c8 100644
--- a/lib/internal/Magento/Framework/Oauth/OauthInterface.php
+++ b/lib/internal/Magento/Framework/Oauth/OauthInterface.php
@@ -11,6 +11,7 @@
  * token requests. A method is also included for generating an OAuth header that can be used in an HTTP request.
  *
  * @api
+ * @since 100.0.2
  */
 interface OauthInterface
 {
diff --git a/lib/internal/Magento/Framework/Oauth/TokenProviderInterface.php b/lib/internal/Magento/Framework/Oauth/TokenProviderInterface.php
index 7f4bc6a320173..7b07b1550745a 100644
--- a/lib/internal/Magento/Framework/Oauth/TokenProviderInterface.php
+++ b/lib/internal/Magento/Framework/Oauth/TokenProviderInterface.php
@@ -11,6 +11,7 @@
  * provided to help clients manipulating tokens validate and acquire the associated token consumer.
  *
  * @api
+ * @since 100.0.2
  */
 interface TokenProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php
index 24ac714507d8e..645e3fd7eff78 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php
@@ -16,8 +16,7 @@
 
 /**
  * Class Repository
- * @since 2.0.0
- * @deprecated 2.2.0 As current implementation breaks Repository contract. Not removed from codebase to prevent
+ * @deprecated 101.0.0 As current implementation breaks Repository contract. Not removed from codebase to prevent
  * possible backward incompatibilities if this functionality being used by 3rd party developers.
  */
 class Repository extends \Magento\Framework\Code\Generator\EntityAbstract
diff --git a/lib/internal/Magento/Framework/ObjectManager/Config/Config.php b/lib/internal/Magento/Framework/ObjectManager/Config/Config.php
index b45a2f8bcf0ba..72b5902337b0d 100644
--- a/lib/internal/Magento/Framework/ObjectManager/Config/Config.php
+++ b/lib/internal/Magento/Framework/ObjectManager/Config/Config.php
@@ -336,7 +336,7 @@ public function getPreferences()
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/ObjectManager/ContextInterface.php b/lib/internal/Magento/Framework/ObjectManager/ContextInterface.php
index 323f092e7cf52..742917ead47fc 100644
--- a/lib/internal/Magento/Framework/ObjectManager/ContextInterface.php
+++ b/lib/internal/Magento/Framework/ObjectManager/ContextInterface.php
@@ -17,6 +17,7 @@
  * the classes they were introduced for.
  *
  * @api
+ * @since 100.0.2
  */
 interface ContextInterface
 {
diff --git a/lib/internal/Magento/Framework/ObjectManagerInterface.php b/lib/internal/Magento/Framework/ObjectManagerInterface.php
index 68e7056bc413b..6b165595f0f2c 100644
--- a/lib/internal/Magento/Framework/ObjectManagerInterface.php
+++ b/lib/internal/Magento/Framework/ObjectManagerInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ObjectManagerInterface
 {
diff --git a/lib/internal/Magento/Framework/Option/ArrayInterface.php b/lib/internal/Magento/Framework/Option/ArrayInterface.php
index 054d9059b02f8..3c813545bc2c5 100644
--- a/lib/internal/Magento/Framework/Option/ArrayInterface.php
+++ b/lib/internal/Magento/Framework/Option/ArrayInterface.php
@@ -8,7 +8,7 @@
 /**
  * Array marker interface
  *
- * @deprecated please use \Magento\Framework\Data\OptionSourceInterface instead.
+ * @deprecated 102.0.1 please use \Magento\Framework\Data\OptionSourceInterface instead.
  * @see \Magento\Framework\Data\OptionSourceInterface
  */
 interface ArrayInterface extends \Magento\Framework\Data\OptionSourceInterface
diff --git a/lib/internal/Magento/Framework/Phrase.php b/lib/internal/Magento/Framework/Phrase.php
index da1eb2a2b3d98..3034dfc30a9e2 100644
--- a/lib/internal/Magento/Framework/Phrase.php
+++ b/lib/internal/Magento/Framework/Phrase.php
@@ -12,6 +12,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Phrase implements \JsonSerializable
 {
diff --git a/lib/internal/Magento/Framework/Phrase/RendererInterface.php b/lib/internal/Magento/Framework/Phrase/RendererInterface.php
index e3e314696f3d1..fa8a8fcae7ae8 100644
--- a/lib/internal/Magento/Framework/Phrase/RendererInterface.php
+++ b/lib/internal/Magento/Framework/Phrase/RendererInterface.php
@@ -11,6 +11,7 @@
  * Translated phrase renderer
  *
  * @api
+ * @since 100.0.2
  */
 interface RendererInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php b/lib/internal/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php
index 9dff304ea3407..2ca6bd07d16e0 100644
--- a/lib/internal/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Adjustment/AdjustmentInterface.php
@@ -12,6 +12,7 @@
  * Interface AdjustmentInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface AdjustmentInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php b/lib/internal/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php
index ea622c2a1cba6..2c182632407ab 100644
--- a/lib/internal/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Adjustment/CalculatorInterface.php
@@ -12,6 +12,7 @@
  * Calculator interface
  *
  * @api
+ * @since 100.0.2
  */
 interface CalculatorInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Adjustment/Collection.php b/lib/internal/Magento/Framework/Pricing/Adjustment/Collection.php
index c7ab4b6e796c2..96e4d52e6b41d 100644
--- a/lib/internal/Magento/Framework/Pricing/Adjustment/Collection.php
+++ b/lib/internal/Magento/Framework/Pricing/Adjustment/Collection.php
@@ -10,6 +10,7 @@
  * Adjustment collection model
  *
  * @api
+ * @since 100.0.2
  */
 class Collection
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Adjustment/Pool.php b/lib/internal/Magento/Framework/Pricing/Adjustment/Pool.php
index d064e05b0b671..4d1e213a9ff6a 100644
--- a/lib/internal/Magento/Framework/Pricing/Adjustment/Pool.php
+++ b/lib/internal/Magento/Framework/Pricing/Adjustment/Pool.php
@@ -12,6 +12,7 @@
  * Global adjustment pool model
  *
  * @api
+ * @since 100.0.2
  */
 class Pool
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Amount/AmountFactory.php b/lib/internal/Magento/Framework/Pricing/Amount/AmountFactory.php
index a8340ee097f58..93da79d8588cb 100644
--- a/lib/internal/Magento/Framework/Pricing/Amount/AmountFactory.php
+++ b/lib/internal/Magento/Framework/Pricing/Amount/AmountFactory.php
@@ -10,6 +10,7 @@
  * Class AmountFactory
  *
  * @api
+ * @since 100.0.2
  */
 class AmountFactory
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Amount/AmountInterface.php b/lib/internal/Magento/Framework/Pricing/Amount/AmountInterface.php
index a625e340395cc..45240315aa126 100644
--- a/lib/internal/Magento/Framework/Pricing/Amount/AmountInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Amount/AmountInterface.php
@@ -10,6 +10,7 @@
  * Amount interface, the amount values are in display currency
  *
  * @api
+ * @since 100.0.2
  */
 interface AmountInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Helper/Data.php b/lib/internal/Magento/Framework/Pricing/Helper/Data.php
index bc56bddea8ece..39852074300be 100644
--- a/lib/internal/Magento/Framework/Pricing/Helper/Data.php
+++ b/lib/internal/Magento/Framework/Pricing/Helper/Data.php
@@ -11,6 +11,7 @@
  * Pricing data helper
  *
  * @api
+ * @since 100.0.2
  */
 class Data extends \Magento\Framework\App\Helper\AbstractHelper
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Price/AbstractPrice.php b/lib/internal/Magento/Framework/Pricing/Price/AbstractPrice.php
index 8c49385f7e60f..89470cf24cbb6 100644
--- a/lib/internal/Magento/Framework/Pricing/Price/AbstractPrice.php
+++ b/lib/internal/Magento/Framework/Pricing/Price/AbstractPrice.php
@@ -16,6 +16,7 @@
  * Should be the base for creating any Price type class
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractPrice implements PriceInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php b/lib/internal/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php
index eb5c6d9064e21..b6367fa46c161 100644
--- a/lib/internal/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Price/BasePriceProviderInterface.php
@@ -10,6 +10,7 @@
  * Interface BasePriceProviderInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface BasePriceProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Price/Collection.php b/lib/internal/Magento/Framework/Pricing/Price/Collection.php
index 200c3a50aff89..eedb910c56b92 100644
--- a/lib/internal/Magento/Framework/Pricing/Price/Collection.php
+++ b/lib/internal/Magento/Framework/Pricing/Price/Collection.php
@@ -12,6 +12,7 @@
  * Class Collection
  *
  * @api
+ * @since 100.0.2
  */
 class Collection implements \Iterator
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Price/Pool.php b/lib/internal/Magento/Framework/Pricing/Price/Pool.php
index dfdd0c52681e1..a1c7d416b2259 100644
--- a/lib/internal/Magento/Framework/Pricing/Price/Pool.php
+++ b/lib/internal/Magento/Framework/Pricing/Price/Pool.php
@@ -10,6 +10,7 @@
  * Class Pool
  *
  * @api
+ * @since 100.0.2
  */
 class Pool implements \Iterator, \ArrayAccess
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Price/PriceInterface.php b/lib/internal/Magento/Framework/Pricing/Price/PriceInterface.php
index 7953940287eb2..2b3bd86d04b2b 100644
--- a/lib/internal/Magento/Framework/Pricing/Price/PriceInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Price/PriceInterface.php
@@ -12,6 +12,7 @@
  * Catalog price interface
  *
  * @api
+ * @since 100.0.2
  */
 interface PriceInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php
index ab3d26f3e0c6c..aea2aacef5edf 100644
--- a/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php
@@ -10,6 +10,7 @@
  * Interface PriceCurrencyInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface PriceCurrencyInterface
 {
@@ -75,7 +76,7 @@ public function convertAndFormat(
     /**
      * Round price
      *
-     * @deprecated
+     * @deprecated 102.0.1
      * @param float $price
      * @return float
      */
diff --git a/lib/internal/Magento/Framework/Pricing/PriceInfo/Base.php b/lib/internal/Magento/Framework/Pricing/PriceInfo/Base.php
index ac8c301e24a5c..31b343c74e272 100644
--- a/lib/internal/Magento/Framework/Pricing/PriceInfo/Base.php
+++ b/lib/internal/Magento/Framework/Pricing/PriceInfo/Base.php
@@ -17,6 +17,7 @@
  * Price info base model
  *
  * @api
+ * @since 100.0.2
  */
 class Base implements PriceInfoInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/PriceInfo/Factory.php b/lib/internal/Magento/Framework/Pricing/PriceInfo/Factory.php
index e3e4af56f6095..8739520016764 100644
--- a/lib/internal/Magento/Framework/Pricing/PriceInfo/Factory.php
+++ b/lib/internal/Magento/Framework/Pricing/PriceInfo/Factory.php
@@ -16,6 +16,7 @@
  * Price info model factory
  *
  * @api
+ * @since 100.0.2
  */
 class Factory
 {
diff --git a/lib/internal/Magento/Framework/Pricing/PriceInfoInterface.php b/lib/internal/Magento/Framework/Pricing/PriceInfoInterface.php
index 259a8a4d8c2d1..80620008c77ae 100644
--- a/lib/internal/Magento/Framework/Pricing/PriceInfoInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/PriceInfoInterface.php
@@ -13,6 +13,7 @@
  * Price info model interface
  *
  * @api
+ * @since 100.0.2
  */
 interface PriceInfoInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Render.php b/lib/internal/Magento/Framework/Pricing/Render.php
index 2159fcaeaa121..0784a09191380 100644
--- a/lib/internal/Magento/Framework/Pricing/Render.php
+++ b/lib/internal/Magento/Framework/Pricing/Render.php
@@ -19,6 +19,7 @@
  * @method string getPriceRenderHandle()
  *
  * @api
+ * @since 100.0.2
  */
 class Render extends AbstractBlock
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php
index 3be51eb83b911..a9bfb84bcaded 100644
--- a/lib/internal/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Render/AdjustmentRenderInterface.php
@@ -13,6 +13,7 @@
  * Adjustment render interface
  *
  * @api
+ * @since 100.0.2
  */
 interface AdjustmentRenderInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php
index 724593e269944..38acbe37e71db 100644
--- a/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Render/AmountRenderInterface.php
@@ -14,6 +14,7 @@
  * Price amount renderer interface
  *
  * @api
+ * @since 100.0.2
  */
 interface AmountRenderInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php b/lib/internal/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php
index 9c23c594a89fb..68a246a36c8dc 100644
--- a/lib/internal/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/Render/PriceBoxRenderInterface.php
@@ -14,6 +14,7 @@
  * Price box render interface
  *
  * @api
+ * @since 100.0.2
  */
 interface PriceBoxRenderInterface
 {
diff --git a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php
index 73efef2e477be..a32273f51c8f4 100644
--- a/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php
+++ b/lib/internal/Magento/Framework/Pricing/Render/RendererPool.php
@@ -13,6 +13,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class RendererPool extends AbstractBlock
 {
diff --git a/lib/internal/Magento/Framework/Pricing/SaleableInterface.php b/lib/internal/Magento/Framework/Pricing/SaleableInterface.php
index 240012c0b18e1..9d7959ff80fea 100644
--- a/lib/internal/Magento/Framework/Pricing/SaleableInterface.php
+++ b/lib/internal/Magento/Framework/Pricing/SaleableInterface.php
@@ -10,6 +10,7 @@
  * Interface SaleableInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface SaleableInterface
 {
diff --git a/lib/internal/Magento/Framework/Profiler.php b/lib/internal/Magento/Framework/Profiler.php
index eaf0a732f98c0..4fafc68a568db 100644
--- a/lib/internal/Magento/Framework/Profiler.php
+++ b/lib/internal/Magento/Framework/Profiler.php
@@ -12,6 +12,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Profiler
 {
diff --git a/lib/internal/Magento/Framework/Profiler/DriverInterface.php b/lib/internal/Magento/Framework/Profiler/DriverInterface.php
index fe6393b3a43e3..4230b69dab917 100644
--- a/lib/internal/Magento/Framework/Profiler/DriverInterface.php
+++ b/lib/internal/Magento/Framework/Profiler/DriverInterface.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface DriverInterface
 {
diff --git a/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php b/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php
index 2f3caf08c534e..43b8cc22ebf2c 100644
--- a/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php
+++ b/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php
@@ -12,6 +12,7 @@
  * Data object processor for array serialization using class reflection
  *
  * @api
+ * @since 100.0.2
  */
 class DataObjectProcessor
 {
diff --git a/lib/internal/Magento/Framework/Reflection/MethodsMap.php b/lib/internal/Magento/Framework/Reflection/MethodsMap.php
index c4a738ac28caa..0b5ab78a504da 100644
--- a/lib/internal/Magento/Framework/Reflection/MethodsMap.php
+++ b/lib/internal/Magento/Framework/Reflection/MethodsMap.php
@@ -239,7 +239,7 @@ public function isMethodReturnValueRequired($type, $methodName)
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/Registry.php b/lib/internal/Magento/Framework/Registry.php
index d1bc227437d5f..e798b28e1e1b2 100644
--- a/lib/internal/Magento/Framework/Registry.php
+++ b/lib/internal/Magento/Framework/Registry.php
@@ -12,7 +12,8 @@
  * It's usage should be avoid. Use service classes or data providers instead.
  *
  * @api
- * @deprecated
+ * @deprecated 102.0.0
+ * @since 100.0.2
  */
 class Registry
 {
@@ -29,7 +30,7 @@ class Registry
      * @param string $key
      * @return mixed
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function registry($key)
     {
@@ -48,7 +49,7 @@ public function registry($key)
      * @return void
      * @throws \RuntimeException
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function register($key, $value, $graceful = false)
     {
@@ -67,7 +68,7 @@ public function register($key, $value, $graceful = false)
      * @param string $key
      * @return void
      *
-     * @deprecated
+     * @deprecated 102.0.0
      */
     public function unregister($key)
     {
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/ConditionManager.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/ConditionManager.php
index e56559563c35a..8dffc679b5c7f 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/ConditionManager.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/ConditionManager.php
@@ -12,8 +12,9 @@
  * MySQL search condition manager
  *
  * @api
- * @deprecated
+ * @deprecated 102.0.0
  * @see \Magento\ElasticSearch
+ * @since 100.0.2
  */
 class ConditionManager
 {
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorage.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorage.php
index 7f8ef8c422b92..1d29f055a464b 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorage.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorage.php
@@ -16,8 +16,9 @@
  * MySQL search temporary storage.
  *
  * @api
- * @deprecated
+ * @deprecated 102.0.0
  * @see \Magento\ElasticSearch
+ * @since 100.0.2
  */
 class TemporaryStorage
 {
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorageFactory.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorageFactory.php
index 208f6b39b9eb4..f1fc487a91ca0 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorageFactory.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/TemporaryStorageFactory.php
@@ -12,8 +12,9 @@
  *
  * @codeCoverageIgnore
  * @api
- * @deprecated
+ * @deprecated 102.0.0
  * @see \Magento\ElasticSearch
+ * @since 100.0.2
  */
 class TemporaryStorageFactory
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php
index ffe24fa324cee..baee7221a7f17 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm.php
@@ -10,6 +10,7 @@
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  * @api
+ * @since 100.0.2
  */
 class Algorithm
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm/Repository.php b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm/Repository.php
index c2d7e4025b3b3..bfba3130c6ae8 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/Algorithm/Repository.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/Algorithm/Repository.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Repository
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/DataProviderFactory.php b/lib/internal/Magento/Framework/Search/Dynamic/DataProviderFactory.php
index 6c3a59152a9a1..ccfd5ec01dee3 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/DataProviderFactory.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/DataProviderFactory.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class DataProviderFactory
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/DataProviderInterface.php b/lib/internal/Magento/Framework/Search/Dynamic/DataProviderInterface.php
index fa360134663d6..374facf486ad9 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/DataProviderInterface.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/DataProviderInterface.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface DataProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/EntityStorage.php b/lib/internal/Magento/Framework/Search/Dynamic/EntityStorage.php
index e32096704025f..7500ab622b65b 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/EntityStorage.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/EntityStorage.php
@@ -8,6 +8,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class EntityStorage
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/EntityStorageFactory.php b/lib/internal/Magento/Framework/Search/Dynamic/EntityStorageFactory.php
index 96e6b0113d1a7..6b7a4cd9a6df6 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/EntityStorageFactory.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/EntityStorageFactory.php
@@ -10,6 +10,7 @@
 /**
  * EntityStorage Factory
  * @api
+ * @since 100.0.2
  */
 class EntityStorageFactory
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/IntervalFactory.php b/lib/internal/Magento/Framework/Search/Dynamic/IntervalFactory.php
index 90e66d1e7330c..261a52c27e850 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/IntervalFactory.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/IntervalFactory.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class IntervalFactory
 {
diff --git a/lib/internal/Magento/Framework/Search/Dynamic/IntervalInterface.php b/lib/internal/Magento/Framework/Search/Dynamic/IntervalInterface.php
index 547166eb175ba..f80cac17d8dc6 100644
--- a/lib/internal/Magento/Framework/Search/Dynamic/IntervalInterface.php
+++ b/lib/internal/Magento/Framework/Search/Dynamic/IntervalInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface IntervalInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/EngineResolverInterface.php b/lib/internal/Magento/Framework/Search/EngineResolverInterface.php
index 57ba210121bc4..47dfa6659cc25 100644
--- a/lib/internal/Magento/Framework/Search/EngineResolverInterface.php
+++ b/lib/internal/Magento/Framework/Search/EngineResolverInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 102.0.0
  */
 interface EngineResolverInterface
 {
@@ -16,6 +17,7 @@ interface EngineResolverInterface
      * It returns string identifier of Search Engine that is currently chosen in configuration
      *
      * @return string
+     * @since 102.0.0
      */
     public function getCurrentSearchEngine();
 }
diff --git a/lib/internal/Magento/Framework/Search/EntityMetadata.php b/lib/internal/Magento/Framework/Search/EntityMetadata.php
index 8d25921813df3..9449396942c5a 100644
--- a/lib/internal/Magento/Framework/Search/EntityMetadata.php
+++ b/lib/internal/Magento/Framework/Search/EntityMetadata.php
@@ -9,6 +9,7 @@
 /**
  * Entity metadata
  * @api
+ * @since 100.0.2
  */
 class EntityMetadata
 {
diff --git a/lib/internal/Magento/Framework/Search/Request.php b/lib/internal/Magento/Framework/Search/Request.php
index 264d4929dde56..54d9f12fcb82f 100644
--- a/lib/internal/Magento/Framework/Search/Request.php
+++ b/lib/internal/Magento/Framework/Search/Request.php
@@ -14,6 +14,7 @@
  *
  * @codeCoverageIgnore
  * @api
+ * @since 100.0.2
  */
 class Request implements RequestInterface
 {
@@ -151,8 +152,9 @@ public function getSize()
      * It must be move to different interface.
      * Scope to split Search request interface on two different 'Search' and 'Fulltext Search' contains in MC-16461.
      *
-     * @deprecated
+     * @deprecated 102.0.2
      * @return array
+     * @since 102.0.2
      */
     public function getSort()
     {
diff --git a/lib/internal/Magento/Framework/Search/Request/Aggregation/DynamicBucket.php b/lib/internal/Magento/Framework/Search/Request/Aggregation/DynamicBucket.php
index dfa28911ca4ce..8f691b695a017 100644
--- a/lib/internal/Magento/Framework/Search/Request/Aggregation/DynamicBucket.php
+++ b/lib/internal/Magento/Framework/Search/Request/Aggregation/DynamicBucket.php
@@ -10,6 +10,7 @@
 /**
  * Dynamic Buckets
  * @api
+ * @since 100.0.2
  */
 class DynamicBucket implements BucketInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Binder.php b/lib/internal/Magento/Framework/Search/Request/Binder.php
index 9df1ee87eb869..5016c1c11926c 100644
--- a/lib/internal/Magento/Framework/Search/Request/Binder.php
+++ b/lib/internal/Magento/Framework/Search/Request/Binder.php
@@ -9,6 +9,7 @@
  * Data binder for search request.
  *
  * @api
+ * @since 100.0.2
  */
 class Binder
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/BucketInterface.php b/lib/internal/Magento/Framework/Search/Request/BucketInterface.php
index 8da797e5a9767..1512a8a68cf78 100644
--- a/lib/internal/Magento/Framework/Search/Request/BucketInterface.php
+++ b/lib/internal/Magento/Framework/Search/Request/BucketInterface.php
@@ -9,6 +9,7 @@
  * Aggregation Bucket Interface
  *
  * @api
+ * @since 100.0.2
  */
 interface BucketInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Builder.php b/lib/internal/Magento/Framework/Search/Request/Builder.php
index 0cf959b657c76..b3e1a7f2e309b 100644
--- a/lib/internal/Magento/Framework/Search/Request/Builder.php
+++ b/lib/internal/Magento/Framework/Search/Request/Builder.php
@@ -16,6 +16,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Builder
 {
@@ -104,6 +105,7 @@ public function setFrom($from)
      *
      * @param \Magento\Framework\Api\SortOrder[] $sort
      * @return $this
+     * @since 102.0.2
      */
     public function setSort($sort)
     {
diff --git a/lib/internal/Magento/Framework/Search/Request/Cleaner.php b/lib/internal/Magento/Framework/Search/Request/Cleaner.php
index c015f90751a23..59eeea47fe278 100644
--- a/lib/internal/Magento/Framework/Search/Request/Cleaner.php
+++ b/lib/internal/Magento/Framework/Search/Request/Cleaner.php
@@ -12,6 +12,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Cleaner
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Dimension.php b/lib/internal/Magento/Framework/Search/Request/Dimension.php
index bc60af8c16959..6df1974cc61cc 100644
--- a/lib/internal/Magento/Framework/Search/Request/Dimension.php
+++ b/lib/internal/Magento/Framework/Search/Request/Dimension.php
@@ -10,6 +10,7 @@
 /**
  * Search Request Dimension
  * @api
+ * @since 100.0.2
  */
 class Dimension extends AbstractKeyValuePair
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Filter/BoolExpression.php b/lib/internal/Magento/Framework/Search/Request/Filter/BoolExpression.php
index 5a1d2ad528237..6b0304ae37758 100644
--- a/lib/internal/Magento/Framework/Search/Request/Filter/BoolExpression.php
+++ b/lib/internal/Magento/Framework/Search/Request/Filter/BoolExpression.php
@@ -10,6 +10,7 @@
 /**
  * Bool Filter
  * @api
+ * @since 100.0.2
  */
 class BoolExpression implements FilterInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Filter/Range.php b/lib/internal/Magento/Framework/Search/Request/Filter/Range.php
index 1be0c690483ab..981c92203b864 100644
--- a/lib/internal/Magento/Framework/Search/Request/Filter/Range.php
+++ b/lib/internal/Magento/Framework/Search/Request/Filter/Range.php
@@ -11,6 +11,7 @@
  * Range Filter
  * @SuppressWarnings(PHPMD.ShortVariable)
  * @api
+ * @since 100.0.2
  */
 class Range implements FilterInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Filter/Term.php b/lib/internal/Magento/Framework/Search/Request/Filter/Term.php
index 5560c92164db4..50fd658c6760b 100644
--- a/lib/internal/Magento/Framework/Search/Request/Filter/Term.php
+++ b/lib/internal/Magento/Framework/Search/Request/Filter/Term.php
@@ -11,6 +11,7 @@
 /**
  * Term Filter
  * @api
+ * @since 100.0.2
  */
 class Term extends AbstractKeyValuePair implements FilterInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Filter/Wildcard.php b/lib/internal/Magento/Framework/Search/Request/Filter/Wildcard.php
index 60b5463132003..d1b487d498935 100644
--- a/lib/internal/Magento/Framework/Search/Request/Filter/Wildcard.php
+++ b/lib/internal/Magento/Framework/Search/Request/Filter/Wildcard.php
@@ -11,6 +11,7 @@
 /**
  * Wildcard Filter
  * @api
+ * @since 100.0.2
  */
 class Wildcard extends AbstractKeyValuePair implements FilterInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/FilterInterface.php b/lib/internal/Magento/Framework/Search/Request/FilterInterface.php
index 14fdd2929b15d..928f4121a84cd 100644
--- a/lib/internal/Magento/Framework/Search/Request/FilterInterface.php
+++ b/lib/internal/Magento/Framework/Search/Request/FilterInterface.php
@@ -9,6 +9,7 @@
  * Filter Interface
  *
  * @api
+ * @since 100.0.2
  */
 interface FilterInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Mapper.php b/lib/internal/Magento/Framework/Search/Request/Mapper.php
index 7586444d4b197..3cbcc618c4438 100644
--- a/lib/internal/Magento/Framework/Search/Request/Mapper.php
+++ b/lib/internal/Magento/Framework/Search/Request/Mapper.php
@@ -13,6 +13,7 @@
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
+ * @since 100.0.2
  */
 class Mapper
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Query/BoolExpression.php b/lib/internal/Magento/Framework/Search/Request/Query/BoolExpression.php
index 1ac3ba6c09b3b..c47a020b80580 100644
--- a/lib/internal/Magento/Framework/Search/Request/Query/BoolExpression.php
+++ b/lib/internal/Magento/Framework/Search/Request/Query/BoolExpression.php
@@ -10,6 +10,7 @@
 /**
  * Bool Query
  * @api
+ * @since 100.0.2
  */
 class BoolExpression implements QueryInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Query/Filter.php b/lib/internal/Magento/Framework/Search/Request/Query/Filter.php
index 7de25175793e4..850dbfd40a1fe 100644
--- a/lib/internal/Magento/Framework/Search/Request/Query/Filter.php
+++ b/lib/internal/Magento/Framework/Search/Request/Query/Filter.php
@@ -10,6 +10,7 @@
 /**
  * Term Query
  * @api
+ * @since 100.0.2
  */
 class Filter implements QueryInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/Query/Match.php b/lib/internal/Magento/Framework/Search/Request/Query/Match.php
index a1f884dbc106e..8fbd5244780bc 100644
--- a/lib/internal/Magento/Framework/Search/Request/Query/Match.php
+++ b/lib/internal/Magento/Framework/Search/Request/Query/Match.php
@@ -10,6 +10,7 @@
 /**
  * Match Query
  * @api
+ * @since 100.0.2
  */
 class Match implements QueryInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Request/QueryInterface.php b/lib/internal/Magento/Framework/Search/Request/QueryInterface.php
index e7cf56172cbaf..bf8a9582f5808 100644
--- a/lib/internal/Magento/Framework/Search/Request/QueryInterface.php
+++ b/lib/internal/Magento/Framework/Search/Request/QueryInterface.php
@@ -9,6 +9,7 @@
  * Query Interface
  *
  * @api
+ * @since 100.0.2
  */
 interface QueryInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/RequestInterface.php b/lib/internal/Magento/Framework/Search/RequestInterface.php
index 16df80f755c07..d5879ce0dc22e 100644
--- a/lib/internal/Magento/Framework/Search/RequestInterface.php
+++ b/lib/internal/Magento/Framework/Search/RequestInterface.php
@@ -13,6 +13,7 @@
  * Search Request
  *
  * @api
+ * @since 100.0.2
  */
 interface RequestInterface
 {
diff --git a/lib/internal/Magento/Framework/Search/Response/Aggregation.php b/lib/internal/Magento/Framework/Search/Response/Aggregation.php
index ea72597c53034..7ebe052b65ba8 100644
--- a/lib/internal/Magento/Framework/Search/Response/Aggregation.php
+++ b/lib/internal/Magento/Framework/Search/Response/Aggregation.php
@@ -11,6 +11,7 @@
 /**
  * Faceted data
  * @api
+ * @since 100.0.2
  */
 class Aggregation implements AggregationInterface, \IteratorAggregate
 {
diff --git a/lib/internal/Magento/Framework/Search/Response/QueryResponse.php b/lib/internal/Magento/Framework/Search/Response/QueryResponse.php
index 00b1ed2149bec..d7d0a8d03b28c 100644
--- a/lib/internal/Magento/Framework/Search/Response/QueryResponse.php
+++ b/lib/internal/Magento/Framework/Search/Response/QueryResponse.php
@@ -12,6 +12,7 @@
 /**
  * Search Response
  * @api
+ * @since 100.0.2
  */
 class QueryResponse implements ResponseInterface
 {
@@ -80,9 +81,10 @@ public function getAggregations()
      * It must be move to different interface.
      * Scope to split Search response interface on two different 'Search' and 'Fulltext Search' contains in MC-16461.
      *
-     * @deprecated
+     * @deprecated 102.0.2
      *
      * @return int
+     * @since 102.0.2
      */
     public function getTotal(): int
     {
diff --git a/lib/internal/Magento/Framework/Serialize/Serializer/Json.php b/lib/internal/Magento/Framework/Serialize/Serializer/Json.php
index 7ce9756ff243d..d5a5aec9259dd 100644
--- a/lib/internal/Magento/Framework/Serialize/Serializer/Json.php
+++ b/lib/internal/Magento/Framework/Serialize/Serializer/Json.php
@@ -11,13 +11,13 @@
  * Serialize data to JSON, unserialize JSON encoded data
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 class Json implements SerializerInterface
 {
     /**
      * @inheritDoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function serialize($data)
     {
@@ -30,7 +30,7 @@ public function serialize($data)
 
     /**
      * @inheritDoc
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function unserialize($string)
     {
diff --git a/lib/internal/Magento/Framework/Serialize/Serializer/JsonHexTag.php b/lib/internal/Magento/Framework/Serialize/Serializer/JsonHexTag.php
index 4a5406ff3fd99..dc63a726481ae 100644
--- a/lib/internal/Magento/Framework/Serialize/Serializer/JsonHexTag.php
+++ b/lib/internal/Magento/Framework/Serialize/Serializer/JsonHexTag.php
@@ -16,13 +16,13 @@
  * unserialize JSON encoded data
  *
  * @api
- * @since 100.2.0
+ * @since 102.0.1
  */
 class JsonHexTag extends Json implements SerializerInterface
 {
     /**
      * @inheritDoc
-     * @since 100.2.0
+     * @since 102.0.1
      */
     public function serialize($data): string
     {
diff --git a/lib/internal/Magento/Framework/Serialize/SerializerInterface.php b/lib/internal/Magento/Framework/Serialize/SerializerInterface.php
index 8b448f3ba246b..24ace0c38b84e 100644
--- a/lib/internal/Magento/Framework/Serialize/SerializerInterface.php
+++ b/lib/internal/Magento/Framework/Serialize/SerializerInterface.php
@@ -9,7 +9,7 @@
  * Interface for serializing
  *
  * @api
- * @since 100.2.0
+ * @since 101.0.0
  */
 interface SerializerInterface
 {
@@ -19,7 +19,7 @@ interface SerializerInterface
      * @param string|int|float|bool|array|null $data
      * @return string|bool
      * @throws \InvalidArgumentException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function serialize($data);
 
@@ -29,7 +29,7 @@ public function serialize($data);
      * @param string $string
      * @return string|int|float|bool|array|null
      * @throws \InvalidArgumentException
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function unserialize($string);
 }
diff --git a/lib/internal/Magento/Framework/Session/Generic.php b/lib/internal/Magento/Framework/Session/Generic.php
index 8cd358dd56416..794ce7a64e88b 100644
--- a/lib/internal/Magento/Framework/Session/Generic.php
+++ b/lib/internal/Magento/Framework/Session/Generic.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Generic extends SessionManager
 {
diff --git a/lib/internal/Magento/Framework/Session/SessionManagerInterface.php b/lib/internal/Magento/Framework/Session/SessionManagerInterface.php
index 93fac2947eb61..70976a6269d18 100644
--- a/lib/internal/Magento/Framework/Session/SessionManagerInterface.php
+++ b/lib/internal/Magento/Framework/Session/SessionManagerInterface.php
@@ -11,6 +11,7 @@
  * Session Manager Interface
  *
  * @api
+ * @since 100.0.2
  */
 interface SessionManagerInterface
 {
diff --git a/lib/internal/Magento/Framework/Session/SidResolver.php b/lib/internal/Magento/Framework/Session/SidResolver.php
index 3455ccf5cab2d..4052f039a2f93 100644
--- a/lib/internal/Magento/Framework/Session/SidResolver.php
+++ b/lib/internal/Magento/Framework/Session/SidResolver.php
@@ -12,7 +12,7 @@
 /**
  * Resolves SID by processing request parameters.
  *
- * @deprecated 2.3.3 SIDs in URLs are no longer used
+ * @deprecated 102.0.2 SIDs in URLs are no longer used
  */
 class SidResolver implements SidResolverInterface
 {
@@ -28,13 +28,13 @@ class SidResolver implements SidResolverInterface
 
     /**
      * @var \Magento\Framework\UrlInterface
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.5 Not used anymore.
      */
     protected $urlBuilder;
 
     /**
      * @var \Magento\Framework\App\RequestInterface
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.5 Not used anymore.
      */
     protected $request;
 
diff --git a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Diff/Diff.php b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Diff/Diff.php
index 0e857567689c4..578b3c62be573 100644
--- a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Diff/Diff.php
+++ b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Diff/Diff.php
@@ -23,6 +23,7 @@
  *  - new (Should be changed to)
  *  - old ()
  * @api
+ * @since 102.0.0
  */
 class Diff implements DiffInterface
 {
@@ -40,6 +41,7 @@ class Diff implements DiffInterface
      * This changes created only for debug reasons.
      *
      * @var array
+     * @since 102.0.0
      */
     public $debugChanges;
 
@@ -100,6 +102,7 @@ public function __construct(
      * All changes are sorted because there are dependencies between tables, like foreign keys.
      *
      * @inheritdoc
+     * @since 102.0.0
      */
     public function getAll()
     {
@@ -115,6 +118,7 @@ public function getAll()
      * @param string $table
      * @param string $operation
      * @return ElementHistory[]
+     * @since 102.0.0
      */
     public function getChange($table, $operation)
     {
@@ -159,6 +163,7 @@ private function getWhiteListTables()
      * @param  ElementInterface | Table $object
      * @param string $operation
      * @return bool
+     * @since 102.0.0
      */
     public function canBeRegistered(ElementInterface $object, $operation): bool
     {
@@ -202,6 +207,7 @@ private function isElementHaveAutoGeneratedName(ElementInterface $element): bool
      *
      * @param TableElementInterface $dtoObject
      * @inheritdoc
+     * @since 102.0.0
      */
     public function register(
         ElementInterface $dtoObject,
diff --git a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Dto/ElementInterface.php b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Dto/ElementInterface.php
index 43c4c5d9d516a..168b8c0861ad7 100644
--- a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Dto/ElementInterface.php
+++ b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Dto/ElementInterface.php
@@ -11,6 +11,7 @@
  * Is parent interface for all various schema structural elements:
  * table, column, constraint, index.
  * @api
+ * @since 102.0.0
  */
 interface ElementInterface
 {
@@ -18,6 +19,7 @@ interface ElementInterface
      * Return name of structural element.
      *
      * @return string
+     * @since 102.0.0
      */
     public function getName();
 
@@ -25,6 +27,7 @@ public function getName();
      * Retrieve element low level type: varchar, char, foreign key, etc..
      *
      * @return string
+     * @since 102.0.0
      */
     public function getType();
 
@@ -36,6 +39,7 @@ public function getType();
      * And in order to distinguish this types of elements we use this method.
      *
      * @return string
+     * @since 102.0.0
      */
     public function getElementType();
 }
diff --git a/lib/internal/Magento/Framework/Setup/InstallDataInterface.php b/lib/internal/Magento/Framework/Setup/InstallDataInterface.php
index 68e08f658faaf..085f989a8bb82 100644
--- a/lib/internal/Magento/Framework/Setup/InstallDataInterface.php
+++ b/lib/internal/Magento/Framework/Setup/InstallDataInterface.php
@@ -9,6 +9,7 @@
  * Interface for data installs of a module
  *
  * @api
+ * @since 100.0.2
  */
 interface InstallDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/InstallSchemaInterface.php b/lib/internal/Magento/Framework/Setup/InstallSchemaInterface.php
index abb0017b85e93..878f3e3e1a152 100644
--- a/lib/internal/Magento/Framework/Setup/InstallSchemaInterface.php
+++ b/lib/internal/Magento/Framework/Setup/InstallSchemaInterface.php
@@ -9,6 +9,7 @@
  * Interface for DB schema installs of a module
  *
  * @api
+ * @since 100.0.2
  */
 interface InstallSchemaInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/LoggerInterface.php b/lib/internal/Magento/Framework/Setup/LoggerInterface.php
index 8f82cf8001127..169c2acfe9bf5 100644
--- a/lib/internal/Magento/Framework/Setup/LoggerInterface.php
+++ b/lib/internal/Magento/Framework/Setup/LoggerInterface.php
@@ -10,6 +10,7 @@
  * Interface to Log Message in Setup
  *
  * @api
+ * @since 100.0.2
  */
 interface LoggerInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/ModuleContextInterface.php b/lib/internal/Magento/Framework/Setup/ModuleContextInterface.php
index 45c59f08bc691..d5d0b4e1efe59 100644
--- a/lib/internal/Magento/Framework/Setup/ModuleContextInterface.php
+++ b/lib/internal/Magento/Framework/Setup/ModuleContextInterface.php
@@ -8,6 +8,7 @@
 /**
  * Context of a module being installed/updated: version, user data, etc.
  * @api
+ * @since 100.0.2
  */
 interface ModuleContextInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/ModuleDataSetupInterface.php b/lib/internal/Magento/Framework/Setup/ModuleDataSetupInterface.php
index bcf50e6ff9851..2bc55d13d2277 100644
--- a/lib/internal/Magento/Framework/Setup/ModuleDataSetupInterface.php
+++ b/lib/internal/Magento/Framework/Setup/ModuleDataSetupInterface.php
@@ -9,6 +9,7 @@
  * DB data resource interface for a module
  *
  * @api
+ * @since 100.0.2
  */
 interface ModuleDataSetupInterface extends SetupInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/SchemaSetupInterface.php b/lib/internal/Magento/Framework/Setup/SchemaSetupInterface.php
index 48900c5cdc029..dd73c79069b1a 100644
--- a/lib/internal/Magento/Framework/Setup/SchemaSetupInterface.php
+++ b/lib/internal/Magento/Framework/Setup/SchemaSetupInterface.php
@@ -8,6 +8,7 @@
 /**
  * DB schema resource interface
  * @api
+ * @since 100.0.2
  */
 interface SchemaSetupInterface extends SetupInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/SetupInterface.php b/lib/internal/Magento/Framework/Setup/SetupInterface.php
index 58d0387007045..434a3234ee318 100644
--- a/lib/internal/Magento/Framework/Setup/SetupInterface.php
+++ b/lib/internal/Magento/Framework/Setup/SetupInterface.php
@@ -9,6 +9,7 @@
  * DB resource interface
  *
  * @api
+ * @since 100.0.2
  */
 interface SetupInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/UninstallInterface.php b/lib/internal/Magento/Framework/Setup/UninstallInterface.php
index 28e8104610559..72a2a9a37348a 100644
--- a/lib/internal/Magento/Framework/Setup/UninstallInterface.php
+++ b/lib/internal/Magento/Framework/Setup/UninstallInterface.php
@@ -9,6 +9,7 @@
  * Interface for handling data removal during module uninstall
  *
  * @api
+ * @since 100.0.2
  */
 interface UninstallInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/UpgradeDataInterface.php b/lib/internal/Magento/Framework/Setup/UpgradeDataInterface.php
index f700157cab98e..93d94cce0dd99 100644
--- a/lib/internal/Magento/Framework/Setup/UpgradeDataInterface.php
+++ b/lib/internal/Magento/Framework/Setup/UpgradeDataInterface.php
@@ -9,6 +9,7 @@
  * Interface for data upgrades of a module
  *
  * @api
+ * @since 100.0.2
  */
 interface UpgradeDataInterface
 {
diff --git a/lib/internal/Magento/Framework/Setup/UpgradeSchemaInterface.php b/lib/internal/Magento/Framework/Setup/UpgradeSchemaInterface.php
index 22c3b2110ec69..d7a3d56e55164 100644
--- a/lib/internal/Magento/Framework/Setup/UpgradeSchemaInterface.php
+++ b/lib/internal/Magento/Framework/Setup/UpgradeSchemaInterface.php
@@ -9,6 +9,7 @@
  * Interface for DB schema upgrades of a module
  *
  * @api
+ * @since 100.0.2
  */
 interface UpgradeSchemaInterface
 {
diff --git a/lib/internal/Magento/Framework/Shell/CommandRendererInterface.php b/lib/internal/Magento/Framework/Shell/CommandRendererInterface.php
index 7460aaea74819..5632e32b790fe 100644
--- a/lib/internal/Magento/Framework/Shell/CommandRendererInterface.php
+++ b/lib/internal/Magento/Framework/Shell/CommandRendererInterface.php
@@ -9,6 +9,7 @@
  * Shell command renderer
  *
  * @api
+ * @since 100.0.2
  */
 interface CommandRendererInterface
 {
diff --git a/lib/internal/Magento/Framework/ShellInterface.php b/lib/internal/Magento/Framework/ShellInterface.php
index 96607b8a072af..3c51916f06a23 100644
--- a/lib/internal/Magento/Framework/ShellInterface.php
+++ b/lib/internal/Magento/Framework/ShellInterface.php
@@ -9,6 +9,7 @@
  * Shell command line wrapper encapsulates command execution and arguments escaping
  *
  * @api
+ * @since 100.0.2
  */
 interface ShellInterface
 {
diff --git a/lib/internal/Magento/Framework/Simplexml/Config.php b/lib/internal/Magento/Framework/Simplexml/Config.php
index 0d8711c5011c0..9f403e3451dcc 100644
--- a/lib/internal/Magento/Framework/Simplexml/Config.php
+++ b/lib/internal/Magento/Framework/Simplexml/Config.php
@@ -9,6 +9,7 @@
  * Base class for simplexml based configurations
  *
  * @api
+ * @since 100.0.2
  */
 class Config
 {
diff --git a/lib/internal/Magento/Framework/Simplexml/Element.php b/lib/internal/Magento/Framework/Simplexml/Element.php
index 15602965de0a8..268eb8cd636e3 100644
--- a/lib/internal/Magento/Framework/Simplexml/Element.php
+++ b/lib/internal/Magento/Framework/Simplexml/Element.php
@@ -10,6 +10,7 @@
  * Extends SimpleXML to add valuable functionality to \SimpleXMLElement class
  *
  * @api
+ * @since 100.0.2
  */
 class Element extends \SimpleXMLElement
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php
index bd822a4942ba9..56243ae6b24cf 100644
--- a/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php
+++ b/lib/internal/Magento/Framework/Stdlib/ArrayUtils.php
@@ -9,6 +9,7 @@
  * Class ArrayUtils
  *
  * @api
+ * @since 100.0.2
  */
 class ArrayUtils
 {
@@ -150,7 +151,7 @@ private function _decorateArrayObject($element, $key, $value, $isSkipped)
      * @param string $path The leading path
      * @param string $separator The path parts separator
      * @return array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function flatten(array $data, $path = '', $separator = '/')
     {
@@ -181,7 +182,7 @@ public function flatten(array $data, $path = '', $separator = '/')
      * @param array $originalArray The array to compare from
      * @param array $newArray The array to compare with
      * @return array Diff array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function recursiveDiff(array $originalArray, array $newArray)
     {
diff --git a/lib/internal/Magento/Framework/Stdlib/BooleanUtils.php b/lib/internal/Magento/Framework/Stdlib/BooleanUtils.php
index 83cf1a839f0ef..f55bc79ad6505 100644
--- a/lib/internal/Magento/Framework/Stdlib/BooleanUtils.php
+++ b/lib/internal/Magento/Framework/Stdlib/BooleanUtils.php
@@ -9,6 +9,7 @@
  * Utility methods for the boolean data type
  *
  * @api
+ * @since 100.0.2
  */
 class BooleanUtils
 {
@@ -71,7 +72,7 @@ public function toBoolean($value)
      *
      * @param mixed $value
      * @return mixed
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function convert($value)
     {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadata.php b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadata.php
index 2b4cddf242113..112408bfddfdd 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadata.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadata.php
@@ -8,6 +8,7 @@
 /**
  * Class CookieMetadata
  * @api
+ * @since 100.0.2
  */
 class CookieMetadata
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadataFactory.php b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadataFactory.php
index b60df1264863d..706c19e1e731a 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadataFactory.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieMetadataFactory.php
@@ -11,6 +11,7 @@
 /**
  * CookieMetadataFactory is used to construct SensitiveCookieMetadata and PublicCookieMetadata objects.
  * @api
+ * @since 100.0.2
  */
 class CookieMetadataFactory
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieReaderInterface.php b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieReaderInterface.php
index 121c168483a6e..5b7c54159aed6 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieReaderInterface.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieReaderInterface.php
@@ -9,6 +9,7 @@
 /**
  * CookieReaderInterface provides the ability to read cookies sent in a request.
  * @api
+ * @since 100.0.2
  */
 interface CookieReaderInterface
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieScopeInterface.php b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieScopeInterface.php
index b2870309ae5a5..d355579b4b07a 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieScopeInterface.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieScopeInterface.php
@@ -8,6 +8,7 @@
 /**
  * CookieScope is used to store default scope metadata.
  * @api
+ * @since 100.0.2
  */
 interface CookieScopeInterface
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieSizeLimitReachedException.php b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieSizeLimitReachedException.php
index fabd3bbe2b0be..a74a4983cb5b8 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/CookieSizeLimitReachedException.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/CookieSizeLimitReachedException.php
@@ -15,6 +15,7 @@
  * set for the domain.
  *
  * @api
+ * @since 100.0.2
  */
 class CookieSizeLimitReachedException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/FailureToSendException.php b/lib/internal/Magento/Framework/Stdlib/Cookie/FailureToSendException.php
index 681d6b43c3d04..ee9e798d258d7 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/FailureToSendException.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/FailureToSendException.php
@@ -12,6 +12,7 @@
  * impossible to send any cookie information back to the client.
  *
  * @api
+ * @since 100.0.2
  */
 class FailureToSendException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/PublicCookieMetadata.php b/lib/internal/Magento/Framework/Stdlib/Cookie/PublicCookieMetadata.php
index ef40ea94a6d08..14af3651834ad 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/PublicCookieMetadata.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/PublicCookieMetadata.php
@@ -10,6 +10,7 @@
  * Class PublicCookieMetadata
  *
  * @api
+ * @since 100.0.2
  */
 class PublicCookieMetadata extends CookieMetadata
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/Cookie/SensitiveCookieMetadata.php b/lib/internal/Magento/Framework/Stdlib/Cookie/SensitiveCookieMetadata.php
index aab8e93160c8d..ed09481ab464e 100644
--- a/lib/internal/Magento/Framework/Stdlib/Cookie/SensitiveCookieMetadata.php
+++ b/lib/internal/Magento/Framework/Stdlib/Cookie/SensitiveCookieMetadata.php
@@ -15,6 +15,7 @@
  * as path and domain are only data to be exposed by SensitiveCookieMetadata
  *
  * @api
+ * @since 100.0.2
  */
 class SensitiveCookieMetadata extends CookieMetadata
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/CookieManagerInterface.php b/lib/internal/Magento/Framework/Stdlib/CookieManagerInterface.php
index d4d37d656ebcf..fc357d26d8c36 100644
--- a/lib/internal/Magento/Framework/Stdlib/CookieManagerInterface.php
+++ b/lib/internal/Magento/Framework/Stdlib/CookieManagerInterface.php
@@ -22,6 +22,7 @@
  * about how the cookie should be stored and whether JavaScript can access the cookie.
  *
  * @api
+ * @since 100.0.2
  */
 interface CookieManagerInterface extends CookieReaderInterface
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime.php b/lib/internal/Magento/Framework/Stdlib/DateTime.php
index 36db84860b373..2b828f4ba1d4e 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime.php
@@ -10,6 +10,7 @@
  * Internal dates
  *
  * @api
+ * @since 100.0.2
  */
 class DateTime
 {
@@ -79,7 +80,7 @@ public function isEmptyDate($date)
      * @param int $time
      * @return string The given time in given format
      *
-     * @deprecated
+     * @deprecated 101.0.1
      * @see Use Intl library for datetime handling: http://php.net/manual/en/book.intl.php
      *
      * @codeCoverageIgnore
@@ -95,7 +96,7 @@ public function gmDate($format, $time)
      * @param string $timeStr
      * @return int
      *
-     * @deprecated
+     * @deprecated 101.0.1
      * @see Use Intl library for datetime handling: http://php.net/manual/en/book.intl.php
      *
      * @codeCoverageIgnore
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php
index 646908f99693c..99f3a76b46d7d 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php
@@ -10,6 +10,7 @@
  * Date conversion model
  *
  * @api
+ * @since 100.0.2
  */
 class DateTime
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/DateTimeFormatterInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/DateTimeFormatterInterface.php
index a2d18215385fc..c1ec2695be114 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime/DateTimeFormatterInterface.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime/DateTimeFormatterInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface DateTimeFormatterInterface
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/Date.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/Date.php
index 1138dc2e60887..59920f1861072 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/Date.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/Date.php
@@ -11,6 +11,7 @@
  * Date filter. Converts date from localized to internal format.
  *
  * @api
+ * @since 100.0.2
  */
 class Date implements \Zend_Filter_Interface
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php
index 0f2e81e6a9faf..05e9042a06a54 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime/Filter/DateTime.php
@@ -9,6 +9,7 @@
  * Date/Time filter. Converts datetime from localized to internal format.
  *
  * @api
+ * @since 100.0.2
  */
 class DateTime extends Date
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php b/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php
index 43cc83a702f6c..363fa54794bb4 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime/Timezone/Validator.php
@@ -11,6 +11,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Validator
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php
index d1ac24c84be9a..0ff6de9266c8a 100644
--- a/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php
+++ b/lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php
@@ -11,6 +11,7 @@
 /**
  * Timezone Interface
  * @api
+ * @since 100.0.2
  */
 interface TimezoneInterface
 {
diff --git a/lib/internal/Magento/Framework/Stdlib/StringUtils.php b/lib/internal/Magento/Framework/Stdlib/StringUtils.php
index 35decd7dab0a0..3e3072ee58677 100644
--- a/lib/internal/Magento/Framework/Stdlib/StringUtils.php
+++ b/lib/internal/Magento/Framework/Stdlib/StringUtils.php
@@ -9,6 +9,7 @@
  * Magento methods to work with string
  *
  * @api
+ * @since 100.0.2
  */
 class StringUtils
 {
diff --git a/lib/internal/Magento/Framework/Translate.php b/lib/internal/Magento/Framework/Translate.php
index e992482609a87..18675e19a4a96 100644
--- a/lib/internal/Magento/Framework/Translate.php
+++ b/lib/internal/Magento/Framework/Translate.php
@@ -461,7 +461,7 @@ private function getThemeTranslationFilesList($locale): array
      * @param string $locale
      * @return string
      *
-     * @deprecated
+     * @deprecated 102.0.1
      *
      * @see \Magento\Framework\Translate::getThemeTranslationFilesList
      */
@@ -589,7 +589,7 @@ protected function _saveCache()
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/Translate/AdapterInterface.php b/lib/internal/Magento/Framework/Translate/AdapterInterface.php
index bcd08a0b27c29..96591d3d32d53 100644
--- a/lib/internal/Magento/Framework/Translate/AdapterInterface.php
+++ b/lib/internal/Magento/Framework/Translate/AdapterInterface.php
@@ -10,6 +10,7 @@
  * Magento translate adapter interface
  *
  * @api
+ * @since 100.0.2
  */
 interface AdapterInterface
 {
diff --git a/lib/internal/Magento/Framework/Translate/Inline/ConfigInterface.php b/lib/internal/Magento/Framework/Translate/Inline/ConfigInterface.php
index 02ab3e92d1d16..dc78b0b49d26f 100644
--- a/lib/internal/Magento/Framework/Translate/Inline/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/Translate/Inline/ConfigInterface.php
@@ -9,6 +9,7 @@
  * Inline Translation config interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php b/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php
index 4c3bfc1a1964b..78093d99729b7 100644
--- a/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php
+++ b/lib/internal/Magento/Framework/Translate/Inline/ParserInterface.php
@@ -9,6 +9,7 @@
  * Processes the content with the inline translation replacement so the inline translate JavaScript code will work.
  *
  * @api
+ * @since 100.0.2
  */
 interface ParserInterface
 {
diff --git a/lib/internal/Magento/Framework/Translate/Inline/StateInterface.php b/lib/internal/Magento/Framework/Translate/Inline/StateInterface.php
index cf56616ac4a99..e0994713a0219 100644
--- a/lib/internal/Magento/Framework/Translate/Inline/StateInterface.php
+++ b/lib/internal/Magento/Framework/Translate/Inline/StateInterface.php
@@ -10,6 +10,7 @@
  * Controls and represents the  state of the inline translation processing.
  *
  * @api
+ * @since 100.0.2
  */
 interface StateInterface
 {
diff --git a/lib/internal/Magento/Framework/Translate/InlineInterface.php b/lib/internal/Magento/Framework/Translate/InlineInterface.php
index 4669a536eedbf..2c8ac78bffcf0 100644
--- a/lib/internal/Magento/Framework/Translate/InlineInterface.php
+++ b/lib/internal/Magento/Framework/Translate/InlineInterface.php
@@ -9,6 +9,7 @@
  * Inline translation interface
  *
  * @api
+ * @since 100.0.2
  */
 interface InlineInterface
 {
diff --git a/lib/internal/Magento/Framework/Translate/ResourceInterface.php b/lib/internal/Magento/Framework/Translate/ResourceInterface.php
index 51e2f430c7281..44a600a04deeb 100644
--- a/lib/internal/Magento/Framework/Translate/ResourceInterface.php
+++ b/lib/internal/Magento/Framework/Translate/ResourceInterface.php
@@ -9,6 +9,7 @@
  * Returns the translation resource data.
  *
  * @api
+ * @since 100.0.2
  */
 interface ResourceInterface
 {
diff --git a/lib/internal/Magento/Framework/Unserialize/Unserialize.php b/lib/internal/Magento/Framework/Unserialize/Unserialize.php
index 56c3bb0d16864..7611e6c12b6d8 100644
--- a/lib/internal/Magento/Framework/Unserialize/Unserialize.php
+++ b/lib/internal/Magento/Framework/Unserialize/Unserialize.php
@@ -10,7 +10,7 @@
 use Magento\Framework\Serialize\Serializer\Serialize;
 
 /**
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 class Unserialize
 {
diff --git a/lib/internal/Magento/Framework/Url.php b/lib/internal/Magento/Framework/Url.php
index efd65cd26e37a..1d00b732c5795 100644
--- a/lib/internal/Magento/Framework/Url.php
+++ b/lib/internal/Magento/Framework/Url.php
@@ -1007,7 +1007,7 @@ public function getRebuiltUrl($url)
      *
      * @param string $value
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escape($value)
     {
@@ -1154,7 +1154,7 @@ protected function getRouteParamsResolver()
      * Gets URL modifier.
      *
      * @return \Magento\Framework\Url\ModifierInterface
-     * @deprecated 100.1.0
+     * @deprecated 101.0.0
      */
     private function getUrlModifier()
     {
@@ -1171,7 +1171,7 @@ private function getUrlModifier()
      * Get escaper
      *
      * @return Escaper
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getEscaper()
     {
diff --git a/lib/internal/Magento/Framework/Url/DecoderInterface.php b/lib/internal/Magento/Framework/Url/DecoderInterface.php
index 523a402c1dc84..7a9f971202450 100644
--- a/lib/internal/Magento/Framework/Url/DecoderInterface.php
+++ b/lib/internal/Magento/Framework/Url/DecoderInterface.php
@@ -9,6 +9,7 @@
  * Base64 decoder for URLs
  *
  * @api
+ * @since 100.0.2
  */
 interface DecoderInterface
 {
diff --git a/lib/internal/Magento/Framework/Url/EncoderInterface.php b/lib/internal/Magento/Framework/Url/EncoderInterface.php
index 9e5a999755063..02afdfcaefe9b 100644
--- a/lib/internal/Magento/Framework/Url/EncoderInterface.php
+++ b/lib/internal/Magento/Framework/Url/EncoderInterface.php
@@ -9,6 +9,7 @@
  * Base64 encoder for URLs
  *
  * @api
+ * @since 100.0.2
  */
 interface EncoderInterface
 {
diff --git a/lib/internal/Magento/Framework/Url/QueryParamsResolverInterface.php b/lib/internal/Magento/Framework/Url/QueryParamsResolverInterface.php
index c9bd2412cad9c..1e7e8dff25456 100644
--- a/lib/internal/Magento/Framework/Url/QueryParamsResolverInterface.php
+++ b/lib/internal/Magento/Framework/Url/QueryParamsResolverInterface.php
@@ -9,6 +9,7 @@
  * Resolves query parameters in a URL.
  *
  * @api
+ * @since 100.0.2
  */
 interface QueryParamsResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/Url/RouteParamsResolver.php b/lib/internal/Magento/Framework/Url/RouteParamsResolver.php
index b46ba00d48023..eac9005e68548 100644
--- a/lib/internal/Magento/Framework/Url/RouteParamsResolver.php
+++ b/lib/internal/Magento/Framework/Url/RouteParamsResolver.php
@@ -154,7 +154,7 @@ public function getRouteParam($key)
      * Get escaper
      *
      * @return \Magento\Framework\Escaper
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getEscaper()
     {
diff --git a/lib/internal/Magento/Framework/Url/RouteParamsResolverInterface.php b/lib/internal/Magento/Framework/Url/RouteParamsResolverInterface.php
index 349f3d8359f7d..22d9aac7a2c32 100644
--- a/lib/internal/Magento/Framework/Url/RouteParamsResolverInterface.php
+++ b/lib/internal/Magento/Framework/Url/RouteParamsResolverInterface.php
@@ -9,6 +9,7 @@
  * Route parameters resolver.
  *
  * @api
+ * @since 100.0.2
  */
 interface RouteParamsResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/Url/ScopeInterface.php b/lib/internal/Magento/Framework/Url/ScopeInterface.php
index 821ae1814e9a3..648a33ca7b870 100644
--- a/lib/internal/Magento/Framework/Url/ScopeInterface.php
+++ b/lib/internal/Magento/Framework/Url/ScopeInterface.php
@@ -10,6 +10,7 @@
  * determine scope based on URLs.
  *
  * @api
+ * @since 100.0.2
  */
 interface ScopeInterface extends \Magento\Framework\App\ScopeInterface
 {
diff --git a/lib/internal/Magento/Framework/Url/ScopeResolverInterface.php b/lib/internal/Magento/Framework/Url/ScopeResolverInterface.php
index 961ad6ecff8b5..b6861e1153f21 100644
--- a/lib/internal/Magento/Framework/Url/ScopeResolverInterface.php
+++ b/lib/internal/Magento/Framework/Url/ScopeResolverInterface.php
@@ -9,6 +9,7 @@
  * This ScopeResolverInterface adds the ability to get the Magento area the code is executing in.
  *
  * @api
+ * @since 100.0.2
  */
 interface ScopeResolverInterface extends \Magento\Framework\App\ScopeResolverInterface
 {
diff --git a/lib/internal/Magento/Framework/Url/SecurityInfoInterface.php b/lib/internal/Magento/Framework/Url/SecurityInfoInterface.php
index c3cdab91d325f..8029538fbaeb4 100644
--- a/lib/internal/Magento/Framework/Url/SecurityInfoInterface.php
+++ b/lib/internal/Magento/Framework/Url/SecurityInfoInterface.php
@@ -9,6 +9,7 @@
  * URL security information. Answers whether URL is secured.
  *
  * @api
+ * @since 100.0.2
  */
 interface SecurityInfoInterface
 {
diff --git a/lib/internal/Magento/Framework/UrlInterface.php b/lib/internal/Magento/Framework/UrlInterface.php
index c1fbbfc8407d3..b25d6ab1a0b85 100644
--- a/lib/internal/Magento/Framework/UrlInterface.php
+++ b/lib/internal/Magento/Framework/UrlInterface.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface UrlInterface
 {
diff --git a/lib/internal/Magento/Framework/Validation/ValidationException.php b/lib/internal/Magento/Framework/Validation/ValidationException.php
index 4f94bd8af80b5..ee98d08ae47f8 100644
--- a/lib/internal/Magento/Framework/Validation/ValidationException.php
+++ b/lib/internal/Magento/Framework/Validation/ValidationException.php
@@ -17,6 +17,7 @@
  * to support Multi-Error response.
  *
  * @api
+ * @since 101.0.7
  */
 class ValidationException extends LocalizedException implements AggregateExceptionInterface
 {
@@ -43,6 +44,7 @@ public function __construct(
 
     /**
      * @inheritdoc
+     * @since 101.0.7
      */
     public function getErrors(): array
     {
diff --git a/lib/internal/Magento/Framework/Validation/ValidationResult.php b/lib/internal/Magento/Framework/Validation/ValidationResult.php
index 60ff7ba5a4700..9e9cad26536fb 100644
--- a/lib/internal/Magento/Framework/Validation/ValidationResult.php
+++ b/lib/internal/Magento/Framework/Validation/ValidationResult.php
@@ -12,6 +12,7 @@
  * ValidationResult represents a container storing all the validation errors that happened during the entity validation.
  *
  * @api
+ * @since 101.0.7
  */
 class ValidationResult
 {
@@ -30,6 +31,7 @@ public function __construct(array $errors)
 
     /**
      * @return bool
+     * @since 101.0.7
      */
     public function isValid(): bool
     {
@@ -38,6 +40,7 @@ public function isValid(): bool
 
     /**
      * @return array
+     * @since 101.0.7
      */
     public function getErrors(): array
     {
diff --git a/lib/internal/Magento/Framework/Validator.php b/lib/internal/Magento/Framework/Validator.php
index e15a1399a96a4..b42e486d00483 100644
--- a/lib/internal/Magento/Framework/Validator.php
+++ b/lib/internal/Magento/Framework/Validator.php
@@ -10,6 +10,7 @@
  * Validator class that represents chain of validators.
  *
  * @api
+ * @since 100.0.2
  */
 class Validator extends \Magento\Framework\Validator\AbstractValidator
 {
diff --git a/lib/internal/Magento/Framework/Validator/AbstractValidator.php b/lib/internal/Magento/Framework/Validator/AbstractValidator.php
index db636516aacab..ade9fa230fbb8 100644
--- a/lib/internal/Magento/Framework/Validator/AbstractValidator.php
+++ b/lib/internal/Magento/Framework/Validator/AbstractValidator.php
@@ -9,6 +9,7 @@
  * Abstract validator class.
  *
  * @api
+ * @since 100.0.2
  */
 abstract class AbstractValidator implements \Magento\Framework\Validator\ValidatorInterface
 {
diff --git a/lib/internal/Magento/Framework/Validator/Constraint.php b/lib/internal/Magento/Framework/Validator/Constraint.php
index d9be3c3d7ff9f..3326d42b7d24f 100644
--- a/lib/internal/Magento/Framework/Validator/Constraint.php
+++ b/lib/internal/Magento/Framework/Validator/Constraint.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Constraint extends \Magento\Framework\Validator\AbstractValidator
 {
diff --git a/lib/internal/Magento/Framework/Validator/DataObject.php b/lib/internal/Magento/Framework/Validator/DataObject.php
index 7348550ab3880..d4f4bbb45e7ec 100644
--- a/lib/internal/Magento/Framework/Validator/DataObject.php
+++ b/lib/internal/Magento/Framework/Validator/DataObject.php
@@ -12,6 +12,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class DataObject implements \Zend_Validate_Interface
 {
diff --git a/lib/internal/Magento/Framework/Validator/Exception.php b/lib/internal/Magento/Framework/Validator/Exception.php
index 370f66c424b01..837886e0ce9c9 100644
--- a/lib/internal/Magento/Framework/Validator/Exception.php
+++ b/lib/internal/Magento/Framework/Validator/Exception.php
@@ -16,6 +16,7 @@
  * Exception to be thrown when data validation fails
  *
  * @api
+ * @since 100.0.2
  */
 class Exception extends InputException
 {
diff --git a/lib/internal/Magento/Framework/Validator/ValidatorInterface.php b/lib/internal/Magento/Framework/Validator/ValidatorInterface.php
index 92fb6395c1e4a..001582bd5b867 100644
--- a/lib/internal/Magento/Framework/Validator/ValidatorInterface.php
+++ b/lib/internal/Magento/Framework/Validator/ValidatorInterface.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 interface ValidatorInterface extends \Zend_Validate_Interface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/AssetInterface.php b/lib/internal/Magento/Framework/View/Asset/AssetInterface.php
index 60dc997b9d6da..6b7c47816c6a8 100644
--- a/lib/internal/Magento/Framework/View/Asset/AssetInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/AssetInterface.php
@@ -9,6 +9,7 @@
  * An abstraction for static view file (or resource) that may be embedded to a web page
  *
  * @api
+ * @since 100.0.2
  */
 interface AssetInterface
 {
@@ -30,7 +31,7 @@ public function getContentType();
      * Retrieve source content type
      *
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSourceContentType();
 }
diff --git a/lib/internal/Magento/Framework/View/Asset/Bundle.php b/lib/internal/Magento/Framework/View/Asset/Bundle.php
index 80f35f9d57075..5d918982412b7 100644
--- a/lib/internal/Magento/Framework/View/Asset/Bundle.php
+++ b/lib/internal/Magento/Framework/View/Asset/Bundle.php
@@ -13,7 +13,7 @@
 
 /**
  * Bundle model
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @see \Magento\Deploy\Package\Bundle
  */
 class Bundle
diff --git a/lib/internal/Magento/Framework/View/Asset/Bundle/Config.php b/lib/internal/Magento/Framework/View/Asset/Bundle/Config.php
index 8c529e9a2bc1c..ede43c789416f 100644
--- a/lib/internal/Magento/Framework/View/Asset/Bundle/Config.php
+++ b/lib/internal/Magento/Framework/View/Asset/Bundle/Config.php
@@ -15,7 +15,7 @@
 
 /**
  * Class Config
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @see \Magento\Deploy\Config\BundleConfig
  */
 class Config implements Bundle\ConfigInterface
diff --git a/lib/internal/Magento/Framework/View/Asset/Bundle/ConfigInterface.php b/lib/internal/Magento/Framework/View/Asset/Bundle/ConfigInterface.php
index bea542aef2ea8..3acb49337a2e0 100644
--- a/lib/internal/Magento/Framework/View/Asset/Bundle/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/Bundle/ConfigInterface.php
@@ -10,7 +10,7 @@
 
 /**
  * Interface ConfigInterface
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @see \Magento\Deploy\Config\BundleConfig
  */
 interface ConfigInterface
diff --git a/lib/internal/Magento/Framework/View/Asset/Bundle/Manager.php b/lib/internal/Magento/Framework/View/Asset/Bundle/Manager.php
index ee1368c0e6230..490c04004365d 100644
--- a/lib/internal/Magento/Framework/View/Asset/Bundle/Manager.php
+++ b/lib/internal/Magento/Framework/View/Asset/Bundle/Manager.php
@@ -15,7 +15,7 @@
 /**
  * BundleService model
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  * @see \Magento\Deploy\Service\Bundle
  */
 class Manager
diff --git a/lib/internal/Magento/Framework/View/Asset/ConfigInterface.php b/lib/internal/Magento/Framework/View/Asset/ConfigInterface.php
index 21357911e4597..1b817acf84aeb 100644
--- a/lib/internal/Magento/Framework/View/Asset/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/ConfigInterface.php
@@ -9,6 +9,7 @@
  * View asset configuration interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php b/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php
index 86daba29e5be8..481968f7da360 100644
--- a/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php
+++ b/lib/internal/Magento/Framework/View/Asset/ContentProcessorException.php
@@ -9,6 +9,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class ContentProcessorException extends LocalizedException
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/File.php b/lib/internal/Magento/Framework/View/Asset/File.php
index 2dd50224f78fa..7a3276b251a5a 100644
--- a/lib/internal/Magento/Framework/View/Asset/File.php
+++ b/lib/internal/Magento/Framework/View/Asset/File.php
@@ -12,6 +12,7 @@
  * This class is a value object with lazy loading of some of its data (content, physical file path)
  *
  * @api
+ * @since 100.0.2
  */
 class File implements MergeableInterface
 {
@@ -166,7 +167,7 @@ public function getSourceFile()
      * Get source content type
      *
      * @return string
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function getSourceContentType()
     {
diff --git a/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php b/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php
index 5f83358336ab6..ba6564cd7abb7 100644
--- a/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php
+++ b/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php
@@ -12,6 +12,7 @@
  * An advanced context that contains information necessary for view files fallback system
  *
  * @api
+ * @since 100.0.2
  */
 class FallbackContext extends Context
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/File/NotFoundException.php b/lib/internal/Magento/Framework/View/Asset/File/NotFoundException.php
index 93b88834edff9..ddecc9330617d 100644
--- a/lib/internal/Magento/Framework/View/Asset/File/NotFoundException.php
+++ b/lib/internal/Magento/Framework/View/Asset/File/NotFoundException.php
@@ -12,6 +12,7 @@
  * Use this exception when file has not been found
  *
  * @api
+ * @since 100.0.2
  */
 class NotFoundException extends \LogicException
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/GroupedCollection.php b/lib/internal/Magento/Framework/View/Asset/GroupedCollection.php
index a0942599480b4..a574b272a2876 100644
--- a/lib/internal/Magento/Framework/View/Asset/GroupedCollection.php
+++ b/lib/internal/Magento/Framework/View/Asset/GroupedCollection.php
@@ -9,6 +9,7 @@
  * List of page assets that combines into groups ones having the same properties
  *
  * @api
+ * @since 100.0.2
  */
 class GroupedCollection extends Collection
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/LocalInterface.php b/lib/internal/Magento/Framework/View/Asset/LocalInterface.php
index fd7d1ea473ecd..2bb53bcaa86b2 100644
--- a/lib/internal/Magento/Framework/View/Asset/LocalInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/LocalInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface of an asset with locally accessible source file
  * @api
+ * @since 100.0.2
  */
 interface LocalInterface extends AssetInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php
index 7c7e8864151c0..c15fedeb8d799 100644
--- a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php
+++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php
@@ -45,7 +45,7 @@ public function __construct(
     }
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return Source
      */
     private function getAssetSource()
diff --git a/lib/internal/Magento/Framework/View/Asset/Minification.php b/lib/internal/Magento/Framework/View/Asset/Minification.php
index 40ac4dd1f3ba3..b0a42fbd373da 100644
--- a/lib/internal/Magento/Framework/View/Asset/Minification.php
+++ b/lib/internal/Magento/Framework/View/Asset/Minification.php
@@ -11,6 +11,7 @@
 /**
  * Helper class for static files minification related processes.
  * @api
+ * @since 100.0.2
  */
 class Minification
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSourceInterface.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSourceInterface.php
index 750c77e651dff..d208786673e04 100644
--- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSourceInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/AlternativeSourceInterface.php
@@ -11,6 +11,7 @@
  * Interface AlternativeSourceInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface AlternativeSourceInterface extends PreProcessorInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php
index 4fc31c22cb2de..80ce1321ef91e 100644
--- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php
+++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/Chain.php
@@ -13,6 +13,7 @@
  * Encapsulates complexity of all necessary context and parameters
  *
  * @api
+ * @since 100.0.2
  */
 class Chain
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php
index 51957cdf4c789..70baf7622b138 100644
--- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php
+++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactory.php
@@ -11,6 +11,7 @@
  * Factory for @see \Magento\Framework\View\Asset\PreProcessor\Chain
  * @codeCoverageIgnore
  * @api
+ * @since 100.0.2
  */
 class ChainFactory implements ChainFactoryInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactoryInterface.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactoryInterface.php
index d81bc69158db9..10ae2f6d479b2 100644
--- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactoryInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/ChainFactoryInterface.php
@@ -9,6 +9,7 @@
  * Interface ChainFactoryInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface ChainFactoryInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php b/lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php
index 419b6cd8f612f..35c9aa6a18a41 100644
--- a/lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php
+++ b/lib/internal/Magento/Framework/View/Asset/PreProcessorInterface.php
@@ -9,6 +9,7 @@
  * An interface for "preprocessing" asset contents
  *
  * @api
+ * @since 100.0.2
  */
 interface PreProcessorInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Asset/Repository.php b/lib/internal/Magento/Framework/View/Asset/Repository.php
index 15b9a7130180a..6ec4d1219af63 100644
--- a/lib/internal/Magento/Framework/View/Asset/Repository.php
+++ b/lib/internal/Magento/Framework/View/Asset/Repository.php
@@ -17,6 +17,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  *
  * @api
+ * @since 100.0.2
  */
 class Repository
 {
@@ -37,7 +38,7 @@ class Repository
 
     /**
      * @var \Magento\Framework\View\Design\Theme\ListInterface
-     * @deprecated 100.1.1
+     * @deprecated 100.0.2
      */
     private $themeList;
 
diff --git a/lib/internal/Magento/Framework/View/Asset/Source.php b/lib/internal/Magento/Framework/View/Asset/Source.php
index 4afe1be4490bc..dc98a257500c2 100644
--- a/lib/internal/Magento/Framework/View/Asset/Source.php
+++ b/lib/internal/Magento/Framework/View/Asset/Source.php
@@ -47,7 +47,7 @@ class Source
 
     /**
      * @var \Magento\Framework\View\Design\Theme\ListInterface
-     * @deprecated 100.1.1
+     * @deprecated 100.0.2
      */
     private $themeList;
 
diff --git a/lib/internal/Magento/Framework/View/ConfigInterface.php b/lib/internal/Magento/Framework/View/ConfigInterface.php
index 1b81f10f49d5a..e2a82d97ca1e8 100644
--- a/lib/internal/Magento/Framework/View/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/View/ConfigInterface.php
@@ -9,6 +9,7 @@
  * Config Interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Context.php b/lib/internal/Magento/Framework/View/Context.php
index 508d63d158bd7..8503c48d135c2 100644
--- a/lib/internal/Magento/Framework/View/Context.php
+++ b/lib/internal/Magento/Framework/View/Context.php
@@ -28,6 +28,7 @@
  * @SuppressWarnings(PHPMD.TooManyFields)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
+ * @since 100.0.2
  */
 class Context
 {
diff --git a/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Theme.php b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Theme.php
index b1e0e117e6efd..543eb3727d7a3 100644
--- a/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Theme.php
+++ b/lib/internal/Magento/Framework/View/Design/Fallback/Rule/Theme.php
@@ -108,7 +108,7 @@ private function getThemePubStaticDir(ThemeInterface $theme, $params = [])
      * Get DirectoryList instance
      * @return DirectoryList
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getDirectoryList()
     {
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/FileProviderInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/FileProviderInterface.php
index bf431b085a106..19337ba60f5a5 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/FileProviderInterface.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/FileProviderInterface.php
@@ -9,6 +9,7 @@
  * Theme files provider
  *
  * @api
+ * @since 100.0.2
  */
 interface FileProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/Label/ListInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/Label/ListInterface.php
index 7003ee17dd763..5f8e8be4cf812 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/Label/ListInterface.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/Label/ListInterface.php
@@ -9,6 +9,7 @@
  * Label list interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ListInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/ListInterface.php b/lib/internal/Magento/Framework/View/Design/Theme/ListInterface.php
index b3556a578db6a..c68f2fc23f3a8 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/ListInterface.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/ListInterface.php
@@ -9,6 +9,7 @@
  * Theme list interface
  *
  * @api
+ * @since 100.0.2
  */
 interface ListInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Design/ThemeInterface.php b/lib/internal/Magento/Framework/View/Design/ThemeInterface.php
index adcd29db708c9..fc1c5d8a22a47 100644
--- a/lib/internal/Magento/Framework/View/Design/ThemeInterface.php
+++ b/lib/internal/Magento/Framework/View/Design/ThemeInterface.php
@@ -9,6 +9,7 @@
  * Interface ThemeInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface ThemeInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php
index 95ff209dd4571..8034e1592a232 100644
--- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php
+++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php
@@ -24,6 +24,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @SuppressWarnings(PHPMD.TooManyFields)
  * @SuppressWarnings(PHPMD.NumberOfChildren)
+ * @since 100.0.2
  */
 abstract class AbstractBlock extends \Magento\Framework\DataObject implements BlockInterface
 {
@@ -55,7 +56,7 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl
      * SID Resolver
      *
      * @var \Magento\Framework\Session\SidResolverInterface
-     * @deprecated Not used anymore.
+     * @deprecated 102.0.5 Not used anymore.
      */
     protected $_sidResolver;
 
@@ -176,7 +177,7 @@ abstract class AbstractBlock extends \Magento\Framework\DataObject implements Bl
 
     /**
      * @var \Magento\Framework\App\CacheInterface
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected $_cache;
 
@@ -893,7 +894,7 @@ public static function extractModuleName($className)
      * @param string|array $data
      * @param array|null $allowedTags
      * @return string
-     * @deprecated Use $escaper directly in templates and in blocks.
+     * @deprecated 103.0.0 Use $escaper directly in templates and in blocks.
      */
     public function escapeHtml($data, $allowedTags = null)
     {
@@ -905,8 +906,8 @@ public function escapeHtml($data, $allowedTags = null)
      *
      * @param string $string
      * @return string
-     * @since 100.2.0
-     * @deprecated Use $escaper directly in templates and in blocks.
+     * @since 101.0.0
+     * @deprecated 103.0.0 Use $escaper directly in templates and in blocks.
      */
     public function escapeJs($string)
     {
@@ -919,8 +920,8 @@ public function escapeJs($string)
      * @param string $string
      * @param boolean $escapeSingleQuote
      * @return string
-     * @since 100.2.0
-     * @deprecated Use $escaper directly in templates and in blocks.
+     * @since 101.0.0
+     * @deprecated 103.0.0 Use $escaper directly in templates and in blocks.
      */
     public function escapeHtmlAttr($string, $escapeSingleQuote = true)
     {
@@ -932,8 +933,8 @@ public function escapeHtmlAttr($string, $escapeSingleQuote = true)
      *
      * @param string $string
      * @return string
-     * @since 100.2.0
-     * @deprecated Use $escaper directly in templates and in blocks.
+     * @since 101.0.0
+     * @deprecated 103.0.0 Use $escaper directly in templates and in blocks.
      */
     public function escapeCss($string)
     {
@@ -961,7 +962,7 @@ public function stripTags($data, $allowableTags = null, $allowHtmlEntities = fal
      *
      * @param string $string
      * @return string
-     * @deprecated Use $escaper directly in templates and in blocks.
+     * @deprecated 103.0.0 Use $escaper directly in templates and in blocks.
      */
     public function escapeUrl($string)
     {
@@ -973,7 +974,7 @@ public function escapeUrl($string)
      *
      * @param string $data
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escapeXssInUrl($data)
     {
@@ -988,7 +989,7 @@ public function escapeXssInUrl($data)
      * @param string $data
      * @param bool $addSlashes
      * @return string
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escapeQuote($data, $addSlashes = false)
     {
@@ -1002,7 +1003,7 @@ public function escapeQuote($data, $addSlashes = false)
      * @param string $quote
      *
      * @return string|array
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     public function escapeJsQuote($data, $quote = '\'')
     {
diff --git a/lib/internal/Magento/Framework/View/Element/Block/ArgumentInterface.php b/lib/internal/Magento/Framework/View/Element/Block/ArgumentInterface.php
index 29b5557c9fcb1..00992d28f4df1 100644
--- a/lib/internal/Magento/Framework/View/Element/Block/ArgumentInterface.php
+++ b/lib/internal/Magento/Framework/View/Element/Block/ArgumentInterface.php
@@ -10,6 +10,7 @@
  * All objects that are injected to block arguments should implement this interface.
  *
  * @api
+ * @since 101.0.0
  */
 interface ArgumentInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Element/BlockFactory.php b/lib/internal/Magento/Framework/View/Element/BlockFactory.php
index d691af8d98f53..f159a9f202928 100644
--- a/lib/internal/Magento/Framework/View/Element/BlockFactory.php
+++ b/lib/internal/Magento/Framework/View/Element/BlockFactory.php
@@ -11,6 +11,7 @@
  * Creates Blocks
  *
  * @api
+ * @since 100.0.2
  */
 class BlockFactory
 {
diff --git a/lib/internal/Magento/Framework/View/Element/BlockInterface.php b/lib/internal/Magento/Framework/View/Element/BlockInterface.php
index 1b4326694df97..565fdcc68188b 100644
--- a/lib/internal/Magento/Framework/View/Element/BlockInterface.php
+++ b/lib/internal/Magento/Framework/View/Element/BlockInterface.php
@@ -11,6 +11,7 @@
  * Used to present information to user
  *
  * @api
+ * @since 100.0.2
  */
 interface BlockInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Context.php b/lib/internal/Magento/Framework/View/Element/Context.php
index 0f8123745e7e8..ce804e2ace255 100644
--- a/lib/internal/Magento/Framework/View/Element/Context.php
+++ b/lib/internal/Magento/Framework/View/Element/Context.php
@@ -22,6 +22,7 @@
  * @SuppressWarnings(PHPMD)
  *
  * @api
+ * @since 100.0.2
  */
 class Context implements \Magento\Framework\ObjectManager\ContextInterface
 {
@@ -379,6 +380,7 @@ public function getLocaleDate()
      * Lock guarded cache loader.
      *
      * @return LockGuardedCacheLoader
+     * @since 102.0.2
      */
     public function getLockGuardedCacheLoader()
     {
diff --git a/lib/internal/Magento/Framework/View/Element/FormKey.php b/lib/internal/Magento/Framework/View/Element/FormKey.php
index e6ecd20435ce8..be661f47cf8e2 100644
--- a/lib/internal/Magento/Framework/View/Element/FormKey.php
+++ b/lib/internal/Magento/Framework/View/Element/FormKey.php
@@ -13,6 +13,7 @@
  * Element with FormKey
  *
  * @api
+ * @since 100.0.2
  */
 class FormKey extends \Magento\Framework\View\Element\AbstractBlock
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Calendar.php b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
index 0e17626160bd6..884488d77a74f 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Calendar.php
@@ -13,6 +13,7 @@
  * Prepares localization data for calendar
  *
  * @api
+ * @since 100.0.2
  */
 class Calendar extends \Magento\Framework\View\Element\Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link.php b/lib/internal/Magento/Framework/View/Element/Html/Link.php
index ab0d44b16fe42..d45bcd373e7a5 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link.php
@@ -19,6 +19,7 @@
  * @method string getTitle()
  *
  * @api
+ * @since 100.0.2
  */
 class Link extends \Magento\Framework\View\Element\Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php b/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php
index 3bd0677c6a443..f3439549275e2 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Link/Current.php
@@ -20,6 +20,7 @@
  * @method null|array                      getAttributes()
  * @method null|bool                       getCurrent()
  * @method \Magento\Framework\View\Element\Html\Link\Current setCurrent(bool $value)
+ * @since 100.0.2
  */
 class Current extends Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Html/Links.php b/lib/internal/Magento/Framework/View/Element/Html/Links.php
index 472e24d7f2bfa..8bca55fcbb61d 100644
--- a/lib/internal/Magento/Framework/View/Element/Html/Links.php
+++ b/lib/internal/Magento/Framework/View/Element/Html/Links.php
@@ -9,6 +9,7 @@
  * Links list block
  *
  * @api
+ * @since 100.0.2
  */
 class Links extends \Magento\Framework\View\Element\Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Js/Components.php b/lib/internal/Magento/Framework/View/Element/Js/Components.php
index 8e33ca5581960..6b5eb78f9994a 100644
--- a/lib/internal/Magento/Framework/View/Element/Js/Components.php
+++ b/lib/internal/Magento/Framework/View/Element/Js/Components.php
@@ -12,6 +12,7 @@
  * Block for Components
  *
  * @api
+ * @since 100.0.2
  */
 class Components extends Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Js/Cookie.php b/lib/internal/Magento/Framework/View/Element/Js/Cookie.php
index b37a9387c07f6..220318bf5392e 100644
--- a/lib/internal/Magento/Framework/View/Element/Js/Cookie.php
+++ b/lib/internal/Magento/Framework/View/Element/Js/Cookie.php
@@ -13,6 +13,7 @@
  * Block passes configuration for cookies set by JS
  *
  * @api
+ * @since 100.0.2
  */
 class Cookie extends Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Messages.php b/lib/internal/Magento/Framework/View/Element/Messages.php
index 409e678d4e30a..0af9a915966bf 100644
--- a/lib/internal/Magento/Framework/View/Element/Messages.php
+++ b/lib/internal/Magento/Framework/View/Element/Messages.php
@@ -11,6 +11,7 @@
  * Class Messages
  *
  * @api
+ * @since 100.0.2
  */
 class Messages extends Template
 {
diff --git a/lib/internal/Magento/Framework/View/Element/RendererInterface.php b/lib/internal/Magento/Framework/View/Element/RendererInterface.php
index e9be81b7f9d20..4137739c08757 100644
--- a/lib/internal/Magento/Framework/View/Element/RendererInterface.php
+++ b/lib/internal/Magento/Framework/View/Element/RendererInterface.php
@@ -9,6 +9,7 @@
  * Magento Block interface
  *
  * @api
+ * @since 100.0.2
  */
 interface RendererInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Element/RendererList.php b/lib/internal/Magento/Framework/View/Element/RendererList.php
index eba78867d7725..a0beb59b14fd9 100644
--- a/lib/internal/Magento/Framework/View/Element/RendererList.php
+++ b/lib/internal/Magento/Framework/View/Element/RendererList.php
@@ -9,6 +9,7 @@
  * Get renderer by code
  *
  * @api
+ * @since 100.0.2
  */
 class RendererList extends AbstractBlock
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Template.php b/lib/internal/Magento/Framework/View/Element/Template.php
index 99c876b440665..53355203213fa 100644
--- a/lib/internal/Magento/Framework/View/Element/Template.php
+++ b/lib/internal/Magento/Framework/View/Element/Template.php
@@ -28,6 +28,7 @@
  * @api
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class Template extends AbstractBlock
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Template/Context.php b/lib/internal/Magento/Framework/View/Element/Template/Context.php
index 4538fb33a9726..48c91ae29bfa9 100644
--- a/lib/internal/Magento/Framework/View/Element/Template/Context.php
+++ b/lib/internal/Magento/Framework/View/Element/Template/Context.php
@@ -20,6 +20,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD)
+ * @since 100.0.2
  */
 class Context extends \Magento\Framework\View\Element\Context
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Text.php b/lib/internal/Magento/Framework/View/Element/Text.php
index 687317576c358..b1197006349da 100644
--- a/lib/internal/Magento/Framework/View/Element/Text.php
+++ b/lib/internal/Magento/Framework/View/Element/Text.php
@@ -9,6 +9,7 @@
  * Class Text
  *
  * @api
+ * @since 100.0.2
  */
 class Text extends \Magento\Framework\View\Element\AbstractBlock
 {
diff --git a/lib/internal/Magento/Framework/View/Element/Text/ListText.php b/lib/internal/Magento/Framework/View/Element/Text/ListText.php
index a18ed78967139..d1892b3e11bd7 100644
--- a/lib/internal/Magento/Framework/View/Element/Text/ListText.php
+++ b/lib/internal/Magento/Framework/View/Element/Text/ListText.php
@@ -11,6 +11,7 @@
  * Class ListText
  *
  * @api
+ * @since 100.0.2
  */
 class ListText extends \Magento\Framework\View\Element\Text
 {
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/ManagerInterface.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/ManagerInterface.php
index a66233f99f4d5..525e9ecb52b20 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/ManagerInterface.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/ManagerInterface.php
@@ -7,7 +7,7 @@
 
 /**
  * Interface ManagerInterface
- * @deprecated 100.2.0
+ * @deprecated 101.0.0
  */
 interface ManagerInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Component/Definition.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Component/Definition.php
index 6fd041d582495..56c945ab4fd28 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Component/Definition.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Component/Definition.php
@@ -114,7 +114,7 @@ protected function prepareComponentData(array $componentsData)
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Template.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Template.php
index 59da9bc8aa5b1..074e18738c3b8 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Template.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/Provider/Template.php
@@ -117,7 +117,7 @@ public function getTemplate($template)
      * Get serializer
      *
      * @return \Magento\Framework\Serialize\SerializerInterface
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      */
     private function getSerializer()
     {
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/DataProviderInterface.php b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/DataProviderInterface.php
index 9f3121f4e495d..d939a01648f6b 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/DataProviderInterface.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/DataProviderInterface.php
@@ -11,6 +11,7 @@
  * Interface DataProviderInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface DataProviderInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/FilterPool.php b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/FilterPool.php
index 2c0b16f27df8b..2e22199773e90 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/FilterPool.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/FilterPool.php
@@ -14,6 +14,7 @@
  * Filter poll apply filters from search criteria
  *
  * @api
+ * @since 100.0.2
  */
 class FilterPool
 {
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php
index e1aa6a0605dab..32334e89c5876 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/DataProvider/SearchResult.php
@@ -95,7 +95,7 @@ public function __construct(
     }
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @return ResourceConnection
      */
     private function getResourceConnection()
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php b/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php
index 16c06fe3abf3a..5e1bc93b9c033 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php
@@ -25,6 +25,7 @@
  *
  * @api
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @since 100.0.2
  */
 class UiComponentFactory extends DataObject
 {
@@ -50,7 +51,7 @@ class UiComponentFactory extends DataObject
     /**
      * UI component manager
      *
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @var ManagerInterface
      */
     protected $componentManager;
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponentInterface.php b/lib/internal/Magento/Framework/View/Element/UiComponentInterface.php
index 3ae2627881101..19f06fd6b2ba4 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponentInterface.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponentInterface.php
@@ -11,6 +11,7 @@
  * Interface UiComponentInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface UiComponentInterface extends BlockInterface
 {
diff --git a/lib/internal/Magento/Framework/View/File/CollectorInterface.php b/lib/internal/Magento/Framework/View/File/CollectorInterface.php
index 31554d2a79238..dec8d6ea093b6 100644
--- a/lib/internal/Magento/Framework/View/File/CollectorInterface.php
+++ b/lib/internal/Magento/Framework/View/File/CollectorInterface.php
@@ -11,6 +11,7 @@
  * Interface of locating view files in the file system
  *
  * @api
+ * @since 100.0.2
  */
 interface CollectorInterface
 {
diff --git a/lib/internal/Magento/Framework/View/FileSystem.php b/lib/internal/Magento/Framework/View/FileSystem.php
index db269345eab98..687b6adcb0f8e 100644
--- a/lib/internal/Magento/Framework/View/FileSystem.php
+++ b/lib/internal/Magento/Framework/View/FileSystem.php
@@ -9,6 +9,7 @@
  * Model that finds file paths by their fileId
  *
  * @api
+ * @since 100.0.2
  */
 class FileSystem
 {
diff --git a/lib/internal/Magento/Framework/View/Layout/BuilderInterface.php b/lib/internal/Magento/Framework/View/Layout/BuilderInterface.php
index f579a539a12a9..1d28952aaa0f7 100644
--- a/lib/internal/Magento/Framework/View/Layout/BuilderInterface.php
+++ b/lib/internal/Magento/Framework/View/Layout/BuilderInterface.php
@@ -11,6 +11,7 @@
  * Interface BuilderInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface BuilderInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Layout/Data/Structure.php b/lib/internal/Magento/Framework/View/Layout/Data/Structure.php
index d9aa739fb04f9..3ec5f8b50c7da 100644
--- a/lib/internal/Magento/Framework/View/Layout/Data/Structure.php
+++ b/lib/internal/Magento/Framework/View/Layout/Data/Structure.php
@@ -12,6 +12,7 @@
  * An associative data structure, that features "nested set" parent-child relations
  *
  * @api
+ * @since 100.0.2
  */
 class Structure extends DataStructure
 {
diff --git a/lib/internal/Magento/Framework/View/Layout/Element.php b/lib/internal/Magento/Framework/View/Layout/Element.php
index 203af4bf1553c..f8ce682dcded2 100644
--- a/lib/internal/Magento/Framework/View/Layout/Element.php
+++ b/lib/internal/Magento/Framework/View/Layout/Element.php
@@ -9,6 +9,7 @@
  * Class Element
  *
  * @api
+ * @since 100.0.2
  */
 class Element extends \Magento\Framework\Simplexml\Element
 {
diff --git a/lib/internal/Magento/Framework/View/Layout/Generator/Context.php b/lib/internal/Magento/Framework/View/Layout/Generator/Context.php
index 951724b062829..606372d366722 100644
--- a/lib/internal/Magento/Framework/View/Layout/Generator/Context.php
+++ b/lib/internal/Magento/Framework/View/Layout/Generator/Context.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Context
 {
diff --git a/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php b/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php
index a585eda37df68..333afcf3bf408 100644
--- a/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php
+++ b/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php
@@ -10,6 +10,7 @@
 /**
  * Pool of generators for structural elements
  * @api
+ * @since 100.0.2
  */
 class GeneratorPool
 {
@@ -238,7 +239,7 @@ protected function moveElementInStructure(
      * @param array $data
      *
      * @return bool
-     * @since 100.2.0
+     * @since 101.0.0
      */
     protected function visibilityConditionsExistsIn(array $data)
     {
diff --git a/lib/internal/Magento/Framework/View/Layout/Reader/Block.php b/lib/internal/Magento/Framework/View/Layout/Reader/Block.php
index b287b517a454c..c24cda37defdb 100644
--- a/lib/internal/Magento/Framework/View/Layout/Reader/Block.php
+++ b/lib/internal/Magento/Framework/View/Layout/Reader/Block.php
@@ -81,7 +81,7 @@ class Block implements Layout\ReaderInterface
     private $conditionReader;
 
     /**
-     * @deprecated 100.2.0
+     * @deprecated 101.0.0
      * @var string
      */
     private $deprecatedAttributeAcl = 'acl';
diff --git a/lib/internal/Magento/Framework/View/Layout/Reader/Context.php b/lib/internal/Magento/Framework/View/Layout/Reader/Context.php
index 806c779186dc0..f9ca09478d600 100644
--- a/lib/internal/Magento/Framework/View/Layout/Reader/Context.php
+++ b/lib/internal/Magento/Framework/View/Layout/Reader/Context.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class Context
 {
diff --git a/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php b/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php
index 3193e10282fd4..aae2e9a68fe3c 100644
--- a/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php
+++ b/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php
@@ -9,6 +9,7 @@
  * Layout structure model
  *
  * @api
+ * @since 100.0.2
  */
 class ScheduledStructure
 {
@@ -489,7 +490,7 @@ public function flushScheduledStructure()
      * Reformat 'Layout scheduled structure' to array.
      *
      * @return array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function __toArray()
     {
@@ -506,7 +507,7 @@ public function __toArray()
      *
      * @param array $data
      * @return void
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function populateWithArray(array $data)
     {
diff --git a/lib/internal/Magento/Framework/View/LayoutInterface.php b/lib/internal/Magento/Framework/View/LayoutInterface.php
index a8ad5e28de2d6..3a63b5ccc9ea3 100644
--- a/lib/internal/Magento/Framework/View/LayoutInterface.php
+++ b/lib/internal/Magento/Framework/View/LayoutInterface.php
@@ -8,6 +8,7 @@
 /**
  * Interface LayoutInterface
  * @api
+ * @since 100.0.2
  */
 interface LayoutInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Page/Config.php b/lib/internal/Magento/Framework/View/Page/Config.php
index 44f4038860cda..ea71e49615e47 100644
--- a/lib/internal/Magento/Framework/View/Page/Config.php
+++ b/lib/internal/Magento/Framework/View/Page/Config.php
@@ -26,6 +26,7 @@
  * @SuppressWarnings(PHPMD.TooManyFields)
  *
  * @api
+ * @since 100.0.2
  */
 class Config
 {
@@ -384,6 +385,7 @@ public function getDescription()
      * Set meta title
      *
      * @param string $title
+     * @since 101.0.6
      */
     public function setMetaTitle($title)
     {
@@ -394,6 +396,7 @@ public function setMetaTitle($title)
      * Retrieve meta title
      *
      * @return string
+     * @since 101.0.6
      */
     public function getMetaTitle()
     {
diff --git a/lib/internal/Magento/Framework/View/Page/Config/Structure.php b/lib/internal/Magento/Framework/View/Page/Config/Structure.php
index 1a181952ed990..78e3cf9f58c85 100644
--- a/lib/internal/Magento/Framework/View/Page/Config/Structure.php
+++ b/lib/internal/Magento/Framework/View/Page/Config/Structure.php
@@ -10,6 +10,7 @@
  * Page config structure model
  *
  * @api
+ * @since 100.0.2
  */
 class Structure
 {
@@ -216,7 +217,7 @@ public function getAssets()
      * Reformat 'Page config structure' to array.
      *
      * @return array
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function __toArray()
     {
@@ -233,7 +234,7 @@ public function __toArray()
      *
      * @param array $data
      * @return void
-     * @since 100.2.0
+     * @since 101.0.0
      */
     public function populateWithArray(array $data)
     {
diff --git a/lib/internal/Magento/Framework/View/Page/FaviconInterface.php b/lib/internal/Magento/Framework/View/Page/FaviconInterface.php
index d7286029c466c..a28506e3f5906 100644
--- a/lib/internal/Magento/Framework/View/Page/FaviconInterface.php
+++ b/lib/internal/Magento/Framework/View/Page/FaviconInterface.php
@@ -9,6 +9,7 @@
  * Favicon interface
  *
  * @api
+ * @since 100.0.2
  */
 interface FaviconInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Page/Title.php b/lib/internal/Magento/Framework/View/Page/Title.php
index b0c8b155c878e..17bc4cea1cc92 100644
--- a/lib/internal/Magento/Framework/View/Page/Title.php
+++ b/lib/internal/Magento/Framework/View/Page/Title.php
@@ -12,6 +12,7 @@
  * Page title
  *
  * @api
+ * @since 100.0.2
  */
 class Title
 {
diff --git a/lib/internal/Magento/Framework/View/Render/RenderFactory.php b/lib/internal/Magento/Framework/View/Render/RenderFactory.php
index 3f90bc2e8f2bb..d150ede9a5b78 100644
--- a/lib/internal/Magento/Framework/View/Render/RenderFactory.php
+++ b/lib/internal/Magento/Framework/View/Render/RenderFactory.php
@@ -12,6 +12,7 @@
  * Class RenderFactory
  *
  * @api
+ * @since 100.0.2
  */
 class RenderFactory
 {
diff --git a/lib/internal/Magento/Framework/View/RenderInterface.php b/lib/internal/Magento/Framework/View/RenderInterface.php
index 041893f81232a..5f456dd1987eb 100644
--- a/lib/internal/Magento/Framework/View/RenderInterface.php
+++ b/lib/internal/Magento/Framework/View/RenderInterface.php
@@ -9,6 +9,7 @@
  * Interface RenderInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface RenderInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Result/Layout.php b/lib/internal/Magento/Framework/View/Result/Layout.php
index 83e0a991cb959..2b08ddf69e372 100644
--- a/lib/internal/Magento/Framework/View/Result/Layout.php
+++ b/lib/internal/Magento/Framework/View/Result/Layout.php
@@ -19,6 +19,7 @@
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  *
  * @api
+ * @since 100.0.2
  */
 class Layout extends AbstractResult
 {
diff --git a/lib/internal/Magento/Framework/View/Result/LayoutFactory.php b/lib/internal/Magento/Framework/View/Result/LayoutFactory.php
index 4104e19686244..4b857ad3cf66b 100644
--- a/lib/internal/Magento/Framework/View/Result/LayoutFactory.php
+++ b/lib/internal/Magento/Framework/View/Result/LayoutFactory.php
@@ -10,6 +10,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class LayoutFactory
 {
diff --git a/lib/internal/Magento/Framework/View/Result/Page.php b/lib/internal/Magento/Framework/View/Result/Page.php
index 39cca1a111906..14a83a8320330 100644
--- a/lib/internal/Magento/Framework/View/Result/Page.php
+++ b/lib/internal/Magento/Framework/View/Result/Page.php
@@ -25,6 +25,7 @@
  * @SuppressWarnings(PHPMD.DepthOfInheritance)
  *
  * @api
+ * @since 100.0.2
  */
 class Page extends Layout
 {
diff --git a/lib/internal/Magento/Framework/View/Result/PageFactory.php b/lib/internal/Magento/Framework/View/Result/PageFactory.php
index ef234ca4d4429..4de4c097d16a2 100644
--- a/lib/internal/Magento/Framework/View/Result/PageFactory.php
+++ b/lib/internal/Magento/Framework/View/Result/PageFactory.php
@@ -14,6 +14,7 @@
  * which is by convention is determined from the controller action class
  *
  * @api
+ * @since 100.0.2
  */
 class PageFactory
 {
diff --git a/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php b/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php
index edd8caeb914b3..98fe13ab3a12c 100644
--- a/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php
+++ b/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php
@@ -10,6 +10,7 @@
  * HTML minifier
  *
  * @api
+ * @since 100.0.2
  */
 interface MinifierInterface
 {
diff --git a/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/CompilerInterface.php b/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/CompilerInterface.php
index 565bb7c92324c..8228013df40a4 100644
--- a/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/CompilerInterface.php
+++ b/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/CompilerInterface.php
@@ -11,6 +11,7 @@
  * Interface CompilerInterface
  *
  * @api
+ * @since 100.0.2
  */
 interface CompilerInterface
 {
diff --git a/lib/internal/Magento/Framework/View/TemplateEnginePool.php b/lib/internal/Magento/Framework/View/TemplateEnginePool.php
index 1aec127a17bd1..0f8d2032af879 100644
--- a/lib/internal/Magento/Framework/View/TemplateEnginePool.php
+++ b/lib/internal/Magento/Framework/View/TemplateEnginePool.php
@@ -7,6 +7,7 @@
 
 /**
  * @api
+ * @since 100.0.2
  */
 class TemplateEnginePool
 {
diff --git a/lib/internal/Magento/Framework/View/Url/ConfigInterface.php b/lib/internal/Magento/Framework/View/Url/ConfigInterface.php
index d1076abdb0ec5..4cc0d86e619f2 100644
--- a/lib/internal/Magento/Framework/View/Url/ConfigInterface.php
+++ b/lib/internal/Magento/Framework/View/Url/ConfigInterface.php
@@ -8,6 +8,7 @@
 /**
  * Url Config Interface
  * @api
+ * @since 100.0.2
  */
 interface ConfigInterface
 {
diff --git a/lib/internal/Magento/Framework/View/Url/CssResolver.php b/lib/internal/Magento/Framework/View/Url/CssResolver.php
index 8c73e2ab9bcf9..60f03d063c4a8 100644
--- a/lib/internal/Magento/Framework/View/Url/CssResolver.php
+++ b/lib/internal/Magento/Framework/View/Url/CssResolver.php
@@ -11,6 +11,7 @@
  * CSS URLs resolver class.
  * This utility class provides a set of methods to work with CSS files.
  * @api
+ * @since 100.0.2
  */
 class CssResolver
 {
diff --git a/lib/internal/Magento/Framework/Webapi/Authorization.php b/lib/internal/Magento/Framework/Webapi/Authorization.php
index 03ee07d48b323..a1907dc46ab11 100644
--- a/lib/internal/Magento/Framework/Webapi/Authorization.php
+++ b/lib/internal/Magento/Framework/Webapi/Authorization.php
@@ -23,7 +23,6 @@ class Authorization
      * Initialize dependencies.
      *
      * @param \Magento\Framework\AuthorizationInterface $authorization
-     * @since 100.1.0
      */
     public function __construct(\Magento\Framework\AuthorizationInterface $authorization)
     {
diff --git a/lib/internal/Magento/Framework/Webapi/CustomAttributeTypeLocatorInterface.php b/lib/internal/Magento/Framework/Webapi/CustomAttributeTypeLocatorInterface.php
index 25d78672eef87..ac183bc3b1871 100644
--- a/lib/internal/Magento/Framework/Webapi/CustomAttributeTypeLocatorInterface.php
+++ b/lib/internal/Magento/Framework/Webapi/CustomAttributeTypeLocatorInterface.php
@@ -24,7 +24,7 @@ public function getType($attributeCode, $entityType);
      * Get list of all Data Interface corresponding to complex custom attribute types
      *
      * @return string[] array of Data Interface class names
-     * @deprecated
+     * @deprecated 102.0.0
      * @see \Magento\Framework\Webapi\CustomAttribute\ServiceTypeListInterface::getDataTypes()
      */
     public function getAllServiceDataInterfaces();
diff --git a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php b/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php
index f9b6a32fc5673..3737d86d2b1f6 100644
--- a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php
+++ b/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php
@@ -24,6 +24,7 @@
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
+ * @since 100.0.2
  */
 class ErrorProcessor
 {
diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request/Deserializer/Json.php b/lib/internal/Magento/Framework/Webapi/Rest/Request/Deserializer/Json.php
index c2e7c324d1282..2673df519b064 100644
--- a/lib/internal/Magento/Framework/Webapi/Rest/Request/Deserializer/Json.php
+++ b/lib/internal/Magento/Framework/Webapi/Rest/Request/Deserializer/Json.php
@@ -14,7 +14,7 @@ class Json implements \Magento\Framework\Webapi\Rest\Request\DeserializerInterfa
 {
     /**
      * @var \Magento\Framework\Json\Decoder
-     * @deprecated
+     * @deprecated 101.0.0
      */
     protected $decoder;
 
diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php b/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php
index 828022353e4fa..bc171b84ba3d9 100644
--- a/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php
+++ b/lib/internal/Magento/Framework/Webapi/Rest/Request/ParamOverriderInterface.php
@@ -27,6 +27,7 @@
  * adding to the parameter list for ParamsOverrider's dependency injection configuration.
  *
  * @api
+ * @since 100.0.2
  */
 interface ParamOverriderInterface
 {
diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php b/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php
index 9d905ce599779..4edbe4e6a5377 100644
--- a/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php
+++ b/lib/internal/Magento/Framework/Webapi/Rest/Response/RendererInterface.php
@@ -11,6 +11,7 @@
  * Renderer interface allows REST response data rendering in a specific format (e.g. Json or Xml)
  *
  * @api
+ * @since 100.0.2
  */
 interface RendererInterface
 {
diff --git a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php
index 902e67bf015b7..c8955aa2a6998 100644
--- a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php
+++ b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php
@@ -28,6 +28,7 @@
  *
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  * @api
+ * @since 100.0.2
  */
 class ServiceInputProcessor implements ServicePayloadConverterInterface
 {
diff --git a/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php b/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php
index 25eacb00c23ae..8319a0398a825 100644
--- a/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php
+++ b/lib/internal/Magento/Framework/Webapi/ServiceOutputProcessor.php
@@ -17,6 +17,7 @@
  * Data object converter
  *
  * @api
+ * @since 100.0.2
  */
 class ServiceOutputProcessor implements ServicePayloadConverterInterface
 {
diff --git a/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php b/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php
index 30f93efdb9ef9..da4fe0ad08143 100644
--- a/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php
+++ b/lib/internal/Magento/Framework/Webapi/ServicePayloadConverterInterface.php
@@ -11,6 +11,7 @@
  * Interface for data conversion based on data type.
  *
  * @api
+ * @since 100.0.2
  */
 interface ServicePayloadConverterInterface
 {

From 15433c43cf0a0691745bdeae79e600f6e4d8050f Mon Sep 17 00:00:00 2001
From: Volodymyr Zaets <vzaets@magento.com>
Date: Mon, 20 Jul 2020 21:41:27 -0500
Subject: [PATCH 297/307] Revert "COMOPS-1042: 2.4.0 packaging"

This reverts commit 19af792cb315a6f3a84270b80d4f93fe6814a13a.
---
 app/code/Magento/AdminAnalytics/composer.json |  13 +-
 .../Magento/AdminNotification/composer.json   |  15 +-
 .../AdvancedPricingImportExport/composer.json |  19 +-
 app/code/Magento/AdvancedSearch/composer.json |  19 +-
 app/code/Magento/Amqp/composer.json           |   9 +-
 app/code/Magento/AmqpStore/composer.json      |  13 +-
 app/code/Magento/Analytics/composer.json      |  13 +-
 .../AsynchronousOperations/composer.json      |  19 +-
 app/code/Magento/Authorization/composer.json  |   7 +-
 app/code/Magento/Backend/composer.json        |  39 +-
 app/code/Magento/Backup/composer.json         |  11 +-
 app/code/Magento/Bundle/composer.json         |  41 +-
 app/code/Magento/BundleGraphQl/composer.json  |  17 +-
 .../Magento/BundleImportExport/composer.json  |  17 +-
 .../Magento/CacheInvalidate/composer.json     |   7 +-
 app/code/Magento/Captcha/composer.json        |  13 +-
 .../Magento/CardinalCommerce/composer.json    |  11 +-
 app/code/Magento/Catalog/composer.json        |  61 +-
 .../Magento/CatalogAnalytics/composer.json    |   9 +-
 .../Magento/CatalogCmsGraphQl/composer.json   |  15 +-
 .../CatalogCustomerGraphQl/composer.json      |  13 +-
 app/code/Magento/CatalogGraphQl/composer.json |  25 +-
 .../Magento/CatalogImportExport/composer.json |  25 +-
 .../Magento/CatalogInventory/composer.json    |  19 +-
 .../CatalogInventoryGraphQl/composer.json     |  11 +-
 app/code/Magento/CatalogRule/composer.json    |  23 +-
 .../CatalogRuleConfigurable/composer.json     |  13 +-
 .../Magento/CatalogRuleGraphQl/composer.json  |   7 +-
 app/code/Magento/CatalogSearch/composer.json  |  29 +-
 .../Magento/CatalogUrlRewrite/composer.json   |  23 +-
 .../CatalogUrlRewriteGraphQl/composer.json    |  15 +-
 app/code/Magento/CatalogWidget/composer.json  |  23 +-
 app/code/Magento/Checkout/composer.json       |  43 +-
 .../Magento/CheckoutAgreements/composer.json  |  13 +-
 .../CheckoutAgreementsGraphQl/composer.json   |  11 +-
 app/code/Magento/Cms/composer.json            |  25 +-
 app/code/Magento/CmsGraphQl/composer.json     |  17 +-
 app/code/Magento/CmsUrlRewrite/composer.json  |  11 +-
 .../CmsUrlRewriteGraphQl/composer.json        |  15 +-
 app/code/Magento/Config/composer.json         |  19 +-
 .../ConfigurableImportExport/composer.json    |  17 +-
 .../Magento/ConfigurableProduct/composer.json |  41 +-
 .../ConfigurableProductGraphQl/composer.json  |  15 +-
 .../ConfigurableProductSales/composer.json    |  13 +-
 app/code/Magento/Contact/composer.json        |  13 +-
 app/code/Magento/Cookie/composer.json         |   9 +-
 app/code/Magento/Cron/composer.json           |   9 +-
 app/code/Magento/Csp/composer.json            |   7 +-
 app/code/Magento/CurrencySymbol/composer.json |  15 +-
 app/code/Magento/Customer/composer.json       |  45 +-
 .../Magento/CustomerAnalytics/composer.json   |   9 +-
 .../CustomerDownloadableGraphQl/composer.json |  11 +-
 .../Magento/CustomerGraphQl/composer.json     |  21 +-
 .../CustomerImportExport/composer.json        |  17 +-
 app/code/Magento/Deploy/composer.json         |  13 +-
 app/code/Magento/Developer/composer.json      |   9 +-
 app/code/Magento/Dhl/composer.json            |  25 +-
 app/code/Magento/Directory/composer.json      |  11 +-
 .../Magento/DirectoryGraphQl/composer.json    |  11 +-
 app/code/Magento/Downloadable/composer.json   |  39 +-
 .../Magento/DownloadableGraphQl/composer.json |  15 +-
 .../DownloadableImportExport/composer.json    |  17 +-
 app/code/Magento/Eav/composer.json            |  15 +-
 app/code/Magento/EavGraphQl/composer.json     |   9 +-
 app/code/Magento/Elasticsearch/composer.json  |  23 +-
 app/code/Magento/Elasticsearch6/composer.json |  15 +-
 app/code/Magento/Elasticsearch7/composer.json |  15 +-
 app/code/Magento/Email/composer.json          |  25 +-
 app/code/Magento/EncryptionKey/composer.json  |   9 +-
 app/code/Magento/Fedex/composer.json          |  21 +-
 app/code/Magento/GiftMessage/composer.json    |  25 +-
 app/code/Magento/GoogleAdwords/composer.json  |   9 +-
 .../Magento/GoogleAnalytics/composer.json     |  13 +-
 .../Magento/GoogleOptimizer/composer.json     |  17 +-
 app/code/Magento/GraphQl/composer.json        |  11 +-
 app/code/Magento/GraphQlCache/composer.json   |   9 +-
 .../GroupedCatalogInventory/composer.json     |  11 +-
 .../Magento/GroupedImportExport/composer.json |  15 +-
 app/code/Magento/GroupedProduct/composer.json |  33 +-
 .../GroupedProductGraphQl/composer.json       |  11 +-
 app/code/Magento/ImportExport/composer.json   |  17 +-
 app/code/Magento/Indexer/composer.json        |   7 +-
 .../Magento/InstantPurchase/composer.json     |  19 +-
 app/code/Magento/Integration/composer.json    |  19 +-
 .../Magento/LayeredNavigation/composer.json   |   9 +-
 .../Magento/LoginAsCustomer/composer.json     |  15 +-
 .../LoginAsCustomerAdminUi/composer.json      |  21 +-
 .../Magento/LoginAsCustomerApi/composer.json  |   9 +-
 .../LoginAsCustomerFrontendUi/composer.json   |  15 +-
 .../Magento/LoginAsCustomerLog/composer.json  |  21 +-
 .../LoginAsCustomerPageCache/composer.json    |  15 +-
 .../LoginAsCustomerQuote/composer.json        |  13 +-
 .../LoginAsCustomerSales/composer.json        |  13 +-
 app/code/Magento/Marketplace/composer.json    |   7 +-
 app/code/Magento/MediaContent/composer.json   |   9 +-
 .../Magento/MediaContentApi/composer.json     |   7 +-
 .../Magento/MediaContentCatalog/composer.json |  11 +-
 .../Magento/MediaContentCms/composer.json     |   9 +-
 app/code/Magento/MediaGallery/composer.json   |   9 +-
 .../Magento/MediaGalleryApi/composer.json     |   5 +-
 .../Magento/MediaGalleryCatalog/composer.json |   9 +-
 app/code/Magento/MediaStorage/composer.json   |  21 +-
 app/code/Magento/MessageQueue/composer.json   |   7 +-
 app/code/Magento/Msrp/composer.json           |  19 +-
 .../MsrpConfigurableProduct/composer.json     |  11 +-
 .../Magento/MsrpGroupedProduct/composer.json  |  11 +-
 app/code/Magento/Multishipping/composer.json  |  23 +-
 app/code/Magento/MysqlMq/composer.json        |   9 +-
 .../Magento/NewRelicReporting/composer.json   |  17 +-
 app/code/Magento/Newsletter/composer.json     |  23 +-
 .../Magento/OfflinePayments/composer.json     |  11 +-
 .../Magento/OfflineShipping/composer.json     |  27 +-
 app/code/Magento/PageCache/composer.json      |  11 +-
 app/code/Magento/Payment/composer.json        |  19 +-
 app/code/Magento/Paypal/composer.json         |  39 +-
 app/code/Magento/PaypalCaptcha/composer.json  |  13 +-
 app/code/Magento/PaypalGraphQl/composer.json  |  21 +-
 app/code/Magento/Persistent/composer.json     |  17 +-
 app/code/Magento/ProductAlert/composer.json   |  17 +-
 app/code/Magento/ProductVideo/composer.json   |  19 +-
 app/code/Magento/Quote/composer.json          |  35 +-
 app/code/Magento/QuoteAnalytics/composer.json |   9 +-
 app/code/Magento/QuoteGraphQl/composer.json   |  25 +-
 .../RelatedProductGraphQl/composer.json       |  11 +-
 .../Magento/ReleaseNotification/composer.json |  13 +-
 app/code/Magento/Reports/composer.json        |  37 +-
 app/code/Magento/RequireJs/composer.json      |   5 +-
 app/code/Magento/Review/composer.json         |  25 +-
 .../Magento/ReviewAnalytics/composer.json     |   9 +-
 app/code/Magento/Robots/composer.json         |   9 +-
 app/code/Magento/Rss/composer.json            |  11 +-
 app/code/Magento/Rule/composer.json           |  13 +-
 app/code/Magento/Sales/composer.json          |  55 +-
 app/code/Magento/SalesAnalytics/composer.json |   9 +-
 app/code/Magento/SalesGraphQl/composer.json   |   9 +-
 app/code/Magento/SalesInventory/composer.json |  13 +-
 app/code/Magento/SalesRule/composer.json      |  45 +-
 app/code/Magento/SalesSequence/composer.json  |   5 +-
 app/code/Magento/SampleData/composer.json     |   7 +-
 app/code/Magento/Search/composer.json         |  15 +-
 app/code/Magento/Security/composer.json       |  13 +-
 app/code/Magento/SendFriend/composer.json     |  17 +-
 .../Magento/SendFriendGraphQl/composer.json   |  11 +-
 app/code/Magento/Shipping/composer.json       |  37 +-
 app/code/Magento/Sitemap/composer.json        |  25 +-
 app/code/Magento/Store/composer.json          |  23 +-
 app/code/Magento/StoreGraphQl/composer.json   |   9 +-
 app/code/Magento/Swagger/composer.json        |   5 +-
 app/code/Magento/SwaggerWebapi/composer.json  |   7 +-
 .../Magento/SwaggerWebapiAsync/composer.json  |   9 +-
 app/code/Magento/Swatches/composer.json       |  29 +-
 .../Magento/SwatchesGraphQl/composer.json     |  11 +-
 .../SwatchesLayeredNavigation/composer.json   |   5 +-
 app/code/Magento/Tax/composer.json            |  35 +-
 app/code/Magento/TaxGraphQl/composer.json     |   9 +-
 .../Magento/TaxImportExport/composer.json     |  15 +-
 app/code/Magento/Theme/composer.json          |  31 +-
 app/code/Magento/ThemeGraphQl/composer.json   |   7 +-
 app/code/Magento/Tinymce3/composer.json       |  15 +-
 app/code/Magento/Translation/composer.json    |  15 +-
 app/code/Magento/Ui/composer.json             |  17 +-
 app/code/Magento/Ups/composer.json            |  21 +-
 app/code/Magento/UrlRewrite/composer.json     |  19 +-
 .../Magento/UrlRewriteGraphQl/composer.json   |   9 +-
 app/code/Magento/User/composer.json           |  19 +-
 app/code/Magento/Usps/composer.json           |  21 +-
 app/code/Magento/Variable/composer.json       |  13 +-
 app/code/Magento/Vault/composer.json          |  19 +-
 app/code/Magento/VaultGraphQl/composer.json   |   9 +-
 app/code/Magento/Version/composer.json        |   5 +-
 app/code/Magento/Webapi/composer.json         |  17 +-
 app/code/Magento/WebapiAsync/composer.json    |  15 +-
 app/code/Magento/WebapiSecurity/composer.json |   7 +-
 app/code/Magento/Weee/composer.json           |  31 +-
 app/code/Magento/WeeeGraphQl/composer.json    |  13 +-
 app/code/Magento/Widget/composer.json         |  21 +-
 app/code/Magento/Wishlist/composer.json       |  39 +-
 .../Magento/WishlistAnalytics/composer.json   |   9 +-
 .../Magento/WishlistGraphQl/composer.json     |  11 +-
 .../adminhtml/Magento/backend/composer.json   |   5 +-
 .../frontend/Magento/blank/composer.json      |   5 +-
 .../frontend/Magento/luma/composer.json       |   7 +-
 app/i18n/Magento/de_DE/composer.json          |   5 +-
 app/i18n/Magento/en_US/composer.json          |   5 +-
 app/i18n/Magento/es_ES/composer.json          |   5 +-
 app/i18n/Magento/fr_FR/composer.json          |   5 +-
 app/i18n/Magento/nl_NL/composer.json          |   5 +-
 app/i18n/Magento/pt_BR/composer.json          |   5 +-
 app/i18n/Magento/zh_Hans_CN/composer.json     |   5 +-
 composer.json                                 | 389 ++++----
 composer.lock                                 | 861 ++++++++----------
 .../Magento/Framework/Amqp/composer.json      |   5 +-
 .../Magento/Framework/Bulk/composer.json      |   5 +-
 .../Framework/MessageQueue/composer.json      |   5 +-
 lib/internal/Magento/Framework/composer.json  |   3 +-
 195 files changed, 2006 insertions(+), 2327 deletions(-)

diff --git a/app/code/Magento/AdminAnalytics/composer.json b/app/code/Magento/AdminAnalytics/composer.json
index 5f92f9d706fd4..cf60b1d88ae55 100644
--- a/app/code/Magento/AdminAnalytics/composer.json
+++ b/app/code/Magento/AdminAnalytics/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-config": "101.2.*",
-        "magento/module-ui": "101.2.*",
-        "magento/module-release-notification": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-config": "*",
+        "magento/module-ui": "*",
+        "magento/module-release-notification": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\AdminAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json
index b579f61dbc900..d421fc869621b 100644
--- a/app/code/Magento/AdminNotification/composer.json
+++ b/app/code/Magento/AdminNotification/composer.json
@@ -7,12 +7,12 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-media-storage": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*",
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\AdminNotification\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/AdvancedPricingImportExport/composer.json b/app/code/Magento/AdvancedPricingImportExport/composer.json
index 9954b6484ad42..ea6a39fba2c3d 100644
--- a/app/code/Magento/AdvancedPricingImportExport/composer.json
+++ b/app/code/Magento/AdvancedPricingImportExport/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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/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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\AdvancedPricingImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/AdvancedSearch/composer.json b/app/code/Magento/AdvancedSearch/composer.json
index c90d97312d7a7..720309b619e43 100644
--- a/app/code/Magento/AdvancedSearch/composer.json
+++ b/app/code/Magento/AdvancedSearch/composer.json
@@ -5,14 +5,14 @@
         "sort-packages": true
     },
     "require": {
-        "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.*",
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-search": "*",
+        "magento/module-config": "*",
+        "magento/module-customer": "*",
+        "magento/module-search": "*",
+        "magento/module-store": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "type": "magento2-module",
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\AdvancedSearch\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Amqp/composer.json b/app/code/Magento/Amqp/composer.json
index e35a4b9307b3e..9e7a035112b04 100644
--- a/app/code/Magento/Amqp/composer.json
+++ b/app/code/Magento/Amqp/composer.json
@@ -5,9 +5,9 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*",
-        "magento/framework-amqp": "100.4.*",
-        "magento/framework-message-queue": "100.4.*",
+        "magento/framework": "*",
+        "magento/framework-amqp": "*",
+        "magento/framework-message-queue": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "type": "magento2-module",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\Amqp\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/AmqpStore/composer.json b/app/code/Magento/AmqpStore/composer.json
index f361806fb50ca..70a10810ece21 100644
--- a/app/code/Magento/AmqpStore/composer.json
+++ b/app/code/Magento/AmqpStore/composer.json
@@ -5,14 +5,14 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*",
-        "magento/framework-amqp": "100.4.*",
-        "magento/module-store": "101.1.*",
+        "magento/framework": "*",
+        "magento/framework-amqp": "*",
+        "magento/module-store": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "suggest": {
-        "magento/module-asynchronous-operations": "100.4.*",
-        "magento/framework-message-queue": "100.4.*"
+        "magento/module-asynchronous-operations": "*",
+        "magento/framework-message-queue": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\AmqpStore\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json
index 5824ce3e240b4..84f8af066bf11 100644
--- a/app/code/Magento/Analytics/composer.json
+++ b/app/code/Magento/Analytics/composer.json
@@ -3,11 +3,11 @@
     "description": "N/A",
     "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.*"
+        "magento/module-backend": "*",
+        "magento/module-config": "*",
+        "magento/module-integration": "*",
+        "magento/module-store": "*",
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\Analytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/AsynchronousOperations/composer.json b/app/code/Magento/AsynchronousOperations/composer.json
index ec4c221c239cc..b5de631418e72 100644
--- a/app/code/Magento/AsynchronousOperations/composer.json
+++ b/app/code/Magento/AsynchronousOperations/composer.json
@@ -5,17 +5,17 @@
         "sort-packages": true
     },
     "require": {
-        "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.*",
+        "magento/framework": "*",
+        "magento/framework-message-queue": "*",
+        "magento/framework-bulk": "*",
+        "magento/module-authorization": "*",
+        "magento/module-backend": "*",
+        "magento/module-ui": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "suggest": {
-        "magento/module-admin-notification": "100.4.*",
-        "magento/module-logging": "101.2.*"
+        "magento/module-admin-notification": "*",
+        "magento/module-logging": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\AsynchronousOperations\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json
index 4a586a3d24e9c..401444404ca3e 100644
--- a/app/code/Magento/Authorization/composer.json
+++ b/app/code/Magento/Authorization/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\Authorization\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json
index 623c58c9827f4..ee5491057d861 100644
--- a/app/code/Magento/Backend/composer.json
+++ b/app/code/Magento/Backend/composer.json
@@ -6,26 +6,26 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backup": "100.4.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-config": "101.2.*",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-theme": "101.1.*"
+        "magento/module-theme": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -39,6 +39,5 @@
         "psr-4": {
             "Magento\\Backend\\": ""
         }
-    },
-    "version": "102.0.0"
+    }
 }
diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json
index 1cb489eef2f3a..9a5904beda550 100644
--- a/app/code/Magento/Backup/composer.json
+++ b/app/code/Magento/Backup/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-cron": "100.4.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-cron": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\Backup\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json
index 9cd1e7e331502..1b5ca24ee098c 100644
--- a/app/code/Magento/Bundle/composer.json
+++ b/app/code/Magento/Bundle/composer.json
@@ -6,27 +6,27 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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/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": "*"
     },
     "suggest": {
-        "magento/module-webapi": "100.4.*",
-        "magento/module-bundle-sample-data": "Sample Data version: 100.4.*",
-        "magento/module-sales-rule": "101.2.*"
+        "magento/module-webapi": "*",
+        "magento/module-bundle-sample-data": "*",
+        "magento/module-sales-rule": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -40,6 +40,5 @@
         "psr-4": {
             "Magento\\Bundle\\": ""
         }
-    },
-    "version": "101.0.0"
+    }
 }
diff --git a/app/code/Magento/BundleGraphQl/composer.json b/app/code/Magento/BundleGraphQl/composer.json
index 47d8fcc1aeb88..cb49ab78588b3 100644
--- a/app/code/Magento/BundleGraphQl/composer.json
+++ b/app/code/Magento/BundleGraphQl/composer.json
@@ -4,13 +4,13 @@
     "type": "magento2-module",
     "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/framework": "103.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",
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\BundleGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/BundleImportExport/composer.json b/app/code/Magento/BundleImportExport/composer.json
index 7fcc00b096ed4..faca3eac9a721 100644
--- a/app/code/Magento/BundleImportExport/composer.json
+++ b/app/code/Magento/BundleImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-bundle": "*",
+        "magento/module-store": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-import-export": "*",
+        "magento/module-eav": "*",
+        "magento/module-import-export": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\BundleImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CacheInvalidate/composer.json b/app/code/Magento/CacheInvalidate/composer.json
index e3f021f24d1a1..7801554c890e1 100644
--- a/app/code/Magento/CacheInvalidate/composer.json
+++ b/app/code/Magento/CacheInvalidate/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-page-cache": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-page-cache": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\CacheInvalidate\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json
index c45119bff4b7a..a6ee83d3f0924 100644
--- a/app/code/Magento/Captcha/composer.json
+++ b/app/code/Magento/Captcha/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-checkout": "100.4.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-store": "101.1.*",
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-checkout": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*",
         "laminas/laminas-captcha": "^2.7.1",
         "laminas/laminas-db": "^2.8.2",
         "laminas/laminas-session": "^2.7.3"
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\Captcha\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CardinalCommerce/composer.json b/app/code/Magento/CardinalCommerce/composer.json
index c2fcc19baa926..8b2989ef915e1 100644
--- a/app/code/Magento/CardinalCommerce/composer.json
+++ b/app/code/Magento/CardinalCommerce/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-checkout": "100.4.*",
-        "magento/module-payment": "100.4.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-checkout": "*",
+        "magento/module-payment": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\CardinalCommerce\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json
index 85f33c5c85c6c..6dde1d76e5e81 100644
--- a/app/code/Magento/Catalog/composer.json
+++ b/app/code/Magento/Catalog/composer.json
@@ -6,37 +6,37 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-cookie": "100.4.*",
-        "magento/module-sales": "103.0.*",
-        "magento/module-catalog-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-cookie": "*",
+        "magento/module-sales": "*",
+        "magento/module-catalog-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -50,6 +50,5 @@
         "psr-4": {
             "Magento\\Catalog\\": ""
         }
-    },
-    "version": "104.0.0"
+    }
 }
diff --git a/app/code/Magento/CatalogAnalytics/composer.json b/app/code/Magento/CatalogAnalytics/composer.json
index 581331b83207c..43fb4c8a6f433 100644
--- a/app/code/Magento/CatalogAnalytics/composer.json
+++ b/app/code/Magento/CatalogAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-analytics": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-analytics": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\CatalogAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogCmsGraphQl/composer.json b/app/code/Magento/CatalogCmsGraphQl/composer.json
index 351f54f1f99b3..aa7a742f2f315 100644
--- a/app/code/Magento/CatalogCmsGraphQl/composer.json
+++ b/app/code/Magento/CatalogCmsGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-cms-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-cms-graph-ql": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*",
-        "magento/module-cms": "104.0.*",
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*",
+        "magento/module-cms": "*",
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\CatalogCmsGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogCustomerGraphQl/composer.json b/app/code/Magento/CatalogCustomerGraphQl/composer.json
index eca6ebb34f5b3..a7c887af0379b 100644
--- a/app/code/Magento/CatalogCustomerGraphQl/composer.json
+++ b/app/code/Magento/CatalogCustomerGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "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.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-customer": "*",
+        "magento/module-catalog-graph-ql": "*",
+        "magento/module-store": "*"
     },
     "license": [
         "OSL-3.0",
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\CatalogCustomerGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogGraphQl/composer.json b/app/code/Magento/CatalogGraphQl/composer.json
index ba8a843dfc8e9..d6e9bfa3c0505 100644
--- a/app/code/Magento/CatalogGraphQl/composer.json
+++ b/app/code/Magento/CatalogGraphQl/composer.json
@@ -4,19 +4,19 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-eav": "102.1.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-catalog-inventory": "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-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": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*",
-        "magento/module-graph-ql-cache": "100.4.*",
-        "magento/module-store-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*",
+        "magento/module-graph-ql-cache": "*",
+        "magento/module-store-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\CatalogGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json
index f95f9109bb931..92a6620827990 100644
--- a/app/code/Magento/CatalogImportExport/composer.json
+++ b/app/code/Magento/CatalogImportExport/composer.json
@@ -7,17 +7,17 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "ext-ctype": "*",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -31,6 +31,5 @@
         "psr-4": {
             "Magento\\CatalogImportExport\\": ""
         }
-    },
-    "version": "101.1.0"
+    }
 }
diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json
index 4ad28b4988aeb..b810e6613aebb 100644
--- a/app/code/Magento/CatalogInventory/composer.json
+++ b/app/code/Magento/CatalogInventory/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-config": "*",
+        "magento/module-customer": "*",
+        "magento/module-eav": "*",
+        "magento/module-quote": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -28,6 +28,5 @@
             "Magento\\CatalogInventory\\": ""
         }
     },
-    "abandoned": "magento/inventory-composer-metapackage",
-    "version": "100.4.0"
+    "abandoned": "magento/inventory-composer-metapackage"
 }
diff --git a/app/code/Magento/CatalogInventoryGraphQl/composer.json b/app/code/Magento/CatalogInventoryGraphQl/composer.json
index b042cf3eb076f..d6d5b01091341 100644
--- a/app/code/Magento/CatalogInventoryGraphQl/composer.json
+++ b/app/code/Magento/CatalogInventoryGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "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.*"
+        "magento/framework": "*",
+        "magento/module-store": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-inventory": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\CatalogInventoryGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json
index be32b3ae95375..7c40ca8a9a33a 100644
--- a/app/code/Magento/CatalogRule/composer.json
+++ b/app/code/Magento/CatalogRule/composer.json
@@ -6,18 +6,18 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-customer": "*",
+        "magento/module-eav": "*",
+        "magento/module-rule": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "suggest": {
-        "magento/module-import-export": "101.0.*",
-        "magento/module-catalog-rule-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-import-export": "*",
+        "magento/module-catalog-rule-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -31,6 +31,5 @@
         "psr-4": {
             "Magento\\CatalogRule\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/CatalogRuleConfigurable/composer.json b/app/code/Magento/CatalogRuleConfigurable/composer.json
index 0048ace2cac55..19274fbae146f 100644
--- a/app/code/Magento/CatalogRuleConfigurable/composer.json
+++ b/app/code/Magento/CatalogRuleConfigurable/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "magento/magento-composer-installer": "*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-catalog-rule": "101.2.*",
-        "magento/module-configurable-product": "100.4.*"
+        "magento/module-catalog": "*",
+        "magento/module-catalog-rule": "*",
+        "magento/module-configurable-product": "*"
     },
     "suggest": {
-        "magento/module-catalog-rule": "101.2.*"
+        "magento/module-catalog-rule": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\CatalogRuleConfigurable\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogRuleGraphQl/composer.json b/app/code/Magento/CatalogRuleGraphQl/composer.json
index 05f4b08b1f39f..c82d9bb20ddab 100644
--- a/app/code/Magento/CatalogRuleGraphQl/composer.json
+++ b/app/code/Magento/CatalogRuleGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-catalog-rule": "101.2.*"
+        "magento/module-catalog-rule": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\CatalogRuleGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json
index c962d07b4825a..1efece402fd84 100644
--- a/app/code/Magento/CatalogSearch/composer.json
+++ b/app/code/Magento/CatalogSearch/composer.json
@@ -6,21 +6,21 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -34,6 +34,5 @@
         "psr-4": {
             "Magento\\CatalogSearch\\": ""
         }
-    },
-    "version": "102.0.0"
+    }
 }
diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json
index 224cbae6e0dff..fe489bcf0a3a0 100644
--- a/app/code/Magento/CatalogUrlRewrite/composer.json
+++ b/app/code/Magento/CatalogUrlRewrite/composer.json
@@ -6,18 +6,18 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-webapi": "100.4.*"
+        "magento/module-webapi": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -31,6 +31,5 @@
         "psr-4": {
             "Magento\\CatalogUrlRewrite\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json
index 2871803f795c7..3b64d51b85568 100644
--- a/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json
+++ b/app/code/Magento/CatalogUrlRewriteGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-store": "101.1.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/framework": "103.0.*"
+        "magento/module-store": "*",
+        "magento/module-catalog": "*",
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-catalog-url-rewrite": "100.4.*",
-        "magento/module-catalog-graph-ql": "100.4.*",
-        "magento/module-url-rewrite-graph-ql": "100.4.*"
+        "magento/module-catalog-url-rewrite": "*",
+        "magento/module-catalog-graph-ql": "*",
+        "magento/module-url-rewrite-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\CatalogUrlRewriteGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CatalogWidget/composer.json b/app/code/Magento/CatalogWidget/composer.json
index b13b562084614..305fb3ec47ad6 100644
--- a/app/code/Magento/CatalogWidget/composer.json
+++ b/app/code/Magento/CatalogWidget/composer.json
@@ -6,16 +6,16 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\CatalogWidget\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json
index e976fbc08267f..2b4fce7dc011a 100644
--- a/app/code/Magento/Checkout/composer.json
+++ b/app/code/Magento/Checkout/composer.json
@@ -6,28 +6,28 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "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-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-captcha": "100.4.*"
+        "magento/framework": "*",
+        "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-shipping": "*",
+        "magento/module-store": "*",
+        "magento/module-tax": "*",
+        "magento/module-theme": "*",
+        "magento/module-ui": "*",
+        "magento/module-captcha": "*"
     },
     "suggest": {
-        "magento/module-cookie": "100.4.*"
+        "magento/module-cookie": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -41,6 +41,5 @@
         "psr-4": {
             "Magento\\Checkout\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json
index 3028ac24b4cee..1741de53e8637 100644
--- a/app/code/Magento/CheckoutAgreements/composer.json
+++ b/app/code/Magento/CheckoutAgreements/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-checkout": "100.4.*",
-        "magento/module-quote": "101.2.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-checkout": "*",
+        "magento/module-quote": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\CheckoutAgreements\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json
index aa1592d4c3378..26b80a4457b4a 100644
--- a/app/code/Magento/CheckoutAgreementsGraphQl/composer.json
+++ b/app/code/Magento/CheckoutAgreementsGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-checkout-agreements": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-store": "*",
+        "magento/module-checkout-agreements": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\CheckoutAgreementsGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json
index b47f5bc803048..8d69320102b5e 100644
--- a/app/code/Magento/Cms/composer.json
+++ b/app/code/Magento/Cms/composer.json
@@ -6,19 +6,19 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-cms-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-cms-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -32,6 +32,5 @@
         "psr-4": {
             "Magento\\Cms\\": ""
         }
-    },
-    "version": "104.0.0"
+    }
 }
diff --git a/app/code/Magento/CmsGraphQl/composer.json b/app/code/Magento/CmsGraphQl/composer.json
index 22c1ad7f7c2f0..0e4c849fe8344 100644
--- a/app/code/Magento/CmsGraphQl/composer.json
+++ b/app/code/Magento/CmsGraphQl/composer.json
@@ -4,15 +4,15 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-cms": "104.0.*",
-        "magento/module-widget": "101.2.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-cms": "*",
+        "magento/module-widget": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*",
-        "magento/module-graph-ql-cache": "100.4.*",
-        "magento/module-store-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*",
+        "magento/module-graph-ql-cache": "*",
+        "magento/module-store-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\CmsGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json
index 6f6a3f5916944..80e150771975f 100644
--- a/app/code/Magento/CmsUrlRewrite/composer.json
+++ b/app/code/Magento/CmsUrlRewrite/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-cms": "104.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-url-rewrite": "102.0.*"
+        "magento/framework": "*",
+        "magento/module-cms": "*",
+        "magento/module-store": "*",
+        "magento/module-url-rewrite": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\CmsUrlRewrite\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json
index 13d16d49f7a44..d8fbbb4c2e6fd 100644
--- a/app/code/Magento/CmsUrlRewriteGraphQl/composer.json
+++ b/app/code/Magento/CmsUrlRewriteGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-cms": "104.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-url-rewrite-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-cms": "*",
+        "magento/module-store": "*",
+        "magento/module-url-rewrite-graph-ql": "*"
     },
     "suggest": {
-        "magento/module-cms-url-rewrite": "100.4.*",
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-cms-url-rewrite": "*",
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\CmsUrlRewriteGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Config/composer.json b/app/code/Magento/Config/composer.json
index b3ea162b34a4a..63eca42a6ac48 100644
--- a/app/code/Magento/Config/composer.json
+++ b/app/code/Magento/Config/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-cron": "*",
+        "magento/module-deploy": "*",
+        "magento/module-directory": "*",
+        "magento/module-email": "*",
+        "magento/module-media-storage": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\Config\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json
index 707b02f1396e7..e27510166a421 100644
--- a/app/code/Magento/ConfigurableImportExport/composer.json
+++ b/app/code/Magento/ConfigurableImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-import-export": "*",
+        "magento/module-configurable-product": "*",
+        "magento/module-eav": "*",
+        "magento/module-import-export": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\ConfigurableImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json
index 6b61f490707bb..7b1b1a18416f5 100644
--- a/app/code/Magento/ConfigurableProduct/composer.json
+++ b/app/code/Magento/ConfigurableProduct/composer.json
@@ -6,27 +6,27 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -40,6 +40,5 @@
         "psr-4": {
             "Magento\\ConfigurableProduct\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ConfigurableProductGraphQl/composer.json b/app/code/Magento/ConfigurableProductGraphQl/composer.json
index a69eace085a9f..76ec4ad3153e2 100644
--- a/app/code/Magento/ConfigurableProductGraphQl/composer.json
+++ b/app/code/Magento/ConfigurableProductGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-configurable-product": "100.4.*",
-        "magento/module-catalog-graph-ql": "100.4.*",
-        "magento/module-quote": "101.2.*",
-        "magento/module-quote-graph-ql": "100.4.*",
-        "magento/framework": "103.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",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\ConfigurableProductGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ConfigurableProductSales/composer.json b/app/code/Magento/ConfigurableProductSales/composer.json
index 2ae309e0ecf23..edac2b7782dcc 100644
--- a/app/code/Magento/ConfigurableProductSales/composer.json
+++ b/app/code/Magento/ConfigurableProductSales/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-sales": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-sales": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-configurable-product": "100.4.*"
+        "magento/module-configurable-product": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\ConfigurableProductSales\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json
index 93e6274919a81..1600c1e0c2543 100644
--- a/app/code/Magento/Contact/composer.json
+++ b/app/code/Magento/Contact/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-cms": "104.0.*",
-        "magento/module-config": "101.2.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-cms": "*",
+        "magento/module-config": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Contact\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Cookie/composer.json b/app/code/Magento/Cookie/composer.json
index 075bd5a23f847..5a47a5c7993bf 100644
--- a/app/code/Magento/Cookie/composer.json
+++ b/app/code/Magento/Cookie/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-backend": "102.0.*"
+        "magento/module-backend": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Cookie\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json
index bd2c0d4551a9b..00da35140744b 100644
--- a/app/code/Magento/Cron/composer.json
+++ b/app/code/Magento/Cron/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Cron\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Csp/composer.json b/app/code/Magento/Csp/composer.json
index 759819a637c4a..352735712b1b0 100644
--- a/app/code/Magento/Csp/composer.json
+++ b/app/code/Magento/Csp/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\Csp\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json
index 016207fd9ea9a..746cfa0ed033d 100644
--- a/app/code/Magento/CurrencySymbol/composer.json
+++ b/app/code/Magento/CurrencySymbol/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-config": "*",
+        "magento/module-directory": "*",
+        "magento/module-page-cache": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\CurrencySymbol\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json
index ce8dd3d6c0bf9..db3108a78e9aa 100644
--- a/app/code/Magento/Customer/composer.json
+++ b/app/code/Magento/Customer/composer.json
@@ -6,29 +6,29 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-cookie": "100.4.*",
-        "magento/module-customer-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-cookie": "*",
+        "magento/module-customer-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -42,6 +42,5 @@
         "psr-4": {
             "Magento\\Customer\\": ""
         }
-    },
-    "version": "103.0.0"
+    }
 }
diff --git a/app/code/Magento/CustomerAnalytics/composer.json b/app/code/Magento/CustomerAnalytics/composer.json
index 4d9ce2a9a38de..abd9e93d89583 100644
--- a/app/code/Magento/CustomerAnalytics/composer.json
+++ b/app/code/Magento/CustomerAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-analytics": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-customer": "*",
+        "magento/module-analytics": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\CustomerAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CustomerDownloadableGraphQl/composer.json b/app/code/Magento/CustomerDownloadableGraphQl/composer.json
index 4cb2b10e5f25c..f7cdbb0dc86d6 100644
--- a/app/code/Magento/CustomerDownloadableGraphQl/composer.json
+++ b/app/code/Magento/CustomerDownloadableGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-downloadable-graph-ql": "100.4.*",
-        "magento/module-graph-ql": "100.4.*",
-        "magento/framework": "103.0.*"
+        "magento/module-downloadable-graph-ql": "*",
+        "magento/module-graph-ql": "*",
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\CustomerDownloadableGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CustomerGraphQl/composer.json b/app/code/Magento/CustomerGraphQl/composer.json
index 8ae74e5cf803d..2ec396ca8ee92 100644
--- a/app/code/Magento/CustomerGraphQl/composer.json
+++ b/app/code/Magento/CustomerGraphQl/composer.json
@@ -4,15 +4,15 @@
     "type": "magento2-module",
     "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.*"
+        "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",
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\CustomerGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json
index 46a69480b7f71..8104ea01875a6 100644
--- a/app/code/Magento/CustomerImportExport/composer.json
+++ b/app/code/Magento/CustomerImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-customer": "*",
+        "magento/module-directory": "*",
+        "magento/module-eav": "*",
+        "magento/module-import-export": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\CustomerImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Deploy/composer.json b/app/code/Magento/Deploy/composer.json
index 2fe81eb47dc24..d8668dbb84874 100644
--- a/app/code/Magento/Deploy/composer.json
+++ b/app/code/Magento/Deploy/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-config": "*",
+        "magento/module-require-js": "*",
+        "magento/module-store": "*",
+        "magento/module-user": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\Deploy\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Developer/composer.json b/app/code/Magento/Developer/composer.json
index ef65ea9e163f1..c5c949ec45f62 100644
--- a/app/code/Magento/Developer/composer.json
+++ b/app/code/Magento/Developer/composer.json
@@ -6,9 +6,9 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-config": "101.2.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-config": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\Developer\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json
index 85ec969695e81..d81ae0d7b4969 100644
--- a/app/code/Magento/Dhl/composer.json
+++ b/app/code/Magento/Dhl/composer.json
@@ -7,19 +7,19 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-checkout": "100.4.*"
+        "magento/module-checkout": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -33,6 +33,5 @@
         "psr-4": {
             "Magento\\Dhl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json
index bb3b89c00b579..e3646d38fe64d 100644
--- a/app/code/Magento/Directory/composer.json
+++ b/app/code/Magento/Directory/composer.json
@@ -7,10 +7,10 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-config": "101.2.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-config": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Directory\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/DirectoryGraphQl/composer.json b/app/code/Magento/DirectoryGraphQl/composer.json
index 946ba097e9a11..ef473e1c43b94 100644
--- a/app/code/Magento/DirectoryGraphQl/composer.json
+++ b/app/code/Magento/DirectoryGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "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.*"
+        "magento/module-directory": "*",
+        "magento/module-store": "*",
+        "magento/module-graph-ql": "*",
+        "magento/framework": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\DirectoryGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json
index ad42097868b74..992bdbd1e263c 100644
--- a/app/code/Magento/Downloadable/composer.json
+++ b/app/code/Magento/Downloadable/composer.json
@@ -6,26 +6,26 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-downloadable-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-downloadable-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -39,6 +39,5 @@
         "psr-4": {
             "Magento\\Downloadable\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/DownloadableGraphQl/composer.json b/app/code/Magento/DownloadableGraphQl/composer.json
index 80bc7fa08694c..185a50f77cc15 100644
--- a/app/code/Magento/DownloadableGraphQl/composer.json
+++ b/app/code/Magento/DownloadableGraphQl/composer.json
@@ -4,14 +4,14 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-downloadable": "100.4.*",
-        "magento/module-quote": "101.2.*",
-        "magento/module-quote-graph-ql": "100.4.*",
-        "magento/framework": "103.0.*"
+        "magento/module-catalog": "*",
+        "magento/module-downloadable": "*",
+        "magento/module-quote": "*",
+        "magento/module-quote-graph-ql": "*",
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\DownloadableGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/DownloadableImportExport/composer.json b/app/code/Magento/DownloadableImportExport/composer.json
index 1a926bc97fcc9..6dd7043fc02a9 100644
--- a/app/code/Magento/DownloadableImportExport/composer.json
+++ b/app/code/Magento/DownloadableImportExport/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-import-export": "*",
+        "magento/module-downloadable": "*",
+        "magento/module-eav": "*",
+        "magento/module-import-export": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\DownloadableImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json
index 56e75d533b29f..5636b0d05841c 100644
--- a/app/code/Magento/Eav/composer.json
+++ b/app/code/Magento/Eav/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-config": "*",
+        "magento/module-media-storage": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\Eav\\": ""
         }
-    },
-    "version": "102.1.0"
+    }
 }
diff --git a/app/code/Magento/EavGraphQl/composer.json b/app/code/Magento/EavGraphQl/composer.json
index 29a6d4fbb7187..ba4138f67cf62 100644
--- a/app/code/Magento/EavGraphQl/composer.json
+++ b/app/code/Magento/EavGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-eav": "102.1.*"
+        "magento/framework": "*",
+        "magento/module-eav": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\EavGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Elasticsearch/composer.json b/app/code/Magento/Elasticsearch/composer.json
index 21ff9ca3b1aa1..b79ae7bc5cc47 100644
--- a/app/code/Magento/Elasticsearch/composer.json
+++ b/app/code/Magento/Elasticsearch/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*",
+        "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": "*",
         "elasticsearch/elasticsearch": "~7.7.0"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\Elasticsearch\\": ""
         }
-    },
-    "version": "101.0.0"
+    }
 }
diff --git a/app/code/Magento/Elasticsearch6/composer.json b/app/code/Magento/Elasticsearch6/composer.json
index 0bcfee63b80f9..1ee92c0b0a3b3 100644
--- a/app/code/Magento/Elasticsearch6/composer.json
+++ b/app/code/Magento/Elasticsearch6/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*",
+        "magento/framework": "*",
+        "magento/module-advanced-search": "*",
+        "magento/module-catalog-search": "*",
+        "magento/module-search": "*",
+        "magento/module-elasticsearch": "*",
         "elasticsearch/elasticsearch": "~7.7.0"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\Elasticsearch6\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Elasticsearch7/composer.json b/app/code/Magento/Elasticsearch7/composer.json
index 03aeedafe7b60..1e59ceaebaf84 100644
--- a/app/code/Magento/Elasticsearch7/composer.json
+++ b/app/code/Magento/Elasticsearch7/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-elasticsearch": "101.0.*",
+        "magento/framework": "*",
+        "magento/module-elasticsearch": "*",
         "elasticsearch/elasticsearch": "~7.7.0",
-        "magento/module-advanced-search": "100.4.*",
-        "magento/module-catalog-search": "102.0.*"
+        "magento/module-advanced-search": "*",
+        "magento/module-catalog-search": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*",
-        "magento/module-search": "101.1.*"
+        "magento/module-config": "*",
+        "magento/module-search": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\Elasticsearch7\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json
index faa72bacc8b80..334bbcf9d4617 100644
--- a/app/code/Magento/Email/composer.json
+++ b/app/code/Magento/Email/composer.json
@@ -6,19 +6,19 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-theme": "101.1.*"
+        "magento/module-theme": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -32,6 +32,5 @@
         "psr-4": {
             "Magento\\Email\\": ""
         }
-    },
-    "version": "101.1.0"
+    }
 }
diff --git a/app/code/Magento/EncryptionKey/composer.json b/app/code/Magento/EncryptionKey/composer.json
index ef05a0dfaad14..6677a5b181f83 100644
--- a/app/code/Magento/EncryptionKey/composer.json
+++ b/app/code/Magento/EncryptionKey/composer.json
@@ -6,9 +6,9 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-config": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\EncryptionKey\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json
index 97a1759102cf6..575311e148457 100644
--- a/app/code/Magento/Fedex/composer.json
+++ b/app/code/Magento/Fedex/composer.json
@@ -7,15 +7,15 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\Fedex\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json
index f6af0767a4cf8..cdf0533c3270d 100644
--- a/app/code/Magento/GiftMessage/composer.json
+++ b/app/code/Magento/GiftMessage/composer.json
@@ -6,19 +6,19 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-eav": "102.1.*",
-        "magento/module-multishipping": "100.4.*"
+        "magento/module-eav": "*",
+        "magento/module-multishipping": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -32,6 +32,5 @@
         "psr-4": {
             "Magento\\GiftMessage\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json
index 98af74380cae9..a37470115584f 100644
--- a/app/code/Magento/GoogleAdwords/composer.json
+++ b/app/code/Magento/GoogleAdwords/composer.json
@@ -6,9 +6,9 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-sales": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-sales": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\GoogleAdwords\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json
index ebae982ac3cf9..64d210c4f4811 100644
--- a/app/code/Magento/GoogleAnalytics/composer.json
+++ b/app/code/Magento/GoogleAnalytics/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-cookie": "100.4.*",
-        "magento/module-sales": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-cookie": "*",
+        "magento/module-sales": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\GoogleAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json
index 9938a1409c5f2..426526a922ec8 100644
--- a/app/code/Magento/GoogleOptimizer/composer.json
+++ b/app/code/Magento/GoogleOptimizer/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-cms": "*",
+        "magento/module-google-analytics": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\GoogleOptimizer\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GraphQl/composer.json b/app/code/Magento/GraphQl/composer.json
index e52cfcb8f7332..904d41c97953e 100644
--- a/app/code/Magento/GraphQl/composer.json
+++ b/app/code/Magento/GraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-eav": "102.1.*",
-        "magento/framework": "103.0.*"
+        "magento/module-eav": "*",
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-webapi": "100.4.*",
-        "magento/module-graph-ql-cache": "100.4.*"
+        "magento/module-webapi": "*",
+        "magento/module-graph-ql-cache": "*"
     },
     "license": [
         "OSL-3.0",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\GraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GraphQlCache/composer.json b/app/code/Magento/GraphQlCache/composer.json
index 7edc82471b181..4cfdd0c4f660a 100644
--- a/app/code/Magento/GraphQlCache/composer.json
+++ b/app/code/Magento/GraphQlCache/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-page-cache": "100.4.*",
-        "magento/module-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-page-cache": "*",
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\GraphQlCache\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GroupedCatalogInventory/composer.json b/app/code/Magento/GroupedCatalogInventory/composer.json
index db81d649ede37..0d91d939494a8 100644
--- a/app/code/Magento/GroupedCatalogInventory/composer.json
+++ b/app/code/Magento/GroupedCatalogInventory/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-catalog-inventory": "100.4.*",
-        "magento/module-grouped-product": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-inventory": "*",
+        "magento/module-grouped-product": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\GroupedCatalogInventory\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json
index 527df378c3265..8806058c2bfc8 100644
--- a/app/code/Magento/GroupedImportExport/composer.json
+++ b/app/code/Magento/GroupedImportExport/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-import-export": "*",
+        "magento/module-eav": "*",
+        "magento/module-grouped-product": "*",
+        "magento/module-import-export": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\GroupedImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json
index b135e1fdaa254..554b0c239c8fb 100644
--- a/app/code/Magento/GroupedProduct/composer.json
+++ b/app/code/Magento/GroupedProduct/composer.json
@@ -6,23 +6,23 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-grouped-product-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-grouped-product-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -36,6 +36,5 @@
         "psr-4": {
             "Magento\\GroupedProduct\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/GroupedProductGraphQl/composer.json b/app/code/Magento/GroupedProductGraphQl/composer.json
index e8d1400736077..5784acb5f5d04 100644
--- a/app/code/Magento/GroupedProductGraphQl/composer.json
+++ b/app/code/Magento/GroupedProductGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "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.*"
+        "magento/module-grouped-product": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-graph-ql": "*",
+        "magento/framework": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\GroupedProductGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json
index 17ae89a722a91..3be5c03dc2828 100644
--- a/app/code/Magento/ImportExport/composer.json
+++ b/app/code/Magento/ImportExport/composer.json
@@ -7,13 +7,13 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "ext-ctype": "*",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-eav": "*",
+        "magento/module-media-storage": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\ImportExport\\": ""
         }
-    },
-    "version": "101.0.0"
+    }
 }
diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json
index 73b5625e1cd3d..07d652e9fa2b5 100644
--- a/app/code/Magento/Indexer/composer.json
+++ b/app/code/Magento/Indexer/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\Indexer\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/InstantPurchase/composer.json b/app/code/Magento/InstantPurchase/composer.json
index 90a18e86c853d..0807926b755a0 100644
--- a/app/code/Magento/InstantPurchase/composer.json
+++ b/app/code/Magento/InstantPurchase/composer.json
@@ -8,14 +8,14 @@
     ],
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/module-store": "*",
+        "magento/module-catalog": "*",
+        "magento/module-customer": "*",
+        "magento/module-sales": "*",
+        "magento/module-shipping": "*",
+        "magento/module-quote": "*",
+        "magento/module-vault": "*",
+        "magento/framework": "*"
     },
     "autoload": {
         "files": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\InstantPurchase\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json
index 4e5f9615924ab..c85e84284b43f 100644
--- a/app/code/Magento/Integration/composer.json
+++ b/app/code/Magento/Integration/composer.json
@@ -6,14 +6,14 @@
     },
     "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-security": "100.4.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-user": "101.2.*",
-        "magento/module-ui": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-authorization": "*",
+        "magento/module-backend": "*",
+        "magento/module-customer": "*",
+        "magento/module-security": "*",
+        "magento/module-store": "*",
+        "magento/module-user": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\Integration\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json
index 5f214d02c9258..fa3c90dbbd774 100644
--- a/app/code/Magento/LayeredNavigation/composer.json
+++ b/app/code/Magento/LayeredNavigation/composer.json
@@ -6,9 +6,9 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-config": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\LayeredNavigation\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomer/composer.json b/app/code/Magento/LoginAsCustomer/composer.json
index 62e30db212828..ec81374528e7b 100755
--- a/app/code/Magento/LoginAsCustomer/composer.json
+++ b/app/code/Magento/LoginAsCustomer/composer.json
@@ -3,12 +3,12 @@
     "description": "Allow for admin to enter a customer account",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-login-as-customer-api": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-customer": "*",
+        "magento/module-login-as-customer-api": "*"
     },
     "suggest": {
-        "magento/module-backend": "102.0.*"
+        "magento/module-backend": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -16,12 +16,9 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [
-            "registration.php"
-        ],
+        "files": [ "registration.php" ],
         "psr-4": {
             "Magento\\LoginAsCustomer\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerAdminUi/composer.json b/app/code/Magento/LoginAsCustomerAdminUi/composer.json
index 16ed6072554d2..8bbe0e2bd6c9e 100644
--- a/app/code/Magento/LoginAsCustomerAdminUi/composer.json
+++ b/app/code/Magento/LoginAsCustomerAdminUi/composer.json
@@ -3,15 +3,15 @@
     "description": "",
     "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-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-login-as-customer-api": "*",
+        "magento/module-login-as-customer-frontend-ui": "*",
+        "magento/module-backend": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-login-as-customer": "100.4.*"
+        "magento/module-login-as-customer": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,12 +19,9 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [
-            "registration.php"
-        ],
+        "files": [ "registration.php" ],
         "psr-4": {
             "Magento\\LoginAsCustomerAdminUi\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerApi/composer.json b/app/code/Magento/LoginAsCustomerApi/composer.json
index b9f3db0559462..b48319b61398f 100644
--- a/app/code/Magento/LoginAsCustomerApi/composer.json
+++ b/app/code/Magento/LoginAsCustomerApi/composer.json
@@ -3,7 +3,7 @@
     "description": "Allow for admin to enter a customer account",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -11,12 +11,9 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [
-            "registration.php"
-        ],
+        "files": [ "registration.php" ],
         "psr-4": {
             "Magento\\LoginAsCustomerApi\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json
index 600f34c843a23..279d8ae3ec79e 100644
--- a/app/code/Magento/LoginAsCustomerFrontendUi/composer.json
+++ b/app/code/Magento/LoginAsCustomerFrontendUi/composer.json
@@ -3,10 +3,10 @@
     "description": "",
     "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.*"
+        "magento/framework": "*",
+        "magento/module-login-as-customer-api": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -14,12 +14,9 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [
-            "registration.php"
-        ],
+        "files": [ "registration.php" ],
         "psr-4": {
             "Magento\\LoginAsCustomerFrontendUi\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerLog/composer.json b/app/code/Magento/LoginAsCustomerLog/composer.json
index 3939888226045..cf888f8cb1a59 100644
--- a/app/code/Magento/LoginAsCustomerLog/composer.json
+++ b/app/code/Magento/LoginAsCustomerLog/composer.json
@@ -3,15 +3,15 @@
     "description": "",
     "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.*"
+        "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": "100.4.*"
+        "magento/module-login-as-customer": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,12 +19,9 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [
-            "registration.php"
-        ],
+        "files": [ "registration.php" ],
         "psr-4": {
             "Magento\\LoginAsCustomerLog\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerPageCache/composer.json b/app/code/Magento/LoginAsCustomerPageCache/composer.json
index 99ac2aacb05d8..195a08fc19d83 100644
--- a/app/code/Magento/LoginAsCustomerPageCache/composer.json
+++ b/app/code/Magento/LoginAsCustomerPageCache/composer.json
@@ -3,12 +3,12 @@
     "description": "",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-page-cache": "100.4.*"
+        "magento/module-page-cache": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -16,12 +16,9 @@
         "AFL-3.0"
     ],
     "autoload": {
-        "files": [
-            "registration.php"
-        ],
+        "files": [ "registration.php" ],
         "psr-4": {
             "Magento\\LoginAsCustomerPageCache\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerQuote/composer.json b/app/code/Magento/LoginAsCustomerQuote/composer.json
index c8d7d6d8006e7..556ffc0d3be43 100644
--- a/app/code/Magento/LoginAsCustomerQuote/composer.json
+++ b/app/code/Magento/LoginAsCustomerQuote/composer.json
@@ -3,13 +3,13 @@
     "description": "",
     "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.*"
+        "magento/framework": "*",
+        "magento/module-checkout": "*",
+        "magento/module-customer": "*",
+        "magento/module-quote": "*"
     },
     "suggest": {
-        "magento/module-login-as-customer-api": "100.4.*"
+        "magento/module-login-as-customer-api": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\LoginAsCustomerQuote\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/LoginAsCustomerSales/composer.json b/app/code/Magento/LoginAsCustomerSales/composer.json
index 58a57d9f3ac71..3965e8acf87d8 100644
--- a/app/code/Magento/LoginAsCustomerSales/composer.json
+++ b/app/code/Magento/LoginAsCustomerSales/composer.json
@@ -3,13 +3,13 @@
     "description": "",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-user": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-customer": "*",
+        "magento/module-user": "*"
     },
     "suggest": {
-        "magento/module-sales": "103.0.*"
+        "magento/module-sales": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\LoginAsCustomerSales\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Marketplace/composer.json b/app/code/Magento/Marketplace/composer.json
index 94827e2e2dd92..42bbcf151a17b 100644
--- a/app/code/Magento/Marketplace/composer.json
+++ b/app/code/Magento/Marketplace/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\Marketplace\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaContent/composer.json b/app/code/Magento/MediaContent/composer.json
index 253ca2d50be1b..4dc2b3eba0f68 100644
--- a/app/code/Magento/MediaContent/composer.json
+++ b/app/code/Magento/MediaContent/composer.json
@@ -3,9 +3,9 @@
     "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": "103.0.*",
-        "magento/module-media-content-api": "100.4.*",
-        "magento/module-media-gallery-api": "101.0.*"
+        "magento/framework": "*",
+        "magento/module-media-content-api": "*",
+        "magento/module-media-gallery-api": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\MediaContent\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaContentApi/composer.json b/app/code/Magento/MediaContentApi/composer.json
index 35a6ea8034d73..fd1f2f9a0f265 100644
--- a/app/code/Magento/MediaContentApi/composer.json
+++ b/app/code/Magento/MediaContentApi/composer.json
@@ -3,8 +3,8 @@
     "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": "101.0.*",
-        "magento/framework": "103.0.*"
+        "magento/module-media-gallery-api": "*",
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -18,6 +18,5 @@
         "psr-4": {
             "Magento\\MediaContentApi\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaContentCatalog/composer.json b/app/code/Magento/MediaContentCatalog/composer.json
index 042d7dd0c4ec0..21e23e6b18bdc 100644
--- a/app/code/Magento/MediaContentCatalog/composer.json
+++ b/app/code/Magento/MediaContentCatalog/composer.json
@@ -3,10 +3,10 @@
     "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": "100.4.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-eav": "102.1.*",
-        "magento/framework": "103.0.*"
+        "magento/module-media-content-api": "*",
+        "magento/module-catalog": "*",
+        "magento/module-eav": "*",
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\MediaContentCatalog\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaContentCms/composer.json b/app/code/Magento/MediaContentCms/composer.json
index 16880d72c1a92..ea32fdd7a49fa 100644
--- a/app/code/Magento/MediaContentCms/composer.json
+++ b/app/code/Magento/MediaContentCms/composer.json
@@ -3,9 +3,9 @@
     "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": "100.4.*",
-        "magento/module-cms": "104.0.*",
-        "magento/framework": "103.0.*"
+        "magento/module-media-content-api": "*",
+        "magento/module-cms": "*",
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\MediaContentCms\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaGallery/composer.json b/app/code/Magento/MediaGallery/composer.json
index 3664941f59615..d430a174a9738 100644
--- a/app/code/Magento/MediaGallery/composer.json
+++ b/app/code/Magento/MediaGallery/composer.json
@@ -3,9 +3,9 @@
     "description": "Magento module responsible for media handling",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-media-gallery-api": "101.0.*",
-        "magento/module-cms": "104.0.*"
+        "magento/framework": "*",
+        "magento/module-media-gallery-api": "*",
+        "magento/module-cms": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\MediaGallery\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaGalleryApi/composer.json b/app/code/Magento/MediaGalleryApi/composer.json
index 512459328707d..8bea8ee95b55a 100644
--- a/app/code/Magento/MediaGalleryApi/composer.json
+++ b/app/code/Magento/MediaGalleryApi/composer.json
@@ -3,7 +3,7 @@
     "description": "Magento module responsible for media gallery asset attributes storage and management",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -17,6 +17,5 @@
         "psr-4": {
             "Magento\\MediaGalleryApi\\": ""
         }
-    },
-    "version": "101.0.0"
+    }
 }
diff --git a/app/code/Magento/MediaGalleryCatalog/composer.json b/app/code/Magento/MediaGalleryCatalog/composer.json
index c83f6b8b2549f..192d86684aa76 100644
--- a/app/code/Magento/MediaGalleryCatalog/composer.json
+++ b/app/code/Magento/MediaGalleryCatalog/composer.json
@@ -3,9 +3,9 @@
     "description": "Magento module responsible for catalog gallery processor delete operation handling",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-media-gallery-api": "101.0.*",
-        "magento/module-catalog": "104.0.*"
+        "magento/framework": "*",
+        "magento/module-media-gallery-api": "*",
+        "magento/module-catalog": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\MediaGalleryCatalog\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MediaStorage/composer.json b/app/code/Magento/MediaStorage/composer.json
index 390f398b2531c..cb1057febb23e 100644
--- a/app/code/Magento/MediaStorage/composer.json
+++ b/app/code/Magento/MediaStorage/composer.json
@@ -6,15 +6,15 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -28,6 +28,5 @@
         "psr-4": {
             "Magento\\MediaStorage\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MessageQueue/composer.json b/app/code/Magento/MessageQueue/composer.json
index 56ad421b9b824..57603f0a73acc 100644
--- a/app/code/Magento/MessageQueue/composer.json
+++ b/app/code/Magento/MessageQueue/composer.json
@@ -5,8 +5,8 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*",
-        "magento/framework-message-queue": "100.4.*",
+        "magento/framework": "*",
+        "magento/framework-message-queue": "*",
         "magento/magento-composer-installer": "*",
         "php": "~7.3.0||~7.4.0"
     },
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\MessageQueue\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json
index d6a6e4576debf..5c9d2e4cf58fa 100644
--- a/app/code/Magento/Msrp/composer.json
+++ b/app/code/Magento/Msrp/composer.json
@@ -6,16 +6,16 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-downloadable": "*",
+        "magento/module-eav": "*",
+        "magento/module-store": "*",
+        "magento/module-tax": "*"
     },
     "suggest": {
-        "magento/module-bundle": "101.0.*",
-        "magento/module-msrp-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-bundle": "*",
+        "magento/module-msrp-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\Msrp\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MsrpConfigurableProduct/composer.json b/app/code/Magento/MsrpConfigurableProduct/composer.json
index 40ce8895fb0ee..53d274a3c4006 100644
--- a/app/code/Magento/MsrpConfigurableProduct/composer.json
+++ b/app/code/Magento/MsrpConfigurableProduct/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-msrp": "100.4.*",
-        "magento/module-configurable-product": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-msrp": "*",
+        "magento/module-configurable-product": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\MsrpConfigurableProduct\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MsrpGroupedProduct/composer.json b/app/code/Magento/MsrpGroupedProduct/composer.json
index 18f8fa7b2658d..5c426b5910ad7 100644
--- a/app/code/Magento/MsrpGroupedProduct/composer.json
+++ b/app/code/Magento/MsrpGroupedProduct/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-msrp": "100.4.*",
-        "magento/module-grouped-product": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-msrp": "*",
+        "magento/module-grouped-product": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\MsrpGroupedProduct\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json
index e05bce8b3d6be..85f60985fe1b0 100644
--- a/app/code/Magento/Multishipping/composer.json
+++ b/app/code/Magento/Multishipping/composer.json
@@ -6,16 +6,16 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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/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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\Multishipping\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/MysqlMq/composer.json b/app/code/Magento/MysqlMq/composer.json
index bdcde982e27ce..225b3a091a462 100644
--- a/app/code/Magento/MysqlMq/composer.json
+++ b/app/code/Magento/MysqlMq/composer.json
@@ -5,10 +5,10 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*",
-        "magento/framework-message-queue": "100.4.*",
+        "magento/framework": "*",
+        "magento/framework-message-queue": "*",
         "magento/magento-composer-installer": "*",
-        "magento/module-store": "101.1.*",
+        "magento/module-store": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "type": "magento2-module",
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\MysqlMq\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/NewRelicReporting/composer.json b/app/code/Magento/NewRelicReporting/composer.json
index de7153c41455f..ca4c72d5a3aad 100644
--- a/app/code/Magento/NewRelicReporting/composer.json
+++ b/app/code/Magento/NewRelicReporting/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "magento/magento-composer-installer": "*",
-        "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.*"
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-config": "*",
+        "magento/module-configurable-product": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\NewRelicReporting\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json
index 5ca8cda80e8d8..790370c328644 100644
--- a/app/code/Magento/Newsletter/composer.json
+++ b/app/code/Magento/Newsletter/composer.json
@@ -6,16 +6,16 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\Newsletter\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json
index 1a98e9f83cb37..56c7eb2778c48 100644
--- a/app/code/Magento/OfflinePayments/composer.json
+++ b/app/code/Magento/OfflinePayments/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-checkout": "100.4.*",
-        "magento/module-payment": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-checkout": "*",
+        "magento/module-payment": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\OfflinePayments\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json
index be24eb428c588..7cd6f05f8ad1c 100644
--- a/app/code/Magento/OfflineShipping/composer.json
+++ b/app/code/Magento/OfflineShipping/composer.json
@@ -6,20 +6,20 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-checkout": "100.4.*",
-        "magento/module-offline-shipping-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-checkout": "*",
+        "magento/module-offline-shipping-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -33,6 +33,5 @@
         "psr-4": {
             "Magento\\OfflineShipping\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json
index 9dd88e64d572f..506fd54886d92 100644
--- a/app/code/Magento/PageCache/composer.json
+++ b/app/code/Magento/PageCache/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-config": "101.2.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-config": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\PageCache\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json
index 9e0a9c5fb0ca6..72246c5698f80 100644
--- a/app/code/Magento/Payment/composer.json
+++ b/app/code/Magento/Payment/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-checkout": "*",
+        "magento/module-config": "*",
+        "magento/module-directory": "*",
+        "magento/module-quote": "*",
+        "magento/module-sales": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\Payment\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json
index 510afa1852c86..1b35fae2de1bc 100644
--- a/app/code/Magento/Paypal/composer.json
+++ b/app/code/Magento/Paypal/composer.json
@@ -7,26 +7,26 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "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-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.*"
+        "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-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": "*"
     },
     "suggest": {
-        "magento/module-checkout-agreements": "100.4.*"
+        "magento/module-checkout-agreements": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -40,6 +40,5 @@
         "psr-4": {
             "Magento\\Paypal\\": ""
         }
-    },
-    "version": "101.0.0"
+    }
 }
diff --git a/app/code/Magento/PaypalCaptcha/composer.json b/app/code/Magento/PaypalCaptcha/composer.json
index 7d3be0012a6f2..b88eb2f1a552e 100644
--- a/app/code/Magento/PaypalCaptcha/composer.json
+++ b/app/code/Magento/PaypalCaptcha/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-captcha": "100.4.*",
-        "magento/module-checkout": "100.4.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-captcha": "*",
+        "magento/module-checkout": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-paypal": "101.0.*"
+        "magento/module-paypal": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\PaypalCaptcha\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/PaypalGraphQl/composer.json b/app/code/Magento/PaypalGraphQl/composer.json
index e033e6f6994de..8d012be3492dd 100644
--- a/app/code/Magento/PaypalGraphQl/composer.json
+++ b/app/code/Magento/PaypalGraphQl/composer.json
@@ -6,17 +6,17 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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/framework": "*",
+        "magento/module-quote": "*",
+        "magento/module-checkout": "*",
+        "magento/module-paypal": "*",
+        "magento/module-quote-graph-ql": "*",
+        "magento/module-sales": "*",
+        "magento/module-payment": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -30,6 +30,5 @@
         "psr-4": {
             "Magento\\PaypalGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json
index 67916942300a8..68fe5cb47c00e 100644
--- a/app/code/Magento/Persistent/composer.json
+++ b/app/code/Magento/Persistent/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-checkout": "*",
+        "magento/module-cron": "*",
+        "magento/module-customer": "*",
+        "magento/module-page-cache": "*",
+        "magento/module-quote": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\Persistent\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json
index 5c856b6f50341..bfe2a43b373ce 100644
--- a/app/code/Magento/ProductAlert/composer.json
+++ b/app/code/Magento/ProductAlert/composer.json
@@ -6,15 +6,15 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*",
+        "magento/module-theme": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -28,6 +28,5 @@
         "psr-4": {
             "Magento\\ProductAlert\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ProductVideo/composer.json b/app/code/Magento/ProductVideo/composer.json
index d98a21d2eace9..b7268338398a7 100644
--- a/app/code/Magento/ProductVideo/composer.json
+++ b/app/code/Magento/ProductVideo/composer.json
@@ -6,17 +6,17 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "magento/magento-composer-installer": "*",
-        "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-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-eav": "*",
+        "magento/module-media-storage": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-customer": "103.0.*",
-        "magento/module-config": "101.2.*"
+        "magento/module-customer": "*",
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -30,6 +30,5 @@
         "psr-4": {
             "Magento\\ProductVideo\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Quote/composer.json b/app/code/Magento/Quote/composer.json
index 0014b209422bf..31312fae26e78 100644
--- a/app/code/Magento/Quote/composer.json
+++ b/app/code/Magento/Quote/composer.json
@@ -6,24 +6,24 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-webapi": "100.4.*"
+        "magento/module-webapi": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -37,6 +37,5 @@
         "psr-4": {
             "Magento\\Quote\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/QuoteAnalytics/composer.json b/app/code/Magento/QuoteAnalytics/composer.json
index b6b6ac017f180..4bfb7172c4c83 100644
--- a/app/code/Magento/QuoteAnalytics/composer.json
+++ b/app/code/Magento/QuoteAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-quote": "101.2.*",
-        "magento/module-analytics": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-quote": "*",
+        "magento/module-analytics": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\QuoteAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/QuoteGraphQl/composer.json b/app/code/Magento/QuoteGraphQl/composer.json
index 85ee29eebd0cc..0652d39b5f426 100644
--- a/app/code/Magento/QuoteGraphQl/composer.json
+++ b/app/code/Magento/QuoteGraphQl/composer.json
@@ -4,19 +4,19 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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/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": "*"
     },
     "suggest": {
-        "magento/module-graph-ql-cache": "100.4.*"
+        "magento/module-graph-ql-cache": "*"
     },
     "license": [
         "OSL-3.0",
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\QuoteGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/RelatedProductGraphQl/composer.json b/app/code/Magento/RelatedProductGraphQl/composer.json
index 63188b5fd0817..2cb851d56e58e 100644
--- a/app/code/Magento/RelatedProductGraphQl/composer.json
+++ b/app/code/Magento/RelatedProductGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-catalog-graph-ql": "100.4.*",
-        "magento/framework": "103.0.*"
+        "magento/module-catalog": "*",
+        "magento/module-catalog-graph-ql": "*",
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\RelatedProductGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ReleaseNotification/composer.json b/app/code/Magento/ReleaseNotification/composer.json
index 10de55ad63375..c2e347bc66ef0 100644
--- a/app/code/Magento/ReleaseNotification/composer.json
+++ b/app/code/Magento/ReleaseNotification/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/module-user": "101.2.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-ui": "101.2.*",
-        "magento/framework": "103.0.*"
+        "magento/module-user": "*",
+        "magento/module-backend": "*",
+        "magento/module-ui": "*",
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\ReleaseNotification\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json
index 97d6e8a476e03..f1fe6c1e2c83a 100644
--- a/app/code/Magento/Reports/composer.json
+++ b/app/code/Magento/Reports/composer.json
@@ -6,23 +6,23 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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/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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -36,6 +36,5 @@
         "psr-4": {
             "Magento\\Reports\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json
index 1946df38f0af0..9c3b84e88df53 100644
--- a/app/code/Magento/RequireJs/composer.json
+++ b/app/code/Magento/RequireJs/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\RequireJs\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json
index 7be475cb4e96f..5a428ae15fd67 100644
--- a/app/code/Magento/Review/composer.json
+++ b/app/code/Magento/Review/composer.json
@@ -6,19 +6,19 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-cookie": "100.4.*",
-        "magento/module-review-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-cookie": "*",
+        "magento/module-review-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -32,6 +32,5 @@
         "psr-4": {
             "Magento\\Review\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/ReviewAnalytics/composer.json b/app/code/Magento/ReviewAnalytics/composer.json
index 0a18612dba40d..d18ec43a93ac1 100644
--- a/app/code/Magento/ReviewAnalytics/composer.json
+++ b/app/code/Magento/ReviewAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-review": "100.4.*",
-        "magento/module-analytics": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-review": "*",
+        "magento/module-analytics": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\ReviewAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Robots/composer.json b/app/code/Magento/Robots/composer.json
index 775666fa64f6b..2035010b0ce8b 100644
--- a/app/code/Magento/Robots/composer.json
+++ b/app/code/Magento/Robots/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-theme": "101.1.*"
+        "magento/module-theme": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Robots\\": ""
         }
-    },
-    "version": "101.1.0"
+    }
 }
diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json
index f50ef0488081d..bd845acc12f9a 100644
--- a/app/code/Magento/Rss/composer.json
+++ b/app/code/Magento/Rss/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-customer": "103.0.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\Rss\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json
index b516551b5f565..0ab2b6780dcad 100644
--- a/app/code/Magento/Rule/composer.json
+++ b/app/code/Magento/Rule/composer.json
@@ -7,11 +7,11 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-eav": "102.1.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-eav": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\Rule\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json
index d15ecc4aa5a8c..411ad3739d560 100644
--- a/app/code/Magento/Sales/composer.json
+++ b/app/code/Magento/Sales/composer.json
@@ -6,34 +6,34 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-sales-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-sales-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -47,6 +47,5 @@
         "psr-4": {
             "Magento\\Sales\\": ""
         }
-    },
-    "version": "103.0.0"
+    }
 }
diff --git a/app/code/Magento/SalesAnalytics/composer.json b/app/code/Magento/SalesAnalytics/composer.json
index d273a21bfb1f1..ca7926f2d8b5a 100644
--- a/app/code/Magento/SalesAnalytics/composer.json
+++ b/app/code/Magento/SalesAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-sales": "103.0.*",
-        "magento/module-analytics": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-sales": "*",
+        "magento/module-analytics": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\SalesAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SalesGraphQl/composer.json b/app/code/Magento/SalesGraphQl/composer.json
index c5d1c32861797..8e9d95836e189 100644
--- a/app/code/Magento/SalesGraphQl/composer.json
+++ b/app/code/Magento/SalesGraphQl/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-sales": "103.0.*",
-        "magento/module-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-sales": "*",
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\SalesGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SalesInventory/composer.json b/app/code/Magento/SalesInventory/composer.json
index b3610ac242469..6a91b04a7c0d9 100644
--- a/app/code/Magento/SalesInventory/composer.json
+++ b/app/code/Magento/SalesInventory/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-catalog-inventory": "*",
+        "magento/module-sales": "*",
+        "magento/module-store": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\SalesInventory\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json
index 40b42fcd1193b..572e191093275 100644
--- a/app/code/Magento/SalesRule/composer.json
+++ b/app/code/Magento/SalesRule/composer.json
@@ -6,29 +6,29 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.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/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": "*"
     },
     "suggest": {
-        "magento/module-sales-rule-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-sales-rule-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -42,6 +42,5 @@
         "psr-4": {
             "Magento\\SalesRule\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/SalesSequence/composer.json b/app/code/Magento/SalesSequence/composer.json
index 666fb0b39a1e2..a0f9cb45cafc8 100644
--- a/app/code/Magento/SalesSequence/composer.json
+++ b/app/code/Magento/SalesSequence/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\SalesSequence\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SampleData/composer.json b/app/code/Magento/SampleData/composer.json
index 175b0e15d1f04..30efc94bc9274 100644
--- a/app/code/Magento/SampleData/composer.json
+++ b/app/code/Magento/SampleData/composer.json
@@ -6,10 +6,10 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/sample-data-media": "Sample Data version: 100.4.*"
+        "magento/sample-data-media": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\SampleData\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json
index 6ed6b07e49214..3df1dc5935ad8 100644
--- a/app/code/Magento/Search/composer.json
+++ b/app/code/Magento/Search/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog-search": "*",
+        "magento/module-reports": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\Search\\": ""
         }
-    },
-    "version": "101.1.0"
+    }
 }
diff --git a/app/code/Magento/Security/composer.json b/app/code/Magento/Security/composer.json
index 9e2388e26d72c..4978f0c628f96 100644
--- a/app/code/Magento/Security/composer.json
+++ b/app/code/Magento/Security/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-user": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-store": "*",
+        "magento/module-user": "*"
     },
     "suggest": {
-        "magento/module-customer": "103.0.*"
+        "magento/module-customer": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\Security\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SendFriend/composer.json b/app/code/Magento/SendFriend/composer.json
index 444401c5ef64a..17c908ab33e3e 100644
--- a/app/code/Magento/SendFriend/composer.json
+++ b/app/code/Magento/SendFriend/composer.json
@@ -6,13 +6,13 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-customer": "*",
+        "magento/module-store": "*",
+        "magento/module-captcha": "*",
+        "magento/module-authorization": "*",
+        "magento/module-theme": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -26,6 +26,5 @@
         "psr-4": {
             "Magento\\SendFriend\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SendFriendGraphQl/composer.json b/app/code/Magento/SendFriendGraphQl/composer.json
index 582bea663947e..456780c1c1841 100644
--- a/app/code/Magento/SendFriendGraphQl/composer.json
+++ b/app/code/Magento/SendFriendGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-send-friend": "100.4.*",
-        "magento/module-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-catalog": "*",
+        "magento/module-send-friend": "*",
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\SendFriendGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json
index 08cbf729f8e22..5ea8430226ad8 100644
--- a/app/code/Magento/Shipping/composer.json
+++ b/app/code/Magento/Shipping/composer.json
@@ -7,25 +7,25 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "ext-gd": "*",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-fedex": "100.4.*",
-        "magento/module-ups": "100.4.*",
-        "magento/module-config": "101.2.*"
+        "magento/module-fedex": "*",
+        "magento/module-ups": "*",
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -39,6 +39,5 @@
         "psr-4": {
             "Magento\\Shipping\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json
index 562016cd5f3a0..6a9f20ac8bddf 100644
--- a/app/code/Magento/Sitemap/composer.json
+++ b/app/code/Magento/Sitemap/composer.json
@@ -6,19 +6,19 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -32,6 +32,5 @@
         "psr-4": {
             "Magento\\Sitemap\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json
index c45b1766a5873..e6f7f0d5ac274 100644
--- a/app/code/Magento/Store/composer.json
+++ b/app/code/Magento/Store/composer.json
@@ -6,18 +6,18 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-deploy": "100.4.*"
+        "magento/module-deploy": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -31,6 +31,5 @@
         "psr-4": {
             "Magento\\Store\\": ""
         }
-    },
-    "version": "101.1.0"
+    }
 }
diff --git a/app/code/Magento/StoreGraphQl/composer.json b/app/code/Magento/StoreGraphQl/composer.json
index 5b9c0f2161ebb..a7cab5851a9ee 100644
--- a/app/code/Magento/StoreGraphQl/composer.json
+++ b/app/code/Magento/StoreGraphQl/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-store": "*",
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\StoreGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Swagger/composer.json b/app/code/Magento/Swagger/composer.json
index fdcab3fe66c2e..759e72350b0a6 100644
--- a/app/code/Magento/Swagger/composer.json
+++ b/app/code/Magento/Swagger/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\Swagger\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SwaggerWebapi/composer.json b/app/code/Magento/SwaggerWebapi/composer.json
index 63d369882ad87..78021f7cb4ec5 100644
--- a/app/code/Magento/SwaggerWebapi/composer.json
+++ b/app/code/Magento/SwaggerWebapi/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-swagger": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-swagger": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\SwaggerWebapi\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SwaggerWebapiAsync/composer.json b/app/code/Magento/SwaggerWebapiAsync/composer.json
index 99e11cdaf87b3..283b2fe1f1758 100644
--- a/app/code/Magento/SwaggerWebapiAsync/composer.json
+++ b/app/code/Magento/SwaggerWebapiAsync/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-swagger": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-swagger": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\SwaggerWebapiAsync\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Swatches/composer.json b/app/code/Magento/Swatches/composer.json
index 6c7c2f1a66ae9..2c9b7a03ba011 100644
--- a/app/code/Magento/Swatches/composer.json
+++ b/app/code/Magento/Swatches/composer.json
@@ -6,21 +6,21 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-layered-navigation": "100.4.*",
-        "magento/module-swatches-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-layered-navigation": "*",
+        "magento/module-swatches-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -34,6 +34,5 @@
         "psr-4": {
             "Magento\\Swatches\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SwatchesGraphQl/composer.json b/app/code/Magento/SwatchesGraphQl/composer.json
index 961852580f2c2..383575302e6ae 100644
--- a/app/code/Magento/SwatchesGraphQl/composer.json
+++ b/app/code/Magento/SwatchesGraphQl/composer.json
@@ -4,12 +4,12 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-swatches": "100.4.*",
-        "magento/module-catalog": "104.0.*"
+        "magento/framework": "*",
+        "magento/module-swatches": "*",
+        "magento/module-catalog": "*"
     },
     "suggest": {
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -22,6 +22,5 @@
         "psr-4": {
             "Magento\\SwatchesGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/SwatchesLayeredNavigation/composer.json b/app/code/Magento/SwatchesLayeredNavigation/composer.json
index e6646efd43268..3b987f8096f18 100644
--- a/app/code/Magento/SwatchesLayeredNavigation/composer.json
+++ b/app/code/Magento/SwatchesLayeredNavigation/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\SwatchesLayeredNavigation\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json
index ea43903ed8df6..2fe0597c85a63 100644
--- a/app/code/Magento/Tax/composer.json
+++ b/app/code/Magento/Tax/composer.json
@@ -6,24 +6,24 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-tax-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-tax-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -37,6 +37,5 @@
         "psr-4": {
             "Magento\\Tax\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/TaxGraphQl/composer.json b/app/code/Magento/TaxGraphQl/composer.json
index 058bfce1d5850..b97e414cacb67 100644
--- a/app/code/Magento/TaxGraphQl/composer.json
+++ b/app/code/Magento/TaxGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-tax": "100.4.*",
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-tax": "*",
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\TaxGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json
index 1905881740f8c..01c069b4299c1 100644
--- a/app/code/Magento/TaxImportExport/composer.json
+++ b/app/code/Magento/TaxImportExport/composer.json
@@ -6,12 +6,12 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-directory": "*",
+        "magento/module-store": "*",
+        "magento/module-tax": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -25,6 +25,5 @@
         "psr-4": {
             "Magento\\TaxImportExport\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json
index 19776eb59ecd8..63779c6f9bf5d 100644
--- a/app/code/Magento/Theme/composer.json
+++ b/app/code/Magento/Theme/composer.json
@@ -6,22 +6,22 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-theme-sample-data": "Sample Data version: 100.4.*",
-        "magento/module-deploy": "100.4.*",
-        "magento/module-directory": "100.4.*"
+        "magento/module-theme-sample-data": "*",
+        "magento/module-deploy": "*",
+        "magento/module-directory": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -35,6 +35,5 @@
         "psr-4": {
             "Magento\\Theme\\": ""
         }
-    },
-    "version": "101.1.0"
+    }
 }
diff --git a/app/code/Magento/ThemeGraphQl/composer.json b/app/code/Magento/ThemeGraphQl/composer.json
index e70b7bb533692..cee740d449b37 100644
--- a/app/code/Magento/ThemeGraphQl/composer.json
+++ b/app/code/Magento/ThemeGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "suggest": {
-        "magento/module-store-graph-ql": "100.4.*"
+        "magento/module-store-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\ThemeGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Tinymce3/composer.json b/app/code/Magento/Tinymce3/composer.json
index c7c03f8e17ca7..0b8cf6824295e 100644
--- a/app/code/Magento/Tinymce3/composer.json
+++ b/app/code/Magento/Tinymce3/composer.json
@@ -3,14 +3,14 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-ui": "101.2.*",
-        "magento/module-variable": "100.4.*",
-        "magento/module-widget": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-ui": "*",
+        "magento/module-variable": "*",
+        "magento/module-widget": "*"
     },
     "suggest": {
-        "magento/module-cms": "104.0.*"
+        "magento/module-cms": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Tinymce3\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json
index ab1d258e36bec..7f67749fa88f4 100644
--- a/app/code/Magento/Translation/composer.json
+++ b/app/code/Magento/Translation/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-developer": "100.4.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-theme": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-developer": "*",
+        "magento/module-store": "*",
+        "magento/module-theme": "*"
     },
     "suggest": {
-        "magento/module-deploy": "100.4.*"
+        "magento/module-deploy": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\Translation\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json
index b122892074037..b4aeda0fc1e6a 100644
--- a/app/code/Magento/Ui/composer.json
+++ b/app/code/Magento/Ui/composer.json
@@ -6,15 +6,15 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-authorization": "*",
+        "magento/module-backend": "*",
+        "magento/module-eav": "*",
+        "magento/module-store": "*",
+        "magento/module-user": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -28,6 +28,5 @@
         "psr-4": {
             "Magento\\Ui\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json
index e26eb018ea688..fa8962f0af592 100644
--- a/app/code/Magento/Ups/composer.json
+++ b/app/code/Magento/Ups/composer.json
@@ -6,17 +6,17 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog-inventory": "*",
+        "magento/module-directory": "*",
+        "magento/module-quote": "*",
+        "magento/module-sales": "*",
+        "magento/module-shipping": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-config": "101.2.*"
+        "magento/module-config": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -30,6 +30,5 @@
         "psr-4": {
             "Magento\\Ups\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json
index 96bdcfc7e9642..44ca51e8bcbe2 100644
--- a/app/code/Magento/UrlRewrite/composer.json
+++ b/app/code/Magento/UrlRewrite/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\UrlRewrite\\": ""
         }
-    },
-    "version": "102.0.0"
+    }
 }
diff --git a/app/code/Magento/UrlRewriteGraphQl/composer.json b/app/code/Magento/UrlRewriteGraphQl/composer.json
index adacea949b340..766ad3ab46ebd 100644
--- a/app/code/Magento/UrlRewriteGraphQl/composer.json
+++ b/app/code/Magento/UrlRewriteGraphQl/composer.json
@@ -4,11 +4,11 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-url-rewrite": "102.0.*"
+        "magento/framework": "*",
+        "magento/module-url-rewrite": "*"
     },
     "suggest": {
-        "magento/module-graph-ql": "100.4.*"
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\UrlRewriteGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json
index 60119f505f6cc..6ba4be749cc7c 100644
--- a/app/code/Magento/User/composer.json
+++ b/app/code/Magento/User/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-authorization": "*",
+        "magento/module-backend": "*",
+        "magento/module-email": "*",
+        "magento/module-integration": "*",
+        "magento/module-security": "*",
+        "magento/module-store": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\User\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json
index fcd3a0babe913..3d5c0669c679d 100644
--- a/app/code/Magento/Usps/composer.json
+++ b/app/code/Magento/Usps/composer.json
@@ -7,15 +7,15 @@
     "require": {
         "php": "~7.3.0||~7.4.0",
         "lib-libxml": "*",
-        "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.*"
+        "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": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -29,6 +29,5 @@
         "psr-4": {
             "Magento\\Usps\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Variable/composer.json b/app/code/Magento/Variable/composer.json
index 283db7ec3a7f2..e6eed40a814db 100644
--- a/app/code/Magento/Variable/composer.json
+++ b/app/code/Magento/Variable/composer.json
@@ -6,11 +6,11 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-config": "101.2.*",
-        "magento/module-ui": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-store": "*",
+        "magento/module-config": "*",
+        "magento/module-ui": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -24,6 +24,5 @@
         "psr-4": {
             "Magento\\Variable\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Vault/composer.json b/app/code/Magento/Vault/composer.json
index fbc12bee2a7f3..31d5ceb906246 100644
--- a/app/code/Magento/Vault/composer.json
+++ b/app/code/Magento/Vault/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "magento/framework": "*",
+        "magento/module-checkout": "*",
+        "magento/module-customer": "*",
+        "magento/module-payment": "*",
+        "magento/module-quote": "*",
+        "magento/module-sales": "*",
+        "magento/module-store": "*",
+        "magento/module-theme": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\Vault\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/VaultGraphQl/composer.json b/app/code/Magento/VaultGraphQl/composer.json
index d7f056178cfaf..aff9a700fbcad 100644
--- a/app/code/Magento/VaultGraphQl/composer.json
+++ b/app/code/Magento/VaultGraphQl/composer.json
@@ -4,9 +4,9 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-vault": "101.2.*",
-        "magento/module-graph-ql": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-vault": "*",
+        "magento/module-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\VaultGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Version/composer.json b/app/code/Magento/Version/composer.json
index 397ffc6ae0c7f..d2b2127446c21 100644
--- a/app/code/Magento/Version/composer.json
+++ b/app/code/Magento/Version/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\Version\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json
index 85418f5b1b28f..11382cc318554 100644
--- a/app/code/Magento/Webapi/composer.json
+++ b/app/code/Magento/Webapi/composer.json
@@ -6,15 +6,15 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-authorization": "100.4.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-integration": "100.4.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-authorization": "*",
+        "magento/module-backend": "*",
+        "magento/module-integration": "*",
+        "magento/module-store": "*"
     },
     "suggest": {
-        "magento/module-user": "101.2.*",
-        "magento/module-customer": "103.0.*"
+        "magento/module-user": "*",
+        "magento/module-customer": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -28,6 +28,5 @@
         "psr-4": {
             "Magento\\Webapi\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/WebapiAsync/composer.json b/app/code/Magento/WebapiAsync/composer.json
index 4f7736cf9fb3b..e0c6a96f1ffe6 100644
--- a/app/code/Magento/WebapiAsync/composer.json
+++ b/app/code/Magento/WebapiAsync/composer.json
@@ -6,14 +6,14 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/framework-message-queue": "100.4.*",
-        "magento/module-webapi": "100.4.*",
-        "magento/module-asynchronous-operations": "100.4.*"
+        "magento/framework": "*",
+        "magento/framework-message-queue": "*",
+        "magento/module-webapi": "*",
+        "magento/module-asynchronous-operations": "*"
     },
     "suggest": {
-        "magento/module-user": "101.2.*",
-        "magento/module-customer": "103.0.*"
+        "magento/module-user": "*",
+        "magento/module-customer": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -27,6 +27,5 @@
         "psr-4": {
             "Magento\\WebapiAsync\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/WebapiSecurity/composer.json b/app/code/Magento/WebapiSecurity/composer.json
index 1b2d3c328e9d1..5b48ed8644709 100644
--- a/app/code/Magento/WebapiSecurity/composer.json
+++ b/app/code/Magento/WebapiSecurity/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-webapi": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-webapi": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -21,6 +21,5 @@
         "psr-4": {
             "Magento\\WebapiSecurity\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json
index ff85c42ac6267..7024de0f595c7 100644
--- a/app/code/Magento/Weee/composer.json
+++ b/app/code/Magento/Weee/composer.json
@@ -6,22 +6,22 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "magento/module-bundle": "101.0.*"
+        "magento/module-bundle": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -35,6 +35,5 @@
         "psr-4": {
             "Magento\\Weee\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/WeeeGraphQl/composer.json b/app/code/Magento/WeeeGraphQl/composer.json
index 33d16fb64a2db..be7e50ab2fca1 100644
--- a/app/code/Magento/WeeeGraphQl/composer.json
+++ b/app/code/Magento/WeeeGraphQl/composer.json
@@ -4,13 +4,13 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-tax": "100.4.*",
-        "magento/module-weee": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-store": "*",
+        "magento/module-tax": "*",
+        "magento/module-weee": "*"
     },
     "suggest": {
-        "magento/module-catalog-graph-ql": "100.4.*"
+        "magento/module-catalog-graph-ql": "*"
     },
     "license": [
         "OSL-3.0",
@@ -23,6 +23,5 @@
         "psr-4": {
             "Magento\\WeeeGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json
index a85b8f46fca0e..2cf8429095ce7 100644
--- a/app/code/Magento/Widget/composer.json
+++ b/app/code/Magento/Widget/composer.json
@@ -6,17 +6,17 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-backend": "102.0.*",
-        "magento/module-catalog": "104.0.*",
-        "magento/module-cms": "104.0.*",
-        "magento/module-store": "101.1.*",
-        "magento/module-theme": "101.1.*",
-        "magento/module-variable": "100.4.*",
-        "magento/module-ui": "101.2.*"
+        "magento/framework": "*",
+        "magento/module-backend": "*",
+        "magento/module-catalog": "*",
+        "magento/module-cms": "*",
+        "magento/module-store": "*",
+        "magento/module-theme": "*",
+        "magento/module-variable": "*",
+        "magento/module-ui": "*"
     },
     "suggest": {
-        "magento/module-widget-sample-data": "Sample Data version: 100.4.*"
+        "magento/module-widget-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -30,6 +30,5 @@
         "psr-4": {
             "Magento\\Widget\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json
index 0a347b9e5f027..b426ffe01cecc 100644
--- a/app/code/Magento/Wishlist/composer.json
+++ b/app/code/Magento/Wishlist/composer.json
@@ -6,26 +6,26 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "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.*"
+        "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": "*"
     },
     "suggest": {
-        "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.*"
+        "magento/module-configurable-product": "*",
+        "magento/module-downloadable": "*",
+        "magento/module-bundle": "*",
+        "magento/module-cookie": "*",
+        "magento/module-grouped-product": "*",
+        "magento/module-wishlist-sample-data": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -39,6 +39,5 @@
         "psr-4": {
             "Magento\\Wishlist\\": ""
         }
-    },
-    "version": "101.2.0"
+    }
 }
diff --git a/app/code/Magento/WishlistAnalytics/composer.json b/app/code/Magento/WishlistAnalytics/composer.json
index 9d072368bdd9d..309257f857ed2 100644
--- a/app/code/Magento/WishlistAnalytics/composer.json
+++ b/app/code/Magento/WishlistAnalytics/composer.json
@@ -3,9 +3,9 @@
     "description": "N/A",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-wishlist": "101.2.*",
-        "magento/module-analytics": "100.4.*"
+        "magento/framework": "*",
+        "magento/module-wishlist": "*",
+        "magento/module-analytics": "*"
     },
     "type": "magento2-module",
     "license": [
@@ -19,6 +19,5 @@
         "psr-4": {
             "Magento\\WishlistAnalytics\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/code/Magento/WishlistGraphQl/composer.json b/app/code/Magento/WishlistGraphQl/composer.json
index e16f27d8cc788..7a3fca599a4b3 100644
--- a/app/code/Magento/WishlistGraphQl/composer.json
+++ b/app/code/Magento/WishlistGraphQl/composer.json
@@ -4,10 +4,10 @@
     "type": "magento2-module",
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/module-catalog-graph-ql": "100.4.*",
-        "magento/module-wishlist": "101.2.*",
-        "magento/module-store": "101.1.*"
+        "magento/framework": "*",
+        "magento/module-catalog-graph-ql": "*",
+        "magento/module-wishlist": "*",
+        "magento/module-store": "*"
     },
     "license": [
         "OSL-3.0",
@@ -20,6 +20,5 @@
         "psr-4": {
             "Magento\\WishlistGraphQl\\": ""
         }
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json
index 2e5c02976ab00..249441be1753e 100644
--- a/app/design/adminhtml/Magento/backend/composer.json
+++ b/app/design/adminhtml/Magento/backend/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-theme",
     "license": [
@@ -17,6 +17,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json
index d12350af15042..066d0cd1cc9f2 100644
--- a/app/design/frontend/Magento/blank/composer.json
+++ b/app/design/frontend/Magento/blank/composer.json
@@ -6,7 +6,7 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-theme",
     "license": [
@@ -17,6 +17,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/design/frontend/Magento/luma/composer.json b/app/design/frontend/Magento/luma/composer.json
index 5083d423ab87b..16bed43fe8cbf 100644
--- a/app/design/frontend/Magento/luma/composer.json
+++ b/app/design/frontend/Magento/luma/composer.json
@@ -6,8 +6,8 @@
     },
     "require": {
         "php": "~7.3.0||~7.4.0",
-        "magento/framework": "103.0.*",
-        "magento/theme-frontend-blank": "100.4.*"
+        "magento/framework": "*",
+        "magento/theme-frontend-blank": "*"
     },
     "type": "magento2-theme",
     "license": [
@@ -18,6 +18,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/de_DE/composer.json b/app/i18n/Magento/de_DE/composer.json
index 2bfbcd3db948f..5a488a3e32c2b 100644
--- a/app/i18n/Magento/de_DE/composer.json
+++ b/app/i18n/Magento/de_DE/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/en_US/composer.json b/app/i18n/Magento/en_US/composer.json
index a2d9d20863893..1108c70de28a6 100644
--- a/app/i18n/Magento/en_US/composer.json
+++ b/app/i18n/Magento/en_US/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/es_ES/composer.json b/app/i18n/Magento/es_ES/composer.json
index 30f86b04042fd..5bc3cb5730adf 100644
--- a/app/i18n/Magento/es_ES/composer.json
+++ b/app/i18n/Magento/es_ES/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/fr_FR/composer.json b/app/i18n/Magento/fr_FR/composer.json
index 4da78146736fc..50c541308673b 100644
--- a/app/i18n/Magento/fr_FR/composer.json
+++ b/app/i18n/Magento/fr_FR/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/nl_NL/composer.json b/app/i18n/Magento/nl_NL/composer.json
index 3641101e66b5a..a182e179d4103 100644
--- a/app/i18n/Magento/nl_NL/composer.json
+++ b/app/i18n/Magento/nl_NL/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/pt_BR/composer.json b/app/i18n/Magento/pt_BR/composer.json
index 0dc5c014eabd0..46734cc09b363 100644
--- a/app/i18n/Magento/pt_BR/composer.json
+++ b/app/i18n/Magento/pt_BR/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/app/i18n/Magento/zh_Hans_CN/composer.json b/app/i18n/Magento/zh_Hans_CN/composer.json
index eff1bfd2c3033..ce214ce649f56 100644
--- a/app/i18n/Magento/zh_Hans_CN/composer.json
+++ b/app/i18n/Magento/zh_Hans_CN/composer.json
@@ -9,13 +9,12 @@
         "sort-packages": true
     },
     "require": {
-        "magento/framework": "103.0.*"
+        "magento/framework": "*"
     },
     "type": "magento2-language",
     "autoload": {
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/composer.json b/composer.json
index c2da7d52f1d19..816fad7068837 100644
--- a/composer.json
+++ b/composer.json
@@ -101,205 +101,205 @@
         "ext-pcntl": "Need for run processes in parallel mode"
     },
     "replace": {
-        "magento/module-marketplace": "100.4.0",
-        "magento/module-admin-analytics": "100.4.0",
-        "magento/module-admin-notification": "100.4.0",
-        "magento/module-advanced-pricing-import-export": "100.4.0",
-        "magento/module-amqp": "100.4.0",
-        "magento/module-amqp-store": "100.4.0",
-        "magento/module-analytics": "100.4.0",
-        "magento/module-asynchronous-operations": "100.4.0",
-        "magento/module-authorization": "100.4.0",
-        "magento/module-advanced-search": "100.4.0",
-        "magento/module-backend": "102.0.0",
-        "magento/module-backup": "100.4.0",
-        "magento/module-bundle": "101.0.0",
-        "magento/module-bundle-graph-ql": "100.4.0",
-        "magento/module-bundle-import-export": "100.4.0",
-        "magento/module-cache-invalidate": "100.4.0",
-        "magento/module-captcha": "100.4.0",
-        "magento/module-cardinal-commerce": "100.4.0",
-        "magento/module-catalog": "104.0.0",
-        "magento/module-catalog-customer-graph-ql": "100.4.0",
-        "magento/module-catalog-analytics": "100.4.0",
-        "magento/module-catalog-import-export": "101.1.0",
-        "magento/module-catalog-inventory": "100.4.0",
-        "magento/module-catalog-inventory-graph-ql": "100.4.0",
-        "magento/module-catalog-rule": "101.2.0",
-        "magento/module-catalog-rule-graph-ql": "100.4.0",
-        "magento/module-catalog-rule-configurable": "100.4.0",
-        "magento/module-catalog-search": "102.0.0",
-        "magento/module-catalog-url-rewrite": "100.4.0",
-        "magento/module-catalog-widget": "100.4.0",
-        "magento/module-checkout": "100.4.0",
-        "magento/module-checkout-agreements": "100.4.0",
-        "magento/module-checkout-agreements-graph-ql": "100.4.0",
-        "magento/module-cms": "104.0.0",
-        "magento/module-cms-url-rewrite": "100.4.0",
-        "magento/module-config": "101.2.0",
-        "magento/module-configurable-import-export": "100.4.0",
-        "magento/module-configurable-product": "100.4.0",
-        "magento/module-configurable-product-sales": "100.4.0",
-        "magento/module-contact": "100.4.0",
-        "magento/module-cookie": "100.4.0",
-        "magento/module-cron": "100.4.0",
-        "magento/module-currency-symbol": "100.4.0",
-        "magento/module-customer": "103.0.0",
-        "magento/module-customer-analytics": "100.4.0",
-        "magento/module-customer-downloadable-graph-ql": "100.4.0",
-        "magento/module-customer-import-export": "100.4.0",
-        "magento/module-deploy": "100.4.0",
-        "magento/module-developer": "100.4.0",
-        "magento/module-dhl": "100.4.0",
-        "magento/module-directory": "100.4.0",
-        "magento/module-directory-graph-ql": "100.4.0",
-        "magento/module-downloadable": "100.4.0",
-        "magento/module-downloadable-graph-ql": "100.4.0",
-        "magento/module-downloadable-import-export": "100.4.0",
-        "magento/module-eav": "102.1.0",
-        "magento/module-elasticsearch": "101.0.0",
-        "magento/module-elasticsearch-6": "100.4.0",
-        "magento/module-elasticsearch-7": "100.4.0",
-        "magento/module-email": "101.1.0",
-        "magento/module-encryption-key": "100.4.0",
-        "magento/module-fedex": "100.4.0",
-        "magento/module-gift-message": "100.4.0",
-        "magento/module-google-adwords": "100.4.0",
-        "magento/module-google-analytics": "100.4.0",
-        "magento/module-google-optimizer": "100.4.0",
-        "magento/module-graph-ql": "100.4.0",
-        "magento/module-graph-ql-cache": "100.4.0",
-        "magento/module-catalog-graph-ql": "100.4.0",
-        "magento/module-catalog-cms-graph-ql": "100.4.0",
-        "magento/module-catalog-url-rewrite-graph-ql": "100.4.0",
-        "magento/module-configurable-product-graph-ql": "100.4.0",
-        "magento/module-customer-graph-ql": "100.4.0",
-        "magento/module-eav-graph-ql": "100.4.0",
-        "magento/module-swatches-graph-ql": "100.4.0",
-        "magento/module-tax-graph-ql": "100.4.0",
-        "magento/module-url-rewrite-graph-ql": "100.4.0",
-        "magento/module-cms-url-rewrite-graph-ql": "100.4.0",
-        "magento/module-weee-graph-ql": "100.4.0",
-        "magento/module-cms-graph-ql": "100.4.0",
-        "magento/module-grouped-import-export": "100.4.0",
-        "magento/module-grouped-product": "100.4.0",
-        "magento/module-grouped-catalog-inventory": "100.4.0",
-        "magento/module-grouped-product-graph-ql": "100.4.0",
-        "magento/module-import-export": "101.0.0",
-        "magento/module-indexer": "100.4.0",
-        "magento/module-instant-purchase": "100.4.0",
-        "magento/module-integration": "100.4.0",
-        "magento/module-layered-navigation": "100.4.0",
-        "magento/module-login-as-customer": "100.4.0",
-        "magento/module-login-as-customer-admin-ui": "100.4.0",
-        "magento/module-login-as-customer-api": "100.4.0",
-        "magento/module-login-as-customer-frontend-ui": "100.4.0",
-        "magento/module-login-as-customer-log": "100.4.0",
-        "magento/module-login-as-customer-quote": "100.4.0",
-        "magento/module-login-as-customer-page-cache": "100.4.0",
-        "magento/module-login-as-customer-sales": "100.4.0",
-        "magento/module-media-content": "100.4.0",
-        "magento/module-media-content-api": "100.4.0",
-        "magento/module-media-content-catalog": "100.4.0",
-        "magento/module-media-content-cms": "100.4.0",
-        "magento/module-media-gallery": "100.4.0",
-        "magento/module-media-gallery-api": "101.0.0",
-        "magento/module-media-gallery-catalog": "100.4.0",
-        "magento/module-media-storage": "100.4.0",
-        "magento/module-message-queue": "100.4.0",
-        "magento/module-msrp": "100.4.0",
-        "magento/module-msrp-configurable-product": "100.4.0",
-        "magento/module-msrp-grouped-product": "100.4.0",
-        "magento/module-multishipping": "100.4.0",
-        "magento/module-mysql-mq": "100.4.0",
-        "magento/module-new-relic-reporting": "100.4.0",
-        "magento/module-newsletter": "100.4.0",
-        "magento/module-offline-payments": "100.4.0",
-        "magento/module-offline-shipping": "100.4.0",
-        "magento/module-page-cache": "100.4.0",
-        "magento/module-payment": "100.4.0",
-        "magento/module-paypal": "101.0.0",
-        "magento/module-paypal-captcha": "100.4.0",
-        "magento/module-paypal-graph-ql": "100.4.0",
-        "magento/module-persistent": "100.4.0",
-        "magento/module-product-alert": "100.4.0",
-        "magento/module-product-video": "100.4.0",
-        "magento/module-quote": "101.2.0",
-        "magento/module-quote-analytics": "100.4.0",
-        "magento/module-quote-graph-ql": "100.4.0",
-        "magento/module-related-product-graph-ql": "100.4.0",
-        "magento/module-release-notification": "100.4.0",
-        "magento/module-reports": "100.4.0",
-        "magento/module-require-js": "100.4.0",
-        "magento/module-review": "100.4.0",
-        "magento/module-review-analytics": "100.4.0",
-        "magento/module-robots": "101.1.0",
-        "magento/module-rss": "100.4.0",
-        "magento/module-rule": "100.4.0",
-        "magento/module-sales": "103.0.0",
-        "magento/module-sales-analytics": "100.4.0",
-        "magento/module-sales-graph-ql": "100.4.0",
-        "magento/module-sales-inventory": "100.4.0",
-        "magento/module-sales-rule": "101.2.0",
-        "magento/module-sales-sequence": "100.4.0",
-        "magento/module-sample-data": "100.4.0",
-        "magento/module-search": "101.1.0",
-        "magento/module-security": "100.4.0",
-        "magento/module-send-friend": "100.4.0",
-        "magento/module-send-friend-graph-ql": "100.4.0",
-        "magento/module-shipping": "100.4.0",
-        "magento/module-sitemap": "100.4.0",
-        "magento/module-store": "101.1.0",
-        "magento/module-store-graph-ql": "100.4.0",
-        "magento/module-swagger": "100.4.0",
-        "magento/module-swagger-webapi": "100.4.0",
-        "magento/module-swagger-webapi-async": "100.4.0",
-        "magento/module-swatches": "100.4.0",
-        "magento/module-swatches-layered-navigation": "100.4.0",
-        "magento/module-tax": "100.4.0",
-        "magento/module-tax-import-export": "100.4.0",
-        "magento/module-theme": "101.1.0",
-        "magento/module-theme-graph-ql": "100.4.0",
-        "magento/module-translation": "100.4.0",
-        "magento/module-ui": "101.2.0",
-        "magento/module-ups": "100.4.0",
-        "magento/module-url-rewrite": "102.0.0",
-        "magento/module-user": "101.2.0",
-        "magento/module-usps": "100.4.0",
-        "magento/module-variable": "100.4.0",
-        "magento/module-vault": "101.2.0",
-        "magento/module-vault-graph-ql": "100.4.0",
-        "magento/module-version": "100.4.0",
-        "magento/module-webapi": "100.4.0",
-        "magento/module-webapi-async": "100.4.0",
-        "magento/module-webapi-security": "100.4.0",
-        "magento/module-weee": "100.4.0",
-        "magento/module-widget": "101.2.0",
-        "magento/module-wishlist": "101.2.0",
-        "magento/module-wishlist-graph-ql": "100.4.0",
-        "magento/module-wishlist-analytics": "100.4.0",
-        "magento/theme-adminhtml-backend": "100.4.0",
-        "magento/theme-frontend-blank": "100.4.0",
-        "magento/theme-frontend-luma": "100.4.0",
-        "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.0",
-        "magento/framework-amqp": "100.4.0",
-        "magento/framework-bulk": "101.0.0",
-        "magento/framework-message-queue": "100.4.0",
+        "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-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-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-frontend-ui": "*",
+        "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-catalog": "*",
+        "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-offline-payments": "*",
+        "magento/module-offline-shipping": "*",
+        "magento/module-page-cache": "*",
+        "magento/module-payment": "*",
+        "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-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-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": "*",
         "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-tinymce-3": "100.4.0",
-        "magento/module-csp": "100.4.0"
+        "magento/module-tinymce-3": "*",
+        "magento/module-csp": "*"
     },
     "conflict": {
         "gene/bluefoot": "*"
@@ -354,6 +354,5 @@
             "Magento\\PhpStan\\": "dev/tests/static/framework/Magento/PhpStan/"
         }
     },
-    "version": "2.4.0",
-    "minimum-stability": "stable"
+    "prefer-stable": true
 }
diff --git a/composer.lock b/composer.lock
index ea3afb13cde3e..04ecd43514636 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "74f566339c6207342f65f3f000595f70",
+    "content-hash": "0ebe9109f59c372f9962e2a51c35c829",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -210,16 +210,16 @@
         },
         {
             "name": "composer/composer",
-            "version": "1.10.9",
+            "version": "1.10.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "83c3250093d5491600a822e176b107a945baf95a"
+                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/83c3250093d5491600a822e176b107a945baf95a",
-                "reference": "83c3250093d5491600a822e176b107a945baf95a",
+                "url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
+                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
                 "shasum": ""
             },
             "require": {
@@ -238,11 +238,12 @@
                 "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
             },
             "conflict": {
-                "symfony/console": "2.8.38"
+                "symfony/console": "2.8.38",
+                "symfony/phpunit-bridge": "3.4.40"
             },
             "require-dev": {
                 "phpspec/prophecy": "^1.10",
-                "symfony/phpunit-bridge": "^4.2"
+                "symfony/phpunit-bridge": "^3.4"
             },
             "suggest": {
                 "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -286,7 +287,7 @@
                 "dependency",
                 "package"
             ],
-            "time": "2020-07-16T10:57:00+00:00"
+            "time": "2020-06-03T08:03:56+00:00"
         },
         {
             "name": "composer/semver",
@@ -351,16 +352,16 @@
         },
         {
             "name": "composer/spdx-licenses",
-            "version": "1.5.4",
+            "version": "1.5.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/spdx-licenses.git",
-                "reference": "6946f785871e2314c60b4524851f3702ea4f2223"
+                "reference": "0c3e51e1880ca149682332770e25977c70cf9dae"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/6946f785871e2314c60b4524851f3702ea4f2223",
-                "reference": "6946f785871e2314c60b4524851f3702ea4f2223",
+                "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae",
+                "reference": "0c3e51e1880ca149682332770e25977c70cf9dae",
                 "shasum": ""
             },
             "require": {
@@ -407,7 +408,7 @@
                 "spdx",
                 "validator"
             ],
-            "time": "2020-07-15T15:35:07+00:00"
+            "time": "2020-02-14T07:44:31+00:00"
         },
         {
             "name": "composer/xdebug-handler",
@@ -651,16 +652,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.5.5",
+            "version": "6.5.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
+                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
-                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
                 "shasum": ""
             },
             "require": {
@@ -668,7 +669,7 @@
                 "guzzlehttp/promises": "^1.0",
                 "guzzlehttp/psr7": "^1.6.1",
                 "php": ">=5.5",
-                "symfony/polyfill-intl-idn": "^1.17.0"
+                "symfony/polyfill-intl-idn": "1.17.0"
             },
             "require-dev": {
                 "ext-curl": "*",
@@ -714,7 +715,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2020-06-16T21:01:06+00:00"
+            "time": "2020-05-25T19:35:05+00:00"
         },
         {
             "name": "guzzlehttp/promises",
@@ -1677,16 +1678,16 @@
         },
         {
             "name": "laminas/laminas-form",
-            "version": "2.15.0",
+            "version": "2.14.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-form.git",
-                "reference": "359cd372c565e18a17f32ccfeacdf21bba091ce2"
+                "reference": "3e22e09751cf6ae031be87a44e092e7925ce5b7b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-form/zipball/359cd372c565e18a17f32ccfeacdf21bba091ce2",
-                "reference": "359cd372c565e18a17f32ccfeacdf21bba091ce2",
+                "url": "https://api.github.com/repos/laminas/laminas-form/zipball/3e22e09751cf6ae031be87a44e092e7925ce5b7b",
+                "reference": "3e22e09751cf6ae031be87a44e092e7925ce5b7b",
                 "shasum": ""
             },
             "require": {
@@ -1729,8 +1730,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.15.x-dev",
-                    "dev-develop": "2.16.x-dev"
+                    "dev-master": "2.14.x-dev",
+                    "dev-develop": "2.15.x-dev"
                 },
                 "laminas": {
                     "component": "Laminas\\Form",
@@ -1755,20 +1756,20 @@
                 "form",
                 "laminas"
             ],
-            "time": "2020-07-14T13:53:27+00:00"
+            "time": "2020-03-29T12:46:16+00:00"
         },
         {
             "name": "laminas/laminas-http",
-            "version": "2.12.0",
+            "version": "2.11.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-http.git",
-                "reference": "48bd06ffa3a6875e2b77d6852405eb7b1589d575"
+                "reference": "8c66963b933c80da59433da56a44dfa979f3ec88"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-http/zipball/48bd06ffa3a6875e2b77d6852405eb7b1589d575",
-                "reference": "48bd06ffa3a6875e2b77d6852405eb7b1589d575",
+                "url": "https://api.github.com/repos/laminas/laminas-http/zipball/8c66963b933c80da59433da56a44dfa979f3ec88",
+                "reference": "8c66963b933c80da59433da56a44dfa979f3ec88",
                 "shasum": ""
             },
             "require": {
@@ -1780,7 +1781,7 @@
                 "php": "^5.6 || ^7.0"
             },
             "replace": {
-                "zendframework/zend-http": "^2.11.2"
+                "zendframework/zend-http": "self.version"
             },
             "require-dev": {
                 "laminas/laminas-coding-standard": "~1.0.0",
@@ -1793,8 +1794,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.12.x-dev",
-                    "dev-develop": "2.13.x-dev"
+                    "dev-master": "2.11.x-dev",
+                    "dev-develop": "2.12.x-dev"
                 }
             },
             "autoload": {
@@ -1813,7 +1814,7 @@
                 "http client",
                 "laminas"
             ],
-            "time": "2020-06-23T15:14:37+00:00"
+            "time": "2019-12-31T17:02:36+00:00"
         },
         {
             "name": "laminas/laminas-hydrator",
@@ -2199,16 +2200,16 @@
         },
         {
             "name": "laminas/laminas-mail",
-            "version": "2.11.0",
+            "version": "2.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-mail.git",
-                "reference": "4c5545637eea3dc745668ddff1028692ed004c4b"
+                "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/4c5545637eea3dc745668ddff1028692ed004c4b",
-                "reference": "4c5545637eea3dc745668ddff1028692ed004c4b",
+                "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/cfe0711446c8d9c392e9fc664c9ccc180fa89005",
+                "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005",
                 "shasum": ""
             },
             "require": {
@@ -2238,8 +2239,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.11.x-dev",
-                    "dev-develop": "2.12.x-dev"
+                    "dev-master": "2.10.x-dev",
+                    "dev-develop": "2.11.x-dev"
                 },
                 "laminas": {
                     "component": "Laminas\\Mail",
@@ -2261,7 +2262,7 @@
                 "laminas",
                 "mail"
             ],
-            "time": "2020-06-30T20:17:23+00:00"
+            "time": "2020-04-21T16:42:19+00:00"
         },
         {
             "name": "laminas/laminas-math",
@@ -3819,16 +3820,16 @@
         },
         {
             "name": "phpseclib/phpseclib",
-            "version": "2.0.28",
+            "version": "2.0.27",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
-                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
+                "reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
-                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
+                "reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
                 "shasum": ""
             },
             "require": {
@@ -3907,7 +3908,7 @@
                 "x.509",
                 "x509"
             ],
-            "time": "2020-07-08T09:08:33+00:00"
+            "time": "2020-04-04T23:17:33+00:00"
         },
         {
             "name": "psr/container",
@@ -4274,16 +4275,16 @@
         },
         {
             "name": "seld/phar-utils",
-            "version": "1.1.1",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Seldaek/phar-utils.git",
-                "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796"
+                "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8674b1d84ffb47cc59a101f5d5a3b61e87d23796",
-                "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796",
+                "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0",
+                "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0",
                 "shasum": ""
             },
             "require": {
@@ -4314,11 +4315,11 @@
             "keywords": [
                 "phar"
             ],
-            "time": "2020-07-07T18:42:57+00:00"
+            "time": "2020-02-14T15:25:33+00:00"
         },
         {
             "name": "symfony/console",
-            "version": "v4.4.10",
+            "version": "v4.4.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
@@ -4395,7 +4396,7 @@
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
@@ -4448,7 +4449,7 @@
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v4.4.10",
+            "version": "v4.4.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
@@ -4518,20 +4519,20 @@
         },
         {
             "name": "symfony/event-dispatcher-contracts",
-            "version": "v1.1.9",
+            "version": "v1.1.7",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher-contracts.git",
-                "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7"
+                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7",
-                "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
+                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.1.3"
+                "php": "^7.1.3"
             },
             "suggest": {
                 "psr/event-dispatcher": "",
@@ -4541,10 +4542,6 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.1-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -4576,11 +4573,11 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2020-07-06T13:19:58+00:00"
+            "time": "2019-09-17T09:54:03+00:00"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
@@ -4630,7 +4627,7 @@
         },
         {
             "name": "symfony/finder",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
@@ -4679,16 +4676,16 @@
         },
         {
             "name": "symfony/polyfill-ctype",
-            "version": "v1.18.0",
+            "version": "v1.17.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
+                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
-                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
                 "shasum": ""
             },
             "require": {
@@ -4700,11 +4697,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "dev-master": "1.17-dev"
                 }
             },
             "autoload": {
@@ -4737,26 +4730,25 @@
                 "polyfill",
                 "portable"
             ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "time": "2020-05-12T16:14:59+00:00"
         },
         {
             "name": "symfony/polyfill-intl-idn",
-            "version": "v1.18.0",
+            "version": "v1.17.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-intl-idn.git",
-                "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe"
+                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
-                "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a",
+                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3",
-                "symfony/polyfill-intl-normalizer": "^1.10",
-                "symfony/polyfill-php70": "^1.10",
+                "symfony/polyfill-mbstring": "^1.3",
                 "symfony/polyfill-php72": "^1.10"
             },
             "suggest": {
@@ -4765,11 +4757,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "dev-master": "1.17-dev"
                 }
             },
             "autoload": {
@@ -4789,10 +4777,6 @@
                     "name": "Laurent Bassin",
                     "email": "laurent@bassin.info"
                 },
-                {
-                    "name": "Trevor Rowbotham",
-                    "email": "trevor.rowbotham@pm.me"
-                },
                 {
                     "name": "Symfony Community",
                     "homepage": "https://symfony.com/contributors"
@@ -4808,87 +4792,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-07-14T12:35:20+00:00"
-        },
-        {
-            "name": "symfony/polyfill-intl-normalizer",
-            "version": "v1.18.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
-                "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
-                "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.3.3"
-            },
-            "suggest": {
-                "ext-intl": "For best performance"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
-                },
-                "files": [
-                    "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill for intl's Normalizer class and related functions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "intl",
-                "normalizer",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "time": "2020-05-12T16:47:27+00:00"
         },
         {
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.18.0",
+            "version": "v1.17.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
+                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
-                "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
+                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
                 "shasum": ""
             },
             "require": {
@@ -4900,11 +4817,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "dev-master": "1.17-dev"
                 }
             },
             "autoload": {
@@ -4938,83 +4851,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-07-14T12:35:20+00:00"
-        },
-        {
-            "name": "symfony/polyfill-php70",
-            "version": "v1.18.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php70.git",
-                "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
-                "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
-                "shasum": ""
-            },
-            "require": {
-                "paragonie/random_compat": "~1.0|~2.0|~9.99",
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php70\\": ""
-                },
-                "files": [
-                    "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "time": "2020-05-12T16:47:27+00:00"
         },
         {
             "name": "symfony/polyfill-php72",
-            "version": "v1.18.0",
+            "version": "v1.17.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "639447d008615574653fb3bc60d1986d7172eaae"
+                "reference": "f048e612a3905f34931127360bdd2def19a5e582"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
-                "reference": "639447d008615574653fb3bc60d1986d7172eaae",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
+                "reference": "f048e612a3905f34931127360bdd2def19a5e582",
                 "shasum": ""
             },
             "require": {
@@ -5023,11 +4873,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "dev-master": "1.17-dev"
                 }
             },
             "autoload": {
@@ -5060,20 +4906,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "time": "2020-05-12T16:47:27+00:00"
         },
         {
             "name": "symfony/polyfill-php73",
-            "version": "v1.18.0",
+            "version": "v1.17.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca"
+                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
-                "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
+                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
                 "shasum": ""
             },
             "require": {
@@ -5082,11 +4928,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "dev-master": "1.17-dev"
                 }
             },
             "autoload": {
@@ -5122,20 +4964,20 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "time": "2020-05-12T16:47:27+00:00"
         },
         {
             "name": "symfony/polyfill-php80",
-            "version": "v1.18.0",
+            "version": "v1.17.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
-                "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
                 "shasum": ""
             },
             "require": {
@@ -5144,11 +4986,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.18-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "dev-master": "1.17-dev"
                 }
             },
             "autoload": {
@@ -5188,11 +5026,11 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-07-14T12:35:20+00:00"
+            "time": "2020-05-12T16:47:27+00:00"
         },
         {
             "name": "symfony/process",
-            "version": "v4.4.10",
+            "version": "v4.4.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/process.git",
@@ -5241,16 +5079,16 @@
         },
         {
             "name": "symfony/service-contracts",
-            "version": "v2.1.3",
+            "version": "v2.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442"
+                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442",
-                "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b",
+                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b",
                 "shasum": ""
             },
             "require": {
@@ -5264,10 +5102,6 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.1-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -5299,7 +5133,7 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2020-07-06T13:23:11+00:00"
+            "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "tedivm/jshrink",
@@ -5448,16 +5282,16 @@
         },
         {
             "name": "webonyx/graphql-php",
-            "version": "v0.13.9",
+            "version": "v0.13.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webonyx/graphql-php.git",
-                "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3"
+                "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3",
-                "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3",
+                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6829ae58f4c59121df1f86915fb9917a2ec595e8",
+                "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8",
                 "shasum": ""
             },
             "require": {
@@ -5496,7 +5330,7 @@
                 "api",
                 "graphql"
             ],
-            "time": "2020-07-02T05:49:25+00:00"
+            "time": "2019-08-25T10:32:47+00:00"
         },
         {
             "name": "wikimedia/less.php",
@@ -5717,16 +5551,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.147.0",
+            "version": "3.141.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "e63974c002c0f6520da597d44a3f83ce46d7a612"
+                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e63974c002c0f6520da597d44a3f83ce46d7a612",
-                "reference": "e63974c002c0f6520da597d44a3f83ce46d7a612",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d57dbde176a7db7a6131bb5d325aff63515eabc3",
+                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3",
                 "shasum": ""
             },
             "require": {
@@ -5749,7 +5583,6 @@
                 "ext-pcntl": "*",
                 "ext-sockets": "*",
                 "nette/neon": "^2.3",
-                "paragonie/random_compat": ">= 2",
                 "phpunit/phpunit": "^4.8.35|^5.4.3",
                 "psr/cache": "^1.0",
                 "psr/simple-cache": "^1.0",
@@ -5798,7 +5631,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-07-17T18:14:13+00:00"
+            "time": "2020-06-10T18:11:38+00:00"
         },
         {
             "name": "beberlei/assert",
@@ -6340,16 +6173,16 @@
         },
         {
             "name": "codeception/stub",
-            "version": "3.7.0",
+            "version": "3.6.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/Stub.git",
-                "reference": "468dd5fe659f131fc997f5196aad87512f9b1304"
+                "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304",
-                "reference": "468dd5fe659f131fc997f5196aad87512f9b1304",
+                "url": "https://api.github.com/repos/Codeception/Stub/zipball/a3ba01414cbee76a1bced9f9b6b169cc8d203880",
+                "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880",
                 "shasum": ""
             },
             "require": {
@@ -6366,7 +6199,7 @@
                 "MIT"
             ],
             "description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
-            "time": "2020-07-03T15:54:43+00:00"
+            "time": "2020-02-07T18:42:28+00:00"
         },
         {
             "name": "csharpru/vault-php",
@@ -6591,16 +6424,16 @@
         },
         {
             "name": "doctrine/cache",
-            "version": "1.10.2",
+            "version": "1.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/cache.git",
-                "reference": "13e3381b25847283a91948d04640543941309727"
+                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727",
-                "reference": "13e3381b25847283a91948d04640543941309727",
+                "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
+                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
                 "shasum": ""
             },
             "require": {
@@ -6669,7 +6502,7 @@
                 "redis",
                 "xcache"
             ],
-            "time": "2020-07-07T18:54:01+00:00"
+            "time": "2020-05-27T16:24:54+00:00"
         },
         {
             "name": "doctrine/inflector",
@@ -6858,16 +6691,16 @@
         },
         {
             "name": "friendsofphp/php-cs-fixer",
-            "version": "v2.16.4",
+            "version": "v2.16.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
-                "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13"
+                "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/1023c3458137ab052f6ff1e09621a721bfdeca13",
-                "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13",
+                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0",
+                "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0",
                 "shasum": ""
             },
             "require": {
@@ -6899,12 +6732,12 @@
                 "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
                 "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
                 "phpunitgoodpractices/traits": "^1.8",
-                "symfony/phpunit-bridge": "^5.1",
+                "symfony/phpunit-bridge": "^4.3 || ^5.0",
                 "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
             },
             "suggest": {
                 "ext-dom": "For handling output formats in XML",
-                "ext-mbstring": "For handling non-UTF8 characters.",
+                "ext-mbstring": "For handling non-UTF8 characters in cache signature.",
                 "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
                 "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
                 "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
@@ -6945,7 +6778,7 @@
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
-            "time": "2020-06-27T23:57:46+00:00"
+            "time": "2020-04-15T18:51:10+00:00"
         },
         {
             "name": "jms/metadata",
@@ -7552,20 +7385,20 @@
         },
         {
             "name": "myclabs/deep-copy",
-            "version": "1.10.1",
+            "version": "1.9.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
+                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
-                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1 || ^8.0"
+                "php": "^7.1"
             },
             "replace": {
                 "myclabs/deep-copy": "self.version"
@@ -7596,7 +7429,7 @@
                 "object",
                 "object graph"
             ],
-            "time": "2020-06-29T13:22:24+00:00"
+            "time": "2020-01-17T21:11:47+00:00"
         },
         {
             "name": "paragonie/constant_time_encoding",
@@ -8033,25 +7866,25 @@
         },
         {
             "name": "phpdocumentor/reflection-common",
-            "version": "2.2.0",
+            "version": "2.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
-                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
+                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
-                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2 || ^8.0"
+                "php": ">=7.1"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-2.x": "2.x-dev"
+                    "dev-master": "2.x-dev"
                 }
             },
             "autoload": {
@@ -8078,7 +7911,7 @@
                 "reflection",
                 "static analysis"
             ],
-            "time": "2020-06-27T09:03:43+00:00"
+            "time": "2020-04-27T09:25:28+00:00"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
@@ -8135,29 +7968,30 @@
         },
         {
             "name": "phpdocumentor/type-resolver",
-            "version": "1.3.0",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/TypeResolver.git",
-                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
+                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
-                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
+                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2 || ^8.0",
+                "php": "^7.2",
                 "phpdocumentor/reflection-common": "^2.0"
             },
             "require-dev": {
-                "ext-tokenizer": "*"
+                "ext-tokenizer": "^7.2",
+                "mockery/mockery": "~1"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-1.x": "1.x-dev"
+                    "dev-master": "1.x-dev"
                 }
             },
             "autoload": {
@@ -8176,7 +8010,7 @@
                 }
             ],
             "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
-            "time": "2020-06-27T10:12:23+00:00"
+            "time": "2020-02-18T18:59:58+00:00"
         },
         {
             "name": "phpmd/phpmd",
@@ -8305,33 +8139,33 @@
         },
         {
             "name": "phpspec/prophecy",
-            "version": "1.11.1",
+            "version": "v1.10.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpspec/prophecy.git",
-                "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160"
+                "reference": "451c3cd1418cf640de218914901e51b064abb093"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160",
-                "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
+                "reference": "451c3cd1418cf640de218914901e51b064abb093",
                 "shasum": ""
             },
             "require": {
-                "doctrine/instantiator": "^1.2",
-                "php": "^7.2",
-                "phpdocumentor/reflection-docblock": "^5.0",
-                "sebastian/comparator": "^3.0 || ^4.0",
-                "sebastian/recursion-context": "^3.0 || ^4.0"
+                "doctrine/instantiator": "^1.0.2",
+                "php": "^5.3|^7.0",
+                "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
+                "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
+                "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
             },
             "require-dev": {
-                "phpspec/phpspec": "^6.0",
-                "phpunit/phpunit": "^8.0"
+                "phpspec/phpspec": "^2.5 || ^3.2",
+                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.11.x-dev"
+                    "dev-master": "1.10.x-dev"
                 }
             },
             "autoload": {
@@ -8364,7 +8198,7 @@
                 "spy",
                 "stub"
             ],
-            "time": "2020-07-08T12:44:21+00:00"
+            "time": "2020-03-05T15:02:03+00:00"
         },
         {
             "name": "phpstan/phpstan",
@@ -8474,20 +8308,20 @@
         },
         {
             "name": "phpunit/php-file-iterator",
-            "version": "3.0.4",
+            "version": "3.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
-                "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e"
+                "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/25fefc5b19835ca653877fe081644a3f8c1d915e",
-                "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
+                "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8520,24 +8354,24 @@
                 "filesystem",
                 "iterator"
             ],
-            "time": "2020-07-11T05:18:21+00:00"
+            "time": "2020-04-18T05:02:12+00:00"
         },
         {
             "name": "phpunit/php-invoker",
-            "version": "3.0.2",
+            "version": "3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-invoker.git",
-                "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66"
+                "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f6eedfed1085dd1f4c599629459a0277d25f9a66",
-                "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a",
+                "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "ext-pcntl": "*",
@@ -8573,27 +8407,24 @@
             "keywords": [
                 "process"
             ],
-            "time": "2020-06-26T11:53:53+00:00"
+            "time": "2020-02-07T06:06:11+00:00"
         },
         {
             "name": "phpunit/php-text-template",
-            "version": "2.0.2",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-text-template.git",
-                "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324"
+                "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/6ff9c8ea4d3212b88fcf74e25e516e2c51c99324",
-                "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
+                "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.0"
+                "php": "^7.3"
             },
             "type": "library",
             "extra": {
@@ -8622,7 +8453,7 @@
             "keywords": [
                 "template"
             ],
-            "time": "2020-06-26T11:55:37+00:00"
+            "time": "2020-02-01T07:43:44+00:00"
         },
         {
             "name": "phpunit/php-timer",
@@ -8675,21 +8506,21 @@
         },
         {
             "name": "phpunit/php-token-stream",
-            "version": "4.0.3",
+            "version": "4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
-                "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374"
+                "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5672711b6b07b14d5ab694e700c62eeb82fcf374",
-                "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
+                "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
                 "shasum": ""
             },
             "require": {
                 "ext-tokenizer": "*",
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8720,7 +8551,7 @@
             "keywords": [
                 "tokenizer"
             ],
-            "time": "2020-06-27T06:36:25+00:00"
+            "time": "2020-05-06T09:56:31+00:00"
         },
         {
             "name": "phpunit/phpunit",
@@ -8906,20 +8737,20 @@
         },
         {
             "name": "sebastian/code-unit",
-            "version": "1.0.5",
+            "version": "1.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit.git",
-                "reference": "c1e2df332c905079980b119c4db103117e5e5c90"
+                "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/c1e2df332c905079980b119c4db103117e5e5c90",
-                "reference": "c1e2df332c905079980b119c4db103117e5e5c90",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
+                "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8948,24 +8779,24 @@
             ],
             "description": "Collection of value objects that represent the PHP code units",
             "homepage": "https://github.com/sebastianbergmann/code-unit",
-            "time": "2020-06-26T12:50:45+00:00"
+            "time": "2020-04-30T05:58:10+00:00"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
-            "version": "2.0.2",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
-                "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819"
+                "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ee51f9bb0c6d8a43337055db3120829fa14da819",
-                "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e",
+                "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8993,24 +8824,24 @@
             ],
             "description": "Looks up which function or method a line of code belongs to",
             "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
-            "time": "2020-06-26T12:04:00+00:00"
+            "time": "2020-02-07T06:20:13+00:00"
         },
         {
             "name": "sebastian/comparator",
-            "version": "4.0.3",
+            "version": "4.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f"
+                "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f",
-                "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8",
+                "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0",
+                "php": "^7.3",
                 "sebastian/diff": "^4.0",
                 "sebastian/exporter": "^4.0"
             },
@@ -9057,24 +8888,24 @@
                 "compare",
                 "equality"
             ],
-            "time": "2020-06-26T12:05:46+00:00"
+            "time": "2020-02-07T06:08:51+00:00"
         },
         {
             "name": "sebastian/diff",
-            "version": "4.0.2",
+            "version": "4.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/diff.git",
-                "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113"
+                "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113",
-                "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a",
+                "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0",
@@ -9113,24 +8944,24 @@
                 "unidiff",
                 "unified diff"
             ],
-            "time": "2020-06-30T04:46:02+00:00"
+            "time": "2020-05-08T05:01:12+00:00"
         },
         {
             "name": "sebastian/environment",
-            "version": "5.1.2",
+            "version": "5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2"
+                "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2",
-                "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c",
+                "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9166,29 +8997,29 @@
                 "environment",
                 "hhvm"
             ],
-            "time": "2020-06-26T12:07:24+00:00"
+            "time": "2020-04-14T13:36:52+00:00"
         },
         {
             "name": "sebastian/exporter",
-            "version": "4.0.2",
+            "version": "4.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "571d721db4aec847a0e59690b954af33ebf9f023"
+                "reference": "80c26562e964016538f832f305b2286e1ec29566"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/571d721db4aec847a0e59690b954af33ebf9f023",
-                "reference": "571d721db4aec847a0e59690b954af33ebf9f023",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566",
+                "reference": "80c26562e964016538f832f305b2286e1ec29566",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0",
+                "php": "^7.3",
                 "sebastian/recursion-context": "^4.0"
             },
             "require-dev": {
                 "ext-mbstring": "*",
-                "phpunit/phpunit": "^9.2"
+                "phpunit/phpunit": "^9.0"
             },
             "type": "library",
             "extra": {
@@ -9233,7 +9064,7 @@
                 "export",
                 "exporter"
             ],
-            "time": "2020-06-26T12:08:55+00:00"
+            "time": "2020-02-07T06:10:52+00:00"
         },
         {
             "name": "sebastian/finder-facade",
@@ -9337,20 +9168,20 @@
         },
         {
             "name": "sebastian/object-enumerator",
-            "version": "4.0.2",
+            "version": "4.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/object-enumerator.git",
-                "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8"
+                "reference": "e67516b175550abad905dc952f43285957ef4363"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/074fed2d0a6d08e1677dd8ce9d32aecb384917b8",
-                "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363",
+                "reference": "e67516b175550abad905dc952f43285957ef4363",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0",
+                "php": "^7.3",
                 "sebastian/object-reflector": "^2.0",
                 "sebastian/recursion-context": "^4.0"
             },
@@ -9380,24 +9211,24 @@
             ],
             "description": "Traverses array structures and object graphs to enumerate all referenced objects",
             "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
-            "time": "2020-06-26T12:11:32+00:00"
+            "time": "2020-02-07T06:12:23+00:00"
         },
         {
             "name": "sebastian/object-reflector",
-            "version": "2.0.2",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/object-reflector.git",
-                "reference": "127a46f6b057441b201253526f81d5406d6c7840"
+                "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/127a46f6b057441b201253526f81d5406d6c7840",
-                "reference": "127a46f6b057441b201253526f81d5406d6c7840",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
+                "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9425,7 +9256,7 @@
             ],
             "description": "Allows reflection of object attributes, including inherited and non-public ones",
             "homepage": "https://github.com/sebastianbergmann/object-reflector/",
-            "time": "2020-06-26T12:12:55+00:00"
+            "time": "2020-02-07T06:19:40+00:00"
         },
         {
             "name": "sebastian/phpcpd",
@@ -9480,20 +9311,20 @@
         },
         {
             "name": "sebastian/recursion-context",
-            "version": "4.0.2",
+            "version": "4.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/recursion-context.git",
-                "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63"
+                "reference": "cdd86616411fc3062368b720b0425de10bd3d579"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/062231bf61d2b9448c4fa5a7643b5e1829c11d63",
-                "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579",
+                "reference": "cdd86616411fc3062368b720b0425de10bd3d579",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9529,24 +9360,24 @@
             ],
             "description": "Provides functionality to recursively process PHP variables",
             "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
-            "time": "2020-06-26T12:14:17+00:00"
+            "time": "2020-02-07T06:18:20+00:00"
         },
         {
             "name": "sebastian/resource-operations",
-            "version": "3.0.2",
+            "version": "3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/resource-operations.git",
-                "reference": "0653718a5a629b065e91f774595267f8dc32e213"
+                "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0653718a5a629b065e91f774595267f8dc32e213",
-                "reference": "0653718a5a629b065e91f774595267f8dc32e213",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
+                "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9574,24 +9405,24 @@
             ],
             "description": "Provides a list of PHP built-in functions that operate on resources",
             "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
-            "time": "2020-06-26T12:16:22+00:00"
+            "time": "2020-02-07T06:13:02+00:00"
         },
         {
             "name": "sebastian/type",
-            "version": "2.2.1",
+            "version": "2.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/type.git",
-                "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a"
+                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/86991e2b33446cd96e648c18bcdb1e95afb2c05a",
-                "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
+                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.2"
@@ -9599,7 +9430,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.2-dev"
+                    "dev-master": "2.1-dev"
                 }
             },
             "autoload": {
@@ -9620,24 +9451,24 @@
             ],
             "description": "Collection of value objects that represent the types of the PHP type system",
             "homepage": "https://github.com/sebastianbergmann/type",
-            "time": "2020-07-05T08:31:53+00:00"
+            "time": "2020-06-01T12:21:09+00:00"
         },
         {
             "name": "sebastian/version",
-            "version": "3.0.1",
+            "version": "3.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/version.git",
-                "reference": "626586115d0ed31cb71483be55beb759b5af5a3c"
+                "reference": "0411bde656dce64202b39c2f4473993a9081d39e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/626586115d0ed31cb71483be55beb759b5af5a3c",
-                "reference": "626586115d0ed31cb71483be55beb759b5af5a3c",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e",
+                "reference": "0411bde656dce64202b39c2f4473993a9081d39e",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3 || ^8.0"
+                "php": "^7.3"
             },
             "type": "library",
             "extra": {
@@ -9663,7 +9494,7 @@
             ],
             "description": "Library that helps with managing the version number of Git-hosted PHP projects",
             "homepage": "https://github.com/sebastianbergmann/version",
-            "time": "2020-06-26T12:18:43+00:00"
+            "time": "2020-01-21T06:36:37+00:00"
         },
         {
             "name": "spomky-labs/otphp",
@@ -9789,7 +9620,7 @@
         },
         {
             "name": "symfony/config",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/config.git",
@@ -9855,16 +9686,16 @@
         },
         {
             "name": "symfony/dependency-injection",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "6508423eded583fc07e88a0172803e1a62f0310c"
+                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6508423eded583fc07e88a0172803e1a62f0310c",
-                "reference": "6508423eded583fc07e88a0172803e1a62f0310c",
+                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6a6791e9584273b32eeb01790da4c7446d87a621",
+                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621",
                 "shasum": ""
             },
             "require": {
@@ -9926,20 +9757,20 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "time": "2020-06-12T08:11:32+00:00"
+            "time": "2020-05-30T20:35:19+00:00"
         },
         {
             "name": "symfony/deprecation-contracts",
-            "version": "v2.1.3",
+            "version": "v2.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/deprecation-contracts.git",
-                "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14"
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14",
-                "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
                 "shasum": ""
             },
             "require": {
@@ -9949,10 +9780,6 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.1-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -9976,20 +9803,20 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
-            "time": "2020-06-06T08:49:21+00:00"
+            "time": "2020-05-27T08:34:37+00:00"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "f93055171b847915225bd5b0a5792888419d8d75"
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75",
-                "reference": "f93055171b847915225bd5b0a5792888419d8d75",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
                 "shasum": ""
             },
             "require": {
@@ -10037,20 +9864,20 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "time": "2020-06-15T06:52:54+00:00"
+            "time": "2020-05-24T12:18:07+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "c0c418f05e727606e85b482a8591519c4712cf45"
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45",
-                "reference": "c0c418f05e727606e85b482a8591519c4712cf45",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
+                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
                 "shasum": ""
             },
             "require": {
@@ -10100,11 +9927,11 @@
                 "mime",
                 "mime-type"
             ],
-            "time": "2020-06-09T15:07:35+00:00"
+            "time": "2020-05-25T12:33:44+00:00"
         },
         {
             "name": "symfony/options-resolver",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/options-resolver.git",
@@ -10158,9 +9985,68 @@
             ],
             "time": "2020-05-23T13:08:13+00:00"
         },
+        {
+            "name": "symfony/polyfill-php70",
+            "version": "v1.17.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/polyfill-php70.git",
+                "reference": "82225c2d7d23d7e70515496d249c0152679b468e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/82225c2d7d23d7e70515496d249c0152679b468e",
+                "reference": "82225c2d7d23d7e70515496d249c0152679b468e",
+                "shasum": ""
+            },
+            "require": {
+                "paragonie/random_compat": "~1.0|~2.0|~9.99",
+                "php": ">=5.3.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.17-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php70\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "time": "2020-05-12T16:47:27+00:00"
+        },
         {
             "name": "symfony/stopwatch",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/stopwatch.git",
@@ -10210,7 +10096,7 @@
         },
         {
             "name": "symfony/yaml",
-            "version": "v5.1.2",
+            "version": "v5.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
@@ -10273,16 +10159,16 @@
         },
         {
             "name": "thecodingmachine/safe",
-            "version": "v1.1.3",
+            "version": "v1.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thecodingmachine/safe.git",
-                "reference": "9f277171e296a3c8629c04ac93ec95ff0f208ccb"
+                "reference": "04f9ffae372a9816d4472dfb7bcf6126b623a9df"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/9f277171e296a3c8629c04ac93ec95ff0f208ccb",
-                "reference": "9f277171e296a3c8629c04ac93ec95ff0f208ccb",
+                "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/04f9ffae372a9816d4472dfb7bcf6126b623a9df",
+                "reference": "04f9ffae372a9816d4472dfb7bcf6126b623a9df",
                 "shasum": ""
             },
             "require": {
@@ -10402,7 +10288,7 @@
                 "MIT"
             ],
             "description": "PHP core functions that throw exceptions instead of returning FALSE on error",
-            "time": "2020-07-10T09:34:29+00:00"
+            "time": "2020-05-04T15:25:36+00:00"
         },
         {
             "name": "theseer/fdomdocument",
@@ -10446,23 +10332,23 @@
         },
         {
             "name": "theseer/tokenizer",
-            "version": "1.2.0",
+            "version": "1.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/theseer/tokenizer.git",
-                "reference": "75a63c33a8577608444246075ea0af0d052e452a"
+                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
-                "reference": "75a63c33a8577608444246075ea0af0d052e452a",
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
                 "shasum": ""
             },
             "require": {
                 "ext-dom": "*",
                 "ext-tokenizer": "*",
                 "ext-xmlwriter": "*",
-                "php": "^7.2 || ^8.0"
+                "php": "^7.0"
             },
             "type": "library",
             "autoload": {
@@ -10482,25 +10368,25 @@
                 }
             ],
             "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
-            "time": "2020-07-12T23:59:07+00:00"
+            "time": "2019-06-13T22:48:21+00:00"
         },
         {
             "name": "vlucas/phpdotenv",
-            "version": "v2.6.6",
+            "version": "v2.6.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/vlucas/phpdotenv.git",
-                "reference": "e1d57f62db3db00d9139078cbedf262280701479"
+                "reference": "2e977311ffb17b2f82028a9c36824647789c6365"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/e1d57f62db3db00d9139078cbedf262280701479",
-                "reference": "e1d57f62db3db00d9139078cbedf262280701479",
+                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e977311ffb17b2f82028a9c36824647789c6365",
+                "reference": "2e977311ffb17b2f82028a9c36824647789c6365",
                 "shasum": ""
             },
             "require": {
                 "php": "^5.3.9 || ^7.0 || ^8.0",
-                "symfony/polyfill-ctype": "^1.17"
+                "symfony/polyfill-ctype": "^1.16"
             },
             "require-dev": {
                 "ext-filter": "*",
@@ -10544,28 +10430,27 @@
                 "env",
                 "environment"
             ],
-            "time": "2020-07-14T17:54:18+00:00"
+            "time": "2020-06-02T14:06:52+00:00"
         },
         {
             "name": "webmozart/assert",
-            "version": "1.9.1",
+            "version": "1.8.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webmozart/assert.git",
-                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
+                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
-                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
                 "shasum": ""
             },
             "require": {
-                "php": "^5.3.3 || ^7.0 || ^8.0",
+                "php": "^5.3.3 || ^7.0",
                 "symfony/polyfill-ctype": "^1.8"
             },
             "conflict": {
-                "phpstan/phpstan": "<0.12.20",
                 "vimeo/psalm": "<3.9.1"
             },
             "require-dev": {
@@ -10593,7 +10478,7 @@
                 "check",
                 "validate"
             ],
-            "time": "2020-07-08T17:02:28+00:00"
+            "time": "2020-04-18T12:12:48+00:00"
         },
         {
             "name": "weew/helpers-array",
@@ -10636,7 +10521,7 @@
     "aliases": [],
     "minimum-stability": "stable",
     "stability-flags": [],
-    "prefer-stable": false,
+    "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {
         "php": "~7.3.0||~7.4.0",
diff --git a/lib/internal/Magento/Framework/Amqp/composer.json b/lib/internal/Magento/Framework/Amqp/composer.json
index 44846c23a48e4..fc65e37d12ecf 100644
--- a/lib/internal/Magento/Framework/Amqp/composer.json
+++ b/lib/internal/Magento/Framework/Amqp/composer.json
@@ -10,7 +10,7 @@
         "AFL-3.0"
     ],
     "require": {
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "php": "~7.3.0||~7.4.0",
         "php-amqplib/php-amqplib": "~2.7.0||~2.10.0"
     },
@@ -21,6 +21,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/lib/internal/Magento/Framework/Bulk/composer.json b/lib/internal/Magento/Framework/Bulk/composer.json
index cf6d64227ddf9..b8e0992182169 100644
--- a/lib/internal/Magento/Framework/Bulk/composer.json
+++ b/lib/internal/Magento/Framework/Bulk/composer.json
@@ -10,7 +10,7 @@
         "AFL-3.0"
     ],
     "require": {
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "autoload": {
@@ -20,6 +20,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "101.0.0"
+    }
 }
diff --git a/lib/internal/Magento/Framework/MessageQueue/composer.json b/lib/internal/Magento/Framework/MessageQueue/composer.json
index 889a6c37d0911..056f1d40c39cf 100644
--- a/lib/internal/Magento/Framework/MessageQueue/composer.json
+++ b/lib/internal/Magento/Framework/MessageQueue/composer.json
@@ -10,7 +10,7 @@
         "AFL-3.0"
     ],
     "require": {
-        "magento/framework": "103.0.*",
+        "magento/framework": "*",
         "php": "~7.3.0||~7.4.0"
     },
     "autoload": {
@@ -20,6 +20,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "100.4.0"
+    }
 }
diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json
index 3bd1d83ff0338..dfc81189bf544 100644
--- a/lib/internal/Magento/Framework/composer.json
+++ b/lib/internal/Magento/Framework/composer.json
@@ -59,6 +59,5 @@
         "files": [
             "registration.php"
         ]
-    },
-    "version": "103.0.0"
+    }
 }

From 35307490cccdc279037f56f381488fc23ad83b3d Mon Sep 17 00:00:00 2001
From: OlgaVasyltsun <olga.vasyltsun@gmail.com>
Date: Tue, 21 Jul 2020 15:06:26 +0300
Subject: [PATCH 298/307] MC-35891: Automate MC-28963 tests

---
 .../Magento/Catalog/Test/Mftf/Data/ProductData.xml   |  1 -
 .../LayeredNavigation/Test/Mftf/Data/ConfigData.xml  |  1 -
 ...tributeOptionsAreShownInLayeredNavigationTest.xml | 12 ++++++------
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
index e5b38533747f9..3faf79416a032 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml
@@ -285,7 +285,6 @@
         <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
     </entity>
     <entity name="ApiSimpleProductWithCategory" type="product2" extends="ApiSimpleOne">
-        <requiredEntity type="custom_attribute">CustomAttributeProductAttribute</requiredEntity>
         <requiredEntity type="custom_attribute">CustomAttributeCategoryIds</requiredEntity>
     </entity>
     <entity name="ApiSimpleProductWithShortSKU" type="product2" extends="ApiSimpleOne">
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
index a745397403cd2..85eb8830dffca 100644
--- a/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Data/ConfigData.xml
@@ -16,5 +16,4 @@
         <data key="path">catalog/layered_navigation/price_range_calculation</data>
         <data key="value">auto</data>
     </entity>
-
 </entities>
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml
index 4f547120f14d2..cb7e683605a68 100644
--- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest.xml
@@ -10,17 +10,19 @@
        xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
     <test name="StorefrontAllAttributeOptionsAreShownInLayeredNavigationTest">
         <annotations>
-            <features value="Layered Navigation"/>
+            <features value="LayeredNavigation"/>
             <stories value="Product attributes in Layered Navigation"/>
             <title value="Limitation of displayed attribute options number in layered navigation with ElasticSearch"/>
             <description value="All attribute options are shown in Layered navigation"/>
             <severity value="CRITICAL"/>
             <testCaseId value="MC-28963"/>
-            <group value="LayeredNavigation"/>
+            <group value="layeredNavigation"/>
+            <group value="catalog"/>
             <group value="SearchEngineElasticsearch"/>
         </annotations>
 
         <before>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
             <magentoCLI command="config:set {{DisplayProductCountDefaultValue.path}} {{DisplayProductCountDefaultValue.value}}" stepKey="enableDisplayProductCount"/>
             <magentoCLI command="config:set {{PriceNavigationStepCalculationDefaultValue.path}} {{PriceNavigationStepCalculationDefaultValue.value}}" stepKey="setPriceNavigationStepCalculationDefaultValue"/>
             <createData entity="ApiCategory" stepKey="createCategory"/>
@@ -72,7 +74,7 @@
             <createData entity="productAttributeOption" stepKey="createConfigProductAttributeOption15">
                 <requiredEntity createDataKey="createConfigProductAttribute"/>
             </createData>
-            <!--Cet Created options data-->
+            <!--Get Created options data-->
             <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption1">
                 <requiredEntity createDataKey="createConfigProductAttribute"/>
             </getData>
@@ -309,9 +311,7 @@
             <deleteData createDataKey="createConfigChildProduct14" stepKey="deleteConfigChildProduct14"/>
             <deleteData createDataKey="createConfigChildProduct15" stepKey="deleteConfigChildProduct15"/>
             <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteAttribute"/>
-            <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
-                <argument name="indices" value="catalogsearch_fulltext"/>
-            </actionGroup>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
         </after>
 
         <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategory">

From 5498e7613e51288184f1c1e5a6368544efa4b7bb Mon Sep 17 00:00:00 2001
From: Pavel Bystritsky <engcom-vendorworker-foxtrot@adobe.com>
Date: Tue, 21 Jul 2020 17:59:52 +0300
Subject: [PATCH 299/307] composer.lock update.

---
 composer.lock | 1751 ++++++++++++++++++++++++++++++++++---------------
 1 file changed, 1220 insertions(+), 531 deletions(-)

diff --git a/composer.lock b/composer.lock
index 370602b87ae09..97ab2b12512c2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "0ebe9109f59c372f9962e2a51c35c829",
+    "content-hash": "a8f3bda109a177996d409f39acfbfd9f",
     "packages": [
         {
             "name": "colinmollenhour/cache-backend-file",
@@ -206,20 +206,30 @@
                 "ssl",
                 "tls"
             ],
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-04-08T08:27:21+00:00"
         },
         {
             "name": "composer/composer",
-            "version": "1.10.7",
+            "version": "1.10.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/composer.git",
-                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39"
+                "reference": "83c3250093d5491600a822e176b107a945baf95a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/composer/zipball/956608ea4f7de9e58c53dfb019d85ae62b193c39",
-                "reference": "956608ea4f7de9e58c53dfb019d85ae62b193c39",
+                "url": "https://api.github.com/repos/composer/composer/zipball/83c3250093d5491600a822e176b107a945baf95a",
+                "reference": "83c3250093d5491600a822e176b107a945baf95a",
                 "shasum": ""
             },
             "require": {
@@ -238,12 +248,11 @@
                 "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0"
             },
             "conflict": {
-                "symfony/console": "2.8.38",
-                "symfony/phpunit-bridge": "3.4.40"
+                "symfony/console": "2.8.38"
             },
             "require-dev": {
                 "phpspec/prophecy": "^1.10",
-                "symfony/phpunit-bridge": "^3.4"
+                "symfony/phpunit-bridge": "^4.2"
             },
             "suggest": {
                 "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
@@ -287,7 +296,21 @@
                 "dependency",
                 "package"
             ],
-            "time": "2020-06-03T08:03:56+00:00"
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-16T10:57:00+00:00"
         },
         {
             "name": "composer/semver",
@@ -352,16 +375,16 @@
         },
         {
             "name": "composer/spdx-licenses",
-            "version": "1.5.3",
+            "version": "1.5.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/composer/spdx-licenses.git",
-                "reference": "0c3e51e1880ca149682332770e25977c70cf9dae"
+                "reference": "6946f785871e2314c60b4524851f3702ea4f2223"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae",
-                "reference": "0c3e51e1880ca149682332770e25977c70cf9dae",
+                "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/6946f785871e2314c60b4524851f3702ea4f2223",
+                "reference": "6946f785871e2314c60b4524851f3702ea4f2223",
                 "shasum": ""
             },
             "require": {
@@ -408,7 +431,21 @@
                 "spdx",
                 "validator"
             ],
-            "time": "2020-02-14T07:44:31+00:00"
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-15T15:35:07+00:00"
         },
         {
             "name": "composer/xdebug-handler",
@@ -452,6 +489,20 @@
                 "Xdebug",
                 "performance"
             ],
+            "funding": [
+                {
+                    "url": "https://packagist.com",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/composer",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-06-04T11:16:35+00:00"
         },
         {
@@ -652,16 +703,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.5.4",
+            "version": "6.5.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
+                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
-                "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
+                "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
                 "shasum": ""
             },
             "require": {
@@ -669,7 +720,7 @@
                 "guzzlehttp/promises": "^1.0",
                 "guzzlehttp/psr7": "^1.6.1",
                 "php": ">=5.5",
-                "symfony/polyfill-intl-idn": "1.17.0"
+                "symfony/polyfill-intl-idn": "^1.17.0"
             },
             "require-dev": {
                 "ext-curl": "*",
@@ -715,7 +766,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2020-05-25T19:35:05+00:00"
+            "time": "2020-06-16T21:01:06+00:00"
         },
         {
             "name": "guzzlehttp/promises",
@@ -1305,6 +1356,12 @@
                 "BSD-3-Clause"
             ],
             "description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.",
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
             "time": "2020-05-20T13:45:39+00:00"
         },
         {
@@ -1678,16 +1735,16 @@
         },
         {
             "name": "laminas/laminas-form",
-            "version": "2.14.5",
+            "version": "2.15.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-form.git",
-                "reference": "3e22e09751cf6ae031be87a44e092e7925ce5b7b"
+                "reference": "359cd372c565e18a17f32ccfeacdf21bba091ce2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-form/zipball/3e22e09751cf6ae031be87a44e092e7925ce5b7b",
-                "reference": "3e22e09751cf6ae031be87a44e092e7925ce5b7b",
+                "url": "https://api.github.com/repos/laminas/laminas-form/zipball/359cd372c565e18a17f32ccfeacdf21bba091ce2",
+                "reference": "359cd372c565e18a17f32ccfeacdf21bba091ce2",
                 "shasum": ""
             },
             "require": {
@@ -1730,8 +1787,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.14.x-dev",
-                    "dev-develop": "2.15.x-dev"
+                    "dev-master": "2.15.x-dev",
+                    "dev-develop": "2.16.x-dev"
                 },
                 "laminas": {
                     "component": "Laminas\\Form",
@@ -1756,20 +1813,26 @@
                 "form",
                 "laminas"
             ],
-            "time": "2020-03-29T12:46:16+00:00"
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
+            "time": "2020-07-14T13:53:27+00:00"
         },
         {
             "name": "laminas/laminas-http",
-            "version": "2.11.2",
+            "version": "2.12.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-http.git",
-                "reference": "8c66963b933c80da59433da56a44dfa979f3ec88"
+                "reference": "48bd06ffa3a6875e2b77d6852405eb7b1589d575"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-http/zipball/8c66963b933c80da59433da56a44dfa979f3ec88",
-                "reference": "8c66963b933c80da59433da56a44dfa979f3ec88",
+                "url": "https://api.github.com/repos/laminas/laminas-http/zipball/48bd06ffa3a6875e2b77d6852405eb7b1589d575",
+                "reference": "48bd06ffa3a6875e2b77d6852405eb7b1589d575",
                 "shasum": ""
             },
             "require": {
@@ -1781,7 +1844,7 @@
                 "php": "^5.6 || ^7.0"
             },
             "replace": {
-                "zendframework/zend-http": "self.version"
+                "zendframework/zend-http": "^2.11.2"
             },
             "require-dev": {
                 "laminas/laminas-coding-standard": "~1.0.0",
@@ -1794,8 +1857,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.11.x-dev",
-                    "dev-develop": "2.12.x-dev"
+                    "dev-master": "2.12.x-dev",
+                    "dev-develop": "2.13.x-dev"
                 }
             },
             "autoload": {
@@ -1814,7 +1877,13 @@
                 "http client",
                 "laminas"
             ],
-            "time": "2019-12-31T17:02:36+00:00"
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
+            "time": "2020-06-23T15:14:37+00:00"
         },
         {
             "name": "laminas/laminas-hydrator",
@@ -2200,16 +2269,16 @@
         },
         {
             "name": "laminas/laminas-mail",
-            "version": "2.10.1",
+            "version": "2.11.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laminas/laminas-mail.git",
-                "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005"
+                "reference": "4c5545637eea3dc745668ddff1028692ed004c4b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/cfe0711446c8d9c392e9fc664c9ccc180fa89005",
-                "reference": "cfe0711446c8d9c392e9fc664c9ccc180fa89005",
+                "url": "https://api.github.com/repos/laminas/laminas-mail/zipball/4c5545637eea3dc745668ddff1028692ed004c4b",
+                "reference": "4c5545637eea3dc745668ddff1028692ed004c4b",
                 "shasum": ""
             },
             "require": {
@@ -2239,8 +2308,8 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.10.x-dev",
-                    "dev-develop": "2.11.x-dev"
+                    "dev-master": "2.11.x-dev",
+                    "dev-develop": "2.12.x-dev"
                 },
                 "laminas": {
                     "component": "Laminas\\Mail",
@@ -2262,7 +2331,13 @@
                 "laminas",
                 "mail"
             ],
-            "time": "2020-04-21T16:42:19+00:00"
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
+            "time": "2020-06-30T20:17:23+00:00"
         },
         {
             "name": "laminas/laminas-math",
@@ -3254,6 +3329,12 @@
                 "laminas",
                 "zf"
             ],
+            "funding": [
+                {
+                    "url": "https://funding.communitybridge.org/projects/laminas-project",
+                    "type": "community_bridge"
+                }
+            ],
             "time": "2020-05-20T16:45:56+00:00"
         },
         {
@@ -3493,6 +3574,16 @@
                 "logging",
                 "psr-3"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/Seldaek",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-22T07:31:27+00:00"
         },
         {
@@ -3820,16 +3911,16 @@
         },
         {
             "name": "phpseclib/phpseclib",
-            "version": "2.0.27",
+            "version": "2.0.28",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
-                "reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc"
+                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
-                "reference": "34620af4df7d1988d8f0d7e91f6c8a3bf931d8dc",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
+                "reference": "d1ca58cf33cb21046d702ae3a7b14fdacd9f3260",
                 "shasum": ""
             },
             "require": {
@@ -3908,7 +3999,21 @@
                 "x.509",
                 "x509"
             ],
-            "time": "2020-04-04T23:17:33+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/terrafrost",
+                    "type": "github"
+                },
+                {
+                    "url": "https://www.patreon.com/phpseclib",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-08T09:08:33+00:00"
         },
         {
             "name": "psr/container",
@@ -4271,20 +4376,30 @@
                 "parser",
                 "validator"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/Seldaek",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-04-30T19:05:18+00:00"
         },
         {
             "name": "seld/phar-utils",
-            "version": "1.1.0",
+            "version": "1.1.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Seldaek/phar-utils.git",
-                "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0"
+                "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0",
-                "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0",
+                "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8674b1d84ffb47cc59a101f5d5a3b61e87d23796",
+                "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796",
                 "shasum": ""
             },
             "require": {
@@ -4315,11 +4430,11 @@
             "keywords": [
                 "phar"
             ],
-            "time": "2020-02-14T15:25:33+00:00"
+            "time": "2020-07-07T18:42:57+00:00"
         },
         {
             "name": "symfony/console",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
@@ -4392,11 +4507,25 @@
             ],
             "description": "Symfony Console Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-30T20:06:45+00:00"
         },
         {
             "name": "symfony/css-selector",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/css-selector.git",
@@ -4445,11 +4574,25 @@
             ],
             "description": "Symfony CssSelector Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/event-dispatcher",
-            "version": "v4.4.9",
+            "version": "v4.4.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher.git",
@@ -4515,24 +4658,38 @@
             ],
             "description": "Symfony EventDispatcher Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T08:37:50+00:00"
         },
         {
             "name": "symfony/event-dispatcher-contracts",
-            "version": "v1.1.7",
+            "version": "v1.1.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher-contracts.git",
-                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18"
+                "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
-                "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
+                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7",
+                "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1.3"
+                "php": ">=7.1.3"
             },
             "suggest": {
                 "psr/event-dispatcher": "",
@@ -4542,6 +4699,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "1.1-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -4573,11 +4734,25 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2019-09-17T09:54:03+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-06T13:19:58+00:00"
         },
         {
             "name": "symfony/filesystem",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/filesystem.git",
@@ -4623,11 +4798,25 @@
             ],
             "description": "Symfony Filesystem Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-30T20:35:19+00:00"
         },
         {
             "name": "symfony/finder",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/finder.git",
@@ -4672,20 +4861,34 @@
             ],
             "description": "Symfony Finder Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/polyfill-ctype",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
+                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
-                "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
+                "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
                 "shasum": ""
             },
             "require": {
@@ -4697,7 +4900,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4730,25 +4937,40 @@
                 "polyfill",
                 "portable"
             ],
-            "time": "2020-05-12T16:14:59+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
             "name": "symfony/polyfill-intl-idn",
-            "version": "v1.17.0",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-intl-idn.git",
-                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a"
+                "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a",
-                "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
+                "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3",
-                "symfony/polyfill-mbstring": "^1.3",
+                "symfony/polyfill-intl-normalizer": "^1.10",
+                "symfony/polyfill-php70": "^1.10",
                 "symfony/polyfill-php72": "^1.10"
             },
             "suggest": {
@@ -4757,7 +4979,11 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
@@ -4777,6 +5003,10 @@
                     "name": "Laurent Bassin",
                     "email": "laurent@bassin.info"
                 },
+                {
+                    "name": "Trevor Rowbotham",
+                    "email": "trevor.rowbotham@pm.me"
+                },
                 {
                     "name": "Symfony Community",
                     "homepage": "https://symfony.com/contributors"
@@ -4792,40 +5022,61 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
-            "name": "symfony/polyfill-mbstring",
-            "version": "v1.17.0",
+            "name": "symfony/polyfill-intl-normalizer",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
+                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+                "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
-                "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
+                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
+                "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3"
             },
             "suggest": {
-                "ext-mbstring": "For best performance"
+                "ext-intl": "For best performance"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "Symfony\\Polyfill\\Mbstring\\": ""
+                    "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
                 },
                 "files": [
                     "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -4842,43 +5093,65 @@
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony polyfill for the Mbstring extension",
+            "description": "Symfony polyfill for intl's Normalizer class and related functions",
             "homepage": "https://symfony.com",
             "keywords": [
                 "compatibility",
-                "mbstring",
+                "intl",
+                "normalizer",
                 "polyfill",
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
-            "name": "symfony/polyfill-php72",
-            "version": "v1.17.0",
+            "name": "symfony/polyfill-mbstring",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "f048e612a3905f34931127360bdd2def19a5e582"
+                "url": "https://github.com/symfony/polyfill-mbstring.git",
+                "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
-                "reference": "f048e612a3905f34931127360bdd2def19a5e582",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
+                "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
                 "shasum": ""
             },
             "require": {
                 "php": ">=5.3.3"
             },
+            "suggest": {
+                "ext-mbstring": "For best performance"
+            },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "Symfony\\Polyfill\\Php72\\": ""
+                    "Symfony\\Polyfill\\Mbstring\\": ""
                 },
                 "files": [
                     "bootstrap.php"
@@ -4898,42 +5171,62 @@
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+            "description": "Symfony polyfill for the Mbstring extension",
             "homepage": "https://symfony.com",
             "keywords": [
                 "compatibility",
+                "mbstring",
                 "polyfill",
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
-            "name": "symfony/polyfill-php73",
-            "version": "v1.17.0",
+            "name": "symfony/polyfill-php70",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
+                "url": "https://github.com/symfony/polyfill-php70.git",
+                "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
-                "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
+                "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
+                "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
                 "shasum": ""
             },
             "require": {
+                "paragonie/random_compat": "~1.0|~2.0|~9.99",
                 "php": ">=5.3.3"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "Symfony\\Polyfill\\Php73\\": ""
+                    "Symfony\\Polyfill\\Php70\\": ""
                 },
                 "files": [
                     "bootstrap.php"
@@ -4956,7 +5249,7 @@
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+            "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
             "homepage": "https://symfony.com",
             "keywords": [
                 "compatibility",
@@ -4964,40 +5257,55 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
-            "name": "symfony/polyfill-php80",
-            "version": "v1.17.0",
+            "name": "symfony/polyfill-php72",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
+                "url": "https://github.com/symfony/polyfill-php72.git",
+                "reference": "639447d008615574653fb3bc60d1986d7172eaae"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
+                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
+                "reference": "639447d008615574653fb3bc60d1986d7172eaae",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.0.8"
+                "php": ">=5.3.3"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.17-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "Symfony\\Polyfill\\Php80\\": ""
+                    "Symfony\\Polyfill\\Php72\\": ""
                 },
                 "files": [
                     "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -5005,10 +5313,6 @@
                 "MIT"
             ],
             "authors": [
-                {
-                    "name": "Ion Bazan",
-                    "email": "ion.bazan@gmail.com"
-                },
                 {
                     "name": "Nicolas Grekas",
                     "email": "p@tchwork.com"
@@ -5018,7 +5322,7 @@
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
             "homepage": "https://symfony.com",
             "keywords": [
                 "compatibility",
@@ -5026,37 +5330,58 @@
                 "portable",
                 "shim"
             ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
-            "name": "symfony/process",
-            "version": "v4.4.9",
+            "name": "symfony/polyfill-php73",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/process.git",
-                "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5"
+                "url": "https://github.com/symfony/polyfill-php73.git",
+                "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5",
-                "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
+                "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1.3"
+                "php": ">=5.3.3"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "4.4-dev"
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "Symfony\\Component\\Process\\": ""
+                    "Symfony\\Polyfill\\Php73\\": ""
                 },
-                "exclude-from-classmap": [
-                    "/Tests/"
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -5065,30 +5390,193 @@
             ],
             "authors": [
                 {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
                 },
                 {
                     "name": "Symfony Community",
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony Process Component",
+            "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
             "homepage": "https://symfony.com",
-            "time": "2020-05-30T20:06:45+00:00"
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
         },
         {
-            "name": "symfony/service-contracts",
-            "version": "v2.1.2",
+            "name": "symfony/polyfill-php80",
+            "version": "v1.18.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b"
+                "url": "https://github.com/symfony/polyfill-php80.git",
+                "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/66a8f0957a3ca54e4f724e49028ab19d75a8918b",
-                "reference": "66a8f0957a3ca54e4f724e49028ab19d75a8918b",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+                "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.0.8"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.18-dev"
+                },
+                "thanks": {
+                    "name": "symfony/polyfill",
+                    "url": "https://github.com/symfony/polyfill"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Polyfill\\Php80\\": ""
+                },
+                "files": [
+                    "bootstrap.php"
+                ],
+                "classmap": [
+                    "Resources/stubs"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ion Bazan",
+                    "email": "ion.bazan@gmail.com"
+                },
+                {
+                    "name": "Nicolas Grekas",
+                    "email": "p@tchwork.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+            "homepage": "https://symfony.com",
+            "keywords": [
+                "compatibility",
+                "polyfill",
+                "portable",
+                "shim"
+            ],
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T12:35:20+00:00"
+        },
+        {
+            "name": "symfony/process",
+            "version": "v4.4.10",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/process.git",
+                "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5",
+                "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1.3"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "4.4-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Symfony\\Component\\Process\\": ""
+                },
+                "exclude-from-classmap": [
+                    "/Tests/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Potencier",
+                    "email": "fabien@symfony.com"
+                },
+                {
+                    "name": "Symfony Community",
+                    "homepage": "https://symfony.com/contributors"
+                }
+            ],
+            "description": "Symfony Process Component",
+            "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-05-30T20:06:45+00:00"
+        },
+        {
+            "name": "symfony/service-contracts",
+            "version": "v2.1.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/symfony/service-contracts.git",
+                "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/58c7475e5457c5492c26cc740cc0ad7464be9442",
+                "reference": "58c7475e5457c5492c26cc740cc0ad7464be9442",
                 "shasum": ""
             },
             "require": {
@@ -5102,6 +5590,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.1-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -5133,7 +5625,21 @@
                 "interoperability",
                 "standards"
             ],
-            "time": "2020-05-20T17:43:50+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-06T13:23:11+00:00"
         },
         {
             "name": "tedivm/jshrink",
@@ -5282,16 +5788,16 @@
         },
         {
             "name": "webonyx/graphql-php",
-            "version": "v0.13.8",
+            "version": "v0.13.9",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webonyx/graphql-php.git",
-                "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8"
+                "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/6829ae58f4c59121df1f86915fb9917a2ec595e8",
-                "reference": "6829ae58f4c59121df1f86915fb9917a2ec595e8",
+                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3",
+                "reference": "d9a94fddcad0a35d4bced212b8a44ad1bc59bdf3",
                 "shasum": ""
             },
             "require": {
@@ -5330,7 +5836,13 @@
                 "api",
                 "graphql"
             ],
-            "time": "2019-08-25T10:32:47+00:00"
+            "funding": [
+                {
+                    "url": "https://opencollective.com/webonyx-graphql-php",
+                    "type": "open_collective"
+                }
+            ],
+            "time": "2020-07-02T05:49:25+00:00"
         },
         {
             "name": "wikimedia/less.php",
@@ -5551,16 +6063,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.141.0",
+            "version": "3.147.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3"
+                "reference": "8a561a4a1645ccdd06413a4f2defe55d35e0eecc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d57dbde176a7db7a6131bb5d325aff63515eabc3",
-                "reference": "d57dbde176a7db7a6131bb5d325aff63515eabc3",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8a561a4a1645ccdd06413a4f2defe55d35e0eecc",
+                "reference": "8a561a4a1645ccdd06413a4f2defe55d35e0eecc",
                 "shasum": ""
             },
             "require": {
@@ -5583,6 +6095,7 @@
                 "ext-pcntl": "*",
                 "ext-sockets": "*",
                 "nette/neon": "^2.3",
+                "paragonie/random_compat": ">= 2",
                 "phpunit/phpunit": "^4.8.35|^5.4.3",
                 "psr/cache": "^1.0",
                 "psr/simple-cache": "^1.0",
@@ -5631,7 +6144,7 @@
                 "s3",
                 "sdk"
             ],
-            "time": "2020-06-10T18:11:38+00:00"
+            "time": "2020-07-20T18:18:31+00:00"
         },
         {
             "name": "beberlei/assert",
@@ -5930,6 +6443,12 @@
                 "functional testing",
                 "unit testing"
             ],
+            "funding": [
+                {
+                    "url": "https://opencollective.com/codeception",
+                    "type": "open_collective"
+                }
+            ],
             "time": "2020-06-07T16:31:51+00:00"
         },
         {
@@ -6173,16 +6692,16 @@
         },
         {
             "name": "codeception/stub",
-            "version": "3.6.1",
+            "version": "3.7.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/Codeception/Stub.git",
-                "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880"
+                "reference": "468dd5fe659f131fc997f5196aad87512f9b1304"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/Codeception/Stub/zipball/a3ba01414cbee76a1bced9f9b6b169cc8d203880",
-                "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880",
+                "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304",
+                "reference": "468dd5fe659f131fc997f5196aad87512f9b1304",
                 "shasum": ""
             },
             "require": {
@@ -6199,7 +6718,7 @@
                 "MIT"
             ],
             "description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
-            "time": "2020-02-07T18:42:28+00:00"
+            "time": "2020-07-03T15:54:43+00:00"
         },
         {
             "name": "csharpru/vault-php",
@@ -6424,16 +6943,16 @@
         },
         {
             "name": "doctrine/cache",
-            "version": "1.10.1",
+            "version": "1.10.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/cache.git",
-                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3"
+                "reference": "13e3381b25847283a91948d04640543941309727"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/cache/zipball/35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
-                "reference": "35a4a70cd94e09e2259dfae7488afc6b474ecbd3",
+                "url": "https://api.github.com/repos/doctrine/cache/zipball/13e3381b25847283a91948d04640543941309727",
+                "reference": "13e3381b25847283a91948d04640543941309727",
                 "shasum": ""
             },
             "require": {
@@ -6502,7 +7021,21 @@
                 "redis",
                 "xcache"
             ],
-            "time": "2020-05-27T16:24:54+00:00"
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-07T18:54:01+00:00"
         },
         {
             "name": "doctrine/inflector",
@@ -6625,6 +7158,20 @@
                 "constructor",
                 "instantiate"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-29T17:27:14+00:00"
         },
         {
@@ -6687,20 +7234,34 @@
                 "parser",
                 "php"
             ],
+            "funding": [
+                {
+                    "url": "https://www.doctrine-project.org/sponsorship.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://www.patreon.com/phpdoctrine",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-25T17:44:05+00:00"
         },
         {
             "name": "friendsofphp/php-cs-fixer",
-            "version": "v2.16.3",
+            "version": "v2.16.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
-                "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0"
+                "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0",
-                "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0",
+                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/1023c3458137ab052f6ff1e09621a721bfdeca13",
+                "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13",
                 "shasum": ""
             },
             "require": {
@@ -6732,12 +7293,12 @@
                 "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
                 "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
                 "phpunitgoodpractices/traits": "^1.8",
-                "symfony/phpunit-bridge": "^4.3 || ^5.0",
+                "symfony/phpunit-bridge": "^5.1",
                 "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
             },
             "suggest": {
                 "ext-dom": "For handling output formats in XML",
-                "ext-mbstring": "For handling non-UTF8 characters in cache signature.",
+                "ext-mbstring": "For handling non-UTF8 characters.",
                 "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
                 "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
                 "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
@@ -6778,7 +7339,13 @@
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
-            "time": "2020-04-15T18:51:10+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/keradus",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-27T23:57:46+00:00"
         },
         {
             "name": "jms/metadata",
@@ -7036,6 +7603,12 @@
                 "sftp",
                 "storage"
             ],
+            "funding": [
+                {
+                    "url": "https://offset.earth/frankdejonge",
+                    "type": "other"
+                }
+            ],
             "time": "2020-05-18T15:13:39+00:00"
         },
         {
@@ -7385,20 +7958,20 @@
         },
         {
             "name": "myclabs/deep-copy",
-            "version": "1.9.5",
+            "version": "1.10.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
-                "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+                "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.1"
+                "php": "^7.1 || ^8.0"
             },
             "replace": {
                 "myclabs/deep-copy": "self.version"
@@ -7429,7 +8002,13 @@
                 "object",
                 "object graph"
             ],
-            "time": "2020-01-17T21:11:47+00:00"
+            "funding": [
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-06-29T13:22:24+00:00"
         },
         {
             "name": "paragonie/constant_time_encoding",
@@ -7866,25 +8445,25 @@
         },
         {
             "name": "phpdocumentor/reflection-common",
-            "version": "2.1.0",
+            "version": "2.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
-                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
-                "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
                 "shasum": ""
             },
             "require": {
-                "php": ">=7.1"
+                "php": "^7.2 || ^8.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.x-dev"
+                    "dev-2.x": "2.x-dev"
                 }
             },
             "autoload": {
@@ -7911,32 +8490,31 @@
                 "reflection",
                 "static analysis"
             ],
-            "time": "2020-04-27T09:25:28+00:00"
+            "time": "2020-06-27T09:03:43+00:00"
         },
         {
             "name": "phpdocumentor/reflection-docblock",
-            "version": "5.1.0",
+            "version": "5.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
-                "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
+                "reference": "3170448f5769fe19f456173d833734e0ff1b84df"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
-                "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
+                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/3170448f5769fe19f456173d833734e0ff1b84df",
+                "reference": "3170448f5769fe19f456173d833734e0ff1b84df",
                 "shasum": ""
             },
             "require": {
-                "ext-filter": "^7.1",
-                "php": "^7.2",
-                "phpdocumentor/reflection-common": "^2.0",
-                "phpdocumentor/type-resolver": "^1.0",
-                "webmozart/assert": "^1"
+                "ext-filter": "*",
+                "php": "^7.2 || ^8.0",
+                "phpdocumentor/reflection-common": "^2.2",
+                "phpdocumentor/type-resolver": "^1.3",
+                "webmozart/assert": "^1.9.1"
             },
             "require-dev": {
-                "doctrine/instantiator": "^1",
-                "mockery/mockery": "^1"
+                "mockery/mockery": "~1.3.2"
             },
             "type": "library",
             "extra": {
@@ -7964,34 +8542,33 @@
                 }
             ],
             "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
-            "time": "2020-02-22T12:28:44+00:00"
+            "time": "2020-07-20T20:05:34+00:00"
         },
         {
             "name": "phpdocumentor/type-resolver",
-            "version": "1.1.0",
+            "version": "1.3.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpDocumentor/TypeResolver.git",
-                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
+                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
-                "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
+                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e878a14a65245fbe78f8080eba03b47c3b705651",
+                "reference": "e878a14a65245fbe78f8080eba03b47c3b705651",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.2",
+                "php": "^7.2 || ^8.0",
                 "phpdocumentor/reflection-common": "^2.0"
             },
             "require-dev": {
-                "ext-tokenizer": "^7.2",
-                "mockery/mockery": "~1"
+                "ext-tokenizer": "*"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.x-dev"
+                    "dev-1.x": "1.x-dev"
                 }
             },
             "autoload": {
@@ -8010,7 +8587,7 @@
                 }
             ],
             "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
-            "time": "2020-02-18T18:59:58+00:00"
+            "time": "2020-06-27T10:12:23+00:00"
         },
         {
             "name": "phpmd/phpmd",
@@ -8084,24 +8661,24 @@
         },
         {
             "name": "phpoption/phpoption",
-            "version": "1.7.4",
+            "version": "1.7.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/schmittjoh/php-option.git",
-                "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3"
+                "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
-                "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3",
+                "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525",
+                "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525",
                 "shasum": ""
             },
             "require": {
                 "php": "^5.5.9 || ^7.0 || ^8.0"
             },
             "require-dev": {
-                "bamarni/composer-bin-plugin": "^1.3",
-                "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
+                "bamarni/composer-bin-plugin": "^1.4.1",
+                "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0"
             },
             "type": "library",
             "extra": {
@@ -8135,37 +8712,47 @@
                 "php",
                 "type"
             ],
-            "time": "2020-06-07T10:40:07+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/GrahamCampbell",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-20T17:29:33+00:00"
         },
         {
             "name": "phpspec/prophecy",
-            "version": "v1.10.3",
+            "version": "1.11.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpspec/prophecy.git",
-                "reference": "451c3cd1418cf640de218914901e51b064abb093"
+                "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
-                "reference": "451c3cd1418cf640de218914901e51b064abb093",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160",
+                "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160",
                 "shasum": ""
             },
             "require": {
-                "doctrine/instantiator": "^1.0.2",
-                "php": "^5.3|^7.0",
-                "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
-                "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
-                "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
+                "doctrine/instantiator": "^1.2",
+                "php": "^7.2",
+                "phpdocumentor/reflection-docblock": "^5.0",
+                "sebastian/comparator": "^3.0 || ^4.0",
+                "sebastian/recursion-context": "^3.0 || ^4.0"
             },
             "require-dev": {
-                "phpspec/phpspec": "^2.5 || ^3.2",
-                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+                "phpspec/phpspec": "^6.0",
+                "phpunit/phpunit": "^8.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.10.x-dev"
+                    "dev-master": "1.11.x-dev"
                 }
             },
             "autoload": {
@@ -8198,7 +8785,7 @@
                 "spy",
                 "stub"
             ],
-            "time": "2020-03-05T15:02:03+00:00"
+            "time": "2020-07-08T12:44:21+00:00"
         },
         {
             "name": "phpstan/phpstan",
@@ -8240,6 +8827,20 @@
                 "MIT"
             ],
             "description": "PHPStan - PHP Static Analysis Tool",
+            "funding": [
+                {
+                    "url": "https://github.com/ondrejmirtes",
+                    "type": "github"
+                },
+                {
+                    "url": "https://www.patreon.com/phpstan",
+                    "type": "patreon"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-05T12:55:44+00:00"
         },
         {
@@ -8304,24 +8905,30 @@
                 "testing",
                 "xunit"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-05-23T08:02:54+00:00"
         },
         {
             "name": "phpunit/php-file-iterator",
-            "version": "3.0.1",
+            "version": "3.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
-                "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4"
+                "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
-                "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/25fefc5b19835ca653877fe081644a3f8c1d915e",
+                "reference": "25fefc5b19835ca653877fe081644a3f8c1d915e",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8354,24 +8961,30 @@
                 "filesystem",
                 "iterator"
             ],
-            "time": "2020-04-18T05:02:12+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-07-11T05:18:21+00:00"
         },
         {
             "name": "phpunit/php-invoker",
-            "version": "3.0.0",
+            "version": "3.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-invoker.git",
-                "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a"
+                "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a",
-                "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f6eedfed1085dd1f4c599629459a0277d25f9a66",
+                "reference": "f6eedfed1085dd1f4c599629459a0277d25f9a66",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "ext-pcntl": "*",
@@ -8407,24 +9020,33 @@
             "keywords": [
                 "process"
             ],
-            "time": "2020-02-07T06:06:11+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T11:53:53+00:00"
         },
         {
             "name": "phpunit/php-text-template",
-            "version": "2.0.0",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-text-template.git",
-                "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346"
+                "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
-                "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/6ff9c8ea4d3212b88fcf74e25e516e2c51c99324",
+                "reference": "6ff9c8ea4d3212b88fcf74e25e516e2c51c99324",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^9.0"
             },
             "type": "library",
             "extra": {
@@ -8453,7 +9075,13 @@
             "keywords": [
                 "template"
             ],
-            "time": "2020-02-01T07:43:44+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T11:55:37+00:00"
         },
         {
             "name": "phpunit/php-timer",
@@ -8502,25 +9130,31 @@
             "keywords": [
                 "timer"
             ],
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-04-20T06:00:37+00:00"
         },
         {
             "name": "phpunit/php-token-stream",
-            "version": "4.0.1",
+            "version": "4.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
-                "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c"
+                "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
-                "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/5672711b6b07b14d5ab694e700c62eeb82fcf374",
+                "reference": "5672711b6b07b14d5ab694e700c62eeb82fcf374",
                 "shasum": ""
             },
             "require": {
                 "ext-tokenizer": "*",
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8551,7 +9185,13 @@
             "keywords": [
                 "tokenizer"
             ],
-            "time": "2020-05-06T09:56:31+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-27T06:36:25+00:00"
         },
         {
             "name": "phpunit/phpunit",
@@ -8639,6 +9279,16 @@
                 "testing",
                 "xunit"
             ],
+            "funding": [
+                {
+                    "url": "https://phpunit.de/donate.html",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
             "time": "2020-05-22T13:54:05+00:00"
         },
         {
@@ -8737,20 +9387,20 @@
         },
         {
             "name": "sebastian/code-unit",
-            "version": "1.0.2",
+            "version": "1.0.5",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit.git",
-                "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5"
+                "reference": "c1e2df332c905079980b119c4db103117e5e5c90"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
-                "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/c1e2df332c905079980b119c4db103117e5e5c90",
+                "reference": "c1e2df332c905079980b119c4db103117e5e5c90",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8779,24 +9429,30 @@
             ],
             "description": "Collection of value objects that represent the PHP code units",
             "homepage": "https://github.com/sebastianbergmann/code-unit",
-            "time": "2020-04-30T05:58:10+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:50:45+00:00"
         },
         {
             "name": "sebastian/code-unit-reverse-lookup",
-            "version": "2.0.0",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
-                "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e"
+                "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e",
-                "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e",
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ee51f9bb0c6d8a43337055db3120829fa14da819",
+                "reference": "ee51f9bb0c6d8a43337055db3120829fa14da819",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8824,24 +9480,30 @@
             ],
             "description": "Looks up which function or method a line of code belongs to",
             "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
-            "time": "2020-02-07T06:20:13+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:04:00+00:00"
         },
         {
             "name": "sebastian/comparator",
-            "version": "4.0.0",
+            "version": "4.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8"
+                "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8",
-                "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8",
+                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f",
+                "reference": "dcc580eadfaa4e7f9d2cf9ae1922134ea962e14f",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3",
+                "php": "^7.3 || ^8.0",
                 "sebastian/diff": "^4.0",
                 "sebastian/exporter": "^4.0"
             },
@@ -8888,24 +9550,30 @@
                 "compare",
                 "equality"
             ],
-            "time": "2020-02-07T06:08:51+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:05:46+00:00"
         },
         {
             "name": "sebastian/diff",
-            "version": "4.0.1",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/diff.git",
-                "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a"
+                "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a",
-                "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a",
+                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113",
+                "reference": "1e90b4cf905a7d06c420b1d2e9d11a4dc8a13113",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0",
@@ -8944,24 +9612,30 @@
                 "unidiff",
                 "unified diff"
             ],
-            "time": "2020-05-08T05:01:12+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-30T04:46:02+00:00"
         },
         {
             "name": "sebastian/environment",
-            "version": "5.1.0",
+            "version": "5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c"
+                "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c",
-                "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c",
+                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2",
+                "reference": "0a757cab9d5b7ef49a619f1143e6c9c1bc0fe9d2",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -8997,29 +9671,35 @@
                 "environment",
                 "hhvm"
             ],
-            "time": "2020-04-14T13:36:52+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:07:24+00:00"
         },
         {
             "name": "sebastian/exporter",
-            "version": "4.0.0",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "80c26562e964016538f832f305b2286e1ec29566"
+                "reference": "571d721db4aec847a0e59690b954af33ebf9f023"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566",
-                "reference": "80c26562e964016538f832f305b2286e1ec29566",
+                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/571d721db4aec847a0e59690b954af33ebf9f023",
+                "reference": "571d721db4aec847a0e59690b954af33ebf9f023",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3",
+                "php": "^7.3 || ^8.0",
                 "sebastian/recursion-context": "^4.0"
             },
             "require-dev": {
                 "ext-mbstring": "*",
-                "phpunit/phpunit": "^9.0"
+                "phpunit/phpunit": "^9.2"
             },
             "type": "library",
             "extra": {
@@ -9064,7 +9744,13 @@
                 "export",
                 "exporter"
             ],
-            "time": "2020-02-07T06:10:52+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:08:55+00:00"
         },
         {
             "name": "sebastian/finder-facade",
@@ -9168,20 +9854,20 @@
         },
         {
             "name": "sebastian/object-enumerator",
-            "version": "4.0.0",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/object-enumerator.git",
-                "reference": "e67516b175550abad905dc952f43285957ef4363"
+                "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363",
-                "reference": "e67516b175550abad905dc952f43285957ef4363",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/074fed2d0a6d08e1677dd8ce9d32aecb384917b8",
+                "reference": "074fed2d0a6d08e1677dd8ce9d32aecb384917b8",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3",
+                "php": "^7.3 || ^8.0",
                 "sebastian/object-reflector": "^2.0",
                 "sebastian/recursion-context": "^4.0"
             },
@@ -9211,24 +9897,30 @@
             ],
             "description": "Traverses array structures and object graphs to enumerate all referenced objects",
             "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
-            "time": "2020-02-07T06:12:23+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:11:32+00:00"
         },
         {
             "name": "sebastian/object-reflector",
-            "version": "2.0.0",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/object-reflector.git",
-                "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7"
+                "reference": "127a46f6b057441b201253526f81d5406d6c7840"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
-                "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
+                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/127a46f6b057441b201253526f81d5406d6c7840",
+                "reference": "127a46f6b057441b201253526f81d5406d6c7840",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9256,7 +9948,13 @@
             ],
             "description": "Allows reflection of object attributes, including inherited and non-public ones",
             "homepage": "https://github.com/sebastianbergmann/object-reflector/",
-            "time": "2020-02-07T06:19:40+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:12:55+00:00"
         },
         {
             "name": "sebastian/phpcpd",
@@ -9311,20 +10009,20 @@
         },
         {
             "name": "sebastian/recursion-context",
-            "version": "4.0.0",
+            "version": "4.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/recursion-context.git",
-                "reference": "cdd86616411fc3062368b720b0425de10bd3d579"
+                "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579",
-                "reference": "cdd86616411fc3062368b720b0425de10bd3d579",
+                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/062231bf61d2b9448c4fa5a7643b5e1829c11d63",
+                "reference": "062231bf61d2b9448c4fa5a7643b5e1829c11d63",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9360,24 +10058,30 @@
             ],
             "description": "Provides functionality to recursively process PHP variables",
             "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
-            "time": "2020-02-07T06:18:20+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:14:17+00:00"
         },
         {
             "name": "sebastian/resource-operations",
-            "version": "3.0.0",
+            "version": "3.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/resource-operations.git",
-                "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98"
+                "reference": "0653718a5a629b065e91f774595267f8dc32e213"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
-                "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
+                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0653718a5a629b065e91f774595267f8dc32e213",
+                "reference": "0653718a5a629b065e91f774595267f8dc32e213",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.0"
@@ -9405,24 +10109,30 @@
             ],
             "description": "Provides a list of PHP built-in functions that operate on resources",
             "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
-            "time": "2020-02-07T06:13:02+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:16:22+00:00"
         },
         {
             "name": "sebastian/type",
-            "version": "2.1.0",
+            "version": "2.2.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/type.git",
-                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8"
+                "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
-                "reference": "bad49207c6f854e7a25cef0ea948ac8ebe3ef9d8",
+                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/86991e2b33446cd96e648c18bcdb1e95afb2c05a",
+                "reference": "86991e2b33446cd96e648c18bcdb1e95afb2c05a",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "^9.2"
@@ -9430,7 +10140,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.1-dev"
+                    "dev-master": "2.2-dev"
                 }
             },
             "autoload": {
@@ -9451,24 +10161,30 @@
             ],
             "description": "Collection of value objects that represent the types of the PHP type system",
             "homepage": "https://github.com/sebastianbergmann/type",
-            "time": "2020-06-01T12:21:09+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-07-05T08:31:53+00:00"
         },
         {
             "name": "sebastian/version",
-            "version": "3.0.0",
+            "version": "3.0.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/version.git",
-                "reference": "0411bde656dce64202b39c2f4473993a9081d39e"
+                "reference": "626586115d0ed31cb71483be55beb759b5af5a3c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e",
-                "reference": "0411bde656dce64202b39c2f4473993a9081d39e",
+                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/626586115d0ed31cb71483be55beb759b5af5a3c",
+                "reference": "626586115d0ed31cb71483be55beb759b5af5a3c",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.3"
+                "php": "^7.3 || ^8.0"
             },
             "type": "library",
             "extra": {
@@ -9494,7 +10210,13 @@
             ],
             "description": "Library that helps with managing the version number of Git-hosted PHP projects",
             "homepage": "https://github.com/sebastianbergmann/version",
-            "time": "2020-01-21T06:36:37+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/sebastianbergmann",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-06-26T12:18:43+00:00"
         },
         {
             "name": "spomky-labs/otphp",
@@ -9620,7 +10342,7 @@
         },
         {
             "name": "symfony/config",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/config.git",
@@ -9682,20 +10404,34 @@
             ],
             "description": "Symfony Config Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-23T13:08:13+00:00"
         },
         {
             "name": "symfony/dependency-injection",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621"
+                "reference": "6508423eded583fc07e88a0172803e1a62f0310c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6a6791e9584273b32eeb01790da4c7446d87a621",
-                "reference": "6a6791e9584273b32eeb01790da4c7446d87a621",
+                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6508423eded583fc07e88a0172803e1a62f0310c",
+                "reference": "6508423eded583fc07e88a0172803e1a62f0310c",
                 "shasum": ""
             },
             "require": {
@@ -9757,66 +10493,34 @@
             ],
             "description": "Symfony DependencyInjection Component",
             "homepage": "https://symfony.com",
-            "time": "2020-05-30T20:35:19+00:00"
-        },
-        {
-            "name": "symfony/deprecation-contracts",
-            "version": "v2.1.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/deprecation-contracts.git",
-                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
-                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.1-dev"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "function.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
+            "funding": [
                 {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
                 },
                 {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
                 }
             ],
-            "description": "A generic function and convention to trigger deprecation notices",
-            "homepage": "https://symfony.com",
-            "time": "2020-05-27T08:34:37+00:00"
+            "time": "2020-06-12T08:11:32+00:00"
         },
         {
             "name": "symfony/deprecation-contracts",
-            "version": "v2.1.2",
+            "version": "v2.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/deprecation-contracts.git",
-                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337"
+                "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
-                "reference": "dd99cb3a0aff6cadd2a8d7d7ed72c2161e218337",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5e20b83385a77593259c9f8beb2c43cd03b2ac14",
+                "reference": "5e20b83385a77593259c9f8beb2c43cd03b2ac14",
                 "shasum": ""
             },
             "require": {
@@ -9826,6 +10530,10 @@
             "extra": {
                 "branch-alias": {
                     "dev-master": "2.1-dev"
+                },
+                "thanks": {
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
@@ -9849,20 +10557,34 @@
             ],
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
-            "time": "2020-05-27T08:34:37+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-06-06T08:49:21+00:00"
         },
         {
             "name": "symfony/http-foundation",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/http-foundation.git",
-                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa"
+                "reference": "f93055171b847915225bd5b0a5792888419d8d75"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
-                "reference": "e0d853bddc2b2cfb0d67b0b4496c03fffe1d37fa",
+                "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f93055171b847915225bd5b0a5792888419d8d75",
+                "reference": "f93055171b847915225bd5b0a5792888419d8d75",
                 "shasum": ""
             },
             "require": {
@@ -9910,20 +10632,34 @@
             ],
             "description": "Symfony HttpFoundation Component",
             "homepage": "https://symfony.com",
-            "time": "2020-05-24T12:18:07+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-06-15T06:52:54+00:00"
         },
         {
             "name": "symfony/mime",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/mime.git",
-                "reference": "56261f89385f9d13cf843a5101ac72131190bc91"
+                "reference": "c0c418f05e727606e85b482a8591519c4712cf45"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91",
-                "reference": "56261f89385f9d13cf843a5101ac72131190bc91",
+                "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45",
+                "reference": "c0c418f05e727606e85b482a8591519c4712cf45",
                 "shasum": ""
             },
             "require": {
@@ -9973,11 +10709,25 @@
                 "mime",
                 "mime-type"
             ],
-            "time": "2020-05-25T12:33:44+00:00"
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-06-09T15:07:35+00:00"
         },
         {
             "name": "symfony/options-resolver",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/options-resolver.git",
@@ -10029,132 +10779,25 @@
                 "configuration",
                 "options"
             ],
-            "time": "2020-05-23T13:08:13+00:00"
-        },
-        {
-            "name": "symfony/polyfill-php70",
-            "version": "v1.17.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php70.git",
-                "reference": "82225c2d7d23d7e70515496d249c0152679b468e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/82225c2d7d23d7e70515496d249c0152679b468e",
-                "reference": "82225c2d7d23d7e70515496d249c0152679b468e",
-                "shasum": ""
-            },
-            "require": {
-                "paragonie/random_compat": "~1.0|~2.0|~9.99",
-                "php": ">=5.3.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.17-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php70\\": ""
-                },
-                "files": [
-                    "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "time": "2020-05-12T16:47:27+00:00"
-        },
-        {
-            "name": "symfony/polyfill-php80",
-            "version": "v1.17.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd",
-                "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.0.8"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.17-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php80\\": ""
-                },
-                "files": [
-                    "bootstrap.php"
-                ],
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
+            "funding": [
                 {
-                    "name": "Ion Bazan",
-                    "email": "ion.bazan@gmail.com"
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
                 },
                 {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
                 },
                 {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
                 }
             ],
-            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "time": "2020-05-12T16:47:27+00:00"
+            "time": "2020-05-23T13:08:13+00:00"
         },
         {
             "name": "symfony/stopwatch",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/stopwatch.git",
@@ -10200,11 +10843,25 @@
             ],
             "description": "Symfony Stopwatch Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "symfony/yaml",
-            "version": "v5.1.0",
+            "version": "v5.1.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
@@ -10263,20 +10920,34 @@
             ],
             "description": "Symfony Yaml Component",
             "homepage": "https://symfony.com",
+            "funding": [
+                {
+                    "url": "https://symfony.com/sponsor",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://github.com/fabpot",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+                    "type": "tidelift"
+                }
+            ],
             "time": "2020-05-20T17:43:50+00:00"
         },
         {
             "name": "thecodingmachine/safe",
-            "version": "v1.1.1",
+            "version": "v1.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thecodingmachine/safe.git",
-                "reference": "04f9ffae372a9816d4472dfb7bcf6126b623a9df"
+                "reference": "9f277171e296a3c8629c04ac93ec95ff0f208ccb"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/04f9ffae372a9816d4472dfb7bcf6126b623a9df",
-                "reference": "04f9ffae372a9816d4472dfb7bcf6126b623a9df",
+                "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/9f277171e296a3c8629c04ac93ec95ff0f208ccb",
+                "reference": "9f277171e296a3c8629c04ac93ec95ff0f208ccb",
                 "shasum": ""
             },
             "require": {
@@ -10396,7 +11067,7 @@
                 "MIT"
             ],
             "description": "PHP core functions that throw exceptions instead of returning FALSE on error",
-            "time": "2020-05-04T15:25:36+00:00"
+            "time": "2020-07-10T09:34:29+00:00"
         },
         {
             "name": "theseer/fdomdocument",
@@ -10440,23 +11111,23 @@
         },
         {
             "name": "theseer/tokenizer",
-            "version": "1.1.3",
+            "version": "1.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/theseer/tokenizer.git",
-                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+                "reference": "75a63c33a8577608444246075ea0af0d052e452a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
-                "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
+                "reference": "75a63c33a8577608444246075ea0af0d052e452a",
                 "shasum": ""
             },
             "require": {
                 "ext-dom": "*",
                 "ext-tokenizer": "*",
                 "ext-xmlwriter": "*",
-                "php": "^7.0"
+                "php": "^7.2 || ^8.0"
             },
             "type": "library",
             "autoload": {
@@ -10476,25 +11147,31 @@
                 }
             ],
             "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
-            "time": "2019-06-13T22:48:21+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/theseer",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-07-12T23:59:07+00:00"
         },
         {
             "name": "vlucas/phpdotenv",
-            "version": "v2.6.5",
+            "version": "v2.6.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/vlucas/phpdotenv.git",
-                "reference": "2e977311ffb17b2f82028a9c36824647789c6365"
+                "reference": "e1d57f62db3db00d9139078cbedf262280701479"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2e977311ffb17b2f82028a9c36824647789c6365",
-                "reference": "2e977311ffb17b2f82028a9c36824647789c6365",
+                "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/e1d57f62db3db00d9139078cbedf262280701479",
+                "reference": "e1d57f62db3db00d9139078cbedf262280701479",
                 "shasum": ""
             },
             "require": {
                 "php": "^5.3.9 || ^7.0 || ^8.0",
-                "symfony/polyfill-ctype": "^1.16"
+                "symfony/polyfill-ctype": "^1.17"
             },
             "require-dev": {
                 "ext-filter": "*",
@@ -10538,27 +11215,38 @@
                 "env",
                 "environment"
             ],
-            "time": "2020-06-02T14:06:52+00:00"
+            "funding": [
+                {
+                    "url": "https://github.com/GrahamCampbell",
+                    "type": "github"
+                },
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-07-14T17:54:18+00:00"
         },
         {
             "name": "webmozart/assert",
-            "version": "1.8.0",
+            "version": "1.9.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/webmozart/assert.git",
-                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
-                "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+                "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
+                "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
                 "shasum": ""
             },
             "require": {
-                "php": "^5.3.3 || ^7.0",
+                "php": "^5.3.3 || ^7.0 || ^8.0",
                 "symfony/polyfill-ctype": "^1.8"
             },
             "conflict": {
+                "phpstan/phpstan": "<0.12.20",
                 "vimeo/psalm": "<3.9.1"
             },
             "require-dev": {
@@ -10586,7 +11274,7 @@
                 "check",
                 "validate"
             ],
-            "time": "2020-04-18T12:12:48+00:00"
+            "time": "2020-07-08T17:02:28+00:00"
         },
         {
             "name": "weew/helpers-array",
@@ -10650,5 +11338,6 @@
         "ext-zip": "*",
         "lib-libxml": "*"
     },
-    "platform-dev": []
+    "platform-dev": [],
+    "plugin-api-version": "1.1.0"
 }

From 41c318b08b31dbb36600e779876a6f9ae1147d52 Mon Sep 17 00:00:00 2001
From: Vitalii Zabaznov <vzabaznov@magento.com>
Date: Tue, 21 Jul 2020 10:14:35 -0500
Subject: [PATCH 300/307] MC-35885: Process public PR with bin/magento
 improvements

---
 .../Magento/Framework/Module/ModuleList.php      | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lib/internal/Magento/Framework/Module/ModuleList.php b/lib/internal/Magento/Framework/Module/ModuleList.php
index b3cf433bbaf45..20cf0bc773156 100644
--- a/lib/internal/Magento/Framework/Module/ModuleList.php
+++ b/lib/internal/Magento/Framework/Module/ModuleList.php
@@ -7,6 +7,7 @@
 
 use Magento\Framework\App\DeploymentConfig;
 use Magento\Framework\Config\ConfigOptionsListConstants;
+use Magento\Framework\Module\ModuleList\Loader;
 
 /**
  * A list of modules in the Magento application
@@ -26,7 +27,7 @@ class ModuleList implements ModuleListInterface
     /**
      * Loader of module information from source code
      *
-     * @var ModuleList\Loader
+     * @var Loader
      */
     private $loader;
 
@@ -50,9 +51,9 @@ class ModuleList implements ModuleListInterface
      * Constructor
      *
      * @param DeploymentConfig $config
-     * @param ModuleList\Loader $loader
+     * @param Loader $loader
      */
-    public function __construct(DeploymentConfig $config, ModuleList\Loader $loader)
+    public function __construct(DeploymentConfig $config, Loader $loader)
     {
         $this->config = $config;
         $this->loader = $loader;
@@ -98,10 +99,17 @@ public function getOne($name)
     public function getNames()
     {
         $this->loadConfigData();
+
+        $modulesList = array_keys($this->loader->load());
+
         if (!$this->configData) {
             return [];
         }
-        $result = array_keys(array_filter($this->configData));
+
+        $modulesInConfig = array_keys(array_filter($this->configData));
+
+        $result = array_intersect($modulesInConfig, $modulesList);
+
         return $result;
     }
 

From a00482d2bb667284b025341256b704cdd4c3316c Mon Sep 17 00:00:00 2001
From: Vitalii Zabaznov <vzabaznov@magento.com>
Date: Tue, 21 Jul 2020 12:27:10 -0500
Subject: [PATCH 301/307] MC-35885: Process public PR with bin/magento
 improvements

---
 .../Framework/Module/Test/Unit/DependencyCheckerTest.php     | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php b/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
index aafafaf378f01..dfe255f90f01a 100644
--- a/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
+++ b/lib/internal/Magento/Framework/Module/Test/Unit/DependencyCheckerTest.php
@@ -27,11 +27,6 @@ class DependencyCheckerTest extends TestCase
      */
     private $packageInfoMock;
 
-    /**
-     * @var PackageInfoFactory|MockObject
-     */
-    private $packageInfoFactoryMock;
-
     /**
      * @var ModuleList|MockObject
      */

From 0c3565e730f2471a34fdf62f29eac33049536a25 Mon Sep 17 00:00:00 2001
From: kphan <kphan@adobe.com>
Date: Wed, 22 Jul 2020 16:56:08 -0500
Subject: [PATCH 302/307] MC-33330: Product is removed from Shopping Cart after
 cancel PayPal checkout flow Fixed static test by changing class description
 in PlaceOrder.php

---
 .../Paypal/Controller/Express/AbstractExpress/PlaceOrder.php    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php
index 50efc763a4456..29d4a5bd1f25c 100644
--- a/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php
+++ b/app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php
@@ -11,7 +11,7 @@
 use Magento\Paypal\Model\Api\ProcessableException as ApiProcessableException;
 
 /**
- * Class PlaceOrder
+ * Creates order on backend and prepares session to show appropriate next step in flow
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class PlaceOrder extends \Magento\Paypal\Controller\Express\AbstractExpress

From b24efece34efe540403ce1c9e0b12d00a0f06021 Mon Sep 17 00:00:00 2001
From: Vitalii Zabaznov <vzabaznov@magento.com>
Date: Wed, 22 Jul 2020 17:28:15 -0500
Subject: [PATCH 303/307] MC-35885: Process public PR with bin/magento
 improvements

---
 .../Magento/Framework/Module/Dir/Reader.php      |  6 +++++-
 .../Magento/Framework/Module/ModuleList.php      | 16 ++++------------
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/lib/internal/Magento/Framework/Module/Dir/Reader.php b/lib/internal/Magento/Framework/Module/Dir/Reader.php
index 141a291ea6818..f4b287a18860f 100644
--- a/lib/internal/Magento/Framework/Module/Dir/Reader.php
+++ b/lib/internal/Magento/Framework/Module/Dir/Reader.php
@@ -124,7 +124,11 @@ private function getFiles($filename, $subDir = '')
     {
         $result = [];
         foreach ($this->modulesList->getNames() as $moduleName) {
-            $moduleSubDir = $this->getModuleDir($subDir, $moduleName);
+            try {
+                $moduleSubDir = $this->getModuleDir($subDir, $moduleName);
+            } catch (\InvalidArgumentException $e) {
+                continue;
+            }
             $file = $moduleSubDir . '/' . $filename;
             $directoryRead = $this->readFactory->create($moduleSubDir);
             $path = $directoryRead->getRelativePath($file);
diff --git a/lib/internal/Magento/Framework/Module/ModuleList.php b/lib/internal/Magento/Framework/Module/ModuleList.php
index 20cf0bc773156..b3cf433bbaf45 100644
--- a/lib/internal/Magento/Framework/Module/ModuleList.php
+++ b/lib/internal/Magento/Framework/Module/ModuleList.php
@@ -7,7 +7,6 @@
 
 use Magento\Framework\App\DeploymentConfig;
 use Magento\Framework\Config\ConfigOptionsListConstants;
-use Magento\Framework\Module\ModuleList\Loader;
 
 /**
  * A list of modules in the Magento application
@@ -27,7 +26,7 @@ class ModuleList implements ModuleListInterface
     /**
      * Loader of module information from source code
      *
-     * @var Loader
+     * @var ModuleList\Loader
      */
     private $loader;
 
@@ -51,9 +50,9 @@ class ModuleList implements ModuleListInterface
      * Constructor
      *
      * @param DeploymentConfig $config
-     * @param Loader $loader
+     * @param ModuleList\Loader $loader
      */
-    public function __construct(DeploymentConfig $config, Loader $loader)
+    public function __construct(DeploymentConfig $config, ModuleList\Loader $loader)
     {
         $this->config = $config;
         $this->loader = $loader;
@@ -99,17 +98,10 @@ public function getOne($name)
     public function getNames()
     {
         $this->loadConfigData();
-
-        $modulesList = array_keys($this->loader->load());
-
         if (!$this->configData) {
             return [];
         }
-
-        $modulesInConfig = array_keys(array_filter($this->configData));
-
-        $result = array_intersect($modulesInConfig, $modulesList);
-
+        $result = array_keys(array_filter($this->configData));
         return $result;
     }
 

From c41c854486c1981b94679aeff696b443954eec12 Mon Sep 17 00:00:00 2001
From: engcom-Echo <engcom-vendorworker-echo@adobe.com>
Date: Thu, 23 Jul 2020 14:07:13 +0300
Subject: [PATCH 304/307] Update integration and functional tests

---
 .../AdminCreateCatalogPriceRuleForCustomerGroupTest.xml       | 3 +++
 ...avigateToNewOrderPageNewCustomerSingleStoreActionGroup.xml | 1 +
 .../Block/Adminhtml/Grid/Renderer/AbstractMultiactionTest.php | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
index 51689440af534..fb218297b646d 100644
--- a/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
+++ b/app/code/Magento/CatalogRule/Test/Mftf/Test/AdminCreateCatalogPriceRuleTest/AdminCreateCatalogPriceRuleForCustomerGroupTest.xml
@@ -43,7 +43,10 @@
         <!-- Create a catalog rule for the NOT LOGGED IN customer group -->
         <actionGroup ref="NewCatalogPriceRuleByUIActionGroup" stepKey="createNewPriceRule"/>
         <actionGroup ref="SelectNotLoggedInCustomerGroupActionGroup" stepKey="selectNotLoggedInCustomerGroup"/>
+        <conditionalClick selector="{{AdminNewCatalogPriceRule.active}}" dependentSelector="{{AdminNewCatalogPriceRule.activeIsEnabled}}" visible="false" stepKey="enableActiveBtn"/>
         <click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>
+
+        <!--<click selector="{{AdminNewCatalogPriceRule.saveAndApply}}" stepKey="saveAndApply"/>-->
         <see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the rule." stepKey="assertSuccess"/>
 
         <!-- Perform reindex and flush cache -->
diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageNewCustomerSingleStoreActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageNewCustomerSingleStoreActionGroup.xml
index 3d3efc705854d..6ec3cef59e22e 100644
--- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageNewCustomerSingleStoreActionGroup.xml
+++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/NavigateToNewOrderPageNewCustomerSingleStoreActionGroup.xml
@@ -18,6 +18,7 @@
         <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
         <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
         <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/>
+        <conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(_defaultStore.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
         <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
     </actionGroup>
 </actionGroups>
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Grid/Renderer/AbstractMultiactionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Grid/Renderer/AbstractMultiactionTest.php
index f8ede749872f4..02d7c886ec2e2 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Grid/Renderer/AbstractMultiactionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Block/Adminhtml/Grid/Renderer/AbstractMultiactionTest.php
@@ -99,12 +99,12 @@ protected function processRender(): void
     private function assertUrl(int $quoteItemId, array $action, string $html): void
     {
         $jsFunction = str_replace('url_', '', $action['url']);
-        $configureXPath = "//a[contains(@onclick, 'return cartControl.$jsFunction($quoteItemId)')"
-            . " and text()='{$action['caption']}' and @href='{$action['url']}']";
+        $configureXPath = "//a[text()='{$action['caption']}' and @href='{$action['url']}']";
         $this->assertEquals(
             1,
             Xpath::getElementsCountForXpath($configureXPath, $html),
             sprintf('Expected %s link is incorrect or missing', $action['caption'])
         );
+        $this->assertStringContainsString("return cartControl.$jsFunction($quoteItemId)", $html);
     }
 }

From b75c28228c471cb0157dc818fed68a42c1d47fa6 Mon Sep 17 00:00:00 2001
From: DianaRusin <rusind95@gmail.com>
Date: Thu, 23 Jul 2020 18:49:57 +0300
Subject: [PATCH 305/307] MC-35892: Automate MC-35954 tests

---
 .../AdminProductAttributeSaveActionGroup.xml  |  22 +++
 .../AdminSaveProductAttributeActionGroup.xml  |   2 +-
 ...seInLayeredNavigationOptionActionGroup.xml |  19 +++
 .../SaveProductAttributeActionGroup.xml       |   2 +-
 .../SaveProductAttributeInUseActionGroup.xml  |   2 +-
 .../StorefrontCategorySidebarSection.xml      |   2 +
 ...eInLayeredNavigationWithoutReindexTest.xml | 152 ++++++++++++++++++
 .../js/jasmine/tests/lib/mage/apply.test.js   |   2 +-
 8 files changed, 199 insertions(+), 4 deletions(-)
 create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSaveActionGroup.xml
 create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup.xml
 create mode 100644 app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml

diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSaveActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSaveActionGroup.xml
new file mode 100644
index 0000000000000..57d4a6c702c89
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminProductAttributeSaveActionGroup.xml
@@ -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="AdminProductAttributeSaveActionGroup">
+        <annotations>
+            <description>Clicks on Save button to save the attribute and check success message.</description>
+        </annotations>
+
+        <scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
+        <waitForElementVisible selector="{{AdminMainActionsSection.save}}" stepKey="waitForSaveButton"/>
+        <click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveButton"/>
+        <waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
+        <see selector="{{AdminMessagesSection.success}}" userInput="You saved the product attribute." stepKey="seeSuccessMessage"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveProductAttributeActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveProductAttributeActionGroup.xml
index 956dc3bf6fa52..66e08b222b60e 100644
--- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveProductAttributeActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSaveProductAttributeActionGroup.xml
@@ -10,7 +10,7 @@
               xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
     <actionGroup name="AdminSaveProductAttributeActionGroup">
         <annotations>
-            <description>Clicks on Save button to save the attribute.</description>
+            <description>DEPRECATED. Use AdminProductAttributeSaveActionGroup instead. Clicks on Save button to save the attribute.</description>
         </annotations>
 
         <waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup.xml
new file mode 100644
index 0000000000000..37947ffca7c5d
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup.xml
@@ -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="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup">
+        <arguments>
+            <argument name="useInLayeredNavigationValue" type="string" defaultValue="Filterable (with results)"/>
+        </arguments>
+        <conditionalClick selector="{{StorefrontPropertiesSection.StoreFrontPropertiesTab}}"  dependentSelector="{{AttributePropertiesSection.useInLayeredNavigation}}" visible="false" stepKey="clickStoreFrontTab"/>
+        <waitForElementVisible selector="{{AttributePropertiesSection.useInLayeredNavigation}}" stepKey="waitForStorefrontTabLoad"/>
+        <selectOption selector="{{AttributePropertiesSection.useInLayeredNavigation}}" userInput="{{useInLayeredNavigationValue}}" stepKey="selectUseInLayeredNavigationOption"/>
+    </actionGroup>
+</actionGroups>
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeActionGroup.xml
index e1bf2dea21318..796577bf84b65 100644
--- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeActionGroup.xml
@@ -10,7 +10,7 @@
               xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
     <actionGroup name="SaveProductAttributeActionGroup">
         <annotations>
-            <description>Clicks on Save. Validates that the Success Message is present.</description>
+            <description>DEPRECATED. Use AdminProductAttributeSaveActionGroup instead. Clicks on Save. Validates that the Success Message is present.</description>
         </annotations>
 
         <waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeInUseActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeInUseActionGroup.xml
index 4da8232e8405d..660bd314c4bf3 100644
--- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeInUseActionGroup.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/SaveProductAttributeInUseActionGroup.xml
@@ -10,7 +10,7 @@
               xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
     <actionGroup name="SaveProductAttributeInUseActionGroup">
         <annotations>
-            <description>Clicks on Save. Validates that the Success Message is present.</description>
+            <description>DEPRECATED. Use AdminProductAttributeSaveActionGroup instead. Clicks on Save. Validates that the Success Message is present.</description>
         </annotations>
 
         <waitForElementVisible selector="{{AttributePropertiesSection.Save}}" stepKey="waitForSaveButton"/>
diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml
index 186d0cf313d96..8219208cb76f2 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml
@@ -17,5 +17,7 @@
         <element name="removeFilter" type="button" selector="div.filter-current .remove"/>
         <element name="activeFilterOptions" type="text" selector=".filter-options-item.active .items"/>
         <element name="activeFilterOptionItemByPosition" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a" parameterized="true"/>
+        <element name="enabledFilterOptionItemByLabel" type="text" selector="//main//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true"/>
+        <element name="disabledFilterOptionItemByLabel" type="text" selector="//main//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true"/>
     </section>
 </sections>
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml
new file mode 100644
index 0000000000000..b950f7fe97015
--- /dev/null
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml
@@ -0,0 +1,152 @@
+<?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="StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest">
+        <annotations>
+            <features value="LayeredNavigation"/>
+            <stories value="Magento_LayeredNavigation"/>
+            <title value="Create and add new dropdown product attribute to existing set, assign it to existing product with that set and see it on layered navigation"/>
+            <description value="Verify that new dropdown attribute in existing attribute set shows on layered navigation on storefront without reindex"/>
+            <severity value="AVERAGE"/>
+            <testCaseId value="MC-35954"/>
+            <group value="layeredNavigation"/>
+        </annotations>
+
+        <before>
+            <!--Create category, attribute set with multiselect product attribute with two options-->
+            <createData entity="SimpleSubCategory" stepKey="createCategory"/>
+            <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
+            <createData entity="multipleSelectProductAttribute" stepKey="createMultiselectAttribute"/>
+            <createData entity="ProductAttributeOption10" stepKey="firstMultiselectOption">
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+            </createData>
+            <createData entity="ProductAttributeOption11" stepKey="secondMultiselectOption">
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+            </createData>
+            <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstMultiselectOption">
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getSecondMultiselectOption">
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+            </getData>
+            <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
+            <amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$createAttributeSet.attribute_set_id$/" stepKey="onAttributeSetEdit"/>
+            <waitForPageLoad stepKey="waitForAttributeSetPageLoad"/>
+            <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignMultiselectAttributeToGroup">
+                <argument name="group" value="Product Details"/>
+                <argument name="attribute" value="$createMultiselectAttribute.attribute_code$"/>
+            </actionGroup>
+            <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSet"/>
+            <!--Create configurable product with created attribute set and multiselect attribute-->
+            <createData entity="SimpleOne" storeCode="all" stepKey="createFirstSimpleProduct">
+                <field key="attribute_set_id">$createAttributeSet.attribute_set_id$</field>
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+                <requiredEntity createDataKey="getFirstMultiselectOption"/>
+            </createData>
+            <createData entity="SimpleOne" storeCode="all" stepKey="createSecondSimpleProduct">
+                <field key="attribute_set_id">$createAttributeSet.attribute_set_id$</field>
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+                <requiredEntity createDataKey="getSecondMultiselectOption"/>
+            </createData>
+            <createData entity="BaseConfigurableProduct" stepKey="createConfigurableProduct">
+                <field key="attribute_set_id">$createAttributeSet.attribute_set_id$</field>
+                <requiredEntity createDataKey="createCategory"/>
+            </createData>
+            <createData entity="ConfigurableProductOneOption" stepKey="createConfigProductOption">
+                <requiredEntity createDataKey="createConfigurableProduct"/>
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+                <requiredEntity createDataKey="getFirstMultiselectOption"/>
+            </createData>
+            <createData entity="ConfigurableProductOneOption" stepKey="createConfigProductOption2">
+                <requiredEntity createDataKey="createConfigurableProduct"/>
+                <requiredEntity createDataKey="createMultiselectAttribute"/>
+                <requiredEntity createDataKey="getSecondMultiselectOption"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild">
+                <requiredEntity createDataKey="createConfigurableProduct"/>
+                <requiredEntity createDataKey="createFirstSimpleProduct"/>
+            </createData>
+            <createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild2">
+                <requiredEntity createDataKey="createConfigurableProduct"/>
+                <requiredEntity createDataKey="createSecondSimpleProduct"/>
+            </createData>
+            <!--Create new dropdown attribute with two options and set Use in layered navigation "Filterable (no results)"-->
+            <createData entity="dropdownProductAttribute" stepKey="createDropdownAttribute"/>
+            <createData entity="ProductAttributeOption10" stepKey="firstDropdownOption">
+                <requiredEntity createDataKey="createDropdownAttribute"/>
+            </createData>
+            <createData entity="ProductAttributeOption11" stepKey="secondDropdownOption">
+                <requiredEntity createDataKey="createDropdownAttribute"/>
+            </createData>
+            <getData entity="ProductAttributeOptionGetter" index="1" stepKey="getFirstDropdownOption">
+                <requiredEntity createDataKey="createDropdownAttribute"/>
+            </getData>
+            <getData entity="ProductAttributeOptionGetter" index="2" stepKey="getSecondDropdownOption">
+                <requiredEntity createDataKey="createDropdownAttribute"/>
+            </getData>
+            <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="goToDropdownAttributePage">
+                <argument name="productAttributeCode" value="$createDropdownAttribute.attribute_code$"/>
+            </actionGroup>
+            <actionGroup ref="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup" stepKey="setDropdownUseInLayeredNavigationNoResults">
+                <argument name="useInLayeredNavigationValue" value="Filterable (no results)"/>
+            </actionGroup>
+            <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveDropdownAttribute"/>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+        </before>
+
+        <after>
+            <deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
+            <deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
+            <deleteData createDataKey="createConfigurableProduct" stepKey="deleteConfigurableProduct"/>
+            <deleteData createDataKey="createMultiselectAttribute" stepKey="deleteMultiselectAttribute"/>
+            <deleteData createDataKey="createDropdownAttribute" stepKey="deleteDropdownAttribute"/>
+            <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
+            <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
+            <magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
+            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
+        </after>
+
+        <!--Set attribute option Use in layered navigation to "Filterable(no results)"-->
+        <actionGroup ref="OpenProductAttributeFromSearchResultInGridActionGroup" stepKey="goToMultiselectAttributePage">
+            <argument name="productAttributeCode" value="$createMultiselectAttribute.attribute_code$"/>
+        </actionGroup>
+        <actionGroup ref="AdminSetProductAttributeUseInLayeredNavigationOptionActionGroup" stepKey="setMultiselectUseInLayeredNavigationNoResults">
+            <argument name="useInLayeredNavigationValue" value="Filterable (no results)"/>
+        </actionGroup>
+        <actionGroup ref="AdminProductAttributeSaveActionGroup" stepKey="saveMultiselectAttribute"/>
+        <amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="onCategoryPage"/>
+        <waitForPageLoad stepKey="waitForCategoryPageLoad"/>
+        <waitForElementVisible selector="{{StorefrontCategorySidebarSection.filterOptionsTitle($createMultiselectAttribute.default_frontend_label$)}}" stepKey="waitForMultiselectAttributeVisible"/>
+        <conditionalClick selector="{{StorefrontCategorySidebarSection.filterOptionsTitle($createMultiselectAttribute.default_frontend_label$)}}" dependentSelector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" visible="false" stepKey="clickToExpandAttribute"/>
+        <waitForElementVisible selector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" stepKey="waitForMultiselectAttributeOptionsVisible"/>
+        <seeElement selector="{{StorefrontCategorySidebarSection.enabledFilterOptionItemByLabel($getFirstMultiselectOption.label$)}}" stepKey="assertMultiselectAttributeFirstOptionInLayeredNavigation"/>
+        <seeElement selector="{{StorefrontCategorySidebarSection.enabledFilterOptionItemByLabel($getSecondMultiselectOption.label$)}}" stepKey="assertMultiselectAttributeSecondOptionInLayeredNavigation"/>
+        <amOnPage url="{{AdminProductAttributeSetEditPage.url}}/$createAttributeSet.attribute_set_id$/" stepKey="onAttributeSetEditPage"/>
+        <waitForPageLoad stepKey="waitForAttributeSetEditPageLoad"/>
+        <actionGroup ref="AssignAttributeToGroupActionGroup" stepKey="assignDropdownAttributeToGroup">
+            <argument name="group" value="Product Details"/>
+            <argument name="attribute" value="$createDropdownAttribute.attribute_code$"/>
+        </actionGroup>
+        <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttributeSetWithDropdownAttribute"/>
+        <!--Assign dropdown attribute to child product of configurable-->
+        <amOnPage url="{{AdminProductEditPage.url($createFirstSimpleProduct.id$)}}" stepKey="visitAdminEditProductPage"/>
+        <waitForElementVisible selector="{{AdminProductFormSection.customSelectField('$createDropdownAttribute.attribute_code$')}}" stepKey="waitForDropdownAttributeSelectVisible"/>
+        <selectOption selector="{{AdminProductFormSection.customSelectField('$createDropdownAttribute.attribute_code$')}}" userInput="$getFirstDropdownOption.label$" stepKey="selectValueOfNewAttribute"/>
+        <actionGroup ref="SaveProductFormActionGroup" stepKey="saveSimpleProduct"/>
+        <!--Assert that dropdown attribute is present on layered navigation with both options-->
+        <amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="goToCategoryPage"/>
+        <waitForPageLoad stepKey="waitForCategoryPageLoadWithDropdownAttribute"/>
+        <waitForElementVisible selector="{{StorefrontCategorySidebarSection.filterOptionsTitle($createDropdownAttribute.default_frontend_label$)}}" stepKey="waitForDropdownAttributeVisible"/>
+        <conditionalClick selector="{{StorefrontCategorySidebarSection.filterOptionsTitle($createDropdownAttribute.default_frontend_label$)}}" dependentSelector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" visible="false" stepKey="clickToExpandDropdownAttribute"/>
+        <waitForElementVisible selector="{{StorefrontCategorySidebarSection.activeFilterOptions}}" stepKey="waitForDropdownAttributeOptionsVisible"/>
+        <seeElement selector="{{StorefrontCategorySidebarSection.enabledFilterOptionItemByLabel($getFirstDropdownOption.label$)}}" stepKey="assertDropdownAttributeFirstOptionInLayeredNavigation"/>
+        <seeElement selector="{{StorefrontCategorySidebarSection.disabledFilterOptionItemByLabel($getSecondDropdownOption.label$)}}" stepKey="assertDropdownAttributeSecondOptionInLayeredNavigation"/>
+    </test>
+</tests>
diff --git a/dev/tests/js/jasmine/tests/lib/mage/apply.test.js b/dev/tests/js/jasmine/tests/lib/mage/apply.test.js
index c2c5d65db34f4..86e0e9b78c952 100644
--- a/dev/tests/js/jasmine/tests/lib/mage/apply.test.js
+++ b/dev/tests/js/jasmine/tests/lib/mage/apply.test.js
@@ -64,7 +64,7 @@ define([
                     .toHaveBeenCalledWith(jasmine.any(Object), node);
 
                 done();
-            }, preset.timeout);
+            }, 100);
         });
     });
 });

From b192e57ef6eafc886ee02d8d009878f646e18c2c Mon Sep 17 00:00:00 2001
From: DianaRusin <rusind95@gmail.com>
Date: Fri, 24 Jul 2020 12:32:46 +0300
Subject: [PATCH 306/307] MC-35892: Automate MC-35954 tests

---
 .../StorefrontCategorySidebarSection.xml                     | 4 ++--
 ...ProductAttributeInLayeredNavigationWithoutReindexTest.xml | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml
index 8219208cb76f2..5ec493aef0cea 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategorySidebarSection/StorefrontCategorySidebarSection.xml
@@ -17,7 +17,7 @@
         <element name="removeFilter" type="button" selector="div.filter-current .remove"/>
         <element name="activeFilterOptions" type="text" selector=".filter-options-item.active .items"/>
         <element name="activeFilterOptionItemByPosition" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a" parameterized="true"/>
-        <element name="enabledFilterOptionItemByLabel" type="text" selector="//main//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true"/>
-        <element name="disabledFilterOptionItemByLabel" type="text" selector="//main//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true"/>
+        <element name="enabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true"/>
+        <element name="disabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true"/>
     </section>
 </sections>
diff --git a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml
index b950f7fe97015..be56caa6d3246 100644
--- a/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml
+++ b/app/code/Magento/LayeredNavigation/Test/Mftf/Test/StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest.xml
@@ -11,12 +11,13 @@
     <test name="StorefrontFilterableProductAttributeInLayeredNavigationWithoutReindexTest">
         <annotations>
             <features value="LayeredNavigation"/>
-            <stories value="Magento_LayeredNavigation"/>
+            <stories value="Product attributes in Layered Navigation"/>
             <title value="Create and add new dropdown product attribute to existing set, assign it to existing product with that set and see it on layered navigation"/>
             <description value="Verify that new dropdown attribute in existing attribute set shows on layered navigation on storefront without reindex"/>
-            <severity value="AVERAGE"/>
+            <severity value="MAJOR"/>
             <testCaseId value="MC-35954"/>
             <group value="layeredNavigation"/>
+            <group value="SearchEngineElasticsearch"/>
         </annotations>
 
         <before>

From bd4d60cdee80a06663e1342baf946cf8ee5fff63 Mon Sep 17 00:00:00 2001
From: engcom-Echo <engcom-vendorworker-echo@adobe.com>
Date: Fri, 24 Jul 2020 13:31:43 +0300
Subject: [PATCH 307/307] Increase timeout and skip test

---
 ...ifyCategoryProductAndProductCategoryPartialReindexTest.xml | 4 ++--
 .../Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml    | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
index b7ae6559b8dfb..890b7b69529a1 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/VerifyCategoryProductAndProductCategoryPartialReindexTest.xml
@@ -146,7 +146,7 @@
         <!-- Run cron -->
         <wait stepKey="waitBeforeRunMagentoCron" time="30"/>
         <magentoCLI stepKey="runMagentoCron" command="cron:run --group=index"/>
-        <wait stepKey="waitAfterRunMagentoCron" time="60"/>
+        <wait stepKey="waitAfterRunMagentoCron" time="90"/>
 
         <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
         <!-- Category K contains only Products A, C -->
@@ -212,7 +212,7 @@
         <!-- Run Cron once to reindex product changes -->
         <wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="30"/>
         <magentoCLI stepKey="runCronIndexAfterProductAssignToCategory" command="cron:run --group=index"/>
-        <wait stepKey="waitAfterRunCronIndexAfterProductAssignToCategory" time="60"/>
+        <wait stepKey="waitAfterRunCronIndexAfterProductAssignToCategory" time="90"/>
 
         <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
 
diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
index 842faeb32cc33..63c482d66c57f 100644
--- a/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
+++ b/app/code/Magento/Sales/Test/Mftf/Test/CreateOrderFromEditCustomerPageTest.xml
@@ -17,6 +17,9 @@
             <severity value="BLOCKER"/>
             <testCaseId value="MC-16161"/>
             <group value="mtf_migrated"/>
+            <skip>
+                <issueId value="MC-36044"/>
+            </skip>
         </annotations>
 
         <before>