Skip to content

Commit

Permalink
Merge pull request #18 from gdalyy/master
Browse files Browse the repository at this point in the history
Rollback ActivityLogger autowiring + fix collections normalization on  update
  • Loading branch information
gdalyy authored May 31, 2024
2 parents a2b8fdb + 9ccf988 commit 84b2cc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/DataProcessor/ActivityLogProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ public function processUpdatedItem(UpdateActivityLogMessageInterface $message, C
return;
}

$updatedData = $message->getNormalizedItem();
$updatedData = null !== $message->getUpdatedItem() ?
$this->objectNormalizer->normalize($message->getUpdatedItem(), 'activityLog', $this->getNormalizationContext($loggableContext)) :
$message->getNormalizedItem();


// no loggable fields were updated
if (empty($updatedData) && !$message->isCreateLogWithoutChanges()) {
Expand Down
7 changes: 2 additions & 5 deletions src/Resources/config/logger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ services:
alias: 'Locastic\Loggastic\Logger\ActivityLogger'

Locastic\Loggastic\Logger\ActivityLogger:
arguments:
- '@Locastic\Loggastic\MessageDispatcher\ActivityLogMessageDispatcherInterface'
- '@Locastic\Loggastic\Metadata\LoggableContext\Factory\LoggableContextFactoryInterface'
- '@serializer.normalizer.object'
- '@event_dispatcher'
autoconfigure: true
autowire: true

Locastic\Loggastic\Factory\ActivityLogInputFactoryInterface:
alias: 'Locastic\Loggastic\Factory\ActivityLogInputFactory'
Expand Down

0 comments on commit 84b2cc5

Please sign in to comment.