New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!!! TASK: Followup #4520 NodeTypeManager
should work on NodeTypeName
#4906
base: 9.0
Are you sure you want to change the base?
Conversation
As alternative trick we can as well make these hardcore mehtods internal like who really understands |
8dfe476
to
e224d4a
Compare
NodeTypeManager
should work on NodeTypeName
Todo these rector migration would need to be adjusted so they dont pass the
|
@bwaidelich as you also currently refactor the NodeTypeManager (#4999) ... do you think we should also incorporate this change (i yet have to fix ci but just want to know if its worth the effort) |
We'll have to since |
e224d4a
to
d14cc76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. I stumled over the method names. Should we change them as we changed the parameter from NodeType to NodeTypeName?
E.g:
isNodeTypeAllowedAsChildToTetheredNode =>isNodeTypeNameAllowedAsChildToTetheredNode
* @return bool true if the $nodeType is allowed as grandchild node, false otherwise. | ||
* @throws \InvalidArgumentException if the requested tethered node is not configured in the parent NodeType. Check via {@see NodeType::hasTetheredNode()}. | ||
*/ | ||
public function isNodeTypeAllowedAsChildToTetheredNode(NodeType $parentNodeType, NodeName $tetheredNodeName, NodeType $nodeType): bool | ||
public function isNodeTypeAllowedAsChildToTetheredNode(NodeTypeName $parentNodeTypeName, NodeName $tetheredNodeName, NodeTypeName $nodeTypeName): bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 3rd param should probably be rather $nodeTypeNameInQuestion
or sth
good point but i dont think so as the thing the user of the api tries to solve if a NodeType is allowed or not ... that the node type is identified via NodeTypeName can be left out in the method name i think. Another thing i just remembered is that we want to be rather forgiving (see #4954) so i dont know if all the new |
That doesn't make sense to me. Yes, we pass in a node name but this method is about the allowed node type |
#4520 (comment)
writing
feels not right, the nodeTypeManger should just operate on NodeTypeNames
(...but we can also allowNodeType
instances either way ...)Upgrade instructions
From 8.3
From 9.x-dev
Review instructions
Rector migrations will be provided as part of neos/rector#57
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions