8000 [Workflow] WIP Create MarkingHistoryStore to allow logging of an entity's states by ChangePlaces · Pull Request #28265 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Workflow] WIP Create MarkingHistoryStore to allow logging of an entity's states #28265

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

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update MarkingHistoryStore.php
  • Loading branch information
ChangePlaces authored Aug 25, 2018
commit 0f4fd34a242724d9d716e41e55b2703baabc515f
4 changes: 2 additions & 2 deletions src/Symfony/Component/Workflow/MarkingHistoryStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(string $historyProperty, string $memoProperty = null
public function updateMarkingHistory($subject, Transition $transition, Marking $marking, $workflowName)
{
// get existing state history for this object
$existingHistory = $this->historyPropertyAccessor->getValue($subject, $this->historyProperty) ?? [];
$existingHistory = $this->historyPropertyAccessor->getValue($subject, $this->historyProperty) ?? array();


// build the array to append to the log, using the workflow name as the log's key
Expand All @@ -50,7 +50,7 @@ public function updateMarkingHistory($subject, Transition $transition, Marking $
$arr['marking'] = $marking->getPlaces();
$arr['transition'] = $transition->getName();

if ($this->memoProperty !== null) {
if (null !== $this->memoProperty) {
$arr['memo'] = $this->memoPropertyAccessor->getValue($subject, $this->memoProperty) ?? ''; // an optional memo
}

Expand Down
0