diff --git a/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php b/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php index 1609220ca3d..06c39096c5a 100644 --- a/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php +++ b/Neos.ContentRepository.Security/Classes/Authorization/Privilege/Node/NodePrivilegeContext.php @@ -17,7 +17,6 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepositoryRegistry\Utility\ContentRepositoryRegistryProvider; use Neos\Flow\Annotations as Flow; use Neos\Flow\Security\Context as SecurityContext; use Neos\Neos\Utility\NodeTypeWithFallbackProvider; @@ -27,9 +26,11 @@ */ class NodePrivilegeContext { - use ContentRepositoryRegistryProvider; use NodeTypeWithFallbackProvider; + #[Flow\Inject] + protected ContentRepositoryRegistry $contentRepositoryRegistry; + /** * @Flow\Inject * @var SecurityContext diff --git a/Neos.ContentRepositoryRegistry/Classes/Utility/ContentRepositoryRegistryProvider.php b/Neos.ContentRepositoryRegistry/Classes/Utility/ContentRepositoryRegistryProvider.php deleted file mode 100644 index 432291627ad..00000000000 --- a/Neos.ContentRepositoryRegistry/Classes/Utility/ContentRepositoryRegistryProvider.php +++ /dev/null @@ -1,15 +0,0 @@ -contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId)->getNodeTypeManager(); + $nodeTypeManager = $this->_contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId)->getNodeTypeManager(); return $nodeTypeManager->hasNodeType($node->nodeTypeName) ? $nodeTypeManager->getNodeType($node->nodeTypeName) diff --git a/Neos.Neos/Classes/View/FusionView.php b/Neos.Neos/Classes/View/FusionView.php index 0183572e541..0596705c97e 100644 --- a/Neos.Neos/Classes/View/FusionView.php +++ b/Neos.Neos/Classes/View/FusionView.php @@ -16,7 +16,6 @@ use GuzzleHttp\Psr7\Message; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepositoryRegistry\Utility\ContentRepositoryRegistryProvider; use Neos\Flow\Annotations as Flow; use Neos\Flow\Mvc\View\AbstractView; use Neos\Flow\Security\Context; @@ -40,9 +39,11 @@ class FusionView extends AbstractView { use FusionViewI18nTrait; - use ContentRepositoryRegistryProvider; use NodeTypeWithFallbackProvider; + #[Flow\Inject] + protected ContentRepositoryRegistry $contentRepositoryRegistry; + /** * @Flow\Inject * @var SiteNodeUtility diff --git a/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php b/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php index 0e07cef55a4..3757f98c837 100644 --- a/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php +++ b/Neos.Neos/Classes/ViewHelpers/Backend/DocumentBreadcrumbPathViewHelper.php @@ -15,7 +15,6 @@ namespace Neos\Neos\ViewHelpers\Backend; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepositoryRegistry\Utility\ContentRepositoryRegistryProvider; use Neos\Flow\Annotations as Flow; use Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper; use Neos\Neos\Domain\Service\NodeTypeNameFactory; @@ -26,9 +25,11 @@ */ class DocumentBreadcrumbPathViewHelper extends AbstractViewHelper { - use ContentRepositoryRegistryProvider; use NodeTypeWithFallbackProvider; + #[Flow\Inject] + protected ContentRepositoryRegistry $contentRepositoryRegistry; + /** * @var boolean */ diff --git a/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php b/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php index f5ab5cfa033..4b80aad2419 100644 --- a/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php +++ b/Neos.Neos/Classes/ViewHelpers/Link/NodeViewHelper.php @@ -18,7 +18,6 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; -use Neos\ContentRepositoryRegistry\Utility\ContentRepositoryRegistryProvider; use Neos\Neos\Domain\Service\NodeTypeNameFactory; use Neos\Neos\FrontendRouting\NodeAddress; use Neos\Neos\FrontendRouting\NodeAddressFactory; @@ -127,9 +126,11 @@ class NodeViewHelper extends AbstractTagBasedViewHelper { use FusionContextTrait; - use ContentRepositoryRegistryProvider; use NodeTypeWithFallbackProvider; + #[Flow\Inject] + protected ContentRepositoryRegistry $contentRepositoryRegistry; + /** * @var string */