Skip to content

Commit

Permalink
BUGFIX: Followup nodeTypes:show with --path to primitive value
Browse files Browse the repository at this point in the history
Related: #4619

Primitive values cannot be shown currently:

```
flow nodetypes:show Neos.Neos:Document --path properties.title.ui.label
Neos\ContentRepository\Command\NodeTypesCommandController_Original::truncateArrayAtLevel(): Argument #1 ($array) must be of type array, string given
```
  • Loading branch information
mhsdesign committed Jan 16, 2024
1 parent e2b5c38 commit 751518c
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ public function showCommand(string $nodeTypeName, string $path = '', int $level
$this->quit();
}

$configuration = $path
? self::truncateArrayAtLevel($nodeType->getConfiguration($path), $level)
: [$nodeTypeName => self::truncateArrayAtLevel($nodeType->getFullConfiguration(), $level)];
if (empty($path)) {
$configuration = [$nodeTypeName => self::truncateArrayAtLevel($nodeType->getFullConfiguration(), $level)];
} else {
$configuration = $nodeType->getConfiguration($path);
if (is_array($configuration)) {
$configuration = self::truncateArrayAtLevel($configuration, $level);
}
}

$yaml = Yaml::dump($configuration, 99);

Expand Down

0 comments on commit 751518c

Please sign in to comment.