Skip to content
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: implement Neos 9 compatibility #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

so-grimm
Copy link

@so-grimm so-grimm commented Jun 5, 2024

  • replace node.context.inBackend with renderingMode.isEdit
  • replace node.context.live with !renderingMode.isEdit
  • replace node.context.currentSite with Neos.Site.findBySiteNode(site)
  • replace Neos\ContentRepository\Domain\Model\Node with Neos\ContentRepository\Core\Projection\ContentGraph\Node

related: neos/Neos.DocsNeosIo#124

- replace `node.context.inBackend` with `renderingMode.isEdit`
- replace `node.context.live` with `!renderingMode.isEdit`
- replace `node.context.currentSite` with `Neos.Site.findBySiteNode(site)`
- replace `Neos\ContentRepository\Domain\Model\Node` with `Neos\ContentRepository\Core\Projection\ContentGraph\Node`
Copy link

@ahaeslich ahaeslich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by reading

Copy link

@dlubitz dlubitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you

@nezaniel
Copy link

nezaniel commented Jun 5, 2024

Hint: depending on where and how the nodes are fetched from, the type would be
Neos\ContentRepository\Core\Projection\ContentGraph\Nodes instead of array<...Node>

Copy link
Member

@jonnitto jonnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR

Could you also adjust the composer.json?

    "require": {
        "neos/neos": "^9",
        "carbon/eel": "^2.0"
    },

@ahaeslich
Copy link

Hint: depending on where and how the nodes are fetched from, the type would be
Neos\ContentRepository\Core\Projection\ContentGraph\Nodes instead of array<...Node>

@jonnitto do you have more context how preloadNodes and prerenderNodes might be fetched? We might need to change the proptype definition for those two because I think in most cases we probably get Neos\ContentRepository\Core\Projection\ContentGraph\Nodes. I can also check that in project code as I remember already stumbling upon this case a while ago.

Thx for the reminder @nezaniel.

@jonnitto
Copy link
Member

jonnitto commented Jun 6, 2024

@ahaeslich Is Neos\ContentRepository\Core\Projection\ContentGraph\Nodes loop-able with Neos.Fusion:Loop?

Or is there a way to convert Neos\ContentRepository\Core\Projection\ContentGraph\Nodes into an array with Nodes? Ad the Fusion:Loop uses ${Array.unique()} to make the nodes unique…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants