-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'task/exception-on-publication-no-op' into task/publishi…
…ng-v3-followup
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...tentRepository.Core/Classes/Feature/WorkspacePublication/Exception/NoChangesException.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,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); | ||
} | ||
} |