-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Add force strategy to the rebase workspace command
- Loading branch information
Showing
6 changed files
with
143 additions
and
11 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
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
44 changes: 44 additions & 0 deletions
44
...ontentRepository.Core/Classes/Feature/WorkspaceRebase/Dto/RebaseErrorHandlingStrategy.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,44 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.ContentRepository package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\ContentRepository\Core\Feature\WorkspaceRebase\Dto; | ||
|
||
/** | ||
* The strategy how to handle errors during workspace rebase | ||
* | ||
* - fail (default) ensures conflicts are not ignored but reported | ||
* - force will rebase even if some conflicting events could have to be rebased | ||
* | ||
* @api DTO of {@see RebaseWorkspace} command | ||
*/ | ||
enum RebaseErrorHandlingStrategy: string implements \JsonSerializable | ||
{ | ||
/** | ||
* This strategy rebasing will fail if conflicts are detected and the "WorkspaceRebaseFailed" event is added. | ||
*/ | ||
case STRATEGY_FAIL = 'fail'; | ||
|
||
/** | ||
* This strategy means all events that can be applied are rebased and conflicting events are ignored | ||
*/ | ||
case STRATEGY_FORCE = 'force'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function jsonSerialize(): string | ||
{ | ||
return $this->value; | ||
} | ||
} |
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