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
M3: Point email action improvements + Refactor PointEventHelper #8161
Conversation
@kuzmany I removed this PR from the M3 project because we want to track only issues there. And please check Travis. |
{ | ||
$action = $changeActionExecutedEvent->getPointAction(); | ||
|
||
if ($action->getType() != 'email.open') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we can use the checkContext
that I suggested be added to the PointChangeActionExecutedEvent.
@@ -77,6 +77,12 @@ public function addAction($key, array $action) | |||
$action | |||
); | |||
|
|||
//Support for old way with callback and new event based system | |||
//Could be removed after all events will be refactored to events. The key 'eventName' will be mandatory and 'callback' will be removed. | |||
if (!array_key_exists('callback', $action) && !array_key_exists('eventName', $action)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's m2-to-m3 I think we should drop support for callbacks now and refactor to events
$this->eventDetails = $eventDetails; | ||
$this->completedActions = $completedActions; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a checkContext
method here?
public function checkContext(string $context): bool
{
return $this->pointAction->getType() === $context;
}
* | ||
* @return bool | ||
*/ | ||
private function invokeCallback(Point $action, Lead $lead, $eventDetails, array $settings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should drop callback support altogether
@escopecz so this PR is removed from Mautic3 or not? |
@kuzmany it will to go into M3. We want to get rid of MauticFactory. We are not certain we will be able to do so for all occurrences but we definitely want to merge in WIP PRs like this one. Did I answer your question or is there something else behind it? |
Please rebase this to the 3.x branch |
Please be sure you are submitting this against the staging branch.
Description:
This PR originally published #7330 resolved Mautic 3 Refactor PointEventHelper issue #8055
This PR try figure out trigger points for each entity in points action reported in this issue #7320
Steps to test this PR:
List deprecations along with the new alternative:
mautic/app/bundles/EmailBundle/EventListener/PointSubscriber.php
Line 82 in 0e500ae
Use eventName like in other parts of Mautic.