-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3762 from neos/feature/conflict-resolution-02/reb…
…ase-conflicts !!!FEATURE: Offer resolution strategies when conflicts arise during rebase
- Loading branch information
Showing
65 changed files
with
3,435 additions
and
527 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos 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\Neos\Ui\Application; | ||
|
||
use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; | ||
use Neos\Flow\Annotations as Flow; | ||
|
||
/** | ||
* The application layer level command DTO to communicate discarding of all changes recorded for a workspace | ||
* | ||
* @internal for communication within the Neos UI only | ||
*/ | ||
#[Flow\Proxy(false)] | ||
final readonly class DiscardAllChanges | ||
{ | ||
public function __construct( | ||
public ContentRepositoryId $contentRepositoryId, | ||
public WorkspaceName $workspaceName, | ||
) { | ||
} | ||
|
||
/** | ||
* @param array<string,string> $values | ||
*/ | ||
public static function fromArray(array $values): self | ||
{ | ||
return new self( | ||
ContentRepositoryId::fromString($values['contentRepositoryId']), | ||
WorkspaceName::fromString($values['workspaceName']), | ||
); | ||
} | ||
} |
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,40 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos.Ui 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\Neos\Ui\Application\SyncWorkspace; | ||
|
||
use Neos\Flow\Annotations as Flow; | ||
|
||
/** | ||
* A DTO representing a rebase conflict | ||
* | ||
* @internal for communication within the Neos UI only | ||
*/ | ||
#[Flow\Proxy(false)] | ||
final readonly class Conflict implements \JsonSerializable | ||
{ | ||
public function __construct( | ||
public ?IconLabel $affectedSite, | ||
public ?IconLabel $affectedDocument, | ||
public ?IconLabel $affectedNode, | ||
public ?TypeOfChange $typeOfChange, | ||
public ?ReasonForConflict $reasonForConflict | ||
) { | ||
} | ||
|
||
public function jsonSerialize(): mixed | ||
{ | ||
return get_object_vars($this); | ||
} | ||
} |
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,57 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos.Ui 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\Neos\Ui\Application\SyncWorkspace; | ||
|
||
use Neos\ContentRepository\Core\ContentRepository; | ||
use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; | ||
use Neos\Flow\Annotations as Flow; | ||
|
||
/** | ||
* @internal for communication within the Neos UI only | ||
*/ | ||
#[Flow\Proxy(false)] | ||
final readonly class Conflicts implements \JsonSerializable, \Countable | ||
{ | ||
/** @var Conflict[] */ | ||
private array $items; | ||
|
||
public function __construct(Conflict ...$items) | ||
{ | ||
$this->items = $items; | ||
} | ||
|
||
public static function builder( | ||
ContentRepository $contentRepository, | ||
WorkspaceName $workspaceName, | ||
?DimensionSpacePoint $preferredDimensionSpacePoint, | ||
): ConflictsBuilder { | ||
return new ConflictsBuilder( | ||
contentRepository: $contentRepository, | ||
workspaceName: $workspaceName, | ||
preferredDimensionSpacePoint: $preferredDimensionSpacePoint | ||
); | ||
} | ||
|
||
public function jsonSerialize(): mixed | ||
{ | ||
return $this->items; | ||
} | ||
|
||
public function count(): int | ||
{ | ||
return count($this->items); | ||
} | ||
} |
Oops, something went wrong.