Skip to content

Commit

Permalink
!!! TASK: Remove underscore node property access _* from property a…
Browse files Browse the repository at this point in the history
…nd filter FlowQuery

Fixes neos#4208 (comment)
  • Loading branch information
mhsdesign committed Apr 26, 2024
1 parent 20307e1 commit 3d8bce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Expand Up @@ -16,7 +16,6 @@
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Utility\NodeTypeWithFallbackProvider;
use Neos\Utility\ObjectAccess;

/**
* This filter implementation contains specific behavior for use on ContentRepository
Expand Down Expand Up @@ -122,11 +121,9 @@ protected function getPropertyPath($element, $propertyPath)
if ($propertyPath === '_identifier') {
// TODO: deprecated (Neos <9 case)
return $element->nodeAggregateId->value;
} elseif ($propertyPath[0] === '_' && $propertyPath !== '_hiddenInIndex') {
return ObjectAccess::getPropertyPath($element, substr($propertyPath, 1));
} else {
return $element->getProperty($propertyPath);
}

return $element->getProperty($propertyPath);
}

/**
Expand Down
Expand Up @@ -21,7 +21,6 @@
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Utility\NodeTypeWithFallbackProvider;
use Neos\Utility\ObjectAccess;

/**
* Used to access properties of a ContentRepository Node. If the property mame is
Expand Down Expand Up @@ -109,10 +108,6 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): mixed
return $element->nodeAggregateId->value;
}

if ($propertyName[0] === '_') {
return ObjectAccess::getPropertyPath($element, substr($propertyName, 1));
}

if ($this->getNodeType($element)->hasReference($propertyName)) {
// legacy access layer for references
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($element);
Expand Down

0 comments on commit 3d8bce3

Please sign in to comment.