Skip to content

Conversation

@punkstar
Copy link
Contributor

@punkstar punkstar commented Jan 2, 2018

There appears to be a typo in this action.

Description

The Magento\Ui\Controller\Adminhtml\Index\Render action incorrectly calls _ instead of __. This resulted in an error when I was running unit tests. I've searched the codebase for other instances of _() but did not find any.

Fixed Issues (if relevant)

No issue.

Manual testing scenarios

I was not able to manually trigger this error. We spotted the error during our CI build:

Magento\Ui\Test\Unit\Controller\Adminhtml\Index\RenderTest::testExecuteAjaxRequestException
Error: Call to undefined function Magento\Ui\Controller\Adminhtml\Index\_()

/var/www/magento/vendor/magento/module-ui/Controller/Adminhtml/Index/Render.php:91
/var/www/magento/vendor/magento/module-ui/Controller/Adminhtml/AbstractAction.php:62
/var/www/magento/vendor/magento/module-ui/Test/Unit/Controller/Adminhtml/Index/RenderTest.php:226

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@dmanners dmanners self-assigned this Jan 3, 2018
@dmanners dmanners added this to the January 2018 milestone Jan 3, 2018
@dmanners
Copy link
Contributor

dmanners commented Jan 3, 2018

@punkstar Thanks for the PR. I will process this now and let you know if I need any further information from you.

@dmanners
Copy link
Contributor

dmanners commented Jan 3, 2018

@punkstar this PR looks good to me and will be merged soon. If you felt like it you could also do a forward (to 2.3-develop) and a backward (to 2.1-develop) ports.

@punkstar
Copy link
Contributor Author

punkstar commented Jan 3, 2018

@dmanners I've just had a look at 2.1-develop and 2.3-develop. The issue isn't present there so no backport required.

@dmanners
Copy link
Contributor

dmanners commented Jan 3, 2018

Thanks @punkstar

@magento-team magento-team merged commit acf6fdb into magento:2.2-develop Jan 3, 2018
@nicobatty
Copy link

Can somebody explain to me why errors like these are not catch by travis? When I run the test manually I also get this fatal error.

I mean, aren't releases supposed to have 0 errors / failures in the tests?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants