-
-
Notifications
You must be signed in to change notification settings - Fork 228
!!! FEATURE: High level Neos site import site:importAll
#5307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8a95449
d192496
4d4e98d
b4461e5
7b3ce80
c8b40bd
191ce88
aa8c611
630bc09
221096b
918a052
a37387f
4478619
4a54ace
9f68937
cd550d7
e260954
361c71e
a05ad66
bd1ff93
14523b2
1c2afb7
4423476
a9fe6ce
88aad94
f526e73
0772b6a
e57ce53
ae03530
cb82c2d
dff6885
71c65a2
9ba32fd
9e7c5c1
9c9ce5b
f674d5e
7e0021d
7fea08b
c98384d
adf7b38
03aca80
b701b17
717688d
efb7fbd
ea67195
210a087
c1d64ba
49234ff
5f3d350
b6c4cd4
6fc88e0
02e9cde
b11bf2e
41e472a
aa71347
c454117
b8670cf
17db2eb
5696f36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,13 @@ public function __construct( | |
|
||
public static function fromRawEvent(Event $event): self | ||
{ | ||
$payload = \json_decode($event->data->value, true, 512, JSON_THROW_ON_ERROR); | ||
// unset content stream id as this is overwritten during import | ||
unset($payload['contentStreamId'], $payload['workspaceName']); | ||
Comment on lines
+28
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at some point i think we should introduce a utility to manifest this stuff :D we do it at a lot of places to assume the properties are named that way ^^ |
||
return new self( | ||
$event->id->value, | ||
$event->type->value, | ||
\json_decode($event->data->value, true, 512, JSON_THROW_ON_ERROR), | ||
$payload, | ||
$event->metadata?->value ?? [], | ||
); | ||
} | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\ContentRepository\Export\Factory; | ||
|
||
use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryDependencies; | ||
use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryInterface; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; | ||
use Neos\ContentRepository\Export\Processors\EventExportProcessor; | ||
|
||
/** | ||
* @implements ContentRepositoryServiceFactoryInterface<EventExportProcessor> | ||
*/ | ||
final readonly class EventExportProcessorFactory implements ContentRepositoryServiceFactoryInterface | ||
{ | ||
public function __construct( | ||
private ContentStreamId $contentStreamId, | ||
) { | ||
} | ||
|
||
public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): EventExportProcessor | ||
{ | ||
return new EventExportProcessor( | ||
$this->contentStreamId, | ||
$serviceFactoryDependencies->eventStore, | ||
); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\ContentRepository\Export\Factory; | ||
|
||
use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryDependencies; | ||
use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceFactoryInterface; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; | ||
use Neos\ContentRepository\Export\Processors\EventStoreImportProcessor; | ||
|
||
/** | ||
* @implements ContentRepositoryServiceFactoryInterface<EventStoreImportProcessor> | ||
*/ | ||
final readonly class EventStoreImportProcessorFactory implements ContentRepositoryServiceFactoryInterface | ||
{ | ||
public function __construct( | ||
private WorkspaceName $targetWorkspaceName, | ||
private bool $keepEventIds, | ||
) { | ||
} | ||
|
||
public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): EventStoreImportProcessor | ||
{ | ||
return new EventStoreImportProcessor( | ||
$this->targetWorkspaceName, | ||
$this->keepEventIds, | ||
$serviceFactoryDependencies->eventStore, | ||
$serviceFactoryDependencies->eventNormalizer, | ||
$serviceFactoryDependencies->contentRepository, | ||
); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.