Skip to content

Commit

Permalink
AKM-26: OroCommerce import changes compat
Browse files Browse the repository at this point in the history
  • Loading branch information
dxops committed Jul 13, 2021
1 parent a09d2d7 commit f89675a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions EventListener/AdditionalOptionalListenerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ public function disable(): void
{
$this->enabled = false;
}

public function setEnabled($enabled = true)
{
$this->enabled = (bool)$enabled;
}
}
2 changes: 1 addition & 1 deletion ImportExport/Strategy/ImportStrategyHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function importEntity($databaseEntity, $importedEntity, array $excludedPr
/**
* {@inheritdoc}
*/
private function getEntityPropertiesByClassName($entityClassName)
protected function getEntityPropertiesByClassName($entityClassName)
{
/*
* In case if we work with configured entities then we should use fieldHelper
Expand Down
5 changes: 4 additions & 1 deletion ImportExport/Writer/CumulativeWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ private function doWrite()
$this->optionalListenerManager->getListeners()
);
foreach ($this->forceListeners as $forceListener) {
$this->optionalListenerManager->enableListener($forceListener);
try {
$this->optionalListenerManager->enableListener($forceListener);
} catch (\InvalidArgumentException $e) {
}
}

$this->writer->write($this->items);
Expand Down

0 comments on commit f89675a

Please sign in to comment.