Skip to content

Commit

Permalink
TASK: Remove obsolete OUTDATED_CONFLICT state leftovers
Browse files Browse the repository at this point in the history
Resolves: neos#5101
  • Loading branch information
mhsdesign committed Jun 16, 2024
1 parent 8cdcc5f commit 10e3259
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private function whenWorkspaceWasRebased(WorkspaceWasRebased $event): void

private function whenWorkspaceRebaseFailed(WorkspaceRebaseFailed $event): void
{
$this->markWorkspaceAsOutdatedConflict($event->workspaceName);
$this->markWorkspaceAsOutdated($event->workspaceName);
}

private function whenWorkspaceWasRemoved(WorkspaceWasRemoved $event): void
Expand Down Expand Up @@ -373,18 +373,4 @@ private function markWorkspaceAsOutdated(WorkspaceName $workspaceName): void
'workspaceName' => $workspaceName->value
]);
}

private function markWorkspaceAsOutdatedConflict(WorkspaceName $workspaceName): void
{
$this->dbal->executeUpdate('
UPDATE ' . $this->tableName . '
SET
status = :outdatedConflict
WHERE
workspacename = :workspaceName
', [
'outdatedConflict' => WorkspaceStatus::OUTDATED_CONFLICT->value,
'workspaceName' => $workspaceName->value
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ enum WorkspaceStatus: string implements \JsonSerializable
*/
case OUTDATED = 'OUTDATED';

/**
* CONFLICT Example:
*
* CONFLICT is a special case of OUTDATED, but then an error happens during the rebasing.
*
* Workspace Review <----------------------------------- Workspace User-Foo
* | . |
* Content Stream A2 (current) <-- Content Stream B2 (rebasing) |
* Content Stream B1
*/
case OUTDATED_CONFLICT = 'OUTDATED_CONFLICT';

public function equals(self $other): bool
{
return $this->value === $other->value;
Expand Down

0 comments on commit 10e3259

Please sign in to comment.