Closed mhsdesign closed 8 months ago
As discussed we still can introduce this method to the ProjectionInterface
at a later point - even in 9.1 as we consider the projection api beta for know and dont promise 100% compatibility
Also we need to better define the setupStatus
it should not only be a boolean status but a dto with all important properties.
cc @bwaidelich , @skurfuerst
Related: https://github.com/neos/eventstore/issues/16 Related: first draft wip implementation https://github.com/neos/neos-development-collection/pull/4474
as discussed with @mhsdesign
enum ProjectionStatusType {
case OK;
case ERROR;
case REQUIRES_SETUP;
case REQUIRES_REPLAY;
}
final readonly class ProjectionStatus {
public function __construct(
public ProjectionStatusType $type,
public string $details,
) {
}
}
final readonly class ProjectionStatuses implements \IteratorAggregate {
/**
* @var array<class-string<ProjectionInterface<ProjectionStateInterface>>, ProjectionStatus>
*/
private array $statuses;
// ...
}
final readonly class ContentRepositoryStatus {
public function __construct(
public EventStoreStatus $eventStoreStatus, // see https://github.com/neos/eventstore/issues/16
public ProjectionStatuses $projectionStatuses,
) {
}
}
and then:
ContentRepository
Change setUp()
signature:
-public function setUp(): SetupResult
+public function setUp(): void
(throw exception on failure)
And add status()
:
public function status(): EventStoreStatus {
// ...
}
im currently building the 9.0 neos setup, and wondering if there is a way to tell the user the
cr:setup
has to be rerun - there is no way currently.See discussion https://neos-project.slack.com/archives/C3MCBK6S2/p1691245346480469