Closed mhsdesign closed 2 weeks ago
The nodetype is also still used in https://github.com/neos/neos-development-collection/blob/9.0/Neos.Neos/Tests/Functional/Fusion/NodeHelperTest.php#L93. I am not sure if this is relevant here, since the tests seem to run through? Could at least be worth looking at :)
Thanks for your throughout review @pKallert the NodeHelperTest
must be rewritten to behat at some point see comment:
Skipped. Either migrate to behat or find a better way to mock node read models. See https://github.com/neos/neos-development-collection/issues/4317
~Requires https://github.com/neos/neos-development-collection/pull/5020 in the long term~
With https://github.com/neos/neos-development-collection/pull/4466 the fallback NodeType handling was removed from the core NodeType manager and extracted to Neos. See the trait
NodeTypeWithFallbackProvider
. That required to make thenodeType
field nullable on the NodeType.This pr takes it a bit further by fully removing the attached NodeType schema from the Node. The Node attached
NodeType
was declared as deprecated with Neos9-Beta10.Resolves: #5019
Upgrade instructions
In Fusion accessing the
NodeType
via${node.nodeType}
wont work longer but one can leverage the helper${Neos.Node.getNodeType(node)}
to access the NodeType.To get the
NodeType
for aNode
in PHP, one can either use theNode::nodeTypeName
and ask theNeos\ContentRepository\Core\NodeType\NodeTypeManager::getNodeType
:For just accessing the string of the NodeType name you can consult the
Node
directly:Also note that
getNodeType
was made nullable by removing the default fallback. change To restore this behaviour you can use theNeos\Neos\Utility\NodeTypeWithFallbackProvider
trait which will return a NodeType instance for any Node considering the Fallback (theNeos.Neos:FallbackNode
) in case the requested NodeType was removed. Please note that this behaviour is discouraged in favour of using nullable NodeTypes:Review instructions
Followup
node.nodeType
viewhelper for fluid (see also https://github.com/neos/neos-development-collection/issues/5023) Rector migrations will be provided as part of https://github.com/neos/rector/issues/57Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions