Skip to content

Commit

Permalink
Merge branch 'task/exception-on-publication-no-op' into task/publishi…
Browse files Browse the repository at this point in the history
…ng-v3-followup
  • Loading branch information
kitsunet committed Nov 1, 2024
2 parents 1efa298 + 2cb2113 commit 8848678
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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\WorkspacePublication\Exception;

use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName;

/**
* @api thrown as part of command handling in case
*/
class NoChangesException extends \Exception
{
public static function inWorkspaceToPublish(WorkspaceName $workspaceName): self
{
return new self(sprintf('Cannot publish workspace "%s" without any changes', $workspaceName->value), 1730463156);
}

public static function nothingSelectedForPublish(WorkspaceName $workspaceName): self
{
return new self(sprintf('Cannot publish workspace "%s" because no changes were selected.', $workspaceName->value), 1730463510);
}

public static function noChangesToRebase(WorkspaceName $workspaceName): self
{
return new self(sprintf('Cannot rebase workspace "%s" because it has no changes.', $workspaceName->value), 1730463693);
}
}

0 comments on commit 8848678

Please sign in to comment.