-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 53281: Add PHPCS ignore rules for Magento2.Legacy.EscapeMet…
…hodsOnBlockClass ## What's being changed Various template phtml files. ## Why it's being changed As of Magento 2.4.7, the Magento2 coding standard flags the use of escaper methods on `$block`, for example: ``` 17 | WARNING | [x] Using escapeHtml on $block is deprecated. Please use equivalent method on $escaper ``` Unfortunately we must yet support 2.3.7 therefore we need to ignore these warnings for the time being. In addition I have resolved a handful of actual `ERROR`s which had the potential to block our marketplace submissions after the new version is released. I've also removed usage `@codingStandardsIgnoreFile` which is a) deprecated and b) risky because errors can surface undetected. ## How to review / test this change - In Magento 2.4.7-beta3, run: ``` vendor/bin/phpcs --standard=Magento2 --extensions=php,phtml --error-severity=10 app/code/Dotdigitalgroup/Email/ --ignore-annotations --report=json --report-file=report.json ``` - Scan the report for any errors (warnings are OK) - See a green CI build once it has been updated to use latest 2.4-develop - Smoke test HTML output where escaping has been added, in particular around WBT (see [this commit](5c48a78)) Related work items: #242925
- Loading branch information
Showing
33 changed files
with
216 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<?php /** @var \Dotdigitalgroup\Email\Block\Adminhtml\EngagementCloudTrialInterface $block */ | ||
// @codingStandardsIgnoreFile | ||
<?php | ||
/** @var \Dotdigitalgroup\Email\Block\Adminhtml\EngagementCloudTrialInterface $block */ | ||
// phpcs:disable Magento2.Legacy.EscapeMethodsOnBlockClass | ||
?> | ||
<script type="text/x-magento-init"> | ||
{ | ||
"*": { | ||
"Dotdigitalgroup_Email/js/engagementCloudEmbed": { | ||
"iframeSrc": "<?= $block->getAction() ?>" | ||
"iframeSrc": "<?= $block->escapeHtml($block->getAction()) ?>" | ||
}, | ||
"Dotdigitalgroup_Email/js/engagementCloudTrial": { | ||
"callback": "<?= $block->getLocalCallbackUrl() ?>", | ||
"micrositeUrl": "<?= $block->getTrialSignupHostAndScheme() ?>" | ||
"callback": "<?= $block->escapeHtml($block->getLocalCallbackUrl()) ?>", | ||
"micrositeUrl": "<?= $block->escapeHtml($block->getTrialSignupHostAndScheme()) ?>" | ||
} | ||
} | ||
} | ||
</script> | ||
<?php // phpcs:enable ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<?php /** @var \Dotdigitalgroup\Email\Block\Adminhtml\Config\Report\Order $block */?> | ||
<?php | ||
/** @var \Dotdigitalgroup\Email\Block\Adminhtml\Config\Report\Order $block */ | ||
// phpcs:disable Magento2.Legacy.EscapeMethodsOnBlockClass | ||
?> | ||
<div> | ||
<a href="<?= $block->escapeHtml($block->getLink()); ?>"> | ||
<?= $block->escapeHtml(__('Click here for status')); ?> | ||
</a> | ||
</div> | ||
<?php // phpcs:enable ?> |
Oops, something went wrong.