Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/Listener/ProductionVersionGuardListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public function handle(Event $event): void
// OR's ObjectUpdatingEvent exposes the new object via getNewObject()
// (not getObject() — the two events have different APIs).
$entity = $event->getNewObject();
} else {
}

if (isset($entity) === false) {
return;
}

Expand Down
13 changes: 6 additions & 7 deletions lib/Mcp/OpenBuiltToolProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,9 @@ private function handleUpsertSchema(array $args): array
if ($existing !== null) {
$schema = $schemaMapper->updateFromArray($existing->getId(), $blob);
$action = 'updated';
} else {
}

if ($existing === null) {
$schema = $schemaMapper->createFromArray($blob);
$action = 'created';

Expand Down Expand Up @@ -718,10 +720,9 @@ private function handleUpsertPage(array $args): array
$manifest['pages'] = array_values($pages);
$saved = $this->saveVersionManifest(objectService: $objectService, version: $version, manifest: $manifest);

$action = 'created';
if ($replaced === true) {
$action = 'updated';
} else {
$action = 'created';
}

return [
Expand Down Expand Up @@ -847,10 +848,9 @@ private function handleUpsertMenuItem(array $args): array
$label = (string) ($args['label'] ?? '');
$icon = (string) ($args['icon'] ?? '');
$route = (string) ($args['route'] ?? '');
$order = 100;
if (isset($args['order']) === true) {
$order = (int) $args['order'];
} else {
$order = 100;
}

if ($appSlug === '' || $this->isValidSlug(candidate: $appSlug) === false) {
Expand Down Expand Up @@ -903,10 +903,9 @@ private function handleUpsertMenuItem(array $args): array
$manifest['menu'] = array_values($menu);
$saved = $this->saveVersionManifest(objectService: $objectService, version: $version, manifest: $manifest);

$action = 'created';
if ($replaced === true) {
$action = 'updated';
} else {
$action = 'created';
}

return [
Expand Down
25 changes: 9 additions & 16 deletions lib/Service/ApplicationCreationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public function createApplication(array $payload): string
$appSlug = (string) ($payload['slug'] ?? '');
$appName = (string) ($payload['name'] ?? '');
$description = (string) ($payload['description'] ?? '');
$preset = (string) ($payload['preset'] ?? '');
$versions = $this->resolveVersionChain(payload: $payload);

// ---- State tracker for rollback -------------------------------------
Expand Down Expand Up @@ -182,10 +181,9 @@ public function createApplication(array $payload): string
if ($state['applicationUuid'] === '') {
$orphaned = [];
$this->rollback(state: $state, orphaned: $orphaned);
$status = 'complete';
if ($orphaned !== []) {
$status = 'partial';
} else {
$status = 'complete';
}

throw new WizardCreationException(
Expand Down Expand Up @@ -244,9 +242,8 @@ public function createApplication(array $payload): string
);
$orphaned = [];
$this->rollback(state: $state, orphaned: $orphaned);
if ($orphaned === []) {
$status = 'complete';
} else {
$status = 'complete';
if ($orphaned !== []) {
$status = 'partial';
}

Expand Down Expand Up @@ -275,9 +272,8 @@ public function createApplication(array $payload): string
);
$orphaned = [];
$this->rollback(state: $state, orphaned: $orphaned);
if ($orphaned === []) {
$status = 'complete';
} else {
$status = 'complete';
if ($orphaned !== []) {
$status = 'partial';
}

Expand Down Expand Up @@ -329,9 +325,8 @@ public function createApplication(array $payload): string
);
$orphaned = [];
$this->rollback(state: $state, orphaned: $orphaned);
if ($orphaned === []) {
$status = 'complete';
} else {
$status = 'complete';
if ($orphaned !== []) {
$status = 'partial';
}

Expand Down Expand Up @@ -379,9 +374,8 @@ public function createApplication(array $payload): string
);
$orphaned = [];
$this->rollback(state: $state, orphaned: $orphaned);
if ($orphaned === []) {
$status = 'complete';
} else {
$status = 'complete';
if ($orphaned !== []) {
$status = 'partial';
}

Expand Down Expand Up @@ -438,7 +432,6 @@ private function validatePayload(array $payload): void
}

// Validate preset or custom versions.
$preset = (string) ($payload['preset'] ?? '');
$versions = $this->resolveVersionChain(payload: $payload);

if ($versions === []) {
Expand Down
9 changes: 5 additions & 4 deletions lib/Service/SlugValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ public function validateChainSlugs(array $slugs): array

foreach ($slugs as $idx => $slug) {
$lower = strtolower((string) $slug);
if (isset($seen[$lower]) === true) {
$dupes[$lower][] = $seen[$lower];
$dupes[$lower][] = $idx;
} else {
if (isset($seen[$lower]) === false) {
$seen[$lower] = $idx;
continue;
}

$dupes[$lower][] = $seen[$lower];
$dupes[$lower][] = $idx;
}

if ($dupes === []) {
Expand Down
Loading
Loading