Skip to content

Commit

Permalink
TASK: Move Conflicts concept to Application\Shared namespace
Browse files Browse the repository at this point in the history
This moves the classes `ConflictsOccurred`, `Conflict`, `Conflicts`,
`ConflictsBuilder`, `ReasonForConflict`, `TypeOfChange` and `IconLabel`
into the `Application\Shared` namespace and adjusts all references
accordingly.

These classes are going to be reused by multiple command handlers.
  • Loading branch information
grebaldi committed Apr 22, 2024
1 parent 3069277 commit aa2617c
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

use Neos\Flow\Annotations as Flow;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

use Neos\ContentRepository\Core\ContentRepository;
use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

use Neos\ContentRepository\Core\CommandHandler\CommandInterface;
use Neos\ContentRepository\Core\ContentRepository;
Expand All @@ -31,7 +31,6 @@
use Neos\ContentRepository\Core\Feature\NodeVariation\Command\CreateNodeVariant;
use Neos\ContentRepository\Core\Feature\SubtreeTagging\Command\TagSubtree;
use Neos\ContentRepository\Core\Feature\SubtreeTagging\Command\UntagSubtree;
use Neos\ContentRepository\Core\Feature\WorkspaceRebase\CommandsThatFailedDuringRebase;
use Neos\ContentRepository\Core\Feature\WorkspaceRebase\CommandThatFailedDuringRebase;
use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindClosestNodeFilter;
Expand All @@ -44,11 +43,6 @@
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Domain\Service\NodeTypeNameFactory;
use Neos\Neos\Ui\Application\SyncWorkspace\Conflict;
use Neos\Neos\Ui\Application\SyncWorkspace\Conflicts;
use Neos\Neos\Ui\Application\SyncWorkspace\IconLabel;
use Neos\Neos\Ui\Application\SyncWorkspace\ReasonForConflict;
use Neos\Neos\Ui\Application\SyncWorkspace\TypeOfChange;

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

/**
* @internal for communication within the Neos UI only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

use Neos\Flow\Annotations as Flow;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

/**
* @internal for communication within the Neos UI only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Ui\Application\SyncWorkspace;
namespace Neos\Neos\Ui\Application\Shared;

/**
* @internal for communication within the Neos UI only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Domain\Workspace\WorkspaceProvider;
use Neos\Neos\Ui\Application\Shared\Conflicts;
use Neos\Neos\Ui\Application\Shared\ConflictsOccurred;

/**
* The application layer level command handler to for rebasing the workspace
Expand All @@ -33,6 +35,9 @@ final class SyncWorkspaceCommandHandler
#[Flow\Inject]
protected WorkspaceProvider $workspaceProvider;

/**
* @throws ConflictsOccurred
*/
public function handle(SyncWorkspaceCommand $command): void
{
try {
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/BackendServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
use Neos\Neos\Ui\Application\PublishChangesInSite;
use Neos\Neos\Ui\Application\ReloadNodes\ReloadNodesQuery;
use Neos\Neos\Ui\Application\ReloadNodes\ReloadNodesQueryHandler;
use Neos\Neos\Ui\Application\SyncWorkspace\ConflictsOccurred;
use Neos\Neos\Ui\Application\Shared\ConflictsOccurred;
use Neos\Neos\Ui\Application\SyncWorkspace\SyncWorkspaceCommand;
use Neos\Neos\Ui\Application\SyncWorkspace\SyncWorkspaceCommandHandler;
use Neos\Neos\Ui\ContentRepository\Service\NeosUiNodeService;
Expand Down

0 comments on commit aa2617c

Please sign in to comment.