Skip to content

Conversation

eliseacornejo
Copy link
Contributor

No description provided.

loginesta
loginesta previously approved these changes Oct 11, 2021
Copy link
Member

@sivaschenko sivaschenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @eliseacornejo ! Please see my comment

foreach ($this->obsoleteResponseMethods as $method) {
if ($tokens[$stringPos]['content'] === $method) {
$phpcsFile->addWarning(
sprintf('Contains obsolete response method: %s.', $method),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be not clear how these static tests failures should be addressed. Can we add a bit more information and replacement suggestion to the message:

I.e. "\Magento\Framework\App\ViewInterface::renderLayout method is deprecated. Please use \Magento\Framework\Controller\ResultInterface::renderResult instead."
...
"\Magento\Framework\App\Action\Action::_redirect" method is deprecated. Please use \Magento\Backend\Model\View\Result\Redirect instead.
...
"\Magento\Backend\App\AbstractAction::_addBreadcrumb method is deprecated. Please use \Magento\Backend\Model\View\Result\Page::addBreadcrumb instead."
and so on

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be implemented by having $obsoleteResponseMethods as associative array

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, please @sivaschenko review! thanks

jcuerdo
jcuerdo previously approved these changes Oct 11, 2021
@eliseacornejo eliseacornejo dismissed stale reviews from jcuerdo and loginesta via 9286ff9 October 13, 2021 08:57
sivaschenko
sivaschenko previously approved these changes Oct 13, 2021
@eliseacornejo
Copy link
Contributor Author

@magento import pr to magento-commerce/magento-coding-standard

@m2-github-services
Copy link
Contributor

@eliseacornejo the Pull Request is successfully imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

6 participants