-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into bugfix/node-type-manager
- Loading branch information
Showing
9 changed files
with
330 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...tRepository90/Rules/NodeSearchServiceRector/Fixture/node-search-service-interface.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace Neos\Rector\Test; | ||
|
||
use Neos\ContentRepository\Domain\Model\Node; | ||
use Neos\ContentRepository\Domain\Service\Context; | ||
|
||
class SomeClass extends AnotherClass | ||
{ | ||
/** | ||
* @var \Neos\Neos\Domain\Service\NodeSearchServiceInterface | ||
*/ | ||
private $nodeSearchServiceInterface; | ||
|
||
public function startingPointNodeIsGiven(Node $node, Context $context) | ||
{ | ||
$term = "term"; | ||
$searchNodeTypes = []; | ||
$nodes = $this->nodeSearchServiceInterface->findByProperties($term, $searchNodeTypes, $context, $node); | ||
} | ||
|
||
public function startingPointNodeIsNotGiven(Context $context) | ||
{ | ||
$term = "term"; | ||
$searchNodeTypes = []; | ||
$nodes = $this->nodeSearchServiceInterface->findByProperties($term, $searchNodeTypes, $context); | ||
} | ||
} | ||
|
||
----- | ||
<?php | ||
|
||
namespace Neos\Rector\Test; | ||
|
||
use Neos\ContentRepository\Domain\Model\Node; | ||
use Neos\ContentRepository\Domain\Service\Context; | ||
|
||
class SomeClass extends AnotherClass | ||
{ | ||
/** | ||
* @var \Neos\Neos\Domain\Service\NodeSearchServiceInterface | ||
*/ | ||
private $nodeSearchServiceInterface; | ||
|
||
public function startingPointNodeIsGiven(Node $node, Context $context) | ||
{ | ||
$term = "term"; | ||
$searchNodeTypes = []; | ||
// TODO 9.0 migration: This could be a suitable replacement. Please check if all your requirements are still fulfilled. | ||
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); | ||
$nodes = $subgraph->findDescendantNodes($node->aggregateId, \Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindDescendantNodesFilter::create(nodeTypes: \Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria::create(\Neos\ContentRepository\Core\NodeType\NodeTypeNames::fromStringArray($searchNodeTypes), \Neos\ContentRepository\Core\NodeType\NodeTypeNames::createEmpty()), searchTerm: $term)); | ||
} | ||
|
||
public function startingPointNodeIsNotGiven(Context $context) | ||
{ | ||
$term = "term"; | ||
$searchNodeTypes = []; | ||
// TODO 9.0 migration: The replacement needs a node as starting point for the search. Please provide a node, to make this replacement working. | ||
$node = 'we-need-a-node-here'; | ||
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($node); | ||
$nodes = $subgraph->findDescendantNodes($node->aggregateId, \Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindDescendantNodesFilter::create(nodeTypes: \Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria::create(\Neos\ContentRepository\Core\NodeType\NodeTypeNames::fromStringArray($searchNodeTypes), \Neos\ContentRepository\Core\NodeType\NodeTypeNames::createEmpty()), searchTerm: $term)); | ||
} | ||
} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.