-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IntegrationBundle bug fixes (#13454)
* Merge pull request #1213 from acquia/MAUT-5072 Segments are very slow to build * Adding the index also to the entity * Merge pull request #889 from mautic-inc/MAUT-3552 Impossible for a marketer to know why an object did not sync due to validation issues * Merge pull request #1000 from mautic-inc/MAUT-4181 MAUT-4181: IntegrationsBundle: don't sync other object types if IDs for particular objects are specified * Fixes after rebase to M5 * Merge pull request #1060 from mautic-inc/MAUT-4362 MAUT-4362: Scoring - SFDC clearing out new data from ACS * Merge pull request #1093 from mautic-inc/MAUT-4640 MAUT-4640: The field change log queue is not processed entirely during a single integration sync * Chages needed after rebase to M5 * Merge pull request #1486 from acquia/MAUT-6230-syncing-sf MAUT-6230 / Removed last sync date time from ObjectDAO and Integratio… * Merge pull request #1706 from acquia/MAUT-6264 MAUT-6264 "Push to Salesforce" Campaign Action showing wrong count * Merge pull request #1758 from acquia/MAUT-7063-Salesforce-Integration-referenceValueDAO-is-causing-sync-issues MAUT-7063: salesforce integration reference value dao is causing sync issues * Merge pull request #1802 from acquia/MAUT-7700 MAUT-7700 - Fixing incorrect timeline URL for salesforce * Fix new line issue * Fixes after rebase to M5 * Merge pull request #1968 from acquia/MAUT-5271 MAUT-5271: Plugin Credentials Change Bug Fix * Changes needed after rebase to M5 --------- Co-authored-by: Anton Vlasenko <43744263+anton-vlasenko@users.noreply.github.com> Co-authored-by: Alan Hartless <alan@devkardia.com> Co-authored-by: lukassykora <lukas.sykora@acquia.com> Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com> Co-authored-by: Robert Parker <diaboloshogunate@gmail.com> Co-authored-by: Miroslav Fedeleš <miroslav.fedeles@gmail.com> Co-authored-by: Saurabh Gupta <saurabh.gupta@acquia.com> Co-authored-by: Saurabh Gupta <48244990+dadarya0@users.noreply.github.com>
- Loading branch information
1 parent
cb5b3c7
commit 8e5b815
Showing
34 changed files
with
856 additions
and
92 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
41 changes: 41 additions & 0 deletions
41
app/bundles/CampaignBundle/EventListener/CampaignEventLogCleanupSubscriber.php
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mautic\CampaignBundle\EventListener; | ||
|
||
use Mautic\CampaignBundle\CampaignEvents; | ||
use Mautic\CampaignBundle\Entity\FailedLeadEventLogRepository; | ||
use Mautic\CampaignBundle\Entity\LeadEventLog; | ||
use Mautic\CampaignBundle\Event\ExecutedBatchEvent; | ||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
|
||
final class CampaignEventLogCleanupSubscriber implements EventSubscriberInterface | ||
{ | ||
public function __construct(private FailedLeadEventLogRepository $failedLeadEventLogRepository) | ||
{ | ||
} | ||
|
||
public static function getSubscribedEvents(): array | ||
{ | ||
return [ | ||
CampaignEvents::ON_EVENT_EXECUTED_BATCH => ['onEventBatchExecuted', -100], | ||
]; | ||
} | ||
|
||
/** | ||
* Deletes failed log entries for all successful event logs. | ||
*/ | ||
public function onEventBatchExecuted(ExecutedBatchEvent $event): void | ||
{ | ||
$ids = $event->getExecuted() | ||
->map(fn (LeadEventLog $eventLog) => $eventLog->getId()) | ||
->getValues(); | ||
|
||
if (!$ids) { | ||
return; | ||
} | ||
|
||
$this->failedLeadEventLogRepository->deleteByIds($ids); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Mautic\IntegrationsBundle\Event; | ||
|
||
use Mautic\PluginBundle\Entity\Integration; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
final class KeysSaveEvent extends Event | ||
{ | ||
/** | ||
* @var array<string,string> | ||
*/ | ||
private array $newKeys; | ||
|
||
/** | ||
* @param array<string,string> $oldKeys | ||
*/ | ||
public function __construct(private Integration $integrationConfiguration, private array $oldKeys) | ||
{ | ||
$this->newKeys = $integrationConfiguration->getApiKeys(); | ||
} | ||
|
||
public function getIntegrationConfiguration(): Integration | ||
{ | ||
return $this->integrationConfiguration; | ||
} | ||
|
||
/** | ||
* @return array<string,string> | ||
*/ | ||
public function getOldKeys(): array | ||
{ | ||
return $this->oldKeys; | ||
} | ||
|
||
/** | ||
* @return array<string,string> | ||
*/ | ||
public function getNewKeys(): array | ||
{ | ||
return $this->newKeys; | ||
} | ||
} |
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
Oops, something went wrong.