Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete CallExit function for After plugin logic execution 2.2-develop [BackPort] #11200

Merged

Conversation

osrecio
Copy link
Member

@osrecio osrecio commented Oct 3, 2017

Delete CallExit to allow Around/After plugin work correctly

Description

If you call a exit, you break the lifecycle of Magento, Post/Dispatch Events, Profiler, etc

Fixed Issues

  1. M2.1.2 : Impossible to create an after interceptor when files are being downloaded by controllers #7356

Manual testing scenarios

Create a plugin that executes code after \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\PrintAction::execute(). e.g:

#File: di.xml
<type name="Magento\Sales\Controller\Adminhtml\Invoice\PrintAction">
    <plugin name="after_print_shipment"
            type="VendorModule\Plugin\Magento\Sales\Controller\Adminhtml\Invoice\PrintAction\Plugin"
            sortOrder='10'
    />
</type>
#File: Plugin.php
function afterExecute($subject, $result) {
    echo 'After Plugin';
    die;
}

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)

Related Pull Requests

#11029

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.

4 participants