neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

task/followup-4520-nodeTypeManger

Open mhsdesign opened this issue 1 year ago • 1 comments

https://github.com/neos/neos-development-collection/pull/4520#issuecomment-1765831354

writing

$nodeTypeManager->getTetheredNodesConfigurationForNodeType($nodeTypeManager->getNodeType($nodeTypeName))

feels not right, the nodeTypeManger should just operate on NodeTypeNames ...but we can also allow NodeTypeInstances either way ... especially as we have a rector migration for this

Upgrade instructions

Review instructions

Checklist

  • [ ] Code follows the PSR-2 coding style
  • [ ] Tests have been created, run and adjusted as needed
  • [ ] The PR is created against the lowest maintained branch
  • [ ] Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • [ ] Reviewer - The first section explains the change briefly for change-logs
  • [ ] Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

mhsdesign avatar Feb 20 '24 16:02 mhsdesign

As alternative trick we can as well make these hardcore mehtods internal like who really understands isNodeTypeAllowedAsChildToTetheredNode ?? :D Usages are limited to Neos.Neos and FlowpackNodeTemplates

mhsdesign avatar Mar 16 '24 16:03 mhsdesign

Todo these rector migration would need to be adjusted so they dont pass the $nodeType to the methods, but $nodeType->name:

  • NodeTypeGetAutoCreatedChildNodesRector
  • NodeTypeGetTypeOfAutoCreatedChildNodeRector
  • NodeTypeAllowsGrandchildNodeTypeRector

mhsdesign avatar Apr 03 '24 19:04 mhsdesign

@bwaidelich as you also currently refactor the NodeTypeManager (https://github.com/neos/neos-development-collection/pull/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)

mhsdesign avatar Apr 23 '24 08:04 mhsdesign

do you think we should also incorporate this change

We'll have to since Node::nodeType will most probably be removed

bwaidelich avatar Apr 23 '24 08:04 bwaidelich